In the last few days I've started some hands-on exploring of Ext, "the client-side, JavaScript framework for building web applications". It's popularity is growing, and I can understand why. It's a pretty remarkable library for building rich user interfaces. What I really wanted to know is whether or not I could easily use Ext from Skyway Builder. Over the last several months as Skyway Builder Community Edition (open source) was approaching it's beta 1 release, I was anxious to give Ext a test drive with Skyway Builder. So I hacked some of the Ext samples to build a basic Ext grid and form that integrated with server logic implemented with Skyway Builder. So the UI was implemented using Ext, and the logic for responding to user events and persistence were implemented using Skyway models, which are generated and deployed as a JEE WAR file using the Spring Framework. The experiment went very well, and it energized me to explore this in more detail. When time allowed, I wanted to build a slightly more comprehensive example.

So the very next day I find a blog post titled "CRUD application using Ext and Java" on Abdel's blog. He built a CRUD application using Ext, a few java servlets, and an oracle database. I was curious if I could take his slightly more comprehensive Ext application and re-implement the back end with Skyway. One of the design goals of Skyway Builder is to provide additive and incremental functionality without being intrusive. I thought this would be a good test for Skyway Builder because I didn't write the Ext front-end. If the design goal was met, I should be able to fully leverage Abdel's Ext application without having to make any accomodations for Skyway.


In about 1 hour from downloading Abdel's sample project, I completely re-implemented the backend using Skyway Builder. Here are the details:

  1. Abdel's example deliberately didn't have an object model. I implemented a Skyway Data Type called 'Person' that has the four attributes from Abdel's example: name, age, city and phone.
  2. Abdel's example was doing data access in his servlets using custom jdbc to oracle. I created a Skyway Data Store, which is an abstract representation of a database used within models to implement persistence. When I deploy the application, the Data Store is associated with a real database (in my case I used MySQL). I didn't need a ddl to create the tables, because Skyway uses the hibernate framework for persistence, and hibernate is configured to automatically derive and create the database schema from the object model.
  3. Each of the servlets were implemented as Skyway Actions. I have included screenshots of their implementations. The entire server logic was cummulatively implemented in nine Skyway Steps (the stop steps don't count; they exist just for readability) You'll notice from the project hierarchy (in Skyway Navigator) that the Actions are contained in a Skyway Web Conversation and subsequently a Skyway Web Controller. The Web Controller is used to map web requests to Skyway Actions, I configured these actions to map to the same request URLs that Abdel specified in his Ext application.

I was very pleased with the excellent results of this experiment. The only changes I need to make to Abdel's Ext application (application.js) was to change the form field names to match the variable name I used for my Person data object. If Skyway integrates well with Ext, it's reasonable to assume that Skyway will integrate well with most AJAX frameworks.

If anyone is interested in a copy of this Skyway project for Eclipse, please drop a comment on this blog post.