Thursday, May 10, 2007

Spring RCP: The Answer Is Yes!


I spend a few days with Spring RCP. I was amazed, disappointed, surprised, lost and resigned... but in the end I decided to use the Spring RCP for the next generation of the MindRaider (and also my new OSS project to be released later this year) despite all the threats.

Let me start with the risks I see:
  • The project is poorly documented.
  • There is no official stable release.
  • There are (almost) no OSS applications build on top of the RCP (which I could use as samples).
  • From what I read in the discussions and mailing list, I got feeling that there is not strong lead (although there is a lead developer). I mean a though-lead having long term roadmap in his head.
  • I feel that the RCP is still in its puberty - there are too many heterogeneous and conflicting plans.
  • Positioning against Eclipse RCP and Netbeans RCP as lightweight, (not that)rich client (the exact meaning of this word) oriented platform which fits Spring.
...which is not that bad ;-) And why am I attracted by Spring RPC?
  • I love Spring Framework.
  • I'm admired by declarative, straightforward and concise way in which Spring RPC applications are built. Incomparable to Swing!
  • I appreciate integration of popular libraries (JGoodies, VLDocking, ...) for all important parts of the UI application - commands, views, docking, forms, validation, ... and precise technical design (components, localization, resource bundle support, ...).
  • The good sign is the will of both commercial and non-commercial library vendors to deliver integrated solutions e.g. JIDE, L2FProd, ...
  • There are rumors saying that several (internal) commercial projects are built on top of Spring RCP.
Looking forward to share more details, experiences and findings in the future ;-)

Labels: , ,

Friday, May 04, 2007

Spring Rich Client Platform: PetClinic

I'm already decided to use Spring IoC in MR7. What I'm considering is Spring RCP. The motivation is to build the UI tier faster and also Spring RCP provisions - components and included/integrated libraries like JGoodies.

Althought here and there you can find some blog post describing how to start with Spring RCP, it took me some time to run PetClinic, so you might find this description useful...
  • Prerequisite: Subversion client
    Download Tortoise Subversion Client for windows (or your favorite one).
  • Checkout Spring RCP from the Sourceforge repository
  • Build the project
    • Download and install Maven 2 (configure your PATH environment variable to run mvn from anywhere).
    • Change to the root directory of the Spring RCP checkout (in our example it is c:\spring-rcp)
    • Run mvn install
    • ...now you may get a cup of coffee ;-)
    • If a repository item is not available (might happen), run mvn install again and again until it successfully finishes.
  • Run PetClinic (standalone)
    • Presuming that you are Eclipse developer...
    • Finish Maven2 installation by defining Eclipse classpath variable M2_REPO.
    • Go to Eclipse menu/Window/Preferences.../Classpath Variables. Select New... and create M2_REPO variable. It will point to the directory like C:/Documents and Settings/[user name]/.m2/repository
    • Let Maven2 create Eclipse projects by running mvn eclipse:eclipse in the root of the project (c:\spring-rcp).
    • Import projects to the Eclipse. Go to menu/File/Import.../Existing Project Into Workspace/ and select root directory (c:\spring-rcp). Eclipse will find several projects - import them all.
    • In package explorer open spring-richclient-petclinic-standalone project, find the package src/main/java/org.springframework.richclient.samples.petclinic.
    • Run PetClinicStandalone class by right click and Run as/Java Application
    • When you will be asked for username/passwd, just click Cancel.
    • And that's it ;-)



Documentation:

Labels: , ,