Successfully reported this slideshow.
Your SlideShare is downloading. ×

Modern Java Web Development

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Loading in …3
×

Check these out next

1 of 31 Ad

Modern Java Web Development

Provides a modern 2011 look on the state of Web Development on Java platform.
Covers framework classification, main features of each framework, how to select a framework and modern tools usage for Java web development

Provides a modern 2011 look on the state of Web Development on Java platform.
Covers framework classification, main features of each framework, how to select a framework and modern tools usage for Java web development

Advertisement
Advertisement

More Related Content

Slideshows for you (19)

Advertisement

Similar to Modern Java Web Development (20)

Advertisement

Recently uploaded (20)

Modern Java Web Development

  1. 1. Modern Java Web Development<br />By Zenyk Matchyshyn<br />
  2. 2. Agenda<br />Web frameworks classification<br />Major frameworks in each class<br />How to select a framework and typical combinations<br />Rapid web development on Java<br />Modern approaches to development<br />2<br />
  3. 3. Web Frameworks Classification<br />Web Frameworks can be classified into following categories:<br />Request/Action Frameworks (Spring MVC, Struts 2, …)<br />Component Frameworks (GWT, JSF, …)<br />Server Side Frameworks (BlazeDS, Jax-RS, …)<br />3<br />
  4. 4. Request/Action Frameworks<br />Follows classic MVC pattern<br />No notion of component<br />Reusability of controllers and views<br />Have similar structure and concepts<br />Simple and straightforward<br />Better suited for simple sites <br />Examples: Spring MVC, Struts 2<br />Non Java examples: Ruby on Rails, ASP.NET MVC<br />4<br />
  5. 5. Component Frameworks<br />Have components at its core<br />Better suited for RIA applications and Forms applications<br />More complex <br />Examples: GWT, JSF, Tapestry 5<br />Non Java examples: ASP.NET<br />5<br />
  6. 6. Server Side Frameworks<br />Divided into following groups:<br />Web Services (SOAP and RESTful)<br />Flex Server Side<br />Ajax libraries, Serialization/Marshaling libraries<br />6<br />
  7. 7. Web Services<br />SOAP based<br />Frameworks: Axis 1/2, Spring WS, JAX-WS <br />XML based<br />RESTful (Jax-RS, Spring MVC, …):<br />Frameworks: <br />Follows REST guidelines<br />XML, JSON or other protocol<br />7<br />
  8. 8. Flex<br />Main frameworks: BlazeDS, WebORB, Granite DS, LiveCycle Data Services<br />Provide serialization for AMF protocol<br />Some have code generation<br />Java is first class citizen in Flex world<br />Main features: remoting, proxy service, pub/sub over HTTP and JMS <br />8<br />
  9. 9. Ajax Libraries and custom serialization<br />Direct Web Remoting (DWR)<br />Custom serializators based on popular protocol (JSON, XML, YAML, …)<br />Usually build on top of Servlet API or Action frameworks such as Spring MVC<br />9<br />
  10. 10. Major Frameworks<br />10<br />
  11. 11. Google Web Toolkit<br />Current version – 2.2<br />Evolves, supported by Google<br />Have forks: GWT-Ext, Vaadin, SmartGWT<br />Good tooling: Google Plugin for Eclipse, visual designer<br />Not just for RIA (Odnoklasniki!)<br />Heavy Java orientation<br />Debug and deployment sometimes complicated<br />11<br />
  12. 12. Spring MVC<br />Current version – 3.1<br />Led by SpringSource – doesn’t evolve<br />Lots of view resolvers<br />Tooling is supported on a Spring Framework level<br />Lots of documentation, implementations and examples<br />12<br />
  13. 13. Java Server Faces<br />Current version – 2.0<br />Led by JCP (Oracle)<br />Evolves, supported by big companies<br />Painful, but standard<br />Libraries - Apache MyFaces, JbossRichFaces, Oracle ADF<br />Tooling is limited<br />Significant version differences<br />13<br />
  14. 14. Struts 2 and Stripes<br />Action/Request based frameworks<br />Actively developed<br />Struts 2 – Apache project, latest release – 20 Dec 2010<br />Struts 2 = Struts 1 + WebWork<br />Struts 2 uses OGNL<br />Stripes – latest release – 4 Jan 2011<br />Some success stories<br />Books, tutorials available<br />14<br />
  15. 15. Tapestry 5 and Wicket<br />Tapestry 5 and Wicket are Apache projects<br />Both are component based<br />Tapestry 5 latest release 15 Nov 2010<br />Wicket latest release – 21 Jan 2011<br />Tapestry uses OGNL<br />Wicket is more Java oriented<br />15<br />
  16. 16. How to select a framework<br />16<br />
  17. 17. Main factors<br />Developer productivity<br />Developer perception<br />Learning curve<br />Project Health<br />Developer Availability<br />Job Trends<br />Templating<br />Components<br />Ajax<br />Plugins or Add-Ons<br />17<br />
  18. 18. Main factors – continued<br />Scalability<br />Testing<br />I18n and i10n<br />Validation<br />Multi-Language support<br />Quality of documentation<br />Books<br />REST support<br />Mobile support<br />Degree of risk<br />18<br />
  19. 19. Comparison<br />High traffic, internet facing, infinite scalability – Action/Request based framework<br />Intranet based, few users, behind firewall – Component based framework<br />Products, to be maintained for 5-10 years – largest community, most vendor support<br />Legacy backend – same language as backend<br />Done by Matt Raible - http://bit.ly/jvm-frameworks-matrix<br />You should have yours!<br />19<br />
  20. 20. Typical frameworks combinations<br />Consider JavaScript libraries<br />YUI/Ext JS/Dojo/jQuery + Action/Request based – gives separation of front end and server side<br />GWT + Spring MVC – gives components and flexibility where necessary<br />JSF + JAX-RS – gives components and REST access for JavaScript UI<br />20<br />
  21. 21. Rapid web development<br />21<br />
  22. 22. Spring Roo<br />Generates typical combinations between database, models, controllers and views<br />Supports Hibernate, GWT, Spring MVC, Spring Security, Maven, JPA and tons more…<br />Waving can be turned off (remove Spring Roo)<br />Actively developed<br />http://www.springsource.org/roo<br />22<br />
  23. 23. AppFuse<br />Generates basic project using typical combinations<br />Good place to learn best practices<br />Can generate code based on DB schema<br />Somewhat evolving<br />http://appfuse.org<br />23<br />
  24. 24. Custom Factories<br />Use Maven!<br />Use scripting!<br />Use code generators – Skyway Builder, SpringFuse<br />Most companies are doing it right<br />Reuse experience<br />24<br />
  25. 25. Modern Approaches to development<br />25<br />
  26. 26. Tools<br />Use Eclipse/Idea/NetBeans<br />Maven works, just use the latest version and Maven Shell<br />m2eclipse, jetty plugin or tomcat plugin<br />Use JRebel for zero turnaround <br />Tomcat and Jetty – rocks!<br />26<br />
  27. 27. Architecture<br />Use JavaScript frameworks<br />Use IoC frameworks (Spring, Guice, …) but keep classpath clean<br />Keep session isolated<br />Avoid JSP<br />Minimize Controllers layer<br />Use existing security solutions e.g. Spring Security<br />Each module should have its own Maven artifact<br />27<br />
  28. 28. Friends from neighborhood <br />JRuby on Rails great for prototyping<br />JRubydeveloped by Oracle<br />Groovy on Grails great for new small and medium projects<br />Groovy developed by SpringSource<br />Possible to use existing business login on other languages<br />Learn and apply best practices from non Java frameworks<br />28<br />
  29. 29. Future – Java EE 6 Web Profile<br />Servlet 3.0: Web Fragments, Async API, programmatic methods to add servlets and filters, Annotations, Security enhancements <br />JSP 2.2 / EL 2.2 : method invocations, new properties <br />Web Beans<br />Bean Validation<br />Managed Beans<br />29<br />
  30. 30. Community<br />http://jug-lviv.blogspot.com/<br />http://dotnetug-lviv.blogspot.com/<br />http://www.rozrobka.com/<br />30<br />
  31. 31. Q/A<br />?<br />31<br />

×