WiMIC Browser – my first big Flex application
Writing about web page http://www2.warwick.ac.uk/fac/arts/history/irishwomenwriters/
The University of Warwick History Department is today releasing the beta version of its WiMIC Data Browser. This is a Flex 2 application that I have built to give online access to the huge bibliographical and biographical database of “women in modern Irish culture”, compiled by a team of researchers at Warwick and at University College Dublin.
The WiMICBrowser is an example of the kind of Rich Internet Application now made possible with the Adobe Flex development toolset. It provides four search interfaces, of varying degrees of complexity. For example, users can do a "Simple Author Search" by selecting the Authors tab and the Simple Search tab. This interface allows them to do a freetext search of various fields in the database's People table.
To compliment this simple search, there is also a "Complex Author Search" form that contains many more fields and options. Note that the user is given the option of saving the search in their "Filing Cabinet". This uses the Flex/Flash Shared Object system (Flash's equivalent of cookies) to permanently store the search parameters on the client machine's hard disk (until they select to delete it). A future migration of the application to Flex 3 and the Adobe Internet Runtime will allow these searches to be saved to ordinary files on disk, and hence allow them to be moved between PCs. I will also consider allowing users to share their searches online. Here is the search saved in the Filing Cabinet, with the options to re-run or delete it:
And the results of the search is a list of mathing authors presented in a standard Flex datagrid, with the option to view a full record of any of the authors. An author record is shown below. Note that the results list remains populated with the results and accesible on a single click of a tab.
The author record contains a rich array of data. Some authors are listed in the database under several names, thses are shown in the "All known names" list. Publications for the author are shown in the datagrid on the right. This shows 12 records at a time, with a paging control to move through the data. Notice that there is a link next to each publication record. Selecting the magnifying glass link opens that publication record in the Publications -> Selected Publication Record tab. For exmple, here is a book record:
Each type of publication (book, book chapter, article, journal edition, play, film) has its own type of publication record page similar to this. These are created as Flex View States based on a generic Publication Base State. All of them list the authors of the publication, with their role in authoring it stated (for example, "editor"). The various recorded versions of the publication are also listed. In the case of a book, a datagrid is given listing its publishers and printers.
Publication records can also be found using the two publication search interfaces. Again these are "Simple" and "Complex". They work in a similar way to the Author Search interfaces. Here is the Complex Publications Search:
In this case the search is configured to return all books and articles (see the filter on the right) that are of the genre "religious", in the languages "Irish" and "English", written between 1700 and 2000. There are many other options for configuring and filtering the search. The SQL query for this search was rather difficult to write!
The results are again shown in a paged datagrid:
The application is now available as a "beta", with the aim of getting feedback from researchers and students working in this field.
I will also soon write a technical review of the application, with consideration of the techniques used to build it, and the feasibility of creating similar applications in the future. For now, I will just say that for such a complex application, it was quite simple to contruct. The Flex/Eclipse IDE makes this possible. Employing a relatively sensible application framework has helped. I constructed my own MVC framework loosely based on my experience with Java application frameworks. The project structure is shown below:
The WiMICBrowser.mxml file defines both the container control (a set of customised TabNavigator controls) and the controller code (which maps actions onto action classes, and equips them with the required model objects and views). Note that the queries are specified in the queryDefinitions.xml file, loaded on start up. This is kept externally to the application, so that I can modify the queries independently. The queries themselves are SQL Server stored procedures.
The dataservices folder contains a class that does all of the work of connecting to a servlet to do the database queries. Communication with the servlet is via JSON, with the servlet mediating queries and results between the client app and a SQL Server. If I wish to employ a different method for communicating between the application and the database, or even using a different database, I just need to change the dataconnector class.
The utils folder contains various utilities, including the FilingCabinet class, which does all of the work of serializing and de-serializing model objects and query objects into the SharedObject storage (note that by default Flash/Flex does this really badly, serializing custom classes is not straightforwards). In the future I would like to try migrating the application to the Adobe Internet Runtime, so that it can run outside of the browser sandbox. That will then allow me to escape reliance on the SharedObject store. I will also soon add an option to create folders of selected publication and author records.
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.