Random thoughts, ideas and experiences


Phpfw is a framework for PHP that provides a base on which various database backed applications can be built. It allows for easy creation of CRUD applications (applications where most of the code is focused on create/read/update/delete operations on the database). It uses MVC-ish patterns to allow for simpler and cleaner organization of code.

Phpfw leverages popular PHP libraries so as to avoid reinventing the wheel. For example, the database abstraction layer is a thin wrapper that supports ADOdb and ADOdb Lite. Hence, Phpfw is able to support multiple databases thanks to these excellent libraries.

Phpfw requires minimal configuration. All the database information is directly obtained from the database itself. The configuration file is a simple .ini file and is adequately commented to explain the different elements.

Phpfw comes built in with an elementary templating class to generate HTML output. Further it also supports templating frameworks like Smarty and PHPTAL. The combination of these templating facilities provides adequate power to generate simple to complex output.

Phpfw is the result of several PHP projects I undertook over the years. It grew inside active projects and has finally taken a life of its own. It has been written from scratch based on all the code that was written over the years with a focus on simplifying the process of creating new applications with minimal effort. I hope this work proves useful to those of you who would like to put together applications quickly and easily.




I’ll be happy to hear about your experiences with Phpfw. If you have any ideas or recommendations, please feel free to send them my way. I also welcome patches and modules that will enhance the Phpfw experience. You can contact me at: ganeshjgd AT gmail DOT com.

2 Responses

  1. belal says:

    Nice introductory article. Could you please discuss some project creating steps with this framework. Love to get any response on this issue.

  2. genotrance says:

    Creating a project is pretty straightforward. Just download and extract the source code. Edit ini/config.ini as needed. It is well documented and should be self-explanatory.

    Next, check out the Phpfw API and see what modules are available and how to leverage them. E.g. the Config module allows you to read and write .INI files.

    Next, you can create a module using the module/script/generate.php script. It will create a standard CRUD module. This provides the best example of how to leverage Phpfw. You can go ahead and modify this CRUD module or write your own from scratch based on how some of the other modules are written.

    Do let me know if you have any specific questions and thanks for your interest.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Twitter Updates

%d bloggers like this: