File: ymtd-implementation.html

package info (click to toggle)
velocity 1.4-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny
  • size: 17,900 kB
  • ctags: 9,916
  • sloc: java: 24,335; xml: 17,188; sh: 99; lisp: 53; makefile: 16
file content (314 lines) | stat: -rw-r--r-- 12,793 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!--
Copyright 1999-2004 The Apache Software Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->


<!-- Content Stylesheet for Site -->

        
<!-- start the processing -->
    <!-- ====================================================================== -->
    <!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
    <!-- Main Page Section -->
    <!-- ====================================================================== -->
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>

                                                    <meta name="author" value="Jon S. Stevens">
            <meta name="email" value="jon@latchkey.com">
            
           
                                    
                        
            <title>Velocity - You make the decision - Implementation</title>
        </head>

        <body bgcolor="#ffffff" text="#000000" link="#525D76">        
            <table border="0" width="100%" cellspacing="0">
                <!-- TOP IMAGE -->
                <tr>
                    <td align="left">
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
<a href="http://jakarta.apache.org/velocity/"><img src="../images/logo.gif" alt="Velocity" border="0"/></a>
</td>
                </tr>
            </table>
            <table border="0" width="100%" cellspacing="4">
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                
                <tr>
                    <!-- LEFT SIDE NAVIGATION -->
                    <td width="20%" valign="top" nowrap="true">
                    
    <!-- ============================================================ -->

                <p><strong>About</strong></p>
        <ul>
                    <li>    <a href="../index.html">Overview</a>
</li>
                    <li>    <a href="../getting-started.html">Getting Started</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/builds/jakarta-velocity/">Download</a>
</li>
                    <li>    <a href="../install.html">Install</a>
</li>
                    <li>    <a href="../design.html">Design</a>
</li>
                    <li>    <a href="../contributors.html">Contributors</a>
</li>
                    <li>    <a href="../changes.html">ChangeLog</a>
</li>
                    <li>    <a href="../code-standards.html">Coding Standards</a>
</li>
                    <li>    <a href="../license.html">License</a>
</li>
                    <li>    <a href="../todo.html">TODO</a>
</li>
                    <li>    <a href="http://issues.apache.org/bugzilla/enter_bug.cgi?product=Velocity">Report Issues</a>
</li>
                </ul>
            <p><strong>Community</strong></p>
        <ul>
                    <li>    <a href="../powered.html">Powered By Velocity</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
                    <li>    <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
</li>
                </ul>
            <p><strong>Docs</strong></p>
        <ul>
                    <li>    <a href="../user-guide.html">User's Guide (English)</a>
</li>
                    <li>    <a href="../user-guide_fi.html">User's Guide (Finnish)</a>
</li>
                    <li>    <a href="../user-guide_fr.html">User's Guide (French)</a>
</li>
                    <li>    <a href="../user-guide_es.html">User's Guide (Spanish)</a>
</li>
                    <li>    <a href="../developer-guide.html">Developer's Guide</a>
</li>
                    <li>    <a href="../vtl-reference-guide.html">VTL Reference Guide</a>
</li>
                    <li>    <a href="../specification.html">Specification</a>
</li>
                    <li>    <a href="../api/index.html">Javadoc</a>
</li>
                </ul>
            <p><strong>Tools</strong></p>
        <ul>
                    <li>    <a href="../tools/index.html">Velocity Tools</a>
</li>
                    <li>    <a href="../anakia.html">Anakia : XML->doc tool</a>
</li>
                    <li>    <a href="../texen.html">Texen : text generation</a>
</li>
                    <li>    <a href="../dvsl/index.html">DVSL : XML xformation</a>
</li>
                    <li>    <a href="../veltag.html">Veltag : JSP taglib</a>
</li>
                    <li>    <a href="../migration.html">Migration to Velocity</a>
</li>
                    <li>    <a href="../devtools.html">Editors and IDEs</a>
</li>
                </ul>
            <p><strong>Comparisons</strong></p>
        <ul>
                    <li>    <a href="../ymtd/ymtd.html">YMTD</a>
</li>
                    <li>    <a href="../differences.html">VM/WM Differences</a>
</li>
                    <li>    <a href="../casestudy1.html">JSP vs. Velocity</a>
</li>
                    <li>    <a href="../casestudy2.html">XMLC vs. Velocity</a>
</li>
                </ul>
            <p><strong>Site Translations</strong></p>
        <ul>
                    <li>    <a href="http://jakarta.apache.org/velocity/">English</a>
</li>
                    <li>    <a href="http://www.ingrid.org/jajakarta/velocity/velocity-1.2-rc2/docs-ja/index.html">Japanese</a>
</li>
                </ul>
                        </td>
                    <td width="80%" align="left" valign="top">
                                                                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#525D76">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="Implementation"><strong>Implementation</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                        <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#828DA6">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="The first point: Standards"><strong>The first point: Standards</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
One of the touted advantages of JSP is that it is a "standard" and quite
a few people like to hold this in high regard. So much so that they
refuse to use any technology that is not "standard." Digging into the
reality of this statement reveals that the important correct terminology
is that JSP is a "Sun Standard Specification" and not strictly a
"standard." This is important because JSP is really no more "standard"
than Microsoft ASP or the PHP Group's PHP product. In other words,
whatever tool you happen to be using becomes the "standard."
</p>
                                                <p>
A small group within the Java Community Process (JCP) defines what JSP
is. The fact of the matter is that there is a fairly high barrier to
joining the JCP because an NDA must be signed, the project leads must
approve your entry and in some cases a fee must be paid. One could even
stretch as far as to say that the JSP specification is really a
proprietary product of Sun!
</p>
                                                <p>
It is important to note at this point that the primary author of this
document (Jon Stevens) is a member of the JSR-053 which defines the
Servlet and JSP specification's.
</p>
                                                <p>
Inside JSR-053, it is clear that not everything is done in the open and
decisions are made behind closed doors. Of course the participants could
object, but Sun still is the binding force behind the decisions.
</p>
                            </blockquote>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#828DA6">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="The next point: Complexity"><strong>The next point: Complexity</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
JSP is both a specification as well as an implementation. There are
various corporations (as well as Open Source) implementations of the
specification. The JSP specification is not a particularly easy thing to
implement. There are many complex systems involved, some of which even
require special hooks into the Servlet Engine in order to obtain optimal
performance.
</p>
                                                <p>
The JSP specification is relatively new (it is still in a 1.x phase).
This means that the specification also has several places in it that are
not as well defined as others, leaving some of the specific details to
be determined by the implementation. Not only does this mean that there
is plenty of places to make mistakes, but it also means that JSP
template code has the possibility of not behaving the same across
implementations. This makes testing JSP based applications across
several different containers a nightmare. Especially if there are
essoteric bugs (meaning bugs that only show up under extreme conditions)
in one and not in the other.
</p>
                                                <p>
Part of the founding reason for creating the Jakarta Project and having
Sun release the source code to Jasper (the JSP reference implementation)
is to encourage vendors to adopt a single base for their source code.
Unfortunately, this has not happened. There is compatibility testing
suites available, however there is no policy in place requiring vendors
to pass the tests. Nor is there a place that shows vendors who do not
pass the tests in order to publicly humiliate them into submission.
</p>
                            </blockquote>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                    <table border="0" cellspacing="0" cellpadding="2" width="100%">
      <tr><td bgcolor="#828DA6">
        <font color="#ffffff" face="arial,helvetica,sanserif">
          <a name="The final point: Velocity"><strong>The final point: Velocity</strong></a>
        </font>
      </td></tr>
      <tr><td>
        <blockquote>
                                    <p>
The definition of what Velocity is is set forth by the developers on the
project. They have created a comprehensive testing suite that is used
for regression testing to ensure that all changes to Velocity will not
break existing templates. If you or your company ever wants to join the
development of Velocity and help determine its direction that can be
done easily by simply joining a mailing list and contributing to the
development effort. This means that no one corporation will ever own the
Velocity specification and it also means that Velocity will always work
with your templates within any servlet engine.
</p>
                            </blockquote>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                                <p>
You make the decision.
</p>
                                                <p>
<strong>[ <a href="ymtd-embedded.html">Embedded Usage</a> &lt;- Previous | 
    Next -&gt; <a href="./ymtd-hosting.html">Hosting</a> ]
</strong></p>
                            </blockquote>
        </p>
      </td></tr>
      <tr><td><br/></td></tr>
    </table>
                                        </td>
                </tr>

                <!-- FOOTER -->
                <tr><td colspan="2">
                    <hr noshade="" size="1"/>
                </td></tr>
                <tr><td colspan="2">
                    <div align="center"><font color="#525D76" size="-1"><em>
                    Copyright &#169; 1999-2004, The Apache Software Foundation
                    </em></font></div>
                </td></tr>
            </table>
        </body>
    </html>
<!-- end the processing -->