-
-
Notifications
You must be signed in to change notification settings - Fork 6
Request response lifecycle
When working with any tool, it is important to understand how the tool works. Here we can look under the bonnet at what makes WebEngine work so you can use the knowledge to make the best decisions in writing applications.
Within PHP.Gt, everything is broken down into its own repository of single responsibility. The PHP.Gt WebEngine brings all of these components together to produce a full application framework. As the name suggests, this framework utilises web technologies and the purpose of this page of the documentation is to walk through what goes into the whole lifecycle of the application.
Before any code is executed, a web request will be handled by the web server. This can be any server, such as NGINX, Apache or the inbuilt server.
The job of the server is to listen for HTTP requests from web browsers across the internet and send back the correct response. A valid response can be a static file, such as an image, a WebEngine page handled by your code, or a 404 Not Found
message.
For a web server to handle WebEngine pages, the request/response lifecycle begins. The entry point of all WebEngien requests is the go.php
file in the root of the WebEngine directory. If WebEngine is installed using Composer, the path will be vendor/phpgt/webengine/go.php
.
See the web servers section for more information about configuring servers and using the inbuilt server.
The go.php
file
- Request-response lifecycle
- Running your application
- Project layout
- Application architecture
- Web servers
- URIs
- Page view
- Dynamic URIs and pages
- Headers and footers
- Page logic
- Protected globals
- User input
- Cookies
- Sessions
- DOM manipulation
- Custom HTML components
- DOM templates
- Binding data to the DOM
- Database
- Client side assets
- API Webservices
- Security
- Configuration
- Build system
- Coding styleguide