I am developing an Ext JS based web application which will manage Origination aspect of commercial loan. Initial prototyping was done using DOJO Framework v0.4, however this version of DOJO is far too slow to be used in Production and version 0.9 is not yet ready for prime time. Ext JS is promising and certainly far better in terms of speed of execution, consistent look and feel and rich collection of widgets. Anyway, the ideas is as follows:

- Main Page: This page will contain a collection of deals, which can be sorted and filtered using various criteria such as: My Deals or Deals that are in a certain status.

- Deal Management Dialog: This dialog is the crux of this application. It is used to create new deals, or to manage existing deals.

I am using JPA (Java Persistence API) to implement the server side code. Hibernate is used as persistence provider. Transaction are RESOURCE_LOCAL (managed by the application) - I have implemented transactions using callback to avoid sprinkling transaction related template code all over the business layer.

-Main View: Calls StatefulRemoteDealManager.findMyDeal() to get a collection of current user’s Deals. StatefulRemoteDealManager is aware of user’s session / context and returns deals created / managed by the current user.
-New Deal View: Calls StatefulRemoteDealManager.createDraftDeal() to create a deal in draft state.
DWR allows to expose fine or coarse grained server side methods to JavaScript using JSON. For example, when I need to create a Borrower, I call, RemoteBorrowerManager.save(Borrower b).
Borrower object can be constructed in javascript as:

var borrower = new Borrower({name: ‘ABC Borrower Inc.’});