Differences

This shows you the differences between two versions of the page.

dev:fk_geodjango [2009/07/06 20:36] (current)
Line 1: Line 1:
 +===== Overview =====
 +This document discusses suitability of [[http://geodjango.org/|GeoDjango]] as an underlying framework for 2.0 version of [[http://sahana.lk/|Sahana - FOSS Disaster Management System]].
 +Covered areas are based on [[dev:fk_requirements|requirements document for Sahana 2.0]]. It was kindly provided by Marek Kuziel of Encode.net.nz.
 +
 +===== Introduction - What is GeoDjango? =====
 +A world-class geographic web framework. It is an add-on for [[http://djangoproject.com/|Django]] that includes support for geometry fields and extends the ORM to allow spatial queries.
 +
 +Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
 +
 +There are many reusable application written for both Django and GeoDjango that are "production ready" and could be used. Those are pointed out as appropriate throught the document.
 +
 +Sites that use GeoDjango (in no particular order):
 +  * http://www.everyblock.com/
 +  * http://brightkite.com/
 +  * http://watch.tampabay.com/homes/
 +  * http://floridahome.palmbeachpost.com/realestate/welcome/
 +  * http://www.terradue.com/duetopia/
 +  * http://koordinates.com/
 +
 +===== Database =====
 +  * Object Relational Mapping (ORM) - is built-in Django. GeoDjango extends this to allow spatial database queries
 +  * Connection Pooling - is not built-in
 +  * Data Versioning - can be achieved by using [[http://code.google.com
 +/p/django-history/|django-history]]
 +  * Audit Trial Support - can be achieved. [[http://code.djangoproject.com
 +/wiki/AuditTrail|More information]].
 +  * Database Abstraction - is built-in as part of ORM
 +
 +===== Quality Assurance (QA) =====
 +  * Form Validation - is built-in
 +  * Error and Exception Handling - built-in (error messages handling for users, etc.)
 +  * Security - [[http://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ref-contrib-csrf|Cross Site Request Forgery]] protection is part of official Django contribs. Security of any Django-based site is discussed in [[http://www.djangobook.com/en/2.0
 +/chapter20/|a Django book]]  
 +  * Auditing - see Audit Trial(?)
 +  * Logging - powerful Python logging can be used. Custom logger for Sahana could be an option too
 +  * Backup - is not built-in. Custom backup solution would need to be developed
 +  * Unit Testing - three available options are built-in:
 +    * doctests - part of the code documentation. Keeps documentation up to date and tests documented functionality.
 +    * unittest - standard unittests
 +    * client tests - like unittests, but similates user's requests in order to test UI
 +
 +===== Working List (yet to be categorised) =====
 +  * Web Services (SOAP, RSS, REST)
 +    * [[http://docs.djangoproject.com/en/dev/ref/contrib
 +/syndication/#ref-contrib-syndication|RSS]] - is part of contrib
 +    * SOAP, REST - would need to be developed. GeoDjango makes all the ground for for this quite easy, though
 +  * AJAX/JS - is not built-in. Any JS/AJAX library can be used. Unit testing of AJAX is possible
 +  * Easy Integration - 3rd party APIs can be integrated easy way. ie. [[http://nyquistrate.com/django/facebook-connect/|Facebook's Connect]] can be added in 15 minutes.
 +  * Mobile Device Support - templating language allows to develop standard/print/mobile styles easily
 +  * Less Bulky - Django is bulky. You would need to look somewhere else if your priority would be very lightweight solution.
 +  * Loose Coupling - Django has many parts loosely coupled. Architecture-wise it is very modular with loosely coupled parts that work together well and make development easy
 +  * MVC - Django is MTV (Model, Template, View) which you can easily translate as Model (=Model), View (=Template), Controller (=View). MVC/MTV makes sense to use. Most of the contemporary frameworks are MVC so developers are familiar with the pattern in general.
 +  * Service Oriented Architecture (SOA) - this should be part of Sahana 2.0 stack if you want to go that way.
 +  * Scalability and Performance - nothing to worry about here with regards to GeoDjango. Good caching support with memcached, you can use fast webserver for serving static files. Reverse proxy and load balancing should be considered from the beginning for a deployment. These things are always depandant per case/installation, but there are not any limitation that could cause troubles to scale. See sites that use GeoDjango at the top for examples.
 +  * Large Developer Ecosystem - noting to worry about with Django. Less experts to find for GeoDjango, though. Documentation of both projects is excellent and the whole community is great.
 +  * Learning Curve - it's very easy to get started and learn GeoDjango. It's written in Python. Code readable and easy to understand. No "spaghetti code" horror stories as we know them from other languages. Anyway, the most important thing is, that GeoDjango makes it very easy to work with GeoSpatial data so you don't need to be GIS expert to create a new functionality.
 +  * Strong GeoSpatial Capabilities - this is strongest point of GeoDjango. See [[http://geodjango.org/docs/install.html#requirements|installation requirements]] for supported and used libraries and databases
 +  * Workflow Engine - is not built-in. [[http://code.djangoproject.com/wiki/GoFlow|GoFlow app]] could be a good match
 + 

Navigation
  • Navigate