martes, 29 de abril de 2008

IWebMvc Milestone 4 released

So a new version is up. This time the feature list is heavy on the server side. Let's review them one by one:
  • License change
    I'm not sure it's the best time to announce it...but from now on IWebMvc will be released under the Apache Software License (ASL 2). I've waited till today just because the initial versions were very preliminary and GPL just keeps things under control. Things have changed and IWebMvc has nearly reached the point where other people can probably contribute better ideas than me.
  • Groovy support
    I've talked about it recently so I'm not adding much here. It supports compiled classes and scripted (dynamic) beans. Just be careful with the IDE support. In particular with Netbeans, at least until v6.5
  • Spring Webflow 2.0 support
    So SWF published the first RC last week and IWebMvc already includes it. Nice! It's very well integrated with the rest of the framework, in particular with MVC, JPA, Security and AJAX. I pretend to blog about this feature in the near future.
  • Jasper Reports / Dynamic Jasper support
    PDF & Excel file download. Automatic grid reports in less than 20 lines of code! Really useful for statistics in the future.
  • Multi file upload
    Upload documents and images in multiples and group them in the server. Including a specific widget.
  • Image Gallery widget
    Show grouped images as a thumbnail strip or as a slideshow with one line of code!
  • Rating widget
    A new way to bind numbers using the latest dojo widget.
  • Miscellaneous
    Several bug fixes and Eclipse support were also improved. Glassfish configuration as well. Check the changelog if interested!
As always, the code along with a new screencast of the features is available at the project's download page. I've to thank you the Google code team for doubling the available space for IWebMvc!

Enjoy!

sábado, 26 de abril de 2008

Mixed feelings adding Groovy support

One of the purposes I had for this year was learning Groovy. And, since the beginning, I knew IWebMvc was going to support Groovy although I didn't have a real clue about the extension of this support. During the last week I've worked to get both things done. As a matter of fact, it was easy and I learned a couple or three things in the process that may be of interest to some Groovy beginners (like me). Let's start with the cool features:
  • Prototyping
    Scripting is FAST and it really saves time. If you're like me and start coding just to get an idea of the problem and explore possible solutions this feature alone makes Groovy worth the effort. It boosts productivity by an order of magnitude!
  • Spring support
    Well..Spring is always good, isn't it? Unless you're using JavaRebel (and enjoying it already), refreshable beans are a bless. And it also allows (encourages?) quick & dirty hacks ;-)
  • Groovy beans
    I migrated the Domain model of IWebMvc to Groovy. I don't know the lines of code that where removed in the process. A boilerplate killer!
  • Language entensions
    GStrings and Object extensions (read Collection) are outstanding. I won't even mention closures (you should be used to them via Javascript). Really useful
  • Choice
    Better let the developer choose which language is better suited for a particular problem. IMHO any modern Java based framework should include Groovy support.
I had a so-so feeling about some things though:
  • Groovy != Java
    This may come as a surprise to some (it was for me) and be obvious for others (heck it's Groovy and not Java!). The fact is the relation is tight: they both work in the JVM, can work together and share syntax but..they're different. Subtle differences really but some that make impossible to rename your Java classes to .groovy and expect your application to work.
  • Groovyc
    Joint compilation is a very intelligent idea and Groovyc works very well but it's not on the same league as Javac. It lacks maturity, reliability and speed. I hope Sun can help the Groovy team as they did with JRuby.
  • Migration
    After adding Groovy support to IWebMvc I was forced to move some code to Groovy even if just to serve as an example. I had mixed feelings with the results. Groovy is amazing to improve productivity but you miss that when you have an already working code. And then there's the static typing issue..I wasn't happy to loose it. At all (I guess my code is not that groovysh)
Finally there were things I just plain disliked:
  • IDE support
    I'm a Netbeans user. There's no current Groovy plug-in that works with 6.1RC2 out-of-the-box. You may try to install one from the Development Update Center (I couldn't). One doesn't know how much he relies on things like syntax highlighting (let's not say debugging!)...IDE support in Netbeans is bluntly put, awful.
  • Generics
    Are Generics in open confrontation with dynamic typing? I guess they are. Java support for Generics is mild...Groovy's...much worse.
All in all, Groovy IS the future. I'm quite sure I'll be using it extensively. Unfortunately, today and with Netbeans is not ready for prime time.

martes, 15 de abril de 2008

IWebMvc receives a JavaRebel free OSS development license

I received it in the mail yesterday and I'm eager to start using it. For those that don't now JavaRebel is an astounding tool that lets a developer reload modified classes during runtime. This means that once an application is deployed it will automatically detect changes in class files and transparently apply them! Only Weblogic 10.3 seems to have a feature like it..at how many times the price!!

The best of all is that ZeroTurnAround people are working hard to get Spring support working. In fact, Spring works per se but they want to get automatic configuration reload so bean state is kept. Awesome isn't it? And other proxy libraries as well (JavaAssist, CGLIB and such). IMO it's one of the most interesting technologies right now and one to watch this year.

Thank you JavaRebel! And thank you for supporting OSS projects! Even those as less known (yet) as IWebMvc.

domingo, 13 de abril de 2008

IWebMvc CRUD Screencasts. Learn the framework

During the last month I've been asked the same question time and again, people somehow feel that IWebMvc demo is cool but have many many doubts about how to make use of it. In fact, if IWebMvc lacks something at the moment that's documentation! Well, I had some time during the weekend so I decided to invest it creating two little videos. Both of them show how easily you can leverage IWebMvc functionality in your application.

The first one explains how to add a new (somehow simple) entity that uses a couple of the framework widgets and how the DB schema is automatically generated and the developer gets CRUD operations & security in less than 30 lines of code.

The later tries to go a step further and use an entity inside other entities while getting full text search and RSS feeds in the process. By the way, it uses a custom view instead of those provided by default.

Both together give a quick glimpse of the CRUD possibilities of IWebMvc. They're available at the project download page.

Enjoy them! And help share the news!

Web Framework Smackdown Questions: IWebMvc

Other frameworks have already answered (Click, Tapestry) Matt's questions so I'm doing it as well:
  • What is the overall performance of your framework as it compares to others?
    No benchmarks have been passed yet but IWebMvc makes full use of Spring MVC / Hibernate on the server side and DWR / dojo on the client. Performance should be on par with those libraries.

  • How does your web framework position themselves in relation to Web Beans?
    JSF / EJB3 is a powerful stack but it cannot stand the visuals and possibilities of dojo on the client and the flexibility Spring + JPA offers on the server.

  • How easy is it to create a re-usable component in your framework? Is it as easy as sub-classing an existing component?
    A new component is composed of a tag lib wrapping the client code and a JPA entity that serves as backend. The most complex components may required a specific Spring data binder. There are several (ten or more) examples for each of these. Framework components are designed to be extensible by nature. All server operations are generic and will work for any new component (CRUD, RSS, security...)

  • What is the key differentiating characteristic of your framework that makes it better than the rest?
    The base is impressive and rock solid (JEE / Spring (AOP, MVC, ORM, TX, Security) / JPA (Hibernate) /DWR / dojo) and IWebMvc just starts there. So basically you get a working application based on those technologies and lots of goodies to make the developer life easier. In addition, choosing such a fixed stack ensures a tight integration between each layer.

  • What do you think about the various scopes introduced by Seam, e.g. conversation vs request or session? If you support these additional scopes, do you also provide some sort of concurrency control?
    IWebMvc will support out-of-the-box Spring Webflow integration in the near future.

  • Why can't we, the Java Community, come together and adopt the best application framework and settle the web development subject?
    Innovation is key in this world. Each framework offers something new and different. IWebMvc probably offers the best DWR / dojo integration with server side technologies available to date.

  • What are you doing to help with developer productivity?
    That's the main goal indeed! Working project scripts (compile, dependency management, QA), generic controllers and functionality, pre-built common tasks, wrapped client code, powerful stack, screencasts & documentation. Everything points in that direction. IWebMvc is a framework aimed at developers.

  • 2008 is a huge year for the mobile web. How do you help developers build great mobile web applications?
    I'm not sure IWebMvc fits the bill here or if some other frameworks are better suited.

  • If you couldn't use your framework, what would you use and why?
    I guess bare Spring MVC / Webflow / DWR / JPA and rebuild some work from there. Another route would be Grails.

  • How do you enable rich Ajax applications?
    IWebMvc was designed with AJAX in mind and cannot really be used otherwise. All widgets support and use AJAX extensively.

  • Can a developer make a change to source, and hit RELOAD in the browser to see the change? If not, why not?
    No problem with client side code (JSP, tag libs, JS, CSS). Java / Spring beans / JPA entities requires the use of and additional product like JavaRebel (or Weblogic 10.3) or a plain restart (to update the DB schema for example).

  • What do you think about the whole Flex revolution, and do you think you are competitors to this technology?
    In some ways we do as IWebMvc offers a lot of client side code. Flex is an interesting technology and so is AJAX. Both are well suited for web develoment. IWebMvc prefers the later because it saves the developer the need of learning a new language and because target applications are more likely to be of the enterprise class rather than highly interactive Flash enabled sites.

  • How easy is it to create a module and plug it into a bigger application, complete with configuration, code, and view?
    Framework and application code are clearly separated. But in truth, as of now, IWebMvc is not designed to create plugins but complete web / enterprise applications. Nonetheless, as long as you keep the Spring configuration in a different XML file and use a different namespace for your sources, with a little extra work everything should be fine.

jueves, 10 de abril de 2008

IWebMvc Milestone 3 released

I've been working hard to polish a lot of aspects of IWebMvc for this milestone 3 and finally today I've finished. The result is a much more mature product that starts to resemble a usable framework. Nonetheless, I had time to add new features as well, some of them really important!

Let's review some of them:
  • Security
    IWebMvc now supports Spring security 2.0 based authentication and authorization using the new security namespace possibilities.
    • Spring Security 2.0 RC1
      The new version of Acegi is fully configured. Declarative security enabled.
    • Database realm
      Users / Roles are persisted in DB as any other entity.
    • User Administration
      CRUD operations to add / edit users, assign permissions and toggle (enable/disable) them are provided out-of-the-box.
    • Login / log off widget
      Working and easily integrated form based authentication. Default user/password combination is iwebmvc/iwebmvc (change it in iwebmvc.properties file)
    • Captcha widget
      AJAX validated captcha to enable human detection.
    • Remember me
      The framework will auto-login a user if so desires and will store authentication info using cookies.
  • Preliminary documentation
    A long standing due. A good percentage of the client interface is documented using the demo application.
  • Widgets
    • I18n Text
      A user can attempt to automatically translate texts into any of the supported languages using the Google AJAX Translation API
    • Tree (Hierarchy) widget
      New in this version, a user can build a tree of generic nodes and modify it as wished.
    • Grid (Table) widget
      The new grid supports a contextual menu, filtering (in addition to paging and ordering), inline edition of cell data (with AJAX storage management), cell content view (for data that exceeds column width) and auto width/height
    • Form widget
      Allows to check required fields before submitting and sending complete forms using JSON.
    • Other widgets
      Everything has been revamped a little or a lot.
  • Miscellaneous
    • YUI compression
      All JS is minified before sent (in addition to GZIP). This isn't activated by default in development environments.
    • Audit
      All create / update / delete operations are transparently audited (user, operation type, date/time, affected record, ...)
    • RSS feeds
      A generic framework to obtain RSS feeds of any entity has been developed. Example feeds have been created for audit operations.
    • DWR custom converters
      Working with JPA entities in JS is easier with the UUID and the Class converters.
    • IE7/Opera support
      A lot of work has been invested in making IWebMvc compatible with other browsers. IE7 is fully compatible with this release (though this bug in dojo affects any page that contains an Editor). Opera support is preliminary but a good chunk of the code is working.
    • Upgraded libraries
      In particular, to dojo 1.1 final but Spring, Hibernate and many others as well. Important: Netbeans project files have been migrated to v6.1beta to get rid of some absolute paths and facilitate project sharing (and include sources and ...). I've just tested this release with Netbeans/Glassfish & Ant/Jetty (though Eclipse/tomcat should still work fine).
And dozens of bug fixes and other issues. All in all, a decent work! Remember that you can download it from the repository. Or save time by watching the (trimmed) screencast (you may need this codec). Enjoy it!