How to build complexweb applications having   fun?
How to build complexweb applications having   fun?
author         Andrew Mleczko         Software Integrator         Ferrara (Italy)            amleczko            amleczko@...
author         Andrew Mleczko         Software Integrator         Ferrara (Italy)            amleczko            amleczko@...
author         Ferrara   Andrew Mleczko                   Software Integrator                   Ferrara (Italy)           ...
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”FASTSTABLE
SMALL    “Roughly 5000 lines              of code”FAST                “100% statementSTABLE               coverage via uni...
SMALL        “Roughly 5000 lines                  of code”FAST                    “100% statementSTABLE                   ...
★   Debug Toolbar★   Flexible authentication    and authorization★   Tweens - a bit like WSGI    middleware
★   Decorator-based configurationfrom pyramid.view import view_configfrom pyramid.response import Response@view_config(rou...
★   Event system (based on ZCA)from pyramid.events import NewRequestfrom pyramid.events import subscriber@subscriber(NewRe...
★ Extendable configurationfrom pyramid.config import Configuratorif __name__ == __main__:   config = Configurator()   conf...
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 ...
project requirements
paperless sale
paperless sale          Sales           E-commerce1            2    3           4          5    CRM           Warehouse   ...
paperless sale1      CRM2     Sales3   Warehouse4   E-commerce5    Support
paperless sale1      CRM2     Sales3   Warehouse4   E-commerce5    Support
paperless sale1      CRM       ★   Customer’s management                     (satisfaction, order status,                 ...
paperless sale1      CRM       ★   Sales network management                 ★   Invoicing / accountancy2     Sales        ...
paperless sale1      CRM       ★   Catalog management                 ★   Warehouse management2     Sales                 ...
paperless sale1      CRM       ★   Online shop (for beverages                     and accessories)2     Sales      ★   Mac...
paperless sale1      CRM       ★   Machine maintenance (filter                     change)2     Sales      ★   Emergency s...
paperless sale1      CRM       ★   Machine maintenance (filter                     change)2     Sales      ★   Emergency s...
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 i...
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★ ...
why                         ?★ pyramid_formalchemy CRUD★ easy pluggable widgets  ★ Multi-upload  ★ Metric units  ★ Autocom...
why                         ?★ pyramid_formalchemy CRUD★ easy pluggable widgets  ★ Multi-upload  ★ Metric units  ★ Autocom...
why                         ?★ pyramid_formalchemy CRUD★ easy pluggable widgets  ★ Multi-upload  ★ Metric units  ★ Autocom...
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   ★...
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   ★...
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   ★...
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            ...
authentication - authorization      auth storage ★   users ★   groups ★   roles       PostgreSQL
authentication - authorization      auth storage        single-sign-on ★   users           ★   plone.session              ...
buildout[intranet-plone]recipe = plone.recipe.zope2instanceeggs =    ${intranet-plone:eggs} aeterna.models[intranet-pyrami...
The big picture                  pas.plugins.                       sa                                          ZODBApache...
The big picture                                                 extranet                  pas.plugins.                    ...
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 withi...
d r u pal:              no!★   security problems    (370 CVE entries)★   integration is more difficult    (PHP vs. Python)...
o pen erp :                 no!★ quite complex: CRM , sales,  accounting and much more★ not enough   time  to fully invest...
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 spec...
check this out!
pyramid_formalchemy★ started by gawel (Gaël Pasgrimaud)  and supported by★ using SQLAlchemy,  Formalchemy and fanstatic★ a...
pyramid_formalchemy★   Lots of improvements during                           by    ★   events hooks    ★   view and action...
pyramid_formalchemy★   Minimal configuration:
pyramid_formalchemy★   Minimal configuration:def main(global_config, **settings):      engine = engine_from_config(setting...
pyramid_formalchemy★   Events subscriptions:
pyramid_formalchemy★   Events subscriptions:@events.subscriber([User, events.IBeforeEditRenderEvent])def before_user_edit(...
pyramid_formalchemy★   demo    http://docs.formalchemy.org/demo/admin★   documentation    http://docs.formalchemy.org/pyra...
pyramid_formalchemy★   demo    http://docs.formalchemy.org/demo/admin★   documentation    http://docs.formalchemy.org/pyra...
fa.bootstrap               ★ a   pyramid_formalchemy plugin               ★ based on   twitter bootstrap               ★ i...
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....
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
PloneConf2011 - How to build ERP application while having fun
Upcoming SlideShare
Loading in...5
×

PloneConf2011 - How to build ERP application while having fun

3,924

Published on

Published in: Technology, Business
2 Comments
12 Likes
Statistics
Notes
No Downloads
Views
Total Views
3,924
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
143
Comments
2
Likes
12
Embeds 0
No embeds

No notes for slide

Transcript of "PloneConf2011 - How to build ERP application while having fun"

  1. 1. How to build complexweb applications having fun?
  2. 2. How to build complexweb applications having fun?
  3. 3. author Andrew Mleczko Software Integrator Ferrara (Italy) amleczko amleczko@redturtle.it
  4. 4. author Andrew Mleczko Software Integrator Ferrara (Italy) amleczko amleczko@redturtle.it
  5. 5. author Ferrara Andrew Mleczko Software Integrator Ferrara (Italy) amleczko amleczko@redturtle.it
  6. 6. the team
  7. 7. the team
  8. 8. WHY this talk?
  9. 9. My Reasons to be here★ Building complex web applications should be fun★ to promote
  10. 10. SMALL “Roughly 5000 lines of code”
  11. 11. SMALL “Roughly 5000 lines of code”FAST
  12. 12. SMALL “Roughly 5000 lines of code”FASTSTABLE
  13. 13. SMALL “Roughly 5000 lines of code”FAST “100% statementSTABLE coverage via unit andTESTED integration tests”
  14. 14. SMALL “Roughly 5000 lines of code”FAST “100% statementSTABLE coverage via unit andTESTED integration tests”DOCUMENTED “Literally nothing in Pyramid is undocumented”
  15. 15. ★ Debug Toolbar★ Flexible authentication and authorization★ Tweens - a bit like WSGI middleware
  16. 16. ★ Decorator-based configurationfrom pyramid.view import view_configfrom pyramid.response import Response@view_config(route_name=fred)def fred_view(request): return Response(fred)
  17. 17. ★ Event system (based on ZCA)from pyramid.events import NewRequestfrom pyramid.events import subscriber@subscriber(NewRequest)def mysubscriber(event): event.request.foo = 1
  18. 18. ★ Extendable configurationfrom pyramid.config import Configuratorif __name__ == __main__: config = Configurator() config.include(pyramid_formalchemy)
  19. 19. the project
  20. 20. The Customer★ .★ Born as a startup★ Offices in US
  21. 21. 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”
  22. 22. project requirements
  23. 23. paperless sale
  24. 24. paperless sale Sales E-commerce1 2 3 4 5 CRM Warehouse Support
  25. 25. paperless sale1 CRM2 Sales3 Warehouse4 E-commerce5 Support
  26. 26. paperless sale1 CRM2 Sales3 Warehouse4 E-commerce5 Support
  27. 27. paperless sale1 CRM ★ Customer’s management (satisfaction, order status, etc.)2 Sales ★ Reports (machine statistics, etc.)3 Warehouse ★ Campaigns4 E-commerce5 Support
  28. 28. paperless sale1 CRM ★ Sales network management ★ Invoicing / accountancy2 Sales ★ Revenue counter3 Warehouse ★ Discount management4 E-commerce5 Support
  29. 29. paperless sale1 CRM ★ Catalog management ★ Warehouse management2 Sales ★ Logistic tracking3 Warehouse4 E-commerce5 Support
  30. 30. paperless sale1 CRM ★ Online shop (for beverages and accessories)2 Sales ★ Machine configurator (interactive wizard)3 Warehouse ★ Online payments4 E-commerce5 Support
  31. 31. paperless sale1 CRM ★ Machine maintenance (filter change)2 Sales ★ Emergency services ★ Order / installation process3 Warehouse4 E-commerce5 Support
  32. 32. paperless sale1 CRM ★ Machine maintenance (filter change)2 Sales ★ Emergency services ★ Order / installation process3 Warehouse4 E-commerce5 Support
  33. 33. paperless sale Warehouse Support CRM E-commerce Sales
  34. 34. paperless sale Intranet Extranet Warehouse Support CRM E-commerce Sales
  35. 35. Totally paperless ERP
  36. 36. project gotchas
  37. 37. 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
  38. 38. Arc hi t e ct u ral dec i si ons
  39. 39. and
  40. 40. and
  41. 41. 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
  42. 42. why ?★ pyramid_formalchemy CRUD★ easy pluggable widgets ★ Multi-upload ★ Metric units ★ Autocomplete ★ Multi-relation★ 75% jQuery code
  43. 43. why ?★ pyramid_formalchemy CRUD★ easy pluggable widgets ★ Multi-upload ★ Metric units ★ Autocomplete ★ Multi-relation★ 75% jQuery code
  44. 44. why ?★ pyramid_formalchemy CRUD★ easy pluggable widgets ★ Multi-upload ★ Metric units ★ Autocomplete ★ Multi-relation★ 75% jQuery code
  45. 45. and ?★ The Best CMS ever★ easy to integrate with other Python frameworks★ almost 2000 addons
  46. 46. and ?★ The Best CMS ever★ easy to integrate with other Python frameworks★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  47. 47. and ?★ The Best CMS ever★ easy to integrate with other Python frameworks★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  48. 48. and ?★ The Best CMS ever★ easy to integrate with other Python frameworks★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  49. 49. and ?★ The Best CMS ever★ easy to integrate with other Python frameworks★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  50. 50. and ?★ The Best CMS ever★ easy to integrate with other Python frameworks★ almost 2000 addons ★ Diazo (plone.app.theming) ★ Poi ★ PAS (PluggableAuthService)
  51. 51. I nt eg r at i o n
  52. 52. SQL A lchemy
  53. 53. SQL A lchemy aeterna.models PostgreSQL
  54. 54. authentication - authorization
  55. 55. authentication - authorization auth storage Request pas.plugins.sa repoze.who PostgreSQL
  56. 56. authentication - authorization auth storage ★ users ★ groups ★ roles PostgreSQL
  57. 57. authentication - authorization auth storage single-sign-on ★ users ★ plone.session ★ repoze.who.plugins.auth_tkt ★ groups ★ roles mod_auth_tkt PostgreSQL
  58. 58. buildout[intranet-plone]recipe = plone.recipe.zope2instanceeggs = ${intranet-plone:eggs} aeterna.models[intranet-pyramid]recipe = zc.recipe.eggeggs = ${intranet-pyramid:eggs} aeterna.models
  59. 59. The big picture pas.plugins. sa ZODBApache beaker PostgreSQL repoze. who
  60. 60. The big picture extranet pas.plugins. sa ZODBApache beaker PostgreSQL intranet repoze. who
  61. 61. why not o t h er c o mpet i t o rs?
  62. 62. d j ang o : no!★ less code more magic★ not so flexible (specification is growing)★ using SQLAlchemy within could be tricky
  63. 63. d r u pal: no!★ security problems (370 CVE entries)★ integration is more difficult (PHP vs. Python)★ missing features workflow, complex ACL, etc.
  64. 64. o pen erp : no!★ quite complex: CRM , sales, accounting and much more★ not enough time to fully investigate it★ not a generic framework
  65. 65. results
  66. 66. What mat t ers?
  67. 67. Proper Tools
  68. 68. and a g o o d t eam
  69. 69. ★ 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)
  70. 70. check this out!
  71. 71. 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
  72. 72. pyramid_formalchemy★ Lots of improvements during by ★ events hooks ★ view and action customizations ★ i18n support ★ paster templates ★ fanstatic integration
  73. 73. pyramid_formalchemy★ Minimal configuration:
  74. 74. pyramid_formalchemy★ Minimal configuration:def main(global_config, **settings): engine = engine_from_config(settings, sqlalchemy.) initialize_sql(engine) config = Configurator(settings=settings) # pyramid_formalchemys configuration config.include(pyramid_formalchemy) # register an admin UI config.formalchemy_admin(/admin, package=pyramidapp) return config.make_wsgi_app()
  75. 75. pyramid_formalchemy★ Events subscriptions:
  76. 76. 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)
  77. 77. pyramid_formalchemy★ demo http://docs.formalchemy.org/demo/admin★ documentation http://docs.formalchemy.org/pyramid_formalchemy★ download http://pypi.python.org/pypi/pyramid_formalchemy
  78. 78. pyramid_formalchemy★ demo http://docs.formalchemy.org/demo/admin★ documentation http://docs.formalchemy.org/pyramid_formalchemy★ download http://pypi.python.org/pypi/pyramid_formalchemy
  79. 79. fa.bootstrap ★ a pyramid_formalchemy plugin ★ based on twitter bootstrap ★ integrated with fanstatic ★ released on pypi http://pypi.python.org/pypi/fa.bootstrap
  80. 80. fa.bootstrap
  81. 81. fa.bootstrap
  82. 82. fa.bootstrap
  83. 83. fa.bootstrap
  84. 84. fa.bootstrap
  85. 85. fa.bootstrap
  86. 86. fa.bootstrap
  87. 87. Qu est i ons?
  88. 88. 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/
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×