File: slides.xml

package info (click to toggle)
cocoon2 20010420-1
  • links: PTS
  • area: contrib
  • in suites: woody
  • size: 15,864 kB
  • ctags: 3,013
  • sloc: java: 18,267; xml: 7,879; sh: 86; makefile: 64; sql: 16; python: 16
file content (431 lines) | stat: -rw-r--r-- 11,760 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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
<?xml version="1.0"?>

<slides>
  <title>Adding XML Capabilities with Cocoon</title>

  <authors>
   <person>
    <name>Stefano Mazzocchi</name>
    <email>stefano@apache.org</email>
   </person>
  </authors>

  <event>
   <name>ApacheCon 2000</name>
   <date>March 9, 2000</date>
   <time>7:30PM - 9:00PM</time>
   <location>Caribe Royale Resort Suites &amp; Villas. Orlando, Florida, U.S.A.</location>
  </event>

  <overview>
   This session will show how to install, set up, and work with the Cocoon XML
   publishing framework. The session will not cover XML technical details but
   will show detailed examples on Cocoon power and details on future development.
  </overview>

  <section>
   <title>Introduction</title>
   <subtitle>let's see if this is any good for me</subtitle>

   <slide>
    <title>Who am I?</title>
    <ul>
     <li>My name is <strong>Stefano Mazzocchi</strong></li>
     <li>Pronounced: <em>Stephan-O Madzock-key</em></li>
     <li>I'm italian</li>
     <li>I'm a student</li>
     <li>I'm Cocoon's author and main architect</li>
    </ul>
   </slide>

   <slide>
    <title>Ok, but what is Cocoon?</title>
    <ul>
     <li>A publishing framework</li>
     <li>A document generator</li>
     <li>A small revolution</li>
    </ul>
   </slide>

   <slide>
    <title>Publishing framework?</title>
    <ul>
     <li>something that helps you publishing your stuff on the web</li>
     <li>something that should impose strict yet flexible practices</li>
     <li>something that should allow you to reduce your costs</li>
    </ul>
   </slide>

   <slide>
    <title>Costs? What costs?</title>
    <ul>
     <li>management costs</li>
     <li>friction between human resources</li>
     <li>costs of adapting to new needs</li>
     <li>scalability costs</li>
    </ul>
   </slide>

   <slide>
    <title>The Cocoon Idea</title>
    <quote>
     The Cocoon project aims to change the way web information is created, 
     rendered and served.
    </quote>
    <quote>
     This new paradigm is based on fact that document content, style and
     logic are often created by different individuals or working groups.
    </quote>
    <quote>
     Cocoon aims to a complete separation of the three layers, allowing the 
     three layers to be independently designed, created and managed, reducing 
     management overhead, increasing work reuse and reducing time to market.
    </quote>
   </slide>

   <slide>
    <title>The XML Model</title>
    <p>Cocoon is an XML publishing framework.</p>
    <p>Key technolgies are:</p>
    <ul>
     <li>XML</li>
     <li>XML Namespaces</li>
     <li>XSLT</li>
     <li>XPath</li>
    </ul>
   </slide>

   <slide>
    <title>Supported Publishing Formats</title>
    <ul>
     <li>HTML+CSS</li>
     <li>XSL(FO)</li>
     <li>SVG</li>
     <li>WML</li>
     <li>VoxML</li>
     <li>VRML</li>
     <li>... you name it!</li>
    </ul>
   </slide>
   
   <slide>
    <title>What do you mean?</title>
    <p>I mean that Cocoon is able to <em>publish</em> your data in any of
    the above formats depending on user parameters or user devices.</p>
    <p>All coming from a single file.</p>
    <p>And easily extensible to any other format thru the use of a highly
    modular architecture.</p>
   </slide>
    
   <slide>
    <title>Hard to believe?</title>
    <p><fork uri="../welcome">Let's take the tour.</fork></p>
   </slide>
  </section>

  <section>
   <title>Installation</title>
   <subtitle>How to show your boss it was worth spending all that money for ApacheCon!</subtitle>

   <slide>
    <title>Cocoon Requirement</title>
    <p>To install Cocoon you need:</p>
    <ul>
     <li>a Java 1.1 compatible virtual machine</li>
     <li>a web server equipped with a Java Servlet API 2.x compliant servet engine</li>
    </ul>
   </slide>
   
   <slide>
    <title>Why Java?</title>
    <ul>
     <li>Portability</li>
     <li>Strong OO features (interfaces)</li>
     <li>Availability of XML components</li>
     <li>Dynamic Linking capabilities</li>
    </ul>
   </slide>

   <slide>
    <title>Why a servlet?</title>
    <ul>
     <li>again, portability</li>
     <li>ease of use</li>
     <li>natural choice with Java for the web</li>
    </ul>
   </slide>
   
   <slide>
    <title>Why not Servlet 2.2 or Java 1.2?</title>
    <p>guess what? portability!</p>
    <ul>
     <li>no 2.2 replacement for JServ available (yet! Tomcat is coming!)</li>
     <li>no JDK 1.2 port on every platform (even if Linux support is finally out!)</li>
    </ul>
   </slide>
   
   <slide>
    <title>How do I install it on my servlet engine?</title>
    <p>I probably don't know!</p>
    <p>I develop on Apache stuff and know almost nothing about other servlet engines.</p>
    <p>Even if Cocoon has been reported to work on all known ones, both commercial and free.</p>
    <p>Anyway, you find detailed instructions for both <em>JServ</em> and <em>Tomcat</em> in
      the handout and more up-to-date information on the web site.</p>
   </slide>
  </section>

  <section>
   <title>Cocoon Internals</title>
   <subtitle>getting a better picture</subtitle>

   <slide>
    <title>Cocoon General Vision</title>
    <figure src="slides/schema.jpg"/>
   </slide>
   
   <slide>
    <title>The Content Generation Model</title>
    <ul>
     <li>producers: generate XML content</li>
     <li>processors: process XML content</li>
     <li>formatters: format XML into a stream representation</li>
    </ul>
   </slide>

   <slide>
    <title>Producer (generator)</title>
    <ul>
     <li>adapts the outside world to XML</li>
     <li>produces <em>structured</em> information (now DOM, later SAX)</li>
     <li>a parser is a producer</li>
     <li>not all producers are parsers</li>
     <li>producers are the XML equivalent of Servlets</li>
    </ul>
   </slide>

   <slide>
    <title>Processor (filter)</title>
    <ul>
     <li>process the structured content that comes in</li>
     <li>creates structured content</li>
     <li>examples: XSLT processor, SQL processor, LDAP processor</li>
     <li>there is not such </li>
     <li>Cocoon proocessors are the XML equivalent of Servlet Chaining</li>
    </ul>
   </slide>

   <slide>
    <title>Formatter (serializer)</title>
    <ul>
     <li>creates the final stream</li>
     <li>examples: FOP (fo-&gt;PDF), SVG serializer</li>
    </ul>
   </slide>
  </section>

  <section>
   <title>Dynamic Content</title>
   <subtitle>let's do useful stuff</subtitle>

   <slide>
    <title>Logic-Content Integration</title>
    <p>Possible alternatives are (for java):</p>
    <ul>
     <li>JSP</li>
     <li>WebMacro</li>
     <li>GSP</li>
    </ul>     
   </slide>

   <slide>
    <title>Logic-Content Integration</title>
    <p>Needs:</p>
    <ul>
     <li>logic and content reside on different files</li>
     <li>reuse of logic on different documents</li>
     <li>performance</li>
     <li>programming language abstraction</li>
     <li>output abstraction</li>
    </ul>     
   </slide>

   <slide>
    <title>The problems of JSP</title>
    <ul>
     <li>logic has direct access to output</li>
     <li>output is always streamed</li>
     <li>not really designed for language abstraction</li>
    </ul>     
   </slide>

   <slide>
    <title>Our solution: XSP</title>
    <ul>
     <li>logic has <strong>not</strong> direct access to output</li>
     <li>output is <strong>never</strong> streamed</li>
     <li>designed for language abstraction</li>
    </ul>     
   </slide>

   <slide>
    <title>What does it look like?</title>
    <source><![CDATA[
<xsp:page>
 <page>
  <p>Current time is <xsp:expr>new Date()</xsp:expr></p>
 </page>
</xsp:page>
    ]]></source>     
   </slide>

   <slide>
    <title>How does it work?</title>
    <ul>
     <li>the XSP page is transformed into source code</li>
     <li>the source code is compiled</li>
     <li>the binary is executed at runtime</li>
     <li>basically like any other server pages technology</li>
    </ul>
   </slide>

   <slide>
    <title>Ok, so what's the point?</title>
    <ul>
     <li>you don't have access to the output stream!</li>
    </ul>
   </slide>

   <slide>
    <title>But still, this is mixing content and logic!</title>
    <p>Ok, look at this:</p>
    
    <source><![CDATA[
<xsp:page>
 <page>
  <p>Current time is <util:date/></p>
 </page>
</xsp:page>
    ]]></source>
    
    <p>then you let Cocoon transform this with</p>

    <source><![CDATA[
<xsl:template match="util:date">
 <xsp:expr>new Data()</xsp:expr>
</xsl:template>
    ]]></source>
   </slide>

   <slide>
    <title>Possible different scenarios</title>
    <ul>
     <li><link uri="../view-source?filename=/docs/samples/slides/page.xml">integrated xsp tags</link></li>
     <li><link uri="../view-source?filename=/docs/samples/slides/clean-page.xml">custom tags transformed by your stylesheets</link></li>
     <li><link uri="../view-source?filename=/docs/samples/slides/lib-page.xml">use of cocoon taglibs</link></li>
    </ul>
   </slide>

   <slide>
    <title>Other dynamic possibilities</title>
    <ul>
     <li><link uri="../view-source?filename=/docs/samples/slides/database-page.xml">SQLProcessor</link></li>
     <li><link uri="../view-source?filename=/docs/samples/slides/ldap.xml">LDAPProcessor</link></li>
     <li>... add yours</li>
    </ul>
   </slide>

   <slide>
    <title>Moving this into taglibs: why?</title>
    <ul>
     <li>performance</li>
     <li>integration</li>
     <li>portability</li>
     <li>standardization</li>
    </ul>
   </slide>

   <slide>
    <title>Still not powerful enough?</title>
    <p>Write your own:</p>
    <ul>
     <li>producer: to create from-java dynamic content</li>
     <li>processor: to process some XML in some complex ways</li>
     <li>formatter: to format an XML file to some binary formats</li>
    </ul>
   </slide>
  </section>

  <section>
   <title>Future Development: Cocoon2</title>
   <subtitle>improving the bleeding edge</subtitle>

   <slide>
    <title>Main Differences</title>
    <ul>
     <li>event driven architecture</li>
     <li>improved overall structure</li>
     <li>complete separation of contexts</li>
     <li>better batch support</li>
    </ul>
   </slide>

   <slide>
    <title>Main Benefits</title>
    <ul>
     <li>lower per-request memory consumption</li>
     <li>globally faster</li>
     <li>increased perceived performance</li>
     <li>enhanced modularity</li>
    </ul>
   </slide>

   <slide>
    <title>Main Drawbacks</title>
    <ul>
     <li>steeper learning curve (due to the sitemap)</li>
     <li>module back incompatibility</li>
    </ul>
   </slide>

   <slide>
    <title>The Cocoon pyramid of contracts</title>
    <figure src="slides/pyramid-model.gif"/>
   </slide>
  </section>

  <section>
   <title>Final Info</title>
   <subtitle>where to find out more</subtitle>
   
   <slide>
    <title>Where do I get more info?</title>
    <ul>
     <li>Cocoon: <fork uri="http://xml.apache.org/cocoon"><strong>http://xml.apache.org/cocoon</strong></fork></li>
     <li>XML and related info: <fork uri="http://www.xmlinfo.com"><strong>http://www.xmlinfo.com</strong></fork></li>
     <li>XML and related specs: <fork uri="http://www.w3c.org"><strong>http://www.w3c.org</strong></fork></li>
    </ul>
   </slide>

   <slide>
    <title>The Cocoon Project</title>
    <p>Active Developers (in alphabetical order):</p>
    <ul>
     <li>Donald Ball</li>
     <li>Pierpaolo Fumagalli</li>
     <li>Stefano Mazzocchi</li>
     <li>Giacomo Pati</li>
     <li>Ricardo Rocha</li>
    </ul>
   </slide>

   <slide>
    <title>Thank you!</title>
    <p>Ok, I'm preparing the asbesto suite for the Q/A! :-)</p>
   </slide>
  </section>

  <legal>
   Copyright (c) 2000 Apache Software Foundation.
  </legal>

</slides>