SlideShare a Scribd company logo
1 of 10
Download to read offline
Web-Development 2010:
Server-side or Client-side?
Lightning Talk @ PyCologne 2010
        Köln, 17.April 2010
    #python #javascript #pybar
   Thomas Koch (@tomy_koch)
(a short) Web Development History
• 199x: Common Gateway Interface
   import cgi
   form = cgi.FieldStorage()
   print “content-type: text/html”
   print “<H1>Hello %s</H1>“ % form["name"].value
• 200x: Web Tools & Frameworks (in Python)
   – Libraries (e.g. Templates & Form handling!)
       • Cheetah, Kid, Genshi, Bottle, …                Server-Side Coding
         s. http://wiki.python.de/Template-Engines
   – Frameworks: Django, TurboGears, Zope, etc.
       • s. http://wiki.python.org/moin/WebFrameworks                ???
• 2005+ Ajax Technology (XmlHttpRequest+JavaScript)
   – Lots of JavaScript Tools,Libs,Frameworks coming up …
       • Prototype, Scriptacolous, MooTools etc.
       • YUI, jQuery, Dojo, ExtJS …
                                                        Client-Side Coding
• 2010 ???
Server-side or Client-side?
• Wrong question! Must do both (somehow)…
  How to efficiently develop Server- and Client-side?

  Assumption: We‘re coding in Python on the server ,-)
   (using at least some framework …)
  Option1: Become JavaScript-Expert (no way!)
  Option2: Use JavaScript-Framework (even better)
  Option3: seek for holy grail…
Some Attempts …
• GWT: Google Web Toolkit
  – Army of Java Developers don‘t wanna code JS
  – Provide Java-based framwork and generate JS
• Python: PyJamas http://pyjs.org/
  – Pyjamas is a port of Google Web Toolkit to Python
     You can write web applications in python
  – pyjamas involves the translation
    of the application and libraries
     (including UI widgets and DOM
     classes) to Javascript.
  – version: Pyjamas 0.6 / 08-2009
Dajax: Django+Ajax
• a powerfull tool to easily and super-fastly develop asynchronous
  presentation logic in web applications using python …
  … and almost no lines of JS source code.
• supports up to four of the most popular JS frameworks:
       Prototype, jQuery, Dojo and mootols

Dajax maps client-side JS call
to server-side python method!


• Version: 0.8.4 – 03-22010
• autor: @jorgebastida
• Web: http://dajaxproject.com/
Dajax: Example
Python Code
     from dajax.core import Dajax

     def multiply(request, a, b):
       dajax = Dajax()
       result = int(a) * int(b)
       dajax.assign('#result','value',str(result))
       return dajax.json()

JavaScript Code
<script src="/dajaxice/dajaxice.core.js" type="text/javascript" />

function calculate() {
  Dajaxice.examples.multiply('Dajax.process',{'a':$('a').value,'b':$('b').value})
Dojango = Dojo + Django
• What?
  – Dojango is a reusable django application that helps
    you to use the client-sideframework dojo within your
    django project
  – … makes the development of rich internet applications
    in combination with dojo more comfortable


• Version: 0.4.6 / 11-2009
• Autor: @tklipstein
• Web: http://code.google.com/p/dojango/
About Dojo
• Dojo = Ajax Development Framework
    – open-source JavaScript toolkit for frontend development
    – allows to shorten the timespan between idea and implementation
    – cut-down development costs, achieve great results
• Features
    –   Supports development of highly interactive web applications
    –   Various basic widgets like Trees, Menus, ListViews, Popups etc.
    –   Business-ready components like Grids and Charts
    –   Lots of add-ons for different purposes like Image Lightbox, animations etc.
• Community
    – Large user community
    – Used / Supported by Key Players (SUN, IBM etc.)

• Version: 1.4
• Website: http://dojotoolkit.org/
Dojango Features
• Form-Integration : django.forms  dojango.forms
   – maps django.forms.fields to dojo enhanced widgets
     (i.e. dojango.forms.fields extends django formfields)
• flexible dojo release configuration
   – aol, google cdn, dojo release 1.0/1.1/1.2/1.3 …
• Django ModelStore
   – using dojo.data.* with dojango.data.modelstore
• Dojango Datagrid
   – Integrate dojo data grid in django
• AppEngine support:
   – get dojango up on Google AppEngine.
Your Experience?
• Best Practices?
  – Server-Side Framework:
     self-written, django, gears … ?
  – Client-Side Framework:
     Simple prototype.js or Dojo, ExtJS,… ?
• Combination of
  frontend & backend
    what is the perfect couple?
  (especially for web-devel in python)

More Related Content

Viewers also liked

ReadWriteWeb's Top 5 Web Trends in 2009
ReadWriteWeb's Top 5 Web Trends in 2009ReadWriteWeb's Top 5 Web Trends in 2009
ReadWriteWeb's Top 5 Web Trends in 2009Richard MacManus
 
Web, Design, and UX Trends for 2008
Web, Design, and UX Trends for 2008Web, Design, and UX Trends for 2008
Web, Design, and UX Trends for 2008Jeremy Johnson
 
Web Design and Development I - 2008
Web Design and Development I - 2008Web Design and Development I - 2008
Web Design and Development I - 2008butest
 
The State of Front End Web Development 2011
The State of Front End Web Development 2011The State of Front End Web Development 2011
The State of Front End Web Development 2011Pascal Rettig
 
Web Technology Trends for 2008 and Beyond, March 08
Web Technology Trends for 2008 and Beyond, March 08Web Technology Trends for 2008 and Beyond, March 08
Web Technology Trends for 2008 and Beyond, March 08Richard MacManus
 
Influencers On IT & Tech 2009 Trends Predictions, By Trendsspotting
Influencers On IT & Tech 2009 Trends Predictions, By TrendsspottingInfluencers On IT & Tech 2009 Trends Predictions, By Trendsspotting
Influencers On IT & Tech 2009 Trends Predictions, By TrendsspottingTaly Weiss
 

Viewers also liked (7)

ReadWriteWeb's Top 5 Web Trends in 2009
ReadWriteWeb's Top 5 Web Trends in 2009ReadWriteWeb's Top 5 Web Trends in 2009
ReadWriteWeb's Top 5 Web Trends in 2009
 
Web, Design, and UX Trends for 2008
Web, Design, and UX Trends for 2008Web, Design, and UX Trends for 2008
Web, Design, and UX Trends for 2008
 
HTML5 and Web Trends in 2013
HTML5 and Web Trends in 2013HTML5 and Web Trends in 2013
HTML5 and Web Trends in 2013
 
Web Design and Development I - 2008
Web Design and Development I - 2008Web Design and Development I - 2008
Web Design and Development I - 2008
 
The State of Front End Web Development 2011
The State of Front End Web Development 2011The State of Front End Web Development 2011
The State of Front End Web Development 2011
 
Web Technology Trends for 2008 and Beyond, March 08
Web Technology Trends for 2008 and Beyond, March 08Web Technology Trends for 2008 and Beyond, March 08
Web Technology Trends for 2008 and Beyond, March 08
 
Influencers On IT & Tech 2009 Trends Predictions, By Trendsspotting
Influencers On IT & Tech 2009 Trends Predictions, By TrendsspottingInfluencers On IT & Tech 2009 Trends Predictions, By Trendsspotting
Influencers On IT & Tech 2009 Trends Predictions, By Trendsspotting
 

More from Thomas Koch

Einfache Heimautomatisierung auf dem Raspberry Pi mit Python
Einfache Heimautomatisierung auf dem Raspberry Pi mit PythonEinfache Heimautomatisierung auf dem Raspberry Pi mit Python
Einfache Heimautomatisierung auf dem Raspberry Pi mit PythonThomas Koch
 
CI Signal Light in less than 100 Line of Python Code
CI Signal Light in less than 100 Line of Python CodeCI Signal Light in less than 100 Line of Python Code
CI Signal Light in less than 100 Line of Python CodeThomas Koch
 
CI-Ampel für Jenkins mit RaspberryPi und Python
CI-Ampel für Jenkins mit RaspberryPi und PythonCI-Ampel für Jenkins mit RaspberryPi und Python
CI-Ampel für Jenkins mit RaspberryPi und PythonThomas Koch
 
Facettensuche mit Lucene und Solr
Facettensuche mit Lucene und SolrFacettensuche mit Lucene und Solr
Facettensuche mit Lucene und SolrThomas Koch
 
BSCW - Teamarbeit leicht gemacht
BSCW - Teamarbeit leicht gemachtBSCW - Teamarbeit leicht gemacht
BSCW - Teamarbeit leicht gemachtThomas Koch
 
Raspberry Pi und Python
Raspberry Pi und PythonRaspberry Pi und Python
Raspberry Pi und PythonThomas Koch
 
Einführung in Raspberry Pi und GPIO
Einführung in Raspberry Pi und GPIOEinführung in Raspberry Pi und GPIO
Einführung in Raspberry Pi und GPIOThomas Koch
 
Python-IDEs - PyDev und Eclipse
Python-IDEs - PyDev und EclipsePython-IDEs - PyDev und Eclipse
Python-IDEs - PyDev und EclipseThomas Koch
 
Pandas und matplotlib im praktischen Einsatz
Pandas und matplotlib im praktischen EinsatzPandas und matplotlib im praktischen Einsatz
Pandas und matplotlib im praktischen EinsatzThomas Koch
 
EnArgus – ein ontologiebasiertes Forschungsinformationssystem
EnArgus – ein ontologiebasiertes ForschungsinformationssystemEnArgus – ein ontologiebasiertes Forschungsinformationssystem
EnArgus – ein ontologiebasiertes ForschungsinformationssystemThomas Koch
 
Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...
Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...
Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...Thomas Koch
 
Volltextsuche mit Lucene und Solr
Volltextsuche mit Lucene und SolrVolltextsuche mit Lucene und Solr
Volltextsuche mit Lucene und SolrThomas Koch
 
PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011Thomas Koch
 
Getting Started with Dojo Toolkit
Getting Started with Dojo ToolkitGetting Started with Dojo Toolkit
Getting Started with Dojo ToolkitThomas Koch
 
Teamarbeit 2.0 (PTF 2008)
Teamarbeit 2.0 (PTF 2008) Teamarbeit 2.0 (PTF 2008)
Teamarbeit 2.0 (PTF 2008) Thomas Koch
 
Suche und PyLucene
Suche und PyLuceneSuche und PyLucene
Suche und PyLuceneThomas Koch
 

More from Thomas Koch (16)

Einfache Heimautomatisierung auf dem Raspberry Pi mit Python
Einfache Heimautomatisierung auf dem Raspberry Pi mit PythonEinfache Heimautomatisierung auf dem Raspberry Pi mit Python
Einfache Heimautomatisierung auf dem Raspberry Pi mit Python
 
CI Signal Light in less than 100 Line of Python Code
CI Signal Light in less than 100 Line of Python CodeCI Signal Light in less than 100 Line of Python Code
CI Signal Light in less than 100 Line of Python Code
 
CI-Ampel für Jenkins mit RaspberryPi und Python
CI-Ampel für Jenkins mit RaspberryPi und PythonCI-Ampel für Jenkins mit RaspberryPi und Python
CI-Ampel für Jenkins mit RaspberryPi und Python
 
Facettensuche mit Lucene und Solr
Facettensuche mit Lucene und SolrFacettensuche mit Lucene und Solr
Facettensuche mit Lucene und Solr
 
BSCW - Teamarbeit leicht gemacht
BSCW - Teamarbeit leicht gemachtBSCW - Teamarbeit leicht gemacht
BSCW - Teamarbeit leicht gemacht
 
Raspberry Pi und Python
Raspberry Pi und PythonRaspberry Pi und Python
Raspberry Pi und Python
 
Einführung in Raspberry Pi und GPIO
Einführung in Raspberry Pi und GPIOEinführung in Raspberry Pi und GPIO
Einführung in Raspberry Pi und GPIO
 
Python-IDEs - PyDev und Eclipse
Python-IDEs - PyDev und EclipsePython-IDEs - PyDev und Eclipse
Python-IDEs - PyDev und Eclipse
 
Pandas und matplotlib im praktischen Einsatz
Pandas und matplotlib im praktischen EinsatzPandas und matplotlib im praktischen Einsatz
Pandas und matplotlib im praktischen Einsatz
 
EnArgus – ein ontologiebasiertes Forschungsinformationssystem
EnArgus – ein ontologiebasiertes ForschungsinformationssystemEnArgus – ein ontologiebasiertes Forschungsinformationssystem
EnArgus – ein ontologiebasiertes Forschungsinformationssystem
 
Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...
Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...
Wissenserschließung und –Modellierung: Ontologie vs. Volltextsuche am Beispie...
 
Volltextsuche mit Lucene und Solr
Volltextsuche mit Lucene und SolrVolltextsuche mit Lucene und Solr
Volltextsuche mit Lucene und Solr
 
PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011PyLucene@PyCon DE 2011
PyLucene@PyCon DE 2011
 
Getting Started with Dojo Toolkit
Getting Started with Dojo ToolkitGetting Started with Dojo Toolkit
Getting Started with Dojo Toolkit
 
Teamarbeit 2.0 (PTF 2008)
Teamarbeit 2.0 (PTF 2008) Teamarbeit 2.0 (PTF 2008)
Teamarbeit 2.0 (PTF 2008)
 
Suche und PyLucene
Suche und PyLuceneSuche und PyLucene
Suche und PyLucene
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 

WebDev Lightning Talk (PyCologne 2010)

  • 1. Web-Development 2010: Server-side or Client-side? Lightning Talk @ PyCologne 2010 Köln, 17.April 2010 #python #javascript #pybar Thomas Koch (@tomy_koch)
  • 2. (a short) Web Development History • 199x: Common Gateway Interface import cgi form = cgi.FieldStorage() print “content-type: text/html” print “<H1>Hello %s</H1>“ % form["name"].value • 200x: Web Tools & Frameworks (in Python) – Libraries (e.g. Templates & Form handling!) • Cheetah, Kid, Genshi, Bottle, … Server-Side Coding s. http://wiki.python.de/Template-Engines – Frameworks: Django, TurboGears, Zope, etc. • s. http://wiki.python.org/moin/WebFrameworks ??? • 2005+ Ajax Technology (XmlHttpRequest+JavaScript) – Lots of JavaScript Tools,Libs,Frameworks coming up … • Prototype, Scriptacolous, MooTools etc. • YUI, jQuery, Dojo, ExtJS … Client-Side Coding • 2010 ???
  • 3. Server-side or Client-side? • Wrong question! Must do both (somehow)… How to efficiently develop Server- and Client-side? Assumption: We‘re coding in Python on the server ,-) (using at least some framework …) Option1: Become JavaScript-Expert (no way!) Option2: Use JavaScript-Framework (even better) Option3: seek for holy grail…
  • 4. Some Attempts … • GWT: Google Web Toolkit – Army of Java Developers don‘t wanna code JS – Provide Java-based framwork and generate JS • Python: PyJamas http://pyjs.org/ – Pyjamas is a port of Google Web Toolkit to Python You can write web applications in python – pyjamas involves the translation of the application and libraries (including UI widgets and DOM classes) to Javascript. – version: Pyjamas 0.6 / 08-2009
  • 5. Dajax: Django+Ajax • a powerfull tool to easily and super-fastly develop asynchronous presentation logic in web applications using python … … and almost no lines of JS source code. • supports up to four of the most popular JS frameworks: Prototype, jQuery, Dojo and mootols Dajax maps client-side JS call to server-side python method! • Version: 0.8.4 – 03-22010 • autor: @jorgebastida • Web: http://dajaxproject.com/
  • 6. Dajax: Example Python Code from dajax.core import Dajax def multiply(request, a, b): dajax = Dajax() result = int(a) * int(b) dajax.assign('#result','value',str(result)) return dajax.json() JavaScript Code <script src="/dajaxice/dajaxice.core.js" type="text/javascript" /> function calculate() { Dajaxice.examples.multiply('Dajax.process',{'a':$('a').value,'b':$('b').value})
  • 7. Dojango = Dojo + Django • What? – Dojango is a reusable django application that helps you to use the client-sideframework dojo within your django project – … makes the development of rich internet applications in combination with dojo more comfortable • Version: 0.4.6 / 11-2009 • Autor: @tklipstein • Web: http://code.google.com/p/dojango/
  • 8. About Dojo • Dojo = Ajax Development Framework – open-source JavaScript toolkit for frontend development – allows to shorten the timespan between idea and implementation – cut-down development costs, achieve great results • Features – Supports development of highly interactive web applications – Various basic widgets like Trees, Menus, ListViews, Popups etc. – Business-ready components like Grids and Charts – Lots of add-ons for different purposes like Image Lightbox, animations etc. • Community – Large user community – Used / Supported by Key Players (SUN, IBM etc.) • Version: 1.4 • Website: http://dojotoolkit.org/
  • 9. Dojango Features • Form-Integration : django.forms  dojango.forms – maps django.forms.fields to dojo enhanced widgets (i.e. dojango.forms.fields extends django formfields) • flexible dojo release configuration – aol, google cdn, dojo release 1.0/1.1/1.2/1.3 … • Django ModelStore – using dojo.data.* with dojango.data.modelstore • Dojango Datagrid – Integrate dojo data grid in django • AppEngine support: – get dojango up on Google AppEngine.
  • 10. Your Experience? • Best Practices? – Server-Side Framework: self-written, django, gears … ? – Client-Side Framework: Simple prototype.js or Dojo, ExtJS,… ? • Combination of frontend & backend  what is the perfect couple? (especially for web-devel in python)