1. How does Frameplicity work?Below is a high-level explanation of how the framework processes a page. Note that is explanation is far from comprehensive, and purposefully so-- You will gain a better and deeper understanding by exploring it yourself and completing the activities.
When a user makes a URL request to a web site running Frameplicity, the framework constructs the result page by applying the header, body and footer templates. These templates are explained below.
As noted above, the above explanation is far from complete. You should read the framework's logs and source code to get a deep understanding how the framework works. This is discussed in the next two sections.
2. Use the Framework's Logs to Ease Your LearningFrameplicity does extensive logging during the page request/response lifecycle. Viewing this log will help you to understand what is going on "under-the-hood". The log is viewable in two ways:
You will start looking at the logs when you complete the first activity.
3. Look at the Framework's Source CodeWhile looking at the logs will provide insight into how the framework processes web requests, you will also want to look deeper. The framework's source code is the ultimate source of "truth". When a web request is made, the index.php file in the framework's root folder is the starting point for handling the request. Looking there, you will see it imports all of the .PHP files in the _Source folder and calls Engine::run() which is the main module that calls all of the other modules in the framework.
You don't need to look at the framework's source code right now. As you progress through the activities, you will refer to the relevant parts of the source code to deepen your understanding.
4. Work on the Primer ActivityThe primer activity highlights specific PHP language elements that are used in the framework. While Frameplicity's goal is not to teach you PHP, you'll need to understand whats covered in the primer so your learning curve will be smoother later.
The following reference materials regarding object-oriented programming (OOP) will help you as you work through the primer activity. If you are new to OOP, you should read through all of these materials.
Constructors and Destructors
In this primer activity, you will be reading and running code but not writing any code. The code is located in these files in your training environment:
After looking at the code for each file in the Activity-LanguagePrimer folder, and reading the commentary at the bottom of the file, run the code by accessing the page from the web browser in your training environment. The first file, for example, is accessed by going to http://<localhost>/Activity-LanguagePrimer/Part1.php where<localhost> is the server name of training environment. You don't need to run Part1Helper separately, since its accessed from Part1.
After you've completed the primer activity, click the button below to proceed to all of the other activities.