All 3 entries tagged Wimic
No other Warwick Blogs use the tag Wimic on entries | View entries tagged Wimic at Technorati | There are no images tagged Wimic on this blog
December 28, 2008
WiMIC Browser v.3 – MySQL, BlazeDS, Lucene, Spring, Flex 3.0, Cairngorm
Follow-up to WiMIC Browser v.2 – migrated to Adobe Flex Cairngorm application framework from Transversality - Robert O'Toole
I've taken advantage of some new technologies to redevelop the Women in Modern Irish Culture data browser. The application will eventually give full online access to a big biographical and bibliographical database developed by researchers at Warwick and University College Dublin. The last version was rather over-complicated and ponderous, giving slow and awkward access to the data. This new version provides a much more instantaneous view onto the thousands of records. It is now really a data browser rather than just a search tool. Researchers can immediately scan through thousands of records, which are all immediately loaded into data grids. Whereas the old version served up 12 records at a time as a result of database queries via JSON, the new version can serve up over 9000 records in a few seconds, using the highly efficient BlazeDS mechanism.
Rapid data browsing with BlazeDS
This is how it works:
- the Flex/Flash interface calls a method on a Remote Object that will return an ArrayCollection of Author objects;
- the RemoteObject proxies through to a corresponding method in a class exposed via BlazeDS;
- the Java method is in fact a Spring bean which queries the database using Spring's jdbc utils (the data is now on MySQL rather than SQL Server);
- Spring builds a Flash Remoting ArrayCollection of Author objects (corresponding to my Flex Author class);
- the ArrayCollection is returned as the result of the proxied method using the effiiciently compressed AMF protocol;
- the ArrayCollection is added to the Flex Cairngorm model, to which the datagrid is bound;
- the data appears in the grid, and can be browsed and re-ordered instantly.
Even when retrieving all 9000+ authors, that only takes a few seconds.
The authors are listed in an AdvancedDataGrid, allowing the researcher to drill down into a selected record. This retrieves further data about the selected author (using BlazeDS) including a list of publications.
Fast and smart querying with Lucene
In addition, I have used the Lucene Java library to add query interfaces that search pre-built indexes. Lucene performs free-text and exact searching as required, and also uses synonyms. So, for example, a researcher could search for "Dublin AND poetry" in the simple search form, and see almost instantly all authors with the words "Dublin" AND "poetry" in their records (including their publications). It would also list records containing "poem" and "poems", giving them a lower ranking in the results.
To be even more precise, one can search for "Locations:Dublin AND Genres:poetry" which would return only authors of poetry with some association with Dublin. "Locations" and "Genres" being fields in the Lucene index. I'm using that mechanism to create a search interface with specific fields such as "genre", "surname", "firstname", "publication title" and "location".
As with other queries, BlazeDS is used for highly efficient transmission of results.
A further addition, again using BlazeDS and Lucene, is the ability to list authors who had published in a selected decade. Each author record in the Lucene index contains a list of the decades in which they published. The efficiency of this approach is demonstrated by viewing all authors to have published since 2000.
Now that I have all of these elements in place, I'll be able to quickly add more features and richer data, including more information on publications.
September 06, 2007
WiMIC Browser v.2 – migrated to Adobe Flex Cairngorm application framework
Follow-up to WiMIC Browser – my first big Flex application from Transversality - Robert O'Toole
The application behaves just as before, but the plumbing behind it has been rationalised and improved using Cairngorm. The project now looks like this in the Navigator:
The migration was quite straightforwards. The design of the original app was quite similar to that of a Cairngorm app. However, the framework offers a few neat tricks:
- A simple and easy to understand event based controller. Views can initiate events, which are then passed onto the required command by the controller. Once the event is called, the originating view is forgotten about.
- The AppModelLocator singleton, which gives access to centrally stored value objects. Elements in views are bound directly to value objects and properties in the model. If a command updates the model, then changes are made to the bound elements.
- In this app, tab navigators are used to contain the various views. The TabNavigator.selectedIndex property of each tab navigator is bound to a property in the model. That means that a command can change the currently displayed tab by changing the relevant property in the model.
- Chaining of commands – a command can call another command. For example, when viewing a single publication record, the GetSinglePublication command calls further commands depending upon the type of publication that is being viewed.
July 17, 2007
WiMIC Browser – my first big Flex application
Writing about web page http://www2.warwick.ac.uk/fac/arts/history/irishwomenwriters/
What then do I think of Flex and RIA technologies? Yes, at last we can easily and safely build complex web applications that run well on [m]any different platforms.