Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Building software using Rich Clients Platforms Rikard Thulin

  • Be the first to comment

  • Be the first to like this

Building software using Rich Clients Platforms Rikard Thulin

  1. 1. Building Software using Rich Clients Platforms Rikard Thulin
  2. 2. Speakers Profile Senior Consultant & Java Evangelist Co-leader for Gothenburg's Java User Group, Javaforum rikard (at) thulin.pp.se
  3. 3. Agenda • The needs of an advanced rich client • Why we need Application Architecture • Available Rich Client Frameworks • Demo • Real world experience • Conclusions • Q & A
  4. 4. Local vs Web application Local app (RCP based) Web app Deployment Automatic updates, clients can have difference versons Clients are always updated and in sync UI Components Very rich and mature Fancy but not mature, usability is low Performance Very high, latency problems can be reduced Slow Time to develop Depends on skill set Depends on skill set Market Small The whole world
  5. 5. The needs • Time-to-market • Focus on business logic • Usability • Flexible deployment and distribution • Solve the application architecture problem
  6. 6. Time-to-market • Requires initial investment • Hurts TTM in short term • Huge decrease in mid to long term • RCP might not be the best choice for simple applications
  7. 7. Focus on business logic What the heck is this?
  8. 8. Focus on business logic What the heck is this?
  9. 9. Focus on business logic What the heck is this?
  10. 10. Focus on business logic What the heck is this?
  11. 11. Focus on business logic • Today - no one needs to write their own web framework • Today - no one needs to not write their own Rich Client application framework • Instead of doing lots (ant lots) of UI infrastructure - do real business value
  12. 12. Focus on business logic • Most applications need some kind of infrastructure to handle things such as • actions, menus, keyboard shortcuts, window management, state, etc • Swing/SWT does not address this - at the end of the day they are just widget libraries
  13. 13. Focus on business logic • The RCP allows you to focus on the business - not the UI infrastructure • True also for web applications as well (no one writes plain JSP)
  14. 14. Usability • Application level usability comes for free • Man years of usability out-of-the box • The RCP helps you with lower level usability as well • Lower level usability is pretty much up to you to get right
  15. 15. Usability • To demonstrate usability • First an RCP based dialog will be presented • Second a non RCP based dialog will be presented • Try to figure out the five usability things addressed by the RCP version
  16. 16. Usability Dialog implemented using an RCP
  17. 17. Usability The same dialog implemented without an RCP
  18. 18. Usability Did you find five usability issues addressed by the RCP?
  19. 19. Usability RCP Non RCP Side by side comparison
  20. 20. Usability
  21. 21. Usability Default button
  22. 22. Usability Default button Escape closes the dialog
  23. 23. Usability Default button Build in support for help Escape closes the dialog
  24. 24. Usability Default button Build in support for help Escape closes the dialog Correct spacing
  25. 25. Usability Default button Build in support for help Escape closes the dialog Correct spacing Correct size
  26. 26. Application architecture • An application is divided into modules/ plugins/bundles • Plugins declares their dependencies • Plugins publish API:s and hide internal code • Plugins are loosely coupled • Plugins execute in a runtime container
  27. 27. • A modular system does not prevent bad coding practices • But it encourages good coding practices • Bad code is isolated to one modules and not spread across the whole application Application architecture
  28. 28. • The UI infrastructure to build applications • Higher level components such as • Wizards, User Settings, Data Access framework • Windowing System • And much more... Application architecture
  29. 29. Flexible deployment and distribution • Big releases can be deployed as usual • Parts of the application (a plugin) can be updated and distributed individually • New features can be released in between big releases • Much more agile approach to releasing software
  30. 30. Available Frameworks • Swing Application Framework (JSR-296) • Spring Rich Client • JGoodies Swing Suite • Eclipse RCP • Netbeans RCP
  31. 31. Available Frameworks Less Better Features Learning Curve Maturity Community
  32. 32. Available Frameworks Less Better Features Learning Curve Maturity Community
  33. 33. Available Frameworks Less Better Features Learning Curve Maturity Community
  34. 34. Available Frameworks Less Better Features Learning Curve Maturity Community
  35. 35. Available Frameworks Less Better Features Learning Curve Maturity Community
  36. 36. Available Frameworks Less Better Features Learning Curve Maturity Community
  37. 37. Available Frameworks Less Better Features Learning Curve Maturity Community
  38. 38. Eclipse RCP • OSGi based container (Equinox) • Manage dependencies and lifecycle • Explicitly supports dynamic scenarios • Highly adopted standard • OSGi Bundle is the unit of modularization
  39. 39. Eclipse RCP • Based on SWT, native look-and-feel • Swing component can be embedded • Requires Eclipse IDE to build (*) • It is possible to run two or more versions of the same module in one application
  40. 40. Netbeans RCP • Proprietary runtime based on Java Extension Mechanism • Manage dependencies and lifecycle • NetBeans module is the unit of modularization • Soon to support OSGi bundles
  41. 41. Netbeans RCP • Built using Ant or Maven, no IDE lockin (*) • Java Webstart deployment out of the box • It is possible to run two or more versions of the same module in one application • Based on Swing
  42. 42. But Swing is slow... The performance of Swing is (for years) not an issue! “the only problem with Swing is that there are a limited number of higher- level abstractions available that assist in making the toolkit simpler and easier to use” - The Spring Rich Client Team
  43. 43. Licensing • Eclipse RCP • Eclipse Public License (EPL) • Netbeans RCP • Common Development and Distribution License (CDDL) • GPLv2 with Classpath Exception
  44. 44. DEMO • Creating a Netbeans RCP based “Hello World” application using Maven • No dependency to NetBeans IDE • Start with a empty directory • Not pre-cooked in any way (*)
  45. 45. DEMO(this page if for reference purpose only) • mvn -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=netbeans-platform-app-archetype -DarchetypeVersion=1.2 -DarchetypeRepository=http:// repo1.maven.org/maven2 archetype:generate • cd <directory> • mvn install • cd application • mvn nbm:run-platform
  46. 46. Real world experience using Netbeans RCP • Requires initial investment • Great community, books, tutorials • Modularity is complex • Unit Testing without the runtime • The usual suspects will haunt you • Java Help, Java WebStart, Maven
  47. 47. Real world experience using Netbeans RCP • We estimated the cost not to use an RCP to $30K • The UI quality would have been significant less
  48. 48. Conclusion • For small applications the initial investment could be to high • What is most important for you? • Can you reuse plugins from the community • SWT or Swing • OSGi or not • Build using Eclipse or Maven / Ant
  49. 49. Conclusion There is no need to reinvent the wheel by writing UI infrastructure code
  50. 50. Conclusion - or - Whatever you choose, it is much, much better than what you could achieve yourself
  51. 51. Q & A

×