There are an impressive number of existing frameworks and many developers choose to work with them, instead of creating their own framework. It’s a matter of convenience, because using a pre-built template exempts developers from wasting precious time while designing a framework – which is not an easy job, and allowing them to focus on other features that will be added to their web apps or websites. But, if you’re a developer who decides to take the bull by the horns, it’s better to know what you’re dealing with, and we must warn you that it’s not easy to design a framework. There are some aspects you’ll need to take into consideration before proceeding.
Before we’ll tell you what a framework is, we’ll give you an exercise of imagination. As you know, the human body’s internal framework is represented by the skeleton, which is divided into the axial skeleton and the appendicular skeleton. They hold the internal organs, which form a solid team and support life. The body won’t function correctly if a vital organ is affected, so everything must be kept in balance, or else there will be serious issues.
Now, replace human body with application, and you’ll understand that it’s built upon its own “skeleton”. The framework is the underlying skeleton and it has five major responsibilities: Menu Management, Form Management, Security Management, Communication Management and Data Access Management.
Before starting building a framework, first you will need to identify your requirements, so you’ll need to ask yourself how your application will look like, what kind of interface you will use and what kind of data resources you will need.
The way the framework should be structured depends on the type of application you’ll be developing, because the way it will be built will be reflected in the way the user will interact with it. Now comes the next important part: required data resources. So, you’ll need local decibels relative to full scale, local views, remote views, or Internet/Intranet data sources.
A framework will be good if it’s simple, clear, expandable and it has an abstract design. If the structure of the framework won’t be easy to understand, it will take you weeks to figure out how things work. Therefore, parts of the framework will need to be clear and to have consistent interfaces. Also, you should set some boundaries, to decide what the responsibilities of the framework are, so the requirements will be met and functionality outside boundaries won’t interfere to make the framework too complex. Any additional functionality must be handled only by the developer. The framework shouldn’t be fixed, but to allow expansion by adding new classes or subclassing the existing classes.
If you’ll be building a PHP framework, you’ll need to install the latest 5.6.24 version or at least version 5.3.8, a web server such as Apache or NGinx, some knowledge of PHP and Object Oriented programming. There are many tutorials online which will tell you the exact steps you’ll need to take to create your first framework. Good luck!
Looking for a new gadget? How about a Drone? You know you want one!