February 2008


Quote Generation

Sean forwarded my request to his IT guy Geoff who got back to us early today.. he created system codes for us and hey presto the request worked.

The task at hand now is to parse the mammoth load of xml that came back from them, so I’m familiarising myself with XPATHs.

Rich Text Editors

I managed to get both the Get and Set ..ContentPageRequestHandlers working correctly today, although for some reason flex is never sending the Set request, so I did lots of debugging today but still haven’t found why.

A little bit of work should see both of these tasks complete.

Meeting with Howard

Today we met with Howard for just under an hour and discussed the following:

Blogs
Our meeting with Dermot on the 15th February
Work completed since last meeting
Architecture run through

Discussed some of the issues we had raised on our blogs, which merged nicely into the discussion of the DM05 meeting, where our first release was made. We highlighted the fact that database migration has taken somewhat longer than planned, with DM’s request for detailed policy information and extra links between clients (husband and wife, parent and children). Kevin has primarily been working on these mappings, while I carry on with developing components deemed essential in the functional specification.

We then gave a nice demonstration of how the architecture works, and how it’s precisely as originally planned (High Level Architecture Overview), we did this by demonstrating the lifecycle of a FLEX getPageContent request to the Management System servlet (flexController), its trail through the chain of responsibility (requestHandlers) and how specifically the GetPageContentRequestHandler reacted -> HibernateSitePageDAO object, SitePage POJO, Hibernate SitePage mapping file all the way back to the JSP that flex interprets. Quite a nice example of how everything is working. I also discussed how adaptable that made the architecture, how pools of popular request handlers could be formed with ease, and how new request handlers can be added without modifying the source of the flexController, quite magic!

Got the XML communication link with bestadvice working, with a test account given to us this morning. Have asked for some clarification on some of the fields and then can get on to testing and error handling etc.

After that I began work on the Shop Front editing Rich Text Editors, by storing the page details in the database and creating requestHandlers to retrieve and persist changes. Considering some primitive version control, or at least a “Revert” function in the editor.

It has been a busy week moving along with the development. This semester we are doing 4 full days per week on the project, and then all our lectures on Tuesdays and Thursdays.

This week I have been focussing on two areas, security and the quote generation.

In the earlier part of the week I set up the Acegi security framework which is now reading from a users file, next step of this is to attach it to a users database. This works very well and have managed to integrate it into flex also. To facilitate this, I have differentiated the Shop Front Controller from the Management System controller by running them as different servlets, each with different requestHandlers associated with them – they are fundamentally the same class though. Shop front requests now go in on the /SF/flex.htm URL and management system requests are at /MS/flex.htm, allowing for easier differentiation between user roles permitted to make those requests.

Decided to set Session expiry time for the Management System to be infinite, as it’s likely that DM will leave the app running all day on his desktop.

Made some good headway on the quote generation, Sean from BestAdvice (bestadvice.ie) has sent on the xml integration guide. I’ve created a QuoteServiceParser interface and a BestAdviceQuoteServiceParser implementation. Currently building the query bit by bit from request parameters and going to use dom4j or jdom to parse the resulting query. Trying out dom4j at the moment.

Some interesting feedback from DM as we navigate his labyrinthine database of duplicated data and mystery links! Kevin is working on the view customer policies function (and its looking good too).

Yesterday we discovered a “ClientKey” in DM’s Access database. It’s a primary key joining quite a few of the access tables.
It joins clients with the same surname, DOB and sex (a bit risky?). So where we had 7 rows pertaining to Dermot in our CLIENT table, this clientkey would join them. Today we tried to trace and to replicate it.

In doing this we discovered the table he considers to be ‘all clients’ appears to be short almost a quarter of the total clients! So we’re going to attempt to clean up or redesign the data, but first we need to know exactly what data he needs. From yesterday it appears he has quite a good idea of what that is, and that we can expect him to let us know soon.

Development Work

We spent the latter part of today beginning to implement the customer -> policy viewing into the app. Kevin on the front end and me on the middle/back. There’s a rather elaborate mapping from the above ClientKey to a policy number, so finding the best way to implement this elegantly in hibernate is key. It looks like a HQL (Hibernate query language) query string will be best.

Release 1 of OBS

Friday morning was tense as we finalised our preparations for delivering Release 1 of OBS to Dermot. Solving some last minute mysteries got done just in time before we left (lunchless) on our way to DM’s office.

The procedure was straightforward:

  • Install Apache Tomcat and deploy application
  • Install MySQL server and create database
  • Install MySQL ODBC Driver
  • Export Access tables to MySQL and perform some modifications
  • Create shortcuts to application and to a restart application batch file (restarting tomcat and mysql)

Most of the steps went off without a hitch, just with some issues of IP addresses between the different machines on his office network and permissions on the database. All of these were solvable with a bit of trial and error. Dermot was admirably patient while this was going on!

Having had a run at the system, Dermot was starting to give some feedback, this was a very welcome change. He suggested filters he’d need to search by as well as the different data he’d need to be available, whereas beforehand he been quite minimal on actual direction or defining requirements, leaving lots of our development up to our best estimations.

Quote Generation – Best Advice

Dermot put us in touch with Sean at Best Advice about getting the so called data-link in place to allow us to generate live quotes on the Shop Front side of the application. Best Advice will allow us to send a post request, returning us XML data of the quotes returned from the various providers. This was a fantastic movement forward in what was one of our most undecided areas.

Today was our first meeting with Howard since before Christmas, our last meeting was a day before delivery of the CMS prototype to DM. Similarly today’s meeting is on the eve of our first release delivery to DM.

Our agenda was as follows:

  1. Blog Review
  2. Bug Tracking
  3. Source Control
  4. Hallway Testing
  5. DM05
  6. Initial Release Review

First off, we had our regular blog review (not too many updates during exam time!) , followed by a demo of our ASP.net Bug Tracking setup that Kevin got up and running on his machine this week – screenshot of issue tracker.

We then discussed our Source control solution, which fast became necessary now that we have started full production development. We have chosen ’subversion’ and its associated eclipse plugin ’subclipse’. It allows for comparisons between versions of files, stored in a repository, making it very easy to get back to working code when you’re 1 undo too far away!

The notion of hallway testing is taken from Joel’s 12 Steps to Better Software, and involves grabbing someone in the hallway (or CA lab) to randomly test the code you’ve just written for usability.

We also demonstrated Release 1, which consists of our replacement customer database GUI: Filters for searching for customers and an interface for inputting new customers’ data.

Spent today finalizing the Customer Database interface for OBS, its nearly completely
wrapped up. Adding new customers, updating existing ones and deleting (marking as
inactive). The flex UI sends a newCustomerDetails request with either a brand new customer
or updated customer details, the newCustomerDetailsRequestHandler determines which it is,
and persists the changes to the database.

Some learning curves today included using a WHERE clause with a hibernate select, deciding
how to deduce whether a customer was new or an update, without relying on information from
flex (Did this using whether or not a clientid was in use), how best to use multiple
constraints.

Flex was sending back the string ‘null’ which was being persisted to the database, rather
than the value null, I overcame this by inserting a simple check on each entry received from flex.

Validation layer will add more concrete assurance to this.

I need to allocate some time to mastering the hibernate mapping technique, particularly in
those instances where multiple tables play a part in creating an object, for example a
customer, with many policies, a contact log and a document library.

Again, our choice between hibernate 2 and 3 will play a part here. Hibernate 3 is the
obvious choice, but some inconsistencies within Spring have caused some headaches here.
[UPDATE: Successfully migrated to Hibernate 3 (headaches included)]

Also need to figure out how to automatically derive the CLIENTCODE as in previous post.

Next Page »