"…mais ce serait peut-être l'une des plus grandes opportunités manquées de notre époque si le logiciel libre ne libérait rien d'autre que du code…"

Quelques articles sur des frameworks Web Python : Django, Pylons, Web2py, Repoze.bfg, Pyxer

Publié par patrick le février 8, 2009

Sources:

  • http://plope.com/whats_your_web_framework_doing (‘It can be a bit useless to benchmark web application frameworks. When you’re commmitted to a particular framework, either it works or it doesn’t for your particular application; often raw speed is not really a concern. You’re probably not going to switch web frameworks in the middle of a project in order to get a 15% or even a 50% or 100% speed increase: you’ve got too much investment in the code that works under the framework to consider it. In my experience, very few people truly understand more than one web framework, and they tend to use that framework for everything even it it’s slightly less optimal for any specific task; this is because the "switching cost" to go to another one is so high. So benchmarks aren’t really all that interesting in the "real" web world; it all depends on context. But if you haven’t chosen a web framework yet (is there anyone?), or if you’re falling out of love with your current web framework and you’re considering using a different one, you might be able to learn something from profiling an application running under various frameworks nonetheless, even if you ignore the raw speed of the framework itself’Here are the results:
  • - http://compoundthinking.com/blog/index.php/2009/02/04/wsgi-and-cooperation/ (‘…The point of all this is that the wider python web world is seeing a huge increase in cross-polination of ideas, of working together on projects, and sharing code across major frameworks from TurboGears to Zope, to Pylons. And at the core of all this is the WSGI specification. WSGI may not be pefect, but it’s still great, because it provides a defined way for web framework developers to work together. And, that coupled with the fact that we’re all pretty friendly people, and we all like each other and want to work together on things, has created a renasance of sorts in python web tools world…’)
  • http://code.google.com/p/pyxer/ (‘Yet another Python Framework! The goal of this project to make web development as easy as possible to enable the developer to start quickly with a new project. This project should be distributable via PasteDeploy for normal servers and for Google App Engine (GAE), without the need of using different technologies and approaches. The Pyxer Server is a very simple Python Web Framework that aims to makes starting a new project as easy as it can be. It still works respecting the MVC concept but the files can be mixed in one directory. For a high end solution you should maybe consider using Pylons, Django, TurboGears and similar. This work is inspired by http://pythonpaste.org/webob/do-it-yourself.htmlTechnical background. The Google App Engine (GAE) in version 1.1 offers a very restricted Python environment and the developer as to ship arround a lot of limitations. Pyxer helps on this point by providing solutions that also work together with the WSGI Framework Paste by Ian Bicking. This way you get the best from both sides: GAE and Paste. To achieve this, some other common third party tools are used like WebOb and VirtualEnv also by Ian Bicking. The templating s based on Genshi. .‘)
  • http://groups.google.com/group/comp.lang.python.announce/browse_thread/thread/09cfe8decd549127/1382cac331ce7805?show_docid=1382cac331ce7805 (‘web2py 1.56 is out, including a new web site with better documentation http://www.web2py.com.
    • New features Include:
      =================
      - Authentication
      - Authorization (Role Based Access Controller)
      - CRUD
      - portable url fetch function
      - portable geocoding function
      - PEP8 compliant
      - Python 2.5 and Python 2.6 compliant
      - Runs on Jython (although without db drivers)
      - Runs on IronPython (although without CSV, db drivers and internal
      web-server)
      - DAL shortcuts
      - SQLFORM has default image preview
      - new generic.html view
      - more examples and documentation
      - always backward compatible ‘)
  • http://kiznet.fr/blog/2008/11/21/django–python-cest-plus-fort-que-toi/ (‘Aujourd"hui, je vais vous présenter Django, "Le framework web pour les perfectionnistes sous pression" ! Avouez que c"est déjà pas mal comme slogan. Je vais parler ici de mon expérience personnelle d’amateur qui pratique l"informatique sur son temps libre. Donc tout ce que je peux raconter ici peut apparaître totalement FAUX à un expert en la matière, mais bon, faut bien se lancer un jour hein :) …J’ai ensuite installé Django en lui même (ce qui se résume à télécharger la version en cours de développement puis créer 2-3 liens symboliques, du gâteau quoi), puis paramétrer mon httpd.conf (de même, processus très simple grâce à la très bonne documentation très bien traduite par David Larlet. Résultat, en partant de rien, un framework fonctionnel disponible en production en tout juste 5 petites minutesBienvenue dans le monde merveilleux de Django! :) Pour tes accents, vérifie que tu as bien créé ta base MySQL avec le bon encodage. Il y a en fait deux encodages qui interviennent: celui de la base et celui de la connexion client. Tu peux mettre les deux en UTF-8. L’encodage de la base détermine comment ton texte est stocké physiquement sur le disque; si tu mets un encodage non-universel, alors certains caractères ne pourront être stockés. L’encodage de la connexion client détermine comment ton texte est transféré physiquement entre le serveur SQL et ton applicatif. Là aussi, il est important que l’encodage choisi soit capable de gérer les caractères de ton texte, mais il est également très important que l’applicatif et le serveur SQL soient d’accord sur cet encodage (c’est une erreur que je vois trop souvent sur des sites PHP). Normalement Django pose tout seul les bons encodages sur la connexion client, donc de ce point de vue là ce n’est probablement pas un souci pour toi. Mais fais gaffe à l’encodage de la base. ‘)
  • http://www.screeley.com/entries/2008/aug/21/enterprise-django/ (‘…If there’s one thing I love about Alfresco it would be webscripts. They make it easy to retrieve, create and modify content from a repository RESTfully. Webscripts are also very technology agnostic, you can put just about anything on top. We looked at Symphony, Ruby on Rails and Django, but because I have a hammer and everything looks like a nail, we went with Django. This might have been short sighted. The developer working on this django-jython project only got Django running on Jython in TomCat 4 days ago. It also doesn’t help that the client asked if we misspelled banjo in our presentation. Needless to say there will be a few challenges going forward. Tech Stuff: If you have an existing Django project it takes less than an hour to make the conversion. Before you get started you will need three things: Java 6, Tomcat(I am using 5.5) and the Postgres JDBC. The initial install directions are here and to create the WAR the docs are here. The only issue I ran into was a Java class version issue, which is why you need Java 6. ‘)

A voir:

  • http://wiki.python.org/moin/WebFrameworks
  • http://mdp.cti.depaul.edu/ (‘web2pyTM Enterprise Web Framework.Free and open source full-stack enterprise framework for agile development of fast, secure and portable database-driven web-based applications. Written and programmable in Python.Version 1.56.1 (2009-02-05 11:49:10) Created by Massimo Di Pierro. © 2007-2009. ‘)
  • http://en.wikipedia.org/wiki/Django_(web_framework)
  • http://www.django-fr.org/liens/ (‘La documentation officielle est complète mais ne suffit parfois pas à certaines spécificités, les liens présents sur cette page sont là pour combler ce manque. ‘)
  • http://plope.com/Members/chrism/repoze-bfg (‘…So, for the last few weeks (at the expense of much else), with a lot of help from Paul Everitt and Tres Seaver, I’ve been working on a new web framework. This framework is named (provisionally) repoze.bfg ("Big Fine Gun"). It uses the Zope CA, and Zope interfaces, and a bunch of other Zope libraries, but doesn’t use the Z2 or Z3 publishers; it has its own publisher. It also does not use any form of Zope security; it implements its own security model. It has the same concept of views that Zope and Django have. Its development model is closer to Pylons’ or Django’s than it is to Zope’s. It uses the z3c.pt templating system, which is a reimplementation of ZPT, or you can also use XSL, or plug in whatever templating system you like really. It doesn’t assume any particular persistence mechanism; you provide your own (ZODB, relational, filesystem, etc); in a tip of the hat to Pylons, that’s considered an application decision. It depends heavily on a variety of Ian Bicking creations, including WebOb and Paste. It’s very small, currently clocking in at a little over 2000 lines of code, minus dependencies. That said, it does about what I want out of a web framework. It’s still in a pretty early stage, but it has definitely moved its way out of "toy" phase. We’ve managed to create several applications using the framework so far. The very first one was repoze.virginia , which is the application which serves up Repoze.org these days. It’s a simple file hierarchy publisher with slight dynamicism. The second one Paul wrote, and it’s named repoze.lxmlgraph , where he demonstrates how one might publish a website that was represented entirely by a single XML document. The third one is named repoze.cluegun , which is a port of Rocky Burt’s ClueBin application to repoze.bfg. That code runs the ClueGun website . Of the three, ClueGun is probably the most real-world app (albeit small). I’m sort of excited about it. It’s sort of like getting out of jail or something to be able to have your own web framework to write as you see fit. We’ll likely continue to develop applications using repoze.bfg, pushing features into the framework as we find them useful.’)
  • http://en.wikipedia.org/wiki/Pylons_(web_framework)
  • http://static.repoze.org/bfgdocs/ (‘repoze.bfg is a Python web application framework. It is inspired by Zope, and uses Zope libraries to do much of its work. However, it is simpler than any released version of Zope. repoze.bfg uses the WSGI protocol to handle request and responses.’)
    • http://static.repoze.org/bfgdocs/narr/introduction.html#similarities-to-other-frameworks (‘The repoze.bfg concept of traversal is inspired by Zope. Additionally, repoze.bfg uses the Zope Component Architecture (“CA”) internally, as do Zope 2, Zope 3, and Grok. Application repoze.bfg developers use either ZCML (an XML dialect, used in Zope) or decorators to perform various configuration tasks. The decorator support is provided by the Grok project. Like Pylons, repoze.bfg is mostly policy-free. It makes no assertions about which database you should use, and its built-in templating facilities are only for convenience. In essence, it only supplies a mechanism to map URLs to view code, along with a convention for calling those views. You are free to use third-party components in your application that fit your needs. Also like Pylons, repoze.bfg is heavily dependent on WSGI.The “Django docs state that Django is an “MTV” framework in their FAQ. This also happens to be true for repoze.bfg:‘)
    • http://static.repoze.org/bfgdocs/narr/introduction.html#differences-from-other-frameworks (‘ Like Zope, the repoze.bfg framework imposes slightly more control inversion upon application developers than other Python frameworks such as Pylons. For example repoze.bfg assumes that you’re wiling to resolve a URL to a context object before passing it to a view. Pylons and other Python “MVC” frameworks have no such intermediate step; they resolve a URL directly to a controller. Another example: using the repoze.bfg security subsystem assumes that you’re willing to attach an ACL to a context object; the ACL is checked by the framework itself instead of by user code, and access is permitted or denied by the framework itself rather than by user code. Such a task would typically be performed by user-space decorators in other Python web frameworks. Unlike application development using Zope, application developers don’t interact with the Zope Component Architecture (“CA”) very much during repoze.bfg application development. Instead, the repoze.bfg framework tends to “hide” most interaction with the CA behind special-purpose API functions. Also unlike Zope and unlike other “full-featured” frameworks such as Django, repoze.bfg makes no assumptions about what persistence mechanisms you want to use to build an application. Zope applications are typically reliant on ZODB; repoze.bfg allows you to build ZODB applications, but it has no reliance on the ZODB package. Likewise, Django tends to make the assumption that you’re going to want to store your application’s data in a relational database. repoze.bfg makes no such assumption; it allows you to use a relational database but doesn’t enourage or discourage an application developer about such a decision.’)
  • http://en.wikipedia.org/wiki/Grok_(web_framework) (‘ Grok is a web framework based on Zope 3 technology. The project was started in 2006 by a number of Zope 3 developers.Grok has since then seen regular releases. Its core technologies (Martian, grokcore.component) are also finding uptake in other Zope 3 and Zope 2 based projects. The primary motive behind Grok is to make the powerful, but not quite easily approachable Zope 3 technology more accessible and easier to use for newcomers and, at the same time, speed up application development, in accordance with the agile programming paradigm.To achieve this, Grok gives up some Zope 3 principles. Instead of using a strictly explicit, XML based configuration language (ZCML) like Zope 3 does, Grok uses Python code for component configuration, and has many implicit defaults and conventions so that you don’t have to have so much configuration, in the hope that it is easier to learn than standard Zope 3. Grok aims to be more similar in feel to popular Python web frameworks like TurboGears, Pylons and Django, while at the same time it retains much of Zope 3′s codebase and its component approach to development. ‘)

Laisser un commentaire

Entrez vos coordonnées ci-dessous ou cliquez sur une icône pour vous connecter:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s

 
Suivre

Recevez les nouvelles publications par mail.

Joignez-vous à 74 followers

%d bloggers like this: