File: design.xml

package info (click to toggle)
velocity 1.3.1-2
  • links: PTS
  • area: contrib
  • in suites: sarge
  • size: 4,164 kB
  • ctags: 2,922
  • sloc: java: 24,134; xml: 16,911; sh: 99; lisp: 53; makefile: 45
file content (83 lines) | stat: -rw-r--r-- 3,304 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?xml version="1.0"?>

<document>

 <properties>
  <title>Velocity Design</title>
  <author email="jvanzyl@zenplex.com">Velocity Documentation Team</author>
 </properties>

 <body>

 <section name="Design">

 <p>
    Velocity is a Java-based template engine. It can be used as a
    standalone utility for generating source code, HTML, reports,
    or it can be combined with other systems to provide template
    services. Velocity will be tightly integrated with the
    <a href="http://java.apache.org/turbine">Turbine</a>
    web application framework. Velocity-Turbine
    provide a template service by which web applications may be
    developed according to a true MVC model.
 </p>

 <p>
    Velocity has a myriad of potential uses -- generating SQL, PostScript,
    or Java source code from templates -- but web developers looking for
    a viable alternative to
    <a href="http://www.php.net/">PHP</a> and
    <a href="http://java.sun.com/products/jsp/">Java
    Server Pages</a> (JSPs) are expected to be its principle user group.
 </p>

 <p>
    Velocity allows web page designers to embed simple yet powerful script
    elements in their web pages. These script elements work
    in conjunction with a Context object, which is defined in Java code.
    A context object--essentially a hashtable that provides get and set
    methods for retrieving and setting objects by name within the Context
    --provides a &quot;hook&quot; from the Java code to the Velocity script
    elements. These script elements allow a web designer to retrieve
    objects from the Context and insert these into a web page as text
    values. The web designer has some control over looping (for each)
    and conditional statements (if/else).
 </p>

 <p>
    Velocity enforces a Model-View-Controller (MVC) style of development
    by separating Java code from HTML template code. Unlike JSPs,
    Velocity does not allow Java code to be embedded in pages. Unlike PHP,
    Velocity does not implement features with other functions. The MVC
    approach is one of Velocity's great strengths, and allows for more
    maintainable and better-designed web pages.
 </p>

 <p>
    Although MVC-style development can sometimes lead to longer incubation
    periods for web sites, particularly if the developers involved are new
    to MVC, this approach saves time over the long term (believe us, we have
    been doing this for a long time now). The MVC abstraction prevents web page
    designers from messing with a software engineer's Java code, and
    programmers from unduly influencing the look of web sites. Velocity enforces
    a contract that defines what roles people play in the web site development
    process.
 </p>

 <p>
    Velocity uses a grammar-based parser generated by
    <a href="http://www.metamata.com/javacc/">JavaCC</a> (Java Compiler
    Compiler) using the JJTree extension to create an Abstract Syntax Tree.
 </p>

 <p>
    Velocity's design concept is borrowed from <a
    href="http://www.webmacro.org/">WebMacro</a>. Those involved in the
    Velocity project acknowledge and appreciate the development and design work
    that went into the WebMacro project.
 </p>

</section>

</body>
</document>