WordCamp Presentation | Drasil Mapper Plugin

August 23, 2008

I have been at WordCamp Cape Town 2008 all day listening to all sorts of interesting speakers presenting various interesting topic.

Drasil Mapper Plugin

View SlideShare presentation or Upload your own. (tags: plugin wordpress)

Here is a video demo of the plugin, sorry that the file is only avail in WMV, not had a chance to convert it to a flash file yet!

We made use of Object Relational Mapping, specifically Propel 1.3 - here are two nice quotes on the subject.

Object Relational mapping is a way of transparently interacting with a relational database by using objects. Each database table is a new class and each row in the table is a single object. Relations between tables are now relations between classes.”

ORM relegates the database to simply being a store for persistent objects. What this means is you no longer need to rely on half-baked SQL queries to save and load objects. You can let the objects take care of that themselves, without worrying about the database back-end.”

In the entire plugin only one line of SQL was written, but I am not sure if we ended up using it….

The front end and presentation is entirely done with Ext-js. The actual content that’s output by php is the code to include the javascript files, one bit of javascript to initiate the whole thing, and an empty div for it to write the content into. Other than that all that the server-side code of the plugin returns is raw data in the JSON format - which is the most practical format to use with Ext-js.

Finally, we made use of Walter Zorn’s vector graphics drawing library to draw the lines on the map, and David Lynch’s jquery ‘maphilight’ plugin to do the highlighting you see in the area select section on the post page.

I think that covers everything - if I remember anything I missed I’ll let you know.

P.S. Oh, just as a final note - in order to use propel it does need to be installed on the server - which means that this plugin DOES have the pre-install requirements of having propel and whatever it may require installed prior to installing the plugin… this might not fit in with the ideology of WordPress - I’m not sure - but it definitely facilitates developing clean, readable, and maintainable code.

Leave a Reply