Django, What is it, Why is it cool?

14

Click here to load reader

description

This text presentation attempts to hit on the highlight features and structure of Django and its ecco-system. It is intended as an introduction for those who are curious about , what is it?

Transcript of Django, What is it, Why is it cool?

Page 1: Django, What is it, Why is it cool?

Django, What is it, Why is it cool?

'Cause it is built on Python and has Pinax on top, and

they are all Open Source

http://oswco.com

Page 2: Django, What is it, Why is it cool?

Why do I care?Open SourceLow cost Platform AgnosticNo vendor lock inHigh PerformanceModern architectureStandards CompliantHighly ModularWidely supportedInternationalization support LtR language support

http://oswco.com

Page 3: Django, What is it, Why is it cool?

Django Is a Python FrameworkNot just a Web frameworkWhat is Python?

http://oswco.com

Page 4: Django, What is it, Why is it cool?

Traditional Approach vs. Django

Build Data DictionaryBuild Data Base InterfaceBuild Authoring ToolsBuild LogicPaint TemplatesBuild Data Flow

DoneDoneDoneDoneDone Done

Traditional Model                    Django

http://oswco.com

Page 5: Django, What is it, Why is it cool?

PythonAn Interpreted Language with extensive corporate usage and sponsorship Inherently Multiplatform Linux, Windows, Mac (some others)Inherently Multi Language (multi character support also)Many "packages" covering a wide variety of domains Math : scipy Image Recognition

Corporate sponsorship:GoogleMicrosoft (Iron Python)Sun (Jython)

http://oswco.com

Page 6: Django, What is it, Why is it cool?

DjangoLots of users:GoogleNASAPBSBit-BucketNewspapers

http://oswco.com

Page 7: Django, What is it, Why is it cool?

Django as a framework An MVC type framework (Called MVT in Django)• M= Model, The database interface• V= View, Logic for getting stuff in and out of the database• T= Template, The display logic

Closest competitor is Ruby on RailsMicrosoft playing catch up in MVC frameworks still almost BetaJava examples are Grails, Spring, Struts or Java Server FacesPHP has dozens Symfony, CodeIgniter For the Web MVT (or MVC) is as important a concept as "Structured Programming" and dates back to 1979. Enables easier maintenance and independent development of functional modules with different skill sets

http://oswco.com

Page 8: Django, What is it, Why is it cool?

Django layers (MVT)Model ..View...TemplateModel Database interface an abstraction Supports:

Mysql MSsql Oracle Postgre Sql IBM Db2 Sql lite

In general: change the DataBase and don't touch your code

Define model, Admin gets generated automaticallySo does the databaseMost data editing

http://oswco.com

Page 9: Django, What is it, Why is it cool?

Django ViewMost Business logicedits, calculationspermissionsmany libraries available

Context processors:More advanced business logic

http://oswco.com

Page 10: Django, What is it, Why is it cool?

TemplateSimple template languageCss is separatedesigned for non technical users such as designers

Easily able to use other Template models (Jinga)Can be used with most advanced front end tools: Ajax Jquery Pyjamas (an upcoming Python Web Presentation tool) Flash Adobe Air

http://oswco.com

Page 11: Django, What is it, Why is it cool?

Other Django featuresUnique in being built on standard language and able to take advantage of libraries developed for other purposes, Imaging, graphics, scientific calculations and many more. Extensive configuration file• Different Databases• Different sites• Different operating systems• Different Caching frameworks

Structure allows site optimization across specialized servers• Static media• Media

And now also Pinax which is a  collection of pre-configured applications written in Django

http://oswco.com

Page 12: Django, What is it, Why is it cool?

Other Django features continuedLoosely coupledAlternative Model layer, Sql AlchemyAlternative Template layer, Jinga, Jinga2Many users constantly adding modules and features

http://oswco.com

Page 13: Django, What is it, Why is it cool?

PinaxPre-assembled Django ApplicationsPermissions BlogSocial siteProject siteSales site

http://oswco.com

Page 14: Django, What is it, Why is it cool?

ToolsPythonPython Debug toolsDjango debug toolbarEclipse PydevPylintPytest Doc test Unit testEmbedded documentation via SphinxChange control done with Distributed change control tool GIT (used by the Linux development team)

http://oswco.com