ppt: apachecon presentation eu 2007
TRANSCRIPT
![Page 1: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/1.jpg)
Basic web application development with Apache Cocoon
Basic web application development with Apache Cocoon 2.1
Jasha Joachimsthal ([email protected])
Jeroen Reijn ([email protected])
4 May 2007
Amsterdam, The Netherlands
![Page 2: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/2.jpg)
Basic web application development with Apache Cocoon
Are you using Cocoon?
![Page 3: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/3.jpg)
Basic web application development with Apache Cocoon
Agenda
• What is Cocoon?• A bit of history• Cocoon basics• Demo• Why Cocoon?• Future of Cocoon• Q&A
![Page 4: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/4.jpg)
Basic web application development with Apache Cocoon
What is Cocoon all about?
• Web development framework• Java & XML• Separation of Concerns (SoC)• Content transformation• Dynamic multi-channel publishing• Inter-operability with other Java projects
(Lucene, FOP, Spring, Hibernate, etc.)
![Page 5: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/5.jpg)
Basic web application development with Apache Cocoon
History
• Cocoon 1– Started in Jan. 1999 by Stefano Mazzocchi– Simple servlet for XSL styling of XML
• Cocoon 2– Rewrite for performance and scalability– More than just XSL transformations
![Page 6: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/6.jpg)
Basic web application development with Apache Cocoon
Connectivity
Collect data from multiple resources• Filesystem• SOAP webservice• LDAP• Databases (XML, SQL, Object)• WebDAV• XML feed
If that's not enough, use your current code in Cocoon from• JSF• JSP
![Page 7: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/7.jpg)
Basic web application development with Apache Cocoon
Connectivity
![Page 8: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/8.jpg)
Basic web application development with Apache Cocoon
Cocoon basics
• Sitemap
• Forms framework
• Flow
• Caching
![Page 9: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/9.jpg)
Basic web application development with Apache Cocoon
Sitemap
• XML configuration file
• Request handling
• Where everything comes together
![Page 10: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/10.jpg)
Basic web application development with Apache Cocoon
Sitemap components
• Pipelines
• Matchers
• Generators
• Transformers
• Serializers
• Readers
<map:sitemap>
<map:components>
<map:pipes/> <map:matchers/> <map:generators/> <map:transformers/> <map:serializers/> <map:readers/>
</map:components>
</map:sitemap>
![Page 11: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/11.jpg)
Basic web application development with Apache Cocoon
Pipelines
• Contain matchers for (requested) URI
Example
![Page 12: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/12.jpg)
Basic web application development with Apache Cocoon
Pipeline example
<map:pipeline>
<map:match pattern="body-**.html">
<map:generate type="file" src="{1}.xml"/> <map:transform type="xslt" src="doc2html.xsl"/> <map:serialize type="html"/>
</map:match>
</map:pipeline>
![Page 13: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/13.jpg)
Basic web application development with Apache Cocoon
Cocoon Forms framework
• Create forms• Ajax / Dojo
• Model• Template• Binding (bean or xml)
![Page 14: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/14.jpg)
Basic web application development with Apache Cocoon
Go with the flow
• Continuations
• Rhino (Javascript)
• JavaFlow
![Page 15: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/15.jpg)
Basic web application development with Apache Cocoon
Caching
• Think about how you design your web application.
• Four kinds of caching
• Apache mod_cache
![Page 16: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/16.jpg)
Basic web application development with Apache Cocoon
Demo
• Let’s show some stuff!
![Page 17: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/17.jpg)
Basic web application development with Apache Cocoon
Why Cocoon?
• Powerful multi-channel publishing
• Inter-operability
• Active community– 20+ active committers (60+ overall)– 5500 mails on userlist in 2006– Annual GetTogether (100+ people)
![Page 18: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/18.jpg)
Basic web application development with Apache Cocoon
Future
• Cocoon 2.2– Dependency
management (M2)– Spring-based
framework– Modularity
• Cocoon 3?
![Page 19: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/19.jpg)
Basic web application development with Apache Cocoon
Resources
• Website:– http://cocoon.apache.org/
• Mailinglists:– [email protected]– [email protected]
• Wiki:– http://wiki.apache.org/cocoon/
![Page 20: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/20.jpg)
Basic web application development with Apache Cocoon
Q&A?
• Any questions?
![Page 21: PPT: ApacheCon presentation EU 2007](https://reader034.vdocuments.site/reader034/viewer/2022052700/558e29f41a28ab31048b45bd/html5/thumbnails/21.jpg)
Basic web application development with Apache Cocoon
Latest version
http://people.apache.org/~jreijn/apachecon.html
• Presentation• Demo sources