Get a Free Quote
You will receive quote within 24 Hrs
Introduction to Bonfire
Bonfire is essentially a framework for you to build your web applications; the difference being that Bonfire is build on top of CodeIgnitor. CodeIgnitor for those who don’t know, is a PHP framework by itself. CodeIgnitor happens to be one of the most popular PHP frameworks around as per the recent statistics released on the Internet. It is also one of the best PHP frameworks according the several comparisons made on the internet.
There are many CMS available and a framework is often confused to being nothing more than a CMS. But that is not the case. A PHP Framework and a CMS are two completely different softwares or tools. A CMS pretty much a complete software that can be installed and used to enter content that will be displayed on the website. While a framework like Bonfire provides the basic functionality that a web developer would require to build his next big project.
The components of Bonfire:
Bonfire consists of several components as described here:
- MY_Model: This consists of a set of standard methods that can be used to derive your models. All the standard CRUD routines are covered here as well as the simple methods that chain together. In case of simple models, you simply need to extend the My_Model class and set a few variables. No additional code is necessary in such situation.
- MY_Controller: There are four different controllers that are used to declare common functions within each so called ‘zone’ of the website. They are: Base_Controller, Front_Controller, Authenticated_Controller and Admin_Controller. Each of the four controllers can be set as per the requirements of your web application. For example, an admin theme can set for the Admin_Controller and you can make sure that the users are logged in with the Authenticated_Controller.
- Role Based Access Control: Bonfire has a user module(User_model) which provides a great deal of flexibility. It can be used for your users to login. It also provides a flexible RBAC that is easy to use.
- Database Tools: The database tools allow quick access of the database, ease to perform backups and even restore old backups and even keep the database versioned with migrations.
- System Events: If you are familiar with CodeIgniter you will know about Hooks. System Events is similar to Hooks. It essentially allows you to hook into the core code of Bonfire without actually modifying the core files. This is also a good method of adding hooks to your own code or modules.
- Activities Log: This simply a easy way to log the user activities. It makes simple and clear logs of every important action of every user. For example ‘John Doe deleted the page title ‘Page 1’.
- Settings: Every web developer can relate to the task of storing application wide settings. With Bonfire it is possible to store application wide settings in the database, which allows the users to easily change their settings at any time.
The admin section of Bonfire consists of a menu with four items across the top: Content, Reports, Settings and Developer. These four items are called Contexts in Bonfire. A Context is a way of grouping the related content from several different modules. Mind you this is automatic and depends solely on the name of the controllers along with a little magic in the routes files.
There is no limit to the number of custom contexts that can be created. You also have the ability to remove the Content and Report contexts. However you are not allowed to remove the Settings and Developer contexts since they are the basic modules of Bonfire. In addition to this the contexts can also be hidden; in the sense they can be designed such that they are visible on to a select group of users.
Since Bonfire is basically a collection of modules that have been created to handle the various sections, it is easy for you to create your own modules too. It is also very easy to reuse or pass around these modules you create.
The basic structure of a Bonfire project is described as below:
Application Folder : Consists of the Bonfire’s primary files and core modules.
Codeigniter Folder : Consists the CodeIgniter system files
Modules Folder : Consists of your own custom modules
Themes Folder : Consists of all the theme files.
A module is in fact a mini application which consists several different assets like CSS or JS, config files, controllers, models, libraries, helpers and views.
Alakmalak is a company that has witnessed the growth and boom of the Internet websites. They have been around since a while developing rich websites to satisfy the requirements of the clients. It is due to this immense experience that they are able to use the correct software or framework for each project. Having completed over 2000 projects for clients from around the world they are still going strong.
Read more about open source platforms services offered by Alakmalak here.
- components of Bonfire
- PHP framework