SlideShare a Scribd company logo
1 of 109
Download to read offline
How to build complex
web applications having   fun?
How to build complex
web applications having   fun?
author
         Andrew Mleczko
         Software Integrator
         Ferrara (Italy)
            amleczko
            amleczko@redturtle.it
author
         Andrew Mleczko
         Software Integrator
         Ferrara (Italy)
            amleczko
            amleczko@redturtle.it
author
         Ferrara   Andrew Mleczko
                   Software Integrator
                   Ferrara (Italy)
                      amleczko
                      amleczko@redturtle.it
the   team
the   team
WHY this talk?
My Reasons to be here
★ Building   complex web
  applications should

  be   fun

★ to promote
SMALL   “Roughly 5000 lines
             of code”
SMALL   “Roughly 5000 lines
             of code”
FAST
SMALL    “Roughly 5000 lines
              of code”
FAST
STABLE
SMALL    “Roughly 5000 lines
              of code”
FAST
                “100% statement
STABLE
               coverage via unit and
TESTED           integration tests”
SMALL        “Roughly 5000 lines
                  of code”
FAST
                    “100% statement
STABLE
                   coverage via unit and
TESTED               integration tests”


DOCUMENTED    “Literally nothing
                  in Pyramid
              is undocumented”
★   Debug Toolbar

★   Flexible authentication
    and authorization

★   Tweens - a bit like WSGI
    middleware
★   Decorator-based configuration


from pyramid.view import view_config
from pyramid.response import Response

@view_config(route_name='fred')
def fred_view(request):
    return Response('fred')
★   Event system (based on ZCA)

from pyramid.events import NewRequest
from pyramid.events import subscriber

@subscriber(NewRequest)
def mysubscriber(event):
    event.request.foo = 1
★ Extendable configuration

from pyramid.config import Configurator

if __name__ == '__main__':
   config = Configurator()
   config.include('pyramid_formalchemy')
the project
The Customer
★ .


★ Born as a startup


★ Offices in US
Water today
★ U.S. - the largest consumer market
   for bottled water in the world



★ in 2011, the market is forecast to have
   a value of   $86,421.2 billion



    “Bottled water has become the second
    largest commercial beverage category”
project requirements
paperless sale
paperless sale
          Sales           E-commerce




1            2    3           4          5




    CRM           Warehouse            Support
paperless sale
1      CRM



2     Sales




3   Warehouse



4   E-commerce




5    Support
paperless sale
1      CRM



2     Sales



3   Warehouse



4   E-commerce



5    Support
paperless sale
1      CRM       ★   Customer’s management
                     (satisfaction, order status,
                     etc.)
2     Sales
                 ★   Reports (machine statistics,
                     etc.)
3   Warehouse
                 ★   Campaigns

4   E-commerce



5    Support
paperless sale
1      CRM       ★   Sales network management


                 ★   Invoicing / accountancy
2     Sales
                 ★   Revenue counter

3   Warehouse    ★   Discount management


4   E-commerce



5    Support
paperless sale
1      CRM       ★   Catalog management


                 ★   Warehouse management
2     Sales
                 ★   Logistic tracking

3   Warehouse



4   E-commerce



5    Support
paperless sale
1      CRM       ★   Online shop (for beverages
                     and accessories)


2     Sales      ★   Machine configurator
                     (interactive wizard)

3   Warehouse    ★   Online payments



4   E-commerce



5    Support
paperless sale
1      CRM       ★   Machine maintenance (filter
                     change)


2     Sales      ★   Emergency services


                 ★   Order / installation process
3   Warehouse



4   E-commerce



5    Support
paperless sale
1      CRM       ★   Machine maintenance (filter
                     change)


2     Sales      ★   Emergency services


                 ★   Order / installation process
3   Warehouse



4   E-commerce



5    Support
paperless sale


    Warehouse     Support



      CRM        E-commerce




      Sales
paperless sale
   Intranet      Extranet

    Warehouse     Support



      CRM        E-commerce




      Sales
Totally paperless ERP
project gotchas
project gotchas
★ Requirements are    not rock
   solid (it’s a startup) - project will
   grow with the customer

★ Customer is in U.S. -   planning
   regular meetings is essential

★ We need to find   new framework
   for ERP part

★ Only 5 months to delivery
Arc hi t e ct u ral dec i si ons
and
and
why                              ?
★ architecture is not so far
   away from Zope

★ it supports SQLAlchemy
   out of the box

★ great documentation and
   active community

★ add’s some fresh air to your
   architecture
why                         ?
★ pyramid_formalchemy CRUD

★ easy pluggable widgets

  ★ Multi-upload

  ★ Metric units

  ★ Autocomplete

  ★ Multi-relation

★ 75% jQuery code
why                         ?
★ pyramid_formalchemy CRUD

★ easy pluggable widgets

  ★ Multi-upload

  ★ Metric units

  ★ Autocomplete

  ★ Multi-relation

★ 75% jQuery code
why                         ?
★ pyramid_formalchemy CRUD

★ easy pluggable widgets

  ★ Multi-upload

  ★ Metric units

  ★ Autocomplete

  ★ Multi-relation

★ 75% jQuery code
and                         ?
★ The Best CMS ever


★ easy to integrate with
  other Python frameworks


★ almost 2000 addons
and                          ?
★ The Best CMS ever


★ easy to integrate with
  other Python frameworks


★ almost 2000 addons


   ★   Diazo (plone.app.theming)

   ★   Poi

   ★   PAS (PluggableAuthService)
and                          ?
★ The Best CMS ever


★ easy to integrate with
  other Python frameworks


★ almost 2000 addons


   ★   Diazo (plone.app.theming)

   ★   Poi

   ★   PAS (PluggableAuthService)
and                          ?
★ The Best CMS ever


★ easy to integrate with
  other Python frameworks


★ almost 2000 addons


   ★   Diazo (plone.app.theming)

   ★   Poi

   ★   PAS (PluggableAuthService)
and                          ?
★ The Best CMS ever


★ easy to integrate with
  other Python frameworks


★ almost 2000 addons


   ★   Diazo (plone.app.theming)

   ★   Poi

   ★   PAS (PluggableAuthService)
and                          ?
★ The Best CMS ever


★ easy to integrate with
  other Python frameworks


★ almost 2000 addons


   ★   Diazo (plone.app.theming)

   ★   Poi

   ★   PAS (PluggableAuthService)
I nt eg r at i o n
SQL A lchemy
SQL A lchemy

         aeterna.models




         PostgreSQL
authentication - authorization
authentication - authorization
           auth storage
 Request




            pas.plugins.sa




             repoze.who




            PostgreSQL
authentication - authorization
      auth storage
 ★   users

 ★   groups

 ★   roles



       PostgreSQL
authentication - authorization
      auth storage        single-sign-on
 ★   users           ★   plone.session

                     ★   repoze.who.plugins.auth_tkt
 ★   groups

 ★   roles
                            mod_auth_tkt



       PostgreSQL
buildout
[intranet-plone]
recipe = plone.recipe.zope2instance
eggs =
    ${intranet-plone:eggs} aeterna.models


[intranet-pyramid]
recipe = zc.recipe.egg
eggs =
    ${intranet-pyramid:eggs} aeterna.models
The big picture
                  pas.plugins.
                       sa

                                          ZODB
Apache




         beaker              PostgreSQL

                   repoze.
                     who
The big picture




                                                 extranet
                  pas.plugins.
                       sa

                                          ZODB
Apache




         beaker              PostgreSQL




                                                 intranet
                   repoze.
                     who
why not o t h er c o mpet i t o rs?
d j ang o :           no!
★ less   code more magic

★ not so   flexible
  (specification is growing)


★ using   SQLAlchemy within
  could be tricky
d r u pal:              no!
★   security problems
    (370 CVE entries)


★   integration is more difficult
    (PHP vs. Python)


★   missing features
    workflow, complex ACL, etc.
o pen erp :                 no!
★ quite complex: CRM , sales,
  accounting and much more


★ not enough   time
  to fully investigate it


★ not a generic framework
results
What mat t ers?
Proper Tools
and a g o o d t eam
★ Prototyping - it’s always a
   lot of fun, but...

  ★ be aware of The

      Learning          Curve Effect

★ Collecting specification and

  keeping docs up-to-date
  (a real on-going process)
check this out!
pyramid_formalchemy
★ started by gawel (Gaël Pasgrimaud)
  and supported by


★ using SQLAlchemy,
  Formalchemy and fanstatic


★ available on pypi
  more then 1720 downloads so far
pyramid_formalchemy
★   Lots of improvements during


                           by

    ★   events hooks

    ★   view and action customizations

    ★   i18n support

    ★   paster templates

    ★   fanstatic integration
pyramid_formalchemy
★   Minimal configuration:
pyramid_formalchemy
★   Minimal configuration:

def main(global_config, **settings):

      engine = engine_from_config(settings, 'sqlalchemy.')
      initialize_sql(engine)
      config = Configurator(settings=settings)

      # pyramid_formalchemy's configuration
      config.include('pyramid_formalchemy')

      # register an admin UI
      config.formalchemy_admin('/admin', package='pyramidapp')

      return config.make_wsgi_app()
pyramid_formalchemy
★   Events subscriptions:
pyramid_formalchemy
★   Events subscriptions:

@events.subscriber([User, events.IBeforeEditRenderEvent])
def before_user_edit(context, event):

      fs = event.kwargs['fs']

      # add roles_manage field for manager:
      if not has_permission('manage', event.request):
          fs.append(fs.roles_manage)

      # set TinyMCE as a renderer for biography field:
      fs.biography.set(renderer=tinymce)
pyramid_formalchemy

★   demo
    http://docs.formalchemy.org/demo/admin


★   documentation
    http://docs.formalchemy.org/pyramid_formalchemy


★   download
    http://pypi.python.org/pypi/pyramid_formalchemy
pyramid_formalchemy

★   demo
    http://docs.formalchemy.org/demo/admin


★   documentation
    http://docs.formalchemy.org/pyramid_formalchemy


★   download
    http://pypi.python.org/pypi/pyramid_formalchemy
fa.bootstrap

               ★ a   pyramid_formalchemy plugin

               ★ based on   twitter bootstrap

               ★ integrated with   fanstatic

               ★ released on pypi

                  http://pypi.python.org/pypi/fa.bootstrap
fa.bootstrap
fa.bootstrap
fa.bootstrap
fa.bootstrap
fa.bootstrap
fa.bootstrap
fa.bootstrap
Qu est i ons?
Credits
★   http://flickr.com/photos/mleczko

★   http://www.melaiphone.com/

★   http://static.iphoneitalia.com

★   http://www.theapplelounge.com

★   http://www.nonconvenzionale.com

★   http://craziestgadgets.com/

★   http://obsessivelystitching.blogspot.com/

★   http://theclockblog.blogspot.com/

★   http://www.scatoladeigiochi.altervista.org/

★   http://wallpapers.brothersoft.com/

★   www.prisionerodelpixel.com

★   http://jawaexpress.com/

★   http://mikehenneke.mvourtown.com/

★   http://android-apps.com/

More Related Content

More from Andrew Mleczko

Bootstrap your app in 45 seconds
Bootstrap your app in 45 secondsBootstrap your app in 45 seconds
Bootstrap your app in 45 secondsAndrew Mleczko
 
PyconUA - How to build ERP application having fun?
PyconUA - How to build ERP application having fun?PyconUA - How to build ERP application having fun?
PyconUA - How to build ERP application having fun?Andrew Mleczko
 
EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?Andrew Mleczko
 
Future is bright, future is Plone
Future is bright, future is PloneFuture is bright, future is Plone
Future is bright, future is PloneAndrew Mleczko
 
Needle in an enterprise haystack
Needle in an enterprise haystackNeedle in an enterprise haystack
Needle in an enterprise haystackAndrew Mleczko
 
Fast content import in Plone
Fast content import in PloneFast content import in Plone
Fast content import in PloneAndrew Mleczko
 
Plone TuneUp challenges
Plone TuneUp challengesPlone TuneUp challenges
Plone TuneUp challengesAndrew Mleczko
 

More from Andrew Mleczko (7)

Bootstrap your app in 45 seconds
Bootstrap your app in 45 secondsBootstrap your app in 45 seconds
Bootstrap your app in 45 seconds
 
PyconUA - How to build ERP application having fun?
PyconUA - How to build ERP application having fun?PyconUA - How to build ERP application having fun?
PyconUA - How to build ERP application having fun?
 
EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?EuroPython 2011 - How to build complex web applications having fun?
EuroPython 2011 - How to build complex web applications having fun?
 
Future is bright, future is Plone
Future is bright, future is PloneFuture is bright, future is Plone
Future is bright, future is Plone
 
Needle in an enterprise haystack
Needle in an enterprise haystackNeedle in an enterprise haystack
Needle in an enterprise haystack
 
Fast content import in Plone
Fast content import in PloneFast content import in Plone
Fast content import in Plone
 
Plone TuneUp challenges
Plone TuneUp challengesPlone TuneUp challenges
Plone TuneUp challenges
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
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
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.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
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 

PloneConf2011 - How to build ERP application while having fun

  • 1. How to build complex web applications having fun?
  • 2. How to build complex web applications having fun?
  • 3. author Andrew Mleczko Software Integrator Ferrara (Italy) amleczko amleczko@redturtle.it
  • 4. author Andrew Mleczko Software Integrator Ferrara (Italy) amleczko amleczko@redturtle.it
  • 5. author Ferrara Andrew Mleczko Software Integrator Ferrara (Italy) amleczko amleczko@redturtle.it
  • 6. the team
  • 7. the team
  • 9. My Reasons to be here ★ Building complex web applications should be fun ★ to promote
  • 10.
  • 11.
  • 12. SMALL “Roughly 5000 lines of code”
  • 13. SMALL “Roughly 5000 lines of code” FAST
  • 14. SMALL “Roughly 5000 lines of code” FAST STABLE
  • 15. SMALL “Roughly 5000 lines of code” FAST “100% statement STABLE coverage via unit and TESTED integration tests”
  • 16. SMALL “Roughly 5000 lines of code” FAST “100% statement STABLE coverage via unit and TESTED integration tests” DOCUMENTED “Literally nothing in Pyramid is undocumented”
  • 17. Debug Toolbar ★ Flexible authentication and authorization ★ Tweens - a bit like WSGI middleware
  • 18. Decorator-based configuration from pyramid.view import view_config from pyramid.response import Response @view_config(route_name='fred') def fred_view(request): return Response('fred')
  • 19. Event system (based on ZCA) from pyramid.events import NewRequest from pyramid.events import subscriber @subscriber(NewRequest) def mysubscriber(event): event.request.foo = 1
  • 20. ★ Extendable configuration from pyramid.config import Configurator if __name__ == '__main__': config = Configurator() config.include('pyramid_formalchemy')
  • 22. The Customer ★ . ★ Born as a startup ★ Offices in US
  • 23. Water today ★ U.S. - the largest consumer market for bottled water in the world ★ in 2011, the market is forecast to have a value of $86,421.2 billion “Bottled water has become the second largest commercial beverage category”
  • 24.
  • 25.
  • 27.
  • 29. paperless sale Sales E-commerce 1 2 3 4 5 CRM Warehouse Support
  • 30. paperless sale 1 CRM 2 Sales 3 Warehouse 4 E-commerce 5 Support
  • 31. paperless sale 1 CRM 2 Sales 3 Warehouse 4 E-commerce 5 Support
  • 32. paperless sale 1 CRM ★ Customer’s management (satisfaction, order status, etc.) 2 Sales ★ Reports (machine statistics, etc.) 3 Warehouse ★ Campaigns 4 E-commerce 5 Support
  • 33. paperless sale 1 CRM ★ Sales network management ★ Invoicing / accountancy 2 Sales ★ Revenue counter 3 Warehouse ★ Discount management 4 E-commerce 5 Support
  • 34. paperless sale 1 CRM ★ Catalog management ★ Warehouse management 2 Sales ★ Logistic tracking 3 Warehouse 4 E-commerce 5 Support
  • 35. paperless sale 1 CRM ★ Online shop (for beverages and accessories) 2 Sales ★ Machine configurator (interactive wizard) 3 Warehouse ★ Online payments 4 E-commerce 5 Support
  • 36. paperless sale 1 CRM ★ Machine maintenance (filter change) 2 Sales ★ Emergency services ★ Order / installation process 3 Warehouse 4 E-commerce 5 Support
  • 37. paperless sale 1 CRM ★ Machine maintenance (filter change) 2 Sales ★ Emergency services ★ Order / installation process 3 Warehouse 4 E-commerce 5 Support
  • 38. paperless sale Warehouse Support CRM E-commerce Sales
  • 39. paperless sale Intranet Extranet Warehouse Support CRM E-commerce Sales
  • 42. project gotchas ★ Requirements are not rock solid (it’s a startup) - project will grow with the customer ★ Customer is in U.S. - planning regular meetings is essential ★ We need to find new framework for ERP part ★ Only 5 months to delivery
  • 43. Arc hi t e ct u ral dec i si ons
  • 44. and
  • 45. and
  • 46.
  • 47. why ? ★ architecture is not so far away from Zope ★ it supports SQLAlchemy out of the box ★ great documentation and active community ★ add’s some fresh air to your architecture
  • 48. why ? ★ pyramid_formalchemy CRUD ★ easy pluggable widgets ★ Multi-upload ★ Metric units ★ Autocomplete ★ Multi-relation ★ 75% jQuery code
  • 49. why ? ★ pyramid_formalchemy CRUD ★ easy pluggable widgets ★ Multi-upload ★ Metric units ★ Autocomplete ★ Multi-relation ★ 75% jQuery code
  • 50. why ? ★ pyramid_formalchemy CRUD ★ easy pluggable widgets ★ Multi-upload ★ Metric units ★ Autocomplete ★ Multi-relation ★ 75% jQuery code
  • 51. and ? ★ The Best CMS ever ★ easy to integrate with other Python frameworks ★ almost 2000 addons
  • 52. and ? ★ The Best CMS ever ★ easy to integrate with other Python frameworks ★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  • 53. and ? ★ The Best CMS ever ★ easy to integrate with other Python frameworks ★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  • 54. and ? ★ The Best CMS ever ★ easy to integrate with other Python frameworks ★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  • 55. and ? ★ The Best CMS ever ★ easy to integrate with other Python frameworks ★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  • 56. and ? ★ The Best CMS ever ★ easy to integrate with other Python frameworks ★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  • 57. I nt eg r at i o n
  • 59. SQL A lchemy aeterna.models PostgreSQL
  • 61. authentication - authorization auth storage Request pas.plugins.sa repoze.who PostgreSQL
  • 62. authentication - authorization auth storage ★ users ★ groups ★ roles PostgreSQL
  • 63. authentication - authorization auth storage single-sign-on ★ users ★ plone.session ★ repoze.who.plugins.auth_tkt ★ groups ★ roles mod_auth_tkt PostgreSQL
  • 64. buildout [intranet-plone] recipe = plone.recipe.zope2instance eggs = ${intranet-plone:eggs} aeterna.models [intranet-pyramid] recipe = zc.recipe.egg eggs = ${intranet-pyramid:eggs} aeterna.models
  • 65. The big picture pas.plugins. sa ZODB Apache beaker PostgreSQL repoze. who
  • 66. The big picture extranet pas.plugins. sa ZODB Apache beaker PostgreSQL intranet repoze. who
  • 67. why not o t h er c o mpet i t o rs?
  • 68. d j ang o : no! ★ less code more magic ★ not so flexible (specification is growing) ★ using SQLAlchemy within could be tricky
  • 69. d r u pal: no! ★ security problems (370 CVE entries) ★ integration is more difficult (PHP vs. Python) ★ missing features workflow, complex ACL, etc.
  • 70. o pen erp : no! ★ quite complex: CRM , sales, accounting and much more ★ not enough time to fully investigate it ★ not a generic framework
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87. What mat t ers?
  • 89. and a g o o d t eam
  • 90. ★ Prototyping - it’s always a lot of fun, but... ★ be aware of The Learning Curve Effect ★ Collecting specification and keeping docs up-to-date (a real on-going process)
  • 92. pyramid_formalchemy ★ started by gawel (Gaël Pasgrimaud) and supported by ★ using SQLAlchemy, Formalchemy and fanstatic ★ available on pypi more then 1720 downloads so far
  • 93. pyramid_formalchemy ★ Lots of improvements during by ★ events hooks ★ view and action customizations ★ i18n support ★ paster templates ★ fanstatic integration
  • 94. pyramid_formalchemy ★ Minimal configuration:
  • 95. pyramid_formalchemy ★ Minimal configuration: def main(global_config, **settings): engine = engine_from_config(settings, 'sqlalchemy.') initialize_sql(engine) config = Configurator(settings=settings) # pyramid_formalchemy's configuration config.include('pyramid_formalchemy') # register an admin UI config.formalchemy_admin('/admin', package='pyramidapp') return config.make_wsgi_app()
  • 96. pyramid_formalchemy ★ Events subscriptions:
  • 97. pyramid_formalchemy ★ Events subscriptions: @events.subscriber([User, events.IBeforeEditRenderEvent]) def before_user_edit(context, event): fs = event.kwargs['fs'] # add roles_manage field for manager: if not has_permission('manage', event.request): fs.append(fs.roles_manage) # set TinyMCE as a renderer for biography field: fs.biography.set(renderer=tinymce)
  • 98. pyramid_formalchemy ★ demo http://docs.formalchemy.org/demo/admin ★ documentation http://docs.formalchemy.org/pyramid_formalchemy ★ download http://pypi.python.org/pypi/pyramid_formalchemy
  • 99. pyramid_formalchemy ★ demo http://docs.formalchemy.org/demo/admin ★ documentation http://docs.formalchemy.org/pyramid_formalchemy ★ download http://pypi.python.org/pypi/pyramid_formalchemy
  • 100. fa.bootstrap ★ a pyramid_formalchemy plugin ★ based on twitter bootstrap ★ integrated with fanstatic ★ released on pypi http://pypi.python.org/pypi/fa.bootstrap
  • 108. Qu est i ons?
  • 109. Credits ★ http://flickr.com/photos/mleczko ★ http://www.melaiphone.com/ ★ http://static.iphoneitalia.com ★ http://www.theapplelounge.com ★ http://www.nonconvenzionale.com ★ http://craziestgadgets.com/ ★ http://obsessivelystitching.blogspot.com/ ★ http://theclockblog.blogspot.com/ ★ http://www.scatoladeigiochi.altervista.org/ ★ http://wallpapers.brothersoft.com/ ★ www.prisionerodelpixel.com ★ http://jawaexpress.com/ ★ http://mikehenneke.mvourtown.com/ ★ http://android-apps.com/