Java Open Source Training


Published on

This is a slide deck from JavaOne by Intertech.

Published in: Technology, Education
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Java Open Source Training

  1. 1. Java Open Source Development<br />Intertech<br />March, 2006<br />
  2. 2. Open Source (& Java Open Source) is Big<br />There are over 110,000 open source projects today!<br />There are about 20,000 Java open source projects!<br />Nov 2004 report suggests 67% of all companies use open source products.<br />With an 16% additional expected to join in 2005.1<br />Sept 2003 reports suggests 41% of application development tools are open source.2<br />It&apos;s Big<br />1 -<br />2 -<br />
  3. 3. Our Objectives<br />This dialogue is an exploration of some of the more popular Java open source products/tools.<br />With some 20K projects to choose from, we can’t look at them all.<br />Give you a broad picture of Java open source landscape.<br />Give you some options to explore for your own projects.<br />Give you resources for more information/exploration.<br />
  4. 4. This is an Exchange – not a Lecture<br />Did we mention this was a dialogue?<br />We welcome and encourage audience participation.<br />What open source products/tools have you encountered?<br />What worked well for you?<br />What blew chunks?<br />What else would you include in our survey?<br />Impromptu show-of-hands surveys should also help give you and idea of popular products in this area. <br />
  5. 5. Open Source Categorization<br />To assist in our examination, we break Java open source projects up into several categories.<br />User interface/Web frameworks<br />Middleware and integration products<br />Persistence frameworks<br />Design and development tools<br />Testing tools and frameworks<br />Support/Maintenance tools<br />Miscellaneous products<br />Some products/tools cut across several categories.<br />
  6. 6.
  7. 7. Product/Tool Examination<br />What is the product/tool’s purpose?<br />How long has it been in existence?<br />Benefits/Issues<br />Commercial counterparts/competitors<br />If they exist<br />Where “popular” competing projects exist<br />Compare and contrast<br />Project’s future<br />We have left off Sun’s reference implementations.<br />We assume everyone knows how to examine/get these.<br />In many cases, these maybe your best option.<br />
  8. 8. An Open Source Drive-By Tour<br />With the time we have, we only have time to mention products.<br />Explore their general use/purpose.<br />This is not a detail dive into the products.<br />Unfortunately work left for you.<br />
  9. 9. Defining “Popular”<br />We couldn’t possibly hit all the projects.<br />We focus on popular tools/products<br />Popular = widely used and active<br />We also measure “popular” by:<br />Ownership – who is in charge of the project now.<br />Current Web site – and its last update.<br />Documentation – quantity and quality.<br />Setup/download – ease of getting/setting up the product/tool<br />Forum/blog/news groups – what others are saying and how often (especially for support)<br />
  10. 10. User Interface & Web Frameworks<br />MyFaces (JSF)<br />Struts<br />Tiles<br />WebWork<br />Cocoon<br />Spring<br />Tapestry<br />jCharts<br />jFreeChart<br />JasperReports<br />jFreeReports<br />TagLibs (JSTL)<br />Lucene<br />Xalan<br />
  11. 11. MVC Frameworks<br />Purpose of Struts and JSF: application frameworks for building Web applications<br />Struts – the old stand-by<br /><br />Launched in 2000<br />Creator same as JSF (Craig McClanahan – now with Sun)<br />JSF – the new stand-by<br />MyFaces – Apache implementation of JSF<br /><br />Launched 2005 (JSF launched in 2004)<br />Many of the frameworks can be weaved together.<br />
  12. 12. Struts<br />Field validation<br />Locale/internationalization support<br />Plenty of extensions.<br />Tiles framework for sophisticated layout management<br />WebWork now folded into Struts Action Framework<br />
  13. 13. MyFaces (JSF)<br />Implementation of Sun standard<br />JEE 5.0 containers must provide an implementation of JSF<br />First free implementation of JSF<br />Focus on View of MVC (more “fat client” like).<br />JSF  Struts + Swing<br />Rich component model with event handling and component rendering<br />JSF components handle the purely visually-oriented HTTP requests (example – clicking on a tree control).<br />Business events go through the standard Struts-request-processing lifecycle (example – add this to my cart).<br />
  14. 14. Struts vs. JSF<br />McClanahan&apos;s Weblog<br /><br />Bottom-line<br />Struts users - think about migrating slowly to JSF<br />New projects – think JSF<br />The two can co-exist<br />Unless unusual needs exist<br />
  15. 15. Cocoon<br />An XML publishing framework.<br />Based on Servlets.<br />Manipulate the presentation layer using XSLT<br />Includes a technology called &quot;XSP&quot; for Extensible Server Pages.<br />Focus on separation of concerns<br />Uses concept of component “pipelines” to process requests<br /><br />Around since 1999<br />Version 2.0 recently released<br />
  16. 16. Cocoon Pipelines<br />
  17. 17. Tapestry<br />Also a Java MVC Web application framework.<br />Builds on the standard Java Servlet API<br />Its ability to blend into a standard HTML markup is its distinguishing and most valuable feature<br />Doesn’t use JSPs<br />Tapestry “templates” are regular HTML, decorated with Tapestry attributes<br />Inspired JSF Facelets<br /><br />Started in 2000<br />Just release version 4<br />Good comparison of JSF to Tapestry at:<br /><br />
  18. 18. Spring Application Framework<br />A comprehensive, layered Java/J2EE application framework<br /><br />Started 2003<br />Version 2 soon to be released<br />Features<br />A complete lightweight container<br />Aspect oriented framework<br />Assembly of loosely-coupled POJOs<br />A common abstraction layer for transaction management.<br />A JDBC abstraction layer that can be integrated to/use Toplink, Hibernate, JDO, etc.<br />Flexible/extensible app framework<br />SpringMVC  Struts++<br />
  19. 19. Spring Framework<br />
  20. 20. Java Charting tools<br />Dozens of options<br />Many open source options at<br />Commercial competitors include: JClass, EspressChart, ChartFX, and many more…<br />jFreeChart<br /><br />First released in 2000<br />Krysalis jCharts<br /><br />First released in 2000<br />
  21. 21. Java Reporting tools<br />Dozens of options<br />Many open source options at<br />Commercial competitors include: Formula One, JReport, and many more…<br />JasperReports<br /><br /><br />“Most popular embeddable open source reporting library” <br />JFreeReport<br /><br />Introduced in 2002<br />
  22. 22. TagLibs<br />Is an “open source repository for JSP custom taglibraries and associated projects.”<br /><br />Includes the reference implementation of the Java Server Pages Standard Tag Library (JSTL) <br />Includes<br />JCP Standardized Tag Libraries (JSTL) a collection of tag libraries that cover conditionals, iterators, accessing URL resources, internationalization and text formatting, database access (SQL), and XML processing. <br />Custom Tag Library Extensions (CTLX) are extensions for popular web publishing tools<br />
  23. 23. Lucene<br />A high performant, scalable and full-featured text search engine library.<br />Allowing you to add indexing and searching capabilities to your apps.<br /><br />Many well known web sites use Lucene (including Wikipedia, FedEx,, etc.)<br />Around since ’97/’98<br />First open source release in 2000<br />There are competing products<br />Not all Java<br />Not as well used.<br />Also behemoths like Google, Yahoo, etc. in this arena.<br />
  24. 24. Xalan Java (Xalan-J)<br />An XSLT processor for transforming XML documents into HTML, text, or other XML document types.<br />Implements XSL Transformations (XSLT) Version 1.0 <br />Implement XML Path Language (XPath) Version 1.0 <br />Implements JAXP 1.3<br />Builds on SAX 2 and DOM level 3 parsers<br />Can be used from the command line, in an applet or a servlet, or as a module in other program.<br /><br />Actually two versions of Xalan (Java and C++)<br />Used to be part of the Apache XML Project<br />Alternate: Saxon<br />
  25. 25. Middleware & Integration Products<br />JBoss<br />JOnAS<br />Enhydra<br />Tomcat<br />Jetty<br />Resin<br />James<br />Axis<br />Xerces<br />OpenJMS<br />MantaRay<br />ActiveMQ<br />JORAM<br />
  26. 26. Application Servers<br />Full J2EE Stack containers <br />Supporting servlets, EJBs, JMS, JCA, etc.<br />JBoss ( – claims to be the #1 Java app server on the market)<br />JOnAS (<br />Enhydra Enterprise (<br />Apache Geronimo ( - just released version 1.0)<br />GlassFish – Sun’s open source EE app server (<br />WebSphere and WebLogic are biggest commercial competition<br />Oracle a somewhat distant third.<br />“During the next two years, open source application servers will gain share in the J2EE market, forcing further vendor consolidation“ – says the Meta Group1<br />1<br />
  27. 27. App Server (cont.)<br />Servlet/JSP/Web containers<br />Tomcat (<br />Jetty (<br />Resin ( - has some EJB functionality)<br />See Server Side’s App Server Matrix<br /><br />
  28. 28. James<br />James is a SMTP and POP3 Mail server and NNTP News server.<br />Also provides a Java mail API for use in applications<br />Lets you write Java code email processor – called mailets.<br />Mailets can generate an automatic reply, update a database, prevent spam, build a message archive, etc.<br />Rumor has it future releases may support instant messaging.<br /><br />James is based upon the Apache Avalon application framework.<br />
  29. 29. Axis - SOAP Toolkit<br />Axis is a tool kit for working with SOAP and WSDL<br />SOAP and WSDL are the backbone XML documents in Web services.<br />Axis shields developers from the details of dealing with SOAP and WSDL<br />Axis is the most popular implementation of JAX-RPC.<br /><br />Few real alternatives, but are some add-ons<br />See<br />
  30. 30. Xerces Java (Xerces-J)<br />An XML parser.<br />Fully conforming XML Schema processor<br />Supports SAX 2<br />Supports DOM level 3 and 2<br /><br />Actually two versions of Xerces (Java and C++ - also have a Perl wrapper version)<br />Used to be part of the Apache XML Project<br />Alternate: many<br />See<br />
  31. 31. JMS Implementations<br />There are several open source Java Message Service API implementations.<br />OpenJMS<br />ActiveMQ<br />JORAM<br />Mantray<br />See<br />Full J2EE servers also support JMS.<br />Open source ESBs – still emerging<br />ServiceMix (ActiveMQ producer)<br />OpenESB (<br />Celtix ( – Iona and ObjectWeb)<br />
  32. 32. Persistence & Persistence Frameworks<br />Hibernate<br />Castor<br />ObjectRelationalBridge(JDO)<br />DBCP<br />HypersonicSQL<br />MySQL<br />
  33. 33. Hibernate<br />Attempts to be “non-intrusive” persistence solution.<br />A lightweight object/relational mapping service.<br />Using POJO’s and Java reflection<br />Isolating mapping and SQL in XML configuration files<br />Provides several means to access data including Hibernate’s own HQL<br /><br />Hibernate 3 now available<br />The foundation of entity beans (EJB) in EJB 3.0<br />Started in 2001<br />Winner of Software Development Jolt award<br />
  34. 34. Castor<br />Provides Java-to-XML binding and Java-to-SQL persistence. <br />Two products: Castor XML and Castor JDO<br />JDO similarities but not compliant with Sun’s JDO spec.<br />SQL statements are automatically generated for loading, updating, creating and deleting.<br />Uses subset of ODMG&apos;s query language<br /><br />
  35. 35. ObJectRelationalBridge - OJB (JDO)<br />JDO (Java Data Objects) is a Java specification<br /><br />Finalized in 2002<br />Transparent persistence framework accomplished through byte code enhancement (which some don’t like).<br />Spec does not dictate the type of data store (relational or object-oriented databases).<br />Spec does not address object to relational mapping (mapping files will not be portable)<br />OJB is an open source JDO implementation<br /><br />Many open source and commercial implementations of JDO<br />KodoJDO is leading commercial implementation.<br />See<br />
  36. 36. Comparing Persistent Frameworks<br />Options<br />Roll-your-own with JDBC/POJOs<br />OR mappers á la TopLink, CocoBase<br />Hibernate<br />JDO implementations<br />EJBs<br />Other open source options (Castor, iBATIS)<br />Bruce Tate and others have given several talks<br /> (although some comments are outdated)<br />Outlining pros/cons of each<br />
  37. 37. DBCP<br />Part of the Apache commons project (more in a bit)<br />Provides database connection pooling services<br />Tomcat and James use DBCP<br /><br />There are several connection pool utilities.<br />Most servers have them built in.<br />
  38. 38. Hypersonic SQL (HSQLDB)<br />Hypersonic SQL is full relational database engine.<br />Written in Java<br />Provides a JDBC driver<br />Supports a large subset of ANSI-92 SQL<br />PolePosition is a benchmark test suite to compare database engines and object-relational mapping technology. <br />Found HSQLDB/JDBC to be one of the more performant open source DBs (<br />Offered as optional/free database server for many commercial products<br />Example: Systinet Registry<br /><br />There are a number of Java open source RDBMS.<br />Of course, MySQL, though not Java, is the world&apos;s most popular open source database<br />
  39. 39. Design and Development Tools<br />Eclipse<br />NetBeans<br />jEdit<br />Java CVS Client<br />SQuirreL<br />ArgoUML<br />JLint<br />Velocity<br />Jalopy<br />ProGuard<br />Ant<br />AntHill<br />Commons<br />XDoclet<br />Maven we save for later.<br />
  40. 40. IDEs and Editors<br />IDEs – many to choose from; few widely used<br />Eclipse (<br />NetBeans (<br />Significant commercial competitors (WSAD, IntelliJ, JBuilder,..)<br />Java Editors – many to choose from<br />jEdit – (<br />TextPad ( - not Java) – also provides Java edit, compile, execution<br />JBuilder is not being open-sourced despite reports on<br />
  41. 41. Eclipse vs. NetBeans<br />Eclipse<br />Based on IBM/OTI’s work which started in ’98<br />Released to open source in 2001<br />Built on premise of plug-ins on top of base platform<br />Dozens of plug-ins and projects<br />Allows for non-Java development<br />Most popular IDE<br />Requires assembly of many plug-ins based on needs<br />NetBeans<br />Made open source by Sun in 2000<br />Heavily influenced by Sun<br />Governed by community and 1/3 by Sun<br />More all-encompassing/inclusive (no plugins required) Java develop platform<br />
  42. 42. Additional Development Tools<br />jCVS – a Java CVS Client (<br />SQuirreL – a Java SQL client application (<br />ArgoUML – UML 1.4 design tool (<br />JLint – Java code checker looking for bugs, inconsistencies and synchronization problems (<br />Velocity – a template engine (<br />Used in several Apache projects<br />Jalopy – code formatter (<br />
  43. 43. Additional Development Tools (cont)<br />ProGuard – code obfuscator (<br />Many IDEs, like NetBeans, uses ProGuard<br />Ant – build tool (<br />Antelope - A GUI for running Ant and editing build files (<br />AntHill – controller for the build process (<br />XDoclet – A source code or other document generation engine (<br />XDoclet is an extension to the Javadoc Doclet engine<br />Commons – a library of all sorts of reusable Java components (<br />There are often many competitors – these tend to get most of the attention in their perspective area.<br />
  44. 44. Testing Tools & Frameworks<br />JUnit<br />HttpUnit<br />HtmlUnit<br />JUnitPerf<br />Cactus<br />Jameleon <br />JMeter<br />Abbot<br />
  45. 45. Unit Testing<br />JUnit is the original unit regression testing framework<br /><br />Has many extensions and IDE adapters<br />HttpUnit is a unit testing framework for testing web based applications<br /><br />HttpUnit models the HTTP protocol – testers deal with request and response objects. <br />HtmlUnit is also a unit testing framework for testing web based applications<br /><br />HtmlUnit models the returned document – testers deal with pages and forms and tables.<br />JUnitPerf is a collection of JUnit test decorators used to measure the performance and scalability within existing JUnit tests. <br /><br />Cactus is a framework for unit testing server-side java code (Servlets, EJBs, tags, Filters, ...).<br /><br />Extends JUnit<br />
  46. 46. Beyond Unit Testing<br />Jameleon is an integration and acceptance-level testing tool.<br /><br />JMeter is a tool to load test and measure (performance) functional behavior<br /><br />Abbot is a tool for unit and functionally testing Java GUI (Swing/AWT)<br /><br />A lot of commercial competition in testing market<br />Mercury, CompuWare, Quest (JProbe) and others<br />See for other open source alternatives<br />
  47. 47. Support & Maintenance Tools<br />Log4J<br />Quartz<br />Scarab<br />Maven<br />Bugzilla<br />
  48. 48. Log4J<br />Ubiquitous framework for logging application debugging messages.<br />JDK logging offer similar functionality today.<br />Apache Commons provides a bridge to either logging utility<br />Sometimes Log4J will conflict with other logging packages in environment/server<br /><br />Around since 1998<br />Version 1.3 expected this year (2006)<br />
  49. 49. Quartz<br />Quartz is a job scheduling system<br />Jobs run on any number of triggers.<br />Quartz can run stand-alone or in a cluster<br />It can run embedded within another application <br />It can be instantiated within an application server or servlet container)<br />It can participate in XA transactions <br /><br />Flux is a commercial competitor<br />
  50. 50. Project Management<br />Maven<br />A “software project management and comprehension” tool.<br />Initially started as a means to simplify the build processes in the Jakarta Turbine project.<br />Uses concept of project object model.<br />It is a site and documentation tool <br />It extends Ant<br /><br />Scarab<br />Scarab is an issue and artifact tracking tool.<br /><br />Bugzilla is leading open source bug tracking tool.<br />Not Java!<br />Plenty of commercial competition on management tool side.<br />
  51. 51. Java JVM<br />Miscellaneous<br />Jikes – IBM open source JVM<br />Developed in 1997 by IBM alphaWorks<br />Typically faster than Sun’s JVM implementation<br />Usually comes with Linux distributions<br /><br />AspectJ<br />Aspect-oriented extension to Java<br /><br />Java and other language mixes<br />Groovy – Java-like scripting language on JVM (<br />JRuby – Ruby interpreter in Java<br /> (<br />Jython – Python interpreter in Java <br /> (<br />
  52. 52. Wrap Up<br />Raise the open source awareness level!<br />There is probably an open source tool for almost every part of your application’s lifecycle.<br />In most cases there is more than one option.<br />Even if you have the funding for commercial products<br />Explore open source alternatives – may be just as good or better<br />Explore the features, benefits, issues so you know what you want in a commercial alternative<br />
  53. 53. Recourses<br />For more information, check out these references:<br /><br /><br /><br /><br /> (O’Reilly’s open source page)<br /> (Free Software Foundation)<br /><br />Richard Monson-Haefel on “Rebel Frameworks”<br /><br />