-
-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the PHP.Gt WebEngine — a lightweight PHP 7 application development toolkit aimed at streamlining development and respecting web technologies.
Web frameworks offer many features, but often come with steep learning curves or imposing rules. The motivation behind this project is the belief that what a framework can offer can be achieved by eliminating code rather than adding more.
The core concept behind the WebEngine is that applications start static first, the simplest application consisting of a single index.html
. Logic can be added to make pages dynamic by using PHP files of the same name as their HTML counterparts. index.html
is powered by index.php
, about.html
is powered by about.php
, etc. Learn more about this in Application architecture.
PHP page logic has context of the HTML page view by using the Document Object Model (DOM), which comes with bindable DOM templates. HTML can be organised using Custom Elements <like-this>
.
- DOM Templates - Bind dynamic data to reusable HTML templates.
- Security - Provides automatically encrypted user input and secures against CSRF.
- Database organisation - Organise and template database queries.
- Protected Globals - Replaces superglobals with object-oriented alternatives.
- Build system - Copies and compiles client-side code automatically without needing to run tasks or "watch" directories.
- Command line actions - Create, serve, test and deploy your application from the command line.
- Blueprint repository - Start coding new applications from the blueprint of example applications.
Each component within a WebEngine application can be developed within its own ??context??, usually within its own file on disk, so that WebEngine can hook everything up and make the magic happen. There is a strong separation of concerns promoted throughout the WebEngine and within applications built upon it.
Separate areas of concern:
- Page View - the representation of a page or template, in HTML.
- Page Logic - the business logic that makes Views dynamic, in PHP.
- Database - the database queries, in SQL.
- Service View and Logic - the same concept as Page View/Logic, but for building webservice requests rather than pages, in JSON and PHP.
- Class - the separate areas of functionality that build up your application's logic, in PHP.
- Client side assets - the source code for pages' JavaScript and CSS (or preprocessors).
If you're new to WebEngine, read the quick start guide first, and work through the beginner tutorials (Hello, World! and Hello, You!) to get the best introduction to the toolkit.
The core concepts to know are detailed in the "User guide", starting with the request-response lifecycle.
Use Stack Overflow to get help with technical issues. Tag your question with webengine
and a developer will be alerted to answer your question as soon as possible.
Report bugs and suggest features on the Github issue tracker.
Website | Packagist | CircleCI | Scrutinizer
- 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