Search code examples
javajavascriptjakarta-eeserver-sidejavascript-framework

What's the best modern way of developing open web apps with a rich JavaScript API for data access?


The company I work for has a powerful Java based server component framework for interacting with special control systems.

We have a UI framework but this is also Java based. A customer can use a Java Applet to access control information etc.

I've recently started working on a rich JavaScript API to access this control system information remotely. It's currently a prototype. It's nice because anyone who's familiar with JavaScript can access our Components remotely. So far it works really well. I've written some prototype applications that use this API. This gave me an introduction to jQuery - great! I've also added the ability for the JavaScript API to make RPC calls to Java as well as a session based Component architecture for when you really need something held on the server.

So far so good. I have to admit though that I'm not really a 'web developer'. I've never used Structs, Spring or any of the MVC based architectures for serious Enterprise based web development (I AM very familiar with design patterns though). My background is application development.

I'd like to know from the pros whether this is the right approach or whether I'm missing anything. Someone I work with has created a really neat Server Side Include architecture. However, I'm wondering now whether this is really necessary? After, I think I can create just about anything using my JS API and jQuery. Should I consider any other 'server' based architectures in this new age of open web apps?

As far as browser support goes, I'm not concerned about the older generation of browsers (please no lectures here, the old technologies we've got will do for IE6 and alike).

By using this open client side technologies, I'll be able to write sophisticated open web apps. Very little server side code will be needed in reality because of my API. I'll be able to take advantage of HTML 5 features etc. But am I missing anything? Should I be considering other server side based Java technologies like Server Side Includes? Am I too client focused?


Solution

  • Well there are four ways to create modern RIAs: HTML5/Javascript, Java Applets, Flash/Flex and Silverlight. Only the first two are open.

    Applets are a nuisance and not really liked by people. Personally I'd go with HTML/Javascript.

    Since you are a Java shop I'd recommend going with GWT for the following reasons:

    1. It's open source with business-friendly license.
    2. It creates minimum-size browser-optimized javascript.
    3. It's actively developed and used by Google. This is a guarantee that it'll be supported for some time.
    4. There are a lot of developers with knowledge of it.
    5. It has good documentation and very active user group.