KEMBAR78
Saas rad with django, django rest framework | PPTX
RAD on SaaS platforms: Django,
Django Rest Framework and…
… a catch
Marco Montanari @ingmmo,
Modal Nodes @mnorchestra
Who am I?
Marco Montanari
@ingmmo, marco.montanari@gmail.com, http://www.ingmmo.com/
• Python architect, Django fanatic, Tastypie appreciator,
Django Rest Framework conoisseur, pandas cuddler, GIS lifestyler
Who are we?
Modal Nodes – The Software Orchestra
• Lorenzo Gigli, Android + web front end dev
• Leonardo Montecchiari, iOS + IoT dev
• Jacopo Carletti, Full stack Web dev (the wrong stack starting with P...)
• Riccardo Biavati, Designer (the one that really does the heavy lifting)
• Me (Marco), Full stack dev (the right stack )
The Issue
• As coders
• We love to code NEW STUFF
• We hate routine
The Issue
• As coders
• We love to code NEW STUFF
• We hate routine
• (We would love to write our code once and have the designers changing the
UI settings N+1 times)
Backend Frontend
A wise man's question
contains half the answer.
Solomon Ibn Gabirol
What does the Issue express?
• We don’t want to explain the APIs we write.
• We would love them to be self documenting
What does the Issue express?
• We don’t want to explain the APIs we write
• We would love them to be self documenting
• We would love to have simple standard rules
• Standard rules mean standard APIs
• Standard APIs mean standard libraries
• Standard libraries mean more time
• More time means possibility to create the tool for the designer
• The time to create the tool means more time!!!
• Win!!
• It’s a matter of describing the world
Backend API Frontend
How do we describe our API driven world?
• Django Class based views?
• Swagger?
• Django Rest Framework?
• WSDL 2.0?
• RAML?
• WhateverML?
• WhateverON?
• UML?
• XDI?
Cool! Uhm…
How do we describe our API driven world?
• Django Class based views?
• Swagger?
• Django Rest Framework?
• WSDL 2.0?
• RAML?
• WhateverML?
• WhateverON?
• UML?
• XDI?
Let’s go back to the basics
• Django
• Class based views for APIs?
• Very loose
• Cool, but it means defining an adapter from Django to the outside world and that brings
us back to the standards slide.
• Django Rest Framework
• Quite strict
• Descriptive on the actions and not as much as it could be on the data structures
• <3 OPTIONS method… what’s not to love there??
Backend API Frontend
Designer
Frontend
Ok cool, but…
We added 2 layers between our app and our front end…
• Not cool
• Not maintainable…
UNLESS…
…unless we can find a nice tool or library
• Angular4 could be a nice tool to provide a structured and meta-level
approach to the code we are describing
• Does not work well with Angular-driven editors, as of now… (we have a library
for non-drag-drop editors)
…unless we can find a nice tool or library
• Angular4 could be a nice tool to provide a structured and meta-level
approach to the code we are describing
• Does not work well with Angular-driven editors
• GrapesJS
GrapesJS
Pros
• Extensible
• Flexible
• Beautiful
• Easy to use for the designer
• Fun to work with for the dev
Cons
GrapesJS
Pros
• Extensible
• Flexible
• Beautiful
• Easy to use for the designer
• Fun to work with for the dev
Cons
• Pure JS…
• The drag-drop elements are pure
html+css (no js)
GrapesJS
Pros
• Extensible
• Flexible
• Beautiful
• Easy to use for the designer
• Fun to work with for the dev
Cons
• Pure JS…
• The drag-drop elements are pure
html+css (no js)
Some magic required
DRF Metadata… what if…
• What if we could generate GrapesJS components from our
standardized metadata?
• A list component
• A list item component
• A detail view component
• A create/edit component
Backend API Frontend
Designer
Frontend
Contributions!
• Django Rest Framework Metadata Transformer
• GrapesJS data-attribute animator
• (which is not bound to GrapesJS, just aptly structured to be useful with…)
• http://cdn.modal-nodes.com/libs/js/mn-grapesjs-animator.js
• Angular2+ mn-bms (Backend Management Service)
• Not discussed, but it relies on the metadata to provide a set of RESTful APIs
directly to the UI
FrontendBackend API Frontend
Designer
DEMO
If we have time. Else, you can find a usable version on our post on Medium
Thanks!
• Questions?
Follow us on Medium: https://medium.com/modal-nodes
Follow us on twitter: https://twitter.com/mnorchestra
Follow us on github: https://github.com/modal-nodes
Follow me on Medium: https://medium.com/sirmmo
Follow me on twitter: https://twitter.com/ingmmo
Follow me on github: https://github.com/sirmmo

Saas rad with django, django rest framework

  • 1.
    RAD on SaaSplatforms: Django, Django Rest Framework and… … a catch Marco Montanari @ingmmo, Modal Nodes @mnorchestra
  • 2.
    Who am I? MarcoMontanari @ingmmo, marco.montanari@gmail.com, http://www.ingmmo.com/ • Python architect, Django fanatic, Tastypie appreciator, Django Rest Framework conoisseur, pandas cuddler, GIS lifestyler
  • 3.
    Who are we? ModalNodes – The Software Orchestra • Lorenzo Gigli, Android + web front end dev • Leonardo Montecchiari, iOS + IoT dev • Jacopo Carletti, Full stack Web dev (the wrong stack starting with P...) • Riccardo Biavati, Designer (the one that really does the heavy lifting) • Me (Marco), Full stack dev (the right stack )
  • 4.
    The Issue • Ascoders • We love to code NEW STUFF • We hate routine
  • 5.
    The Issue • Ascoders • We love to code NEW STUFF • We hate routine • (We would love to write our code once and have the designers changing the UI settings N+1 times)
  • 6.
  • 7.
    A wise man'squestion contains half the answer. Solomon Ibn Gabirol
  • 8.
    What does theIssue express? • We don’t want to explain the APIs we write. • We would love them to be self documenting
  • 10.
    What does theIssue express? • We don’t want to explain the APIs we write • We would love them to be self documenting • We would love to have simple standard rules • Standard rules mean standard APIs • Standard APIs mean standard libraries • Standard libraries mean more time • More time means possibility to create the tool for the designer • The time to create the tool means more time!!! • Win!! • It’s a matter of describing the world
  • 11.
  • 12.
    How do wedescribe our API driven world? • Django Class based views? • Swagger? • Django Rest Framework? • WSDL 2.0? • RAML? • WhateverML? • WhateverON? • UML? • XDI?
  • 13.
  • 14.
    How do wedescribe our API driven world? • Django Class based views? • Swagger? • Django Rest Framework? • WSDL 2.0? • RAML? • WhateverML? • WhateverON? • UML? • XDI?
  • 15.
    Let’s go backto the basics • Django • Class based views for APIs? • Very loose • Cool, but it means defining an adapter from Django to the outside world and that brings us back to the standards slide. • Django Rest Framework • Quite strict • Descriptive on the actions and not as much as it could be on the data structures • <3 OPTIONS method… what’s not to love there??
  • 16.
  • 17.
    Ok cool, but… Weadded 2 layers between our app and our front end… • Not cool • Not maintainable… UNLESS…
  • 18.
    …unless we canfind a nice tool or library • Angular4 could be a nice tool to provide a structured and meta-level approach to the code we are describing • Does not work well with Angular-driven editors, as of now… (we have a library for non-drag-drop editors)
  • 19.
    …unless we canfind a nice tool or library • Angular4 could be a nice tool to provide a structured and meta-level approach to the code we are describing • Does not work well with Angular-driven editors • GrapesJS
  • 20.
    GrapesJS Pros • Extensible • Flexible •Beautiful • Easy to use for the designer • Fun to work with for the dev Cons
  • 21.
    GrapesJS Pros • Extensible • Flexible •Beautiful • Easy to use for the designer • Fun to work with for the dev Cons • Pure JS… • The drag-drop elements are pure html+css (no js)
  • 22.
    GrapesJS Pros • Extensible • Flexible •Beautiful • Easy to use for the designer • Fun to work with for the dev Cons • Pure JS… • The drag-drop elements are pure html+css (no js) Some magic required
  • 23.
    DRF Metadata… whatif… • What if we could generate GrapesJS components from our standardized metadata? • A list component • A list item component • A detail view component • A create/edit component
  • 24.
  • 25.
    Contributions! • Django RestFramework Metadata Transformer • GrapesJS data-attribute animator • (which is not bound to GrapesJS, just aptly structured to be useful with…) • http://cdn.modal-nodes.com/libs/js/mn-grapesjs-animator.js • Angular2+ mn-bms (Backend Management Service) • Not discussed, but it relies on the metadata to provide a set of RESTful APIs directly to the UI
  • 26.
  • 27.
    DEMO If we havetime. Else, you can find a usable version on our post on Medium
  • 28.
    Thanks! • Questions? Follow uson Medium: https://medium.com/modal-nodes Follow us on twitter: https://twitter.com/mnorchestra Follow us on github: https://github.com/modal-nodes Follow me on Medium: https://medium.com/sirmmo Follow me on twitter: https://twitter.com/ingmmo Follow me on github: https://github.com/sirmmo