geo-django python

16
City of Asheville Information Technology Services Django – GeoDjango- Python

Upload: dave-michelson

Post on 05-Dec-2014

364 views

Category:

Technology


4 download

DESCRIPTION

Basic overview of Django and Geo-Django for a regional GIS group MRAC September 2012. This is not really meant for Django wizards.

TRANSCRIPT

Page 1: Geo-Django Python

City of AshevilleInformation Technology Services

Django – GeoDjango- Python

Page 2: Geo-Django Python

City of AshevilleInformation Technology Services

What is Django?Yes this is Django. Django Reinhardt.

Page 3: Geo-Django Python

City of AshevilleInformation Technology Services

But What is Django?Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.

Developed by a fast-moving online-news operation, Django was designed to handle two challenges: the intensive deadlines of a newsroom and the stringent requirements of the experienced Web developers who wrote it. It lets you build high-performing, elegant Web applications quickly.

Django focuses on automating as much as possible and adhering to the DRY principle. – Do Not repeat Yourself. (http://c2.com/cgi/wiki?DontRepeatYourself)

Please note that this was all plagiarized from Django website

Page 4: Geo-Django Python

City of AshevilleInformation Technology Services

But What is Django again?Django is really a MVC web framework. Model – View – Controller.

In Django they kind -of mix this up and call it MTV Model Template View. Its really the same

The Model is the data The View is the logicThe Template is the presentation

Each part is loosely coupled and abstracted or each part can kind-of exist without the other.

Page 5: Geo-Django Python

City of AshevilleInformation Technology Services

But What is Django again?Everything is abstracted

Why is this good?

Scenario the decision is made to migrate all data to SQL Server. This includes all the data that existed in MySQL and PostGresSQL database. You have a few Web Applications written in Django that used these databases on the backed.

The change in Django would take about 30 seconds.

Edit the Model enter the new connection information and done. The data is abstracted from the source no other code changes are necessary you never use SQL or data vendor specific calls. You use python code which is not tied to the data source type.

Page 6: Geo-Django Python

City of AshevilleInformation Technology Services

And GeoDjango?GeoDjango is an extension or add-on to Django that spatial enables the framework.

It uses spatial data in variety of sources including my favorite SDE.

Yeah right really no SDE here, just real data sources such as PostGIS, SQLite, MySQL, and Oracle. And MSQLServer

It also uses the typical GDAL, GEOS, and proj.4 FOSS projects that ESRI, PostGIS, and just about every GIS modern technologies use.

Page 7: Geo-Django Python

City of AshevilleInformation Technology Services

Who uses DjangoNot just for news agencies.

Page 8: Geo-Django Python

City of AshevilleInformation Technology Services

Who uses Geo-Django

Page 9: Geo-Django Python

City of AshevilleInformation Technology Services

What works with DjangoAnything that python supports!

Which is just about every piece of technology python is cross platform

Page 10: Geo-Django Python

City of AshevilleInformation Technology Services

Thumbs Up Extreme Flexibility!

No Complications, no thrills, works the same on any Operating System Mac’s, Linux, and Windows. There is a binding to just about anything you can imagine. And there are millions of examples to do just about anything you can imagine. And yes it even works with ESRI products.

Python continues to show me that it is the simplest, easiest, and most diverse code base available.

Page 11: Geo-Django Python

City of AshevilleInformation Technology Services

ExampleBudget Department Online Citizen Budget Application – “Quick Application”

Citizens would create a City Budget by adjusting the allocated money to different initiatives.

The application needed to be interactive and supply feed back as they entered the data.

The budget office wanted to administer the data and information without interacting with IT. (data driven)

The budget office wanted to record and report on how people budgeted…

Page 12: Geo-Django Python

City of AshevilleInformation Technology Services

Example 1So in my tool bag was Dot Net - The dot Net solution from experience would take at least two – three weeks to get to a prototype. I had a week

I had already been investigating new web frameworks. And Django/GeoDjango kept coming up. I had done a tutorial and thought this might be a good easy fit to test in the real world

I jumped in started and had a proto-type in three days. This is with very little meaning no Django experience.

Page 13: Geo-Django Python

City of AshevilleInformation Technology Services

Example 1

Page 14: Geo-Django Python

City of AshevilleInformation Technology Services

Example 2Start Testing possible mapAsheville replacements

I investigated open block – in two days had something similar to the Crime mapper and Development mapper running and fully functional.

Page 15: Geo-Django Python

City of AshevilleInformation Technology Services

Example 3Asheville – OpenTreeMapper

Page 16: Geo-Django Python

City of AshevilleInformation Technology Services

The End