lunes 3 de marzo de 2008

IWebMvc first preview version available!

The landscape of web frameworks based on Java is crowded. For the most part, they are all flexible and capable and you're better served using them than trying to build something by your own. At the bare minimum you are saving time. The price to pay is the learning curve. And sometimes is steep! Let's take Spring, for example. The basics, the IoC container, is easy to learn and leverage but add now, AOP, transaction management, MVC, security and/or ORM capabilities. Things can get complex really soon.

Unfortunately, even if you happen to master all those topics, a new issue will rise his ugly face. It happens because even the best frameworks just target some clearly defined development areas, for example, Hibernate targets database abstraction. This means any developer is forced to include a variable number of libraries and integrate them as best as he can. Being a committer of DWR (currently responsible of the Spring integration) I, for sure, know first hand what this means. In short, troubles.

Some Open Source frameworks have come to the rescue. AppFuse will let you kick start a project using a different combinations of frameworks quickly. Grails is another great web platform, the scaffolding features are fantastic (automatic controllers and views!) but it's based on Groovy.

Nonetheless, in my mind what I really needed was a platform that:
  • Is based on Java
    Although supporting Grooy / JRuby is a plus
  • Helps me to kick start a project
    But simplifying the process by giving me the best (and this can be tricky) set of frameworks for each task
  • Integrates both server and client sides
    And it's lightweight, robust and extensible. Read enterprise quality.
  • Supports all the common tasks a web app has to handle
    I include here: User Management, CRUD operations, i18n support (both framework & data), AJAX and astounding visuals

In the end there was nothing in the wild that could help me. In part because my framework choices are pretty clear (and fixed): JEE5/Spring/Hibernate/DWR/dojo. I have a number of projects on my back (heck! 10 years!) and these tools have helped me (like no others) to achieve robustness, productivity and quality.

So at the beginning of the year I embarked a personal task. I would build a web framework (yet another!), filling the void that existed, and release it as Open Source. I knew I had the knowledge (picking ideas from each successful project I've been in) and it was a matter of effort.

I'm glad to be able to release the first alpha (preview) version today! Here's the list of features I could manage to get working during the time:
  • Environment
    • Fully configured project
    • Ant + Ivy working build scripts
      • Transitive dependency management
      • Quality assurance tools and reports
      • Platform independent
    • Server and database independent
      • Tested against Glassfish v2 and Jetty
      • Tested against MySQL and HSQLDB
  • Spring
    • AOP, Context, MVC, ORM, TX pre-configured
    • Root (parent) & per web application contexts
    • Incredibly reduced XML configuration
      • Convention over configurarion
      • Annotation based configuration
    • Locale support (English, Spanish)
    • Powerful but easy validation framework
      • Injected in Controllers
      • Remote use with AJAX
    • Repository abstraction
      • Implementation based on HDD (more following)
  • JPA / Hibernate
    • Annotation based
    • Automatic DB schema creation & update
    • Base domain model provided
    • JTA
    • Generic DAO implementation
  • DWR
    • Advanced use of converters & javascript
      • Mapped domain objects allow transparent work in the browser
    • File upload with progress bar
    • Leverages upcoming 3.0 functionalities
      • Not yet available in any other framework
      • Remote beans using annotations
      • File transfers
  • dojo
    • Wrapped dojo widgets inside tag files
      • Centralized access
      • Auto-configured
    • DWR integration
      • Including a DWR read store to populate content
      • Automatic remote validation added
    • Widgets
      • Provided backing beans in the server for each widget
        • Automatic binding and validation
      • Included in this release
        • Textbox family (text, number, date, checkbox)
        • I18n text
        • Rich text editor
        • Document upload
        • Image upload
        • Entity grid (including pagination, ordering & AJAX backing model)
        • Filter (includes filter groups and ranges)
        • Menu bar
        • Entity selector (using a combo)
        • Color chooser
  • CRUD
    • Automatic CRUDs for any domain entityt
    • Default or customized views
    • Build domain classes using Lego pieces
      • Automatic DB mappings
  • Miscellaneous
    • 3DES Encryption
    • Utility classes
    • Little demo application
Not bad for a months work :-)

If you wanna try it (and I really hope so!) here are the installation instructions. Just a little disclaimer before: This is a preview (alpha status) release. It has many glitches (Firefox is in fact recommended). It's main goal is to offer a vision of where the framework is heading (it lacks several important features like security, documentation, theme support...). In addition I really wanted to make this release today so I rushed a little and couldn't fix some tests (don't worry about that). So, finally, the promised instructions, enjoy it:
  • Requirements
    • Installed JDK 6
    • Subversion client (if checking the sources)
  • Download
    • From HTTP: Download from repository
    • From subversion:
      svn checkout -r 72 https://internna.googlecode.com/svn/trunk/IWebMvc IWebMvc
  • Double click the provided run.bat file
  • Point your browser to http://localhost:8080/iwebmvc

Now, the real value of the platform can be seen creating a new domain class (like those in the demoapp.domain package) and getting for free the CRUD operations, the screens and the DB schema. And building the model class should be fairly easy using the provided backing beans (I18nText, RichText, Document, Image, ...).

For any questions (comments, contributions, recommendations, doubts...) related to IWebMvc please refer them to the mailing list.

2 comentarios:

Ivan dijo...

I had to set the ant -lib flag manually for the run.bat file to execute. just fyi. excited to see what this does!

mpuglin dijo...

Just curious,

Why do you prefer to use JSP/Dojo over JSF?