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

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
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
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
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
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
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
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 
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
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
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
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 

Recently uploaded (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
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
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
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...
 
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
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
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
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 
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
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
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
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 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/