Diferència entre revisions de la pàgina «Desenvolupament d'aplicacions web amb frameworks»
| Línia 32: | Línia 32: | ||
| Frameworks Python: | Frameworks Python: | ||
| * [[Django]]: és el que treballarem aquest curs | * [[Django]]: és el que treballarem aquest curs | ||
| − | * [http://docs.pylonsproject.org/projects/pyramid/en/latest/ Pyramid] | + | * Pyramid: | 
| + | ** [http://docs.pylonsproject.org/projects/pyramid/en/latest/ Pyramid (oficial)] | ||
| + | ** [[Python: Pyramid framework]] (a cacauet.org) | ||
| + | |||
| + | Microframeworks Python: | ||
| * [http://www.cherrypy.org/ CherryPy] | * [http://www.cherrypy.org/ CherryPy] | ||
| * [http://flask.pocoo.org/ Flask] | * [http://flask.pocoo.org/ Flask] | ||
| + | * [http://bottlepy.org Bottle] | ||
| Frameworks PHP: | Frameworks PHP: | ||
Revisió del 16:53, 13 set 2016
Contingut
Què és un framework?
Per començar, us reprodueixo el què explica la web de Pyramid, un conegut framework per Python, que compara la idea de llibreria i framework:
| Frameworks vs. Libraries A framework differs from a library in one very important way: library code is always called by code that you write, while a framework always calls code that you write. Using a set of libraries to create an application is usually easier than using a framework initially, because you can choose to cede control to library code you have not authored very selectively. But when you use a framework, you are required to cede a greater portion of control to code you have not authored: code that resides in the framework itself. You needn’t use a framework at all to create a web application using Python. A rich set of libraries already exists for the platform. In practice, however, using a framework to create an application is often more practical than rolling your own via a set of libraries if the framework provides a set of facilities that fits your application requirements. | 
Podriem dir, en resum, que un framework és:
- Un seguit de llibreries
- Uns mecanismes de control (en el cas del web, seria el serividor web)
- Un conjunt de bones pràctiques
Separació de codi i disseny
Model multicapa
Frameworks i microframeworks
Han sorgit molts microframeworks per desenvolupament superràpid, tot i que per a grans projectes potser els pot faltar algunes features que podem voler.
Frameworks Python:
- Django: és el que treballarem aquest curs
- Pyramid:
- Pyramid (oficial)
- Python: Pyramid framework (a cacauet.org)
 
Microframeworks Python:
Frameworks PHP:

