Wednesday, May 31, 2006

Creating the Lookup Screens

One of the early challenges in designing this application was how to create the lookup screens for the terms, sales reps, shippers, customers, accounts, vendors, etc. that would be used throughout the app in all the document entry areas. We needed a reusuable screen that could be popped up, would pull its own data, allow selection from the grid, and ending with the data selected being distributed back to the calling area.

The use of the TitleWindow with the PopUpManager made this very straightforward. All the lookups were built in the same way with only changes to the webservice query call and the datagrid columns. Otherwise, all follow the same model.

Example: In the customer invoice, you will find the following lookups at the middle of the invoice screen.




By clicking on the lookup icon ( looks like a grid ) for Terms, the following screen will appear.



The screen is modal so you must choose either the Ok or Cancel button to close the screen. The Ok button is enabled only when a selection has occurred in the grid.

If you would like to look at the code for this lookup, you may download from:

http://www.is2software.com/quickbooks/is2qb/Terms_lu.mxml

Also, I have loaded a pdf tutorial where I have tried to describe how the lookups work. Maybe this will help someone who is starting out with Flex.

http://www.is2software.com/quickbooks/is2qb/Build_Terms_Lookup.pdf

If there is a better way, please feel free to tell me. I am by no means a Flex expert. I am still learning how to putter around in Flex Builder 2.

Tuesday, May 30, 2006

Submitted My Flex 2 Derby Entry

Worked all weekend and finally got my application in shape enough to enter it into the Flex 2 Application Derby. My entry is a web front-end to a Quickbooks accounting database.

You can view the work in progress at http://shop.is2software.com/is2qb/bin/is2qb.html.

I had two primary goals in mind when I started this proof-of-concept.

1. Determine how to build a xml soap server that would access Quickbooks data using the Quickbooks Sdk. This server could be used to serve data to both windows and flex clients.
2. Determine if Flex 2 could be used to build a full accounting application front-end.

My first goal, the building of the xml soap server took over a month to work out the base mechanisms. In the end, one of the most used request functions has been the raw qbxml query call where I can send the server any query I wish. That way I can view the raw returned response. That made the development speed up dramatically on the flex client side. In fact, I incorporated a xml viewer title window just for viewing the requests and responses.

The second goal has been partially achieved. With Flex 2, I have been able to create a working application where queries can be called via web services and easily formatted in the datagrids. The area that interested me most was the ability to enter new, view existing, and modify existing customer invoices. Master / detail operations with multiple list lookups and calculations are usually very hard to attain in web browser interfaces. But Flex greatly simplified the user inteface screen layouts.

I will detail individually each of the main areas of the application in my next posts.