Wednesday 25 November 2009

PLINGS and QlikView

Spent some more time working on the PLINGS app today. Tidied up the 'Create New User' form and improved the way it worked. This is probably the last application I will ever write in ASP.NET; having seen what DOJO can do I find the whole thing slow and unresponsive.

Also expanded the eClaims dashboard for QlikView with the help of one of our potential customers. The functionality that you can create very quickly was amazing and it has received a very positive response.

QlikView Reporting

Stumbled across an article in Time Magazine about a company in the US that makes a product called QlikView. It's a really, really good development suite for building data dashboards. It allows you to import tables of data and it automatically finds relationships between data. So if you load data about mileage claims (I've used this to put a demo together) you can quickly show the sum of all the unauthorised claims for a specific department in September 2009 by clicking a few controls. There are no complicated SQL scripts, no VB to change the data - it takes no time at all to get something up and running. There's also a full suite of controls - graphs, charts, dials, lists to make everything look neat and funky.

Did I mention it was fast! I can achieve in two hours something that would have taken me days of boring development time. Plus I know that I can easily train this out to other people on the team.

The sales team is coming in to see us on the 7th December and they have offered some free time to use some of our data and put together a polished demo. Hopefull we can convince customers that this is the way forward in terms of reporting / data dashboards.

Monday 23 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (8)

This morning I had a look at the different 'sub layers' available to me. Each map is built from a base layer (of which we have two, an OS map that shows streets, houses etc. as coloured polygons and a satellite map which shows cars, trees, phone boxes etc.). You can also add extra information on top of these such as plotting the location of libraries, one stop shops, bridges, bus stops and ward boundaries.

This is pretty useful because I now have a map of the borough with all the ward boundaries and the user can click inside one of the boundaries and see the stats for that ward. Now I need to figure out how to plot the geographic location of individual instances that occur in the ward which shouldn't be too difficult because the API has a method for doing that sort of thing.

GIS Dashboard Replication with STRATUS RIA tools / DOJO (7)

I have now (sadly) gotten into the habit of writing this a day late. I spent Friday morning doing some more work which involved getting the application to dynamically output a table of data and a line chart that summarised the data on every click of the mouse. The charting element is included in the DOJO library and took a little bit of figuring out while the table is just building and injecting a string of HTML into a DIV on the web page which is easy enough to do.

Friday 20 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (6)

Another successful afternoon (yesterday, I'm writing this a day late). Now I have the web application displaying both east / north / ward info when the user clicks as well as displaying enforcement statistics for the specific ward. Had a bit of a crisis over the mouse click - for some reason the app was only displaying the stats info on the second click - but I fudged it in the end by nesting a function within a function on the OnMapClick event. It works so I guess that's the main thing - I have a suspicion that the problem was being caused by the search results that were coming back. I use two different search functions and both were returning an object called 'results'; need to investigate this further.

Today I need to work on the following:
  • Replace the standard layer with a layer that shows the ward boundaries
  • Add a date filter that lets the user decide how much data they want to see
  • Figure out how to display graphs of data using the DOJO framework

Thursday 19 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (5)

Wow! Lot's of progress today. Finally got my head around the fact that the API will allow you to search a specific MapInfo table for data that relates to that specific point. So if I want to find which ward I'm clicking on, for example, I can just use the search at point method and connect it to the wards table and it will give me the name of the ward. Simple!

I have a demo working now where a mouseclick will give the easting, northing and ward name of the point I have clicked on the map. I now have to figure out how to pull enforcement statistics back for the ward I have clicked on; just need to get my functions in the right order.

Tuesday 17 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (4)

Another pretty successful afternoon. Three of us have worked together to figure out how to pull back and display event information within a specific radius of a point on the map. We also discovered that the map was configured wrong based on the PB examples (their bounds are set for London, not Knowsley).

There doesn't appear to be an onMapMouseOver event (or something similar) to fire an event when the mouse is moved. I phoned the support team and they said that they tried to get it to work but couldn't. That's a bit of a shame.

Now I need to start planning how to actually put the dashboard together and also if there's a way to filter data that gets pulled back from the Geostore table. I also need to work out how to show events for a specific area partnership. Lots to do but much further on than I thought I would be after just two days.

GIS Dashboard Replication with STRATUS RIA tools / DOJO (3)

Success! After yesterday's frustrations at not being able to download the right files a colleague who knows a lot more about setting up Apache websites than I do suggested recreating the Stratus web server locally and pointing Aptana at the local version instead. So we did the following:
  • Installed Apache Tomcat 5.5.23
  • Copied the contents of the Stratus webapp (that's the root for Tomcat much like inetpub\wwwroot is the root for IIS) into the local webapp folder
  • Created a new project in Aptana and pointed this to the ria content on the local machine
  • Moved all my test files across and hit compile

After a little bit of messing with the filepaths for the .js and .css resources we were good to go. The map displayed and I was able to move around, zoom in / out and all that good stuff.

Now I've started working on getting onclick events from the map, and also using the features tables to do a 'Find My Nearest' search for libraries and one stop shops. This is giving me a little headache - I can't get any x / y co-ords to work other than the sample ones provided by PB - but I'll get there.

A good morning's work.

Monday 16 November 2009

GIS Dashboard Replication with STRATUS RIA tools / DOJO (2)

Bit of a frustrating afternoon. I've been building up the structure of the application and making sure that all the necessary .js files are available (there are a lot). If you dump a load and then refresh Aptana it takes a few minutes to update itself which is irritating (I guess it's compiling all the content or something).

Now I have got to the stage where it looks like FireFox is downloading a load of content from the server that the API sits on but it's trying to get hold of one particular file in a folder that doesn't exist (ria/widgets./i18n.js) anywhere on the server. I wonder if this is a bug? The wierd thing is that the examples work fine so maybe it's something I'm doing wrong.

More tomorrow.

GIS Dashboard Replication with STRATUS RIA tools / DOJO (1)

Just finished 1/2 day #1. Spent the morning setting up the development environment and running through some basic DOJO tutorials. Achieved the following:
  • Downloaded and installed Apanta Web onto Windows XP (http://www.apanta.org). This is a free development tool that comes with a DOJO plugin that makes life easier.
  • Downloaded and installed FireFox (http://www.mozilla.org). I am reliably informed that you have to pay for a debugger that works with IE; the FireFox one is (of course) free.
  • Set up a new project in Apanta. If you create a default web project then it asks you if you want to add the reference to DOJO. Learned how to add files, set the start page, that sort of thing.
  • Worked through a series of DOJO tutorials at http://www.sitepen.com/blog/2009/10/30/why-dojo/#more-770 that show off some of the cool stuff you can do pretty easily. They all eventually compiled and worked.

There was a bit of post - install jiggery pokery for Apanta; you have to download and install the DOJO plug in, set the proxy properly so that it can connect to the web (for some reason it didn't like the new proxy we have installed) and set up a debug environment that defaults to FF and not IE. But after a mornings' work I'm good to go.

GIS Dashboard Replication with STRATUS RIA tools / DOJO

On Friday I was asked to drop everything and investigate how we can replicate an existing GIS dashboard using the STRATUS RIA tools (http://stratus.pbbiblogs.com/tag/ria/) and the DOJO toolkit (http://www.dojotoolkit.org/). DOJO is a JavaScript library that let's you do extremely cool things. If I stick to my plan then I'm going to record my experiences here and there should be an update for every 1/2 day that I spend working on this project.