Django, What is it, Why is it cool?

Post on 03-Sep-2014

9.984 views 0 download

Tags:

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?

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

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

http://oswco.com

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

http://oswco.com

Traditional Approach vs. Django

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

DoneDoneDoneDoneDone Done

Traditional Model                    Django

http://oswco.com

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

DjangoLots of users:GoogleNASAPBSBit-BucketNewspapers

http://oswco.com

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

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

Django ViewMost Business logicedits, calculationspermissionsmany libraries available

Context processors:More advanced business logic

http://oswco.com

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

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

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

http://oswco.com

PinaxPre-assembled Django ApplicationsPermissions BlogSocial siteProject siteSales site

http://oswco.com

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