A Comparison of Open Source Application Development Frameworks for the Enterprise Webinar on March 12, 2008 Presented by Kim Weins, Sr. VP of Marketing at OpenLogic and Kelby Zorgdrager, President of DevelopIntelligence
OpenLogic Vision OpenLogic enables enterprises to safely and successfully acquire, use, support and control free and open source software, and thereby transform their development efforts and realize significant savings.
OpenLogic Provides What Enterprises Need Provisioning Support Trusted source Subscription to certified library Managed updates One throat to choke Consolidated SLA support OpenLogic Expert Community (OXC) Expertise Governance Expert help Training on open source packages Professional services Risk reduction Indemnification SaaS Governance platform
Want More Help? Services Get help with selection of an open source framework from an unbiased source. Training Get further training on an open source framework or other open source software. Support Learn about Developer or Production Support for open source frameworks and other open source you use. Contact us www.openlogic.com sales@openlogic.com
Developing Web Applications Faster A Comparison of Java Web Development Frameworks
Application Development Framework Software frameworks typically provide: Standard structure / design / architectures Streamlined / simplified abstractions for well-defined APIs A programming model / defined application lifecycle Software framework benefits: Usually address / define the application architecture Reduce the amount of code developers have to write Simplify the development by hiding low-level details Allow developers to focus on business logic (requirements)
Types of App Dev Frameworks Three primary types of frameworks Application low-level Web application focused on web domain Enterprise high-level architecture oriented Application framework Typically exist to simplify development within a specific technology, language, or operating system Usually not domain specific First came on the scene with GUI development Microsoft Foundation Classes Enterprise architecture framework Focused on defining modular architecture for enterprise applications Deal with large complex systems and model Java EE anyone?
Web Application Frameworks Conceptual extension of an app framework Focused on simplifying web application development Typically built on-top-off some other platform or framework Two broad types: Server-side Address complexities in back-end of web application Available for Java, PHP,.NET, etc. Client-side Address complexities in front-end web design / applications JavaScript frameworks, Flex, Silverlight, etc.
Web Framework Explosion Frameworks have exploded over the years Wikipedia has over 85 web application frameworks compared http://en.wikipedia.org/wiki/comparison_of_web_application_frameworks Language # of Frameworks Compared Java 28 PHP 21 Python 8.NET 4 Other 25
Java Web Development Frameworks Full-stack frameworks: SEAM, RIFE, Spring (?) Address back-end soup-to-nuts web development Typically include MVC component AND integration with enterprise systems ADVANTAGES: complete stack, limited glue code DISADVANTAGES: less plug-n-play; heavyweight MVC frameworks: Struts, Spring MVC, etc. Address page flow and reusability in web development Focused on simplifying MVC-based web application Limited out-of-the-box integration with enterprise ADVANTAGES: pluggable architecture, lightweight DISADVANTAGES: glue code
MVC Diagram MODEL State Query State Change Notification -Encapsulates business data and business rules -Handles calls from the CONTROLLER -Notifies VIEW of changes Change State VIEW -Displays the MODEL data -Sends user request to CONTROLLER -Notified by MODEL of state change User request Select View CONTROLLER -Provides business logic -Translates user requests into calls to MODEL -Selects VIEW for response
Choosing an MVC Framework Two types of MVC frameworks: Action-based (aka Push-based MVC) Data is pushed from controller to view Focused more on request flow Struts, Spring MVC, Stripes Which is the most productive? Component-based (aka Pull-based MVC) Data is pulled in view Focused more on view rendering JSF, Wicket, Tapestry Which is the most productive?
Action-based MVC Frameworks Struts 2 Part of Apache Foundation Reworked version from Struts 1 Based on WebWork Spring MVC 2.5 Built on-top of Spring framework Adds MVC capabilities Supported by Spring Source Stripes 1.5 No backing organization Very grassroots framework
Component-based MVC Frameworks JSF / MyFaces 1.2 JSR 127 Governed by JCP Multiple vendor implementations Big Marketing Machine Wicket 1.4 Part of Apache Foundation Heavy Java focus Tapestry 5 Part of Apache Foundation Version 5 of framework is complete re-write
Choosing a Framework The Popularity Formula How many Google searches? How many jobs on Dice? The Community Activity Formula When was the last commit/release? How active is the mailing list? The Learning Formula How many books? How s the documentation? The Architect Formula How clean are the results? How well does it scale? The Pragmatist Formula How hard was it to build a prototype?
Formula Comparison Struts 2 Spring MVC Stripes JSF Wicket Tapestry 5 Popularity (# of Google Searches / Month) Community (Last Release Date) Learning (# of Books) 110,000 18,100 1,600 165,000 4,400 9,900 1/13/09 10/31/08 3/4/09 1/19/09 2/9/09 12/4/08 10ish 5ish 1 16ish 3ish 1ish Architect (How clean?) POJOs POJO or Class Hierarcy Inheritenc e POJO or inheritence POLO + inheritence POJO
The Productivity Formula How rapidly can I build a RIA? Measuring productivity is a crapshoot: Not all programmers learn at the same speed Not all programmers develop at the same speed Measure against trends in RAD Convention over configuration Scaffolding / CRUD Inversion of Control / Dependency Injection Measure against trends in RIA RESTful URLs Client-side validation AJAX
Understanding Variables of RAD Convention over configuration Paradigm that prefers coding conventions to XML configuration files It s been said configuration is the demise of Java Scaffolding / CRUD Temporary files / framework artifacts generated to aid in construction of web application Typically generate UI, controllers, model, and CRUD operations Inversion of Control Paradigm that prefers dependency injection over object / service lookup Service lookup can be boiler-plated and cumbersome
Understanding Variables of RIA RESTful URLs Representational state transfer Software architecture that focuses on passing domainspecific data over HTTP without using another application layer Popularized as an alternative to SOAP / WSDL Client-side Validation Perform UI input field validation within browser Prevents round-tripping to backend AJAX Asynchronous JavaScript + XML Allows background process to occur in web-apps
Action-Based RAD Comparison Convention over Configuration Configuration Files Struts 2 Spring MVC Stripes Configuration Configuration; moving towards convention 2 7ish 2+ 1 Convention Navigation Paths XML XML Java based Scaffolding N/A 3 rd Party N/A CRUD N/A 3 rd Party N/A Inversion of Control Yes Yes Yes Annotations Yes Yes Yes
Action-Based RIA Comparison Struts Spring MVC Stripes REST No; A plug-in is being developed Coming in Spring 3.0 No; need to write a custom ActionResolver Client-side validation Automatic Manual Manual AJAX Manual Manual Manual
Component-Based RAD Comparison Convention over Configuration Configuration Files JSF Wicket Tapestry 5 Configuration Convention Convention 2+ 2 1 Navigation Paths XML Java-based Java-based Scaffolding 3 rd Party N/A UI edit / display screens CRUD N/A N/A N/A Inversion of Control Yes No Yes Annotations Yes No Yes
Component-Based RIA Comparison JSF Wicket Tapestry 5 REST No No Yes Client-side validation Manual Manual Automatic AJAX Manual Automatic Automatic
And the Winner is? Stripes Struts 2 Spring MVC Tapestry JSF Wicket Popularity 6 2 3 4 1 5 Community 1 4 6 5 3 2 Learning 5 2 3 5 1 4 Architecture 3 1 2 1 2 3 RAD 1 3 2 1 3 2 RIA 2 2 1 1 3 2 Total 18 14 17 17 13 18 Productivity Total 3 5 3 2 6 4 Based on ranking; lower number is better.
Other Considerations Open Source License Java Version Stripes Struts 2 Spring MVC Tapestry JSF Wicket Apache 2 Apache 2 Apache 2 Apache 2 Apache 2 Apache 2 1.5 1.5 1.4 1.5 1.5 1.5 Spring Support JSF Support Yes Yes Yes Yes Yes? No Yes Yes No Yes No Validation Yes Yes Yes Yes Yes Yes
A note about Scaffolding Scaffolding support is found in: Groovy / Grails SEAM RIFE All are full-stack web development frameworks
Q/A Questions? Contact Information: Kelby Zorgdrager, President DevelopIntelligence LLC http://www.developintelligence.com http://www.developintelligence.com/learn Kim Weins, Sr. VP Marketing OpenLogic http://www.openlogic.com https://olex.openlogic.com