"If you don't know where you are going, any road will get you there." - Lewis Carroll

Like many developers I often start a project by jumping in and writing code. For this project I'm going try something a little different and create a road map for my mapping project.

My project is named MapNews. In my prior post, I covered the project concept: present a map with markers/information windows which show news headlines by location.

Doing the design up front is a bit of a jump off of a cliff for me. I've had only a light reading of the MapQuest Platform documentation and am going to proceed to layout the design. This should be interesting; as the project unfolds, I'll be able to look back and see my misconceptions exposed.

Without further ado, I present the following sketch of my design:

One implicit choice I've made here is to use JavaScript on the client to access the MapQuest functionality. Other language choices and/or server side implementation are allowed as the MapQuest Platform has bindings for Java, .NET, CPP, and ActionScript.

The server will hold RSS feeds arranged by topics such as National or Business news. A complete system would include a server side process to collect and cache RSS feeds. I'm focusing on the MapQuest API so I may not build out this component. Instead, I'll just stage a couple of RSS XML files on the server.

I plan to fetch the RSS feeds with an AJAX component after the initial load of index.html to the browser. I'll also need some JavaScript to parse the RSS feeds and discover which items have associated locations and then geocode the locations via the MapQuest API. MapNews JavaScript will also have to invoke the MapQuest JavaScript API to create the map and place markers and information windows on the map.

I've shown the processes executing on the client. However, the physical location of the JavaScript files is also important and is driven by browser security restrictions (scripts can only call back to the domain from which they are served).

For basic maps the MapQuest (MQ) JavaScript files can be directly included from a MapQuest server. For more complex functionality such as searching and routing the MapQuest JavaScript files need to be located on your server. The MQ JavaScript files then communicate with MapQuest servers via a proxy located on your server. MapQuest provides proxy implementations in several languages (Java, PHP5, .Net, ROR, and Flash). I have PHP on my server so that's an easy choice.

That is about all I have in my initial design. The next steps are to get the infrastructure set up. I plan to follow the instructions in the MapQuest Advantage Developer Guide to configure and install the proxy. Then, I am off to the fun parts of writing the RSS parsing code and using the MQ API to bring MapNews to life.