How to: make an open source successful framework
This article recalls the basics of building a successful framework with agile workload repartition.
A framework is a basic conceptual structure used to solve or address complex issues, usually a set of tools, materials or components.
A framework library allows developers to work on your what makes their new project different from others instead of reinventing simple solutions to address complex issues.
Introduction
This example thread from the django-users mailing list demonstrate the agile design of the Django framework and the important involvement of the user community:
Newbie posts:
Hi group,
Is it reasonable easy to achieve a form for users with in the end the opportunity to register or login? I’d like to let users who visit the site for the first time be able to choose a password and name. This needs to registered first and temporarily the data of the form itself needs to be saved and after successful signup stored in the database. Or is that mission impossible ? :P
Thanks
Other newbie replies:
It’s possible to do and to encapsulate in a loosly coupled application (“module”), which can be reused at will.
You should read the documentation about authentication and an app for that:
http://docs.djangoproject.com/en/1.1/topics/auth
Or install and hack one of the many existing apps shared by other kind users:
http://bitbucket.org/ubernostrum/django-registration/wiki/ http://github.com/policus/django-registration-facebook-backend http://github.com/nathanborror/django-registration
Or start with any Pinax project, because they all include a configured app which just works out of the box (ootb) and concentrate on what makes your project different — which i must recommend if you’re on deadlines.
Agile design
The above newbie answers with 3 paths:
- to the documentation of the framework-level authentication app,
- to the sources of apps developed by external developers, which reuses the one above,
- to the project samples which includes one of these apps reusable module,
On the first (root) layer: the gurus. The team that concentrates on improving and fixing the framework itself.
On the second (leaves) layer: users. From all horizons, users build their project on the apps decoupled from pasts projects, and create new apps.
On the third (trees) layer: more gurus. Cleaning and bundling the community apps and release sample projects.
At this point, the Open Source community is stronger, the growth of production increases the economic factor.
A fantastic framework should not get in the way of users. Not only in terms of license, but also by following traditional concepts: allow to overload everything, value configuration equality to convention, …
Community involvement
It is probably a good idea to start with a committed team of project managers, preferably freelancers who solve a variety of different needs during their career. Not only they will help fix the framework, but also produce, maintain and share the same variety of apps.
The top three motivations for hackers sharing sources are:
- bug reports,
- contributions,
- money “jobs”,
That’s exactly what the god github provides.
For example, it is possible to install a django app with a standard python command directly from a github repository, be it the mainstream or with user patches, and with whatever SCM (ie. git, mercurial, svn …).
Needless to say, integrating with services like github or bitbucket is very profitable for a framework.
The difference between apps and modules
A module cannot run by itself, whereas an app can. The formulation for that can be puzzling: projects are apps and apps are projects, projects and apps are the same.
Technically, one could reuse a project directly in another. This perspective makes the third layer of the community an interesting economic factor each contributor can contribute in a decentralized environment.
This follows common KISS concept: Keep It Simple, Stupid.
Share what?
An application serves a particular purpose, it can package as much as a project:
- routes (ie. urls that route to functions, methods, views …),
- controller logic (ie. identification, input …),
- business logic (ie. database definitions …),
- view logic (ie. conditional tests for the template …),
- templates (ie. html, text …),
- static files (ie. css, js, images …),
- locale support (ie. translations …),
- configuration (ie. default settings, misc definitions …),
The framework design should focus on solving the “project-plugging”, allowing to build modular projects and to reuse it in future projects.
This allows a development team to focus on what actually makes a project different from the other. Which is really appreciable on deadlines.
Comments
Comment form for «How to: make an open source successful framework»