PHP.GT is a collection of web development tools that form WebEngine — an ergonomic toolkit for building web applications. WebEngine follows a static-first approach: development begins using plain static HTML, with PHP introduced only when needed. Dynamic behavior is handled through server-side DOM manipulation, mirroring well-known client-side techniques.
- Start with static HTML
- Split pages into templates and components
- Bind data automatically to the DOM
- Plain HTTP techniques for easy debugging
- Live-updating pages built in
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.
// TODO: Example code
The overall aim throughout GT repositories is to provide an alternative, minimalistic approach to web development. If you're tired of working with the so called "full stack", there might be something of interest to you here.
All GT repositories are designed to be inclusive to novice developers. Each repository is designed to operate independently, allowing developers to leverage individual components without necessarily needing to adopt the entire framework or possess prior knowledge of WebEngine. This modular approach not only enhances flexibility but also promotes a more focused, purpose-driven development experience.
WebEngine itself provides a "batteries-included" default configuration and has an accessible entry point for beginners. However, its capabilities extend far beyond basic use-cases; WebEngine is robust enough to power large-scale, real-world applications serving millions of users.
Whether you're just starting your web development journey or seeking a new perspective on established practices, you are invited to explore WebEngine further by visiting the Getting Started page.
Jump right in to some full featured tutorials, or follow the getting started guide for a good overview of the development process in WebEngine applications.
The user guide starts at "the request-response lifecycle", which exposes the logic that makes WebEngine work, from the first line of the first PHP script, all the way through to the page being sent back to the browser.
Modern web development is underpinned by the DOM, but using its benefits is usually constrained to the client-side.
Having a full-featured DOM in your server-side code enhances the way dynamic pages can be built. Utilising a standardised object-oriented interface means the page can be ready-processed as Multi-page Applications (MPAs), benefitting browsers, web servers, content delivery networks, and end-users.
On top of the standard DOM API, you can take advantage of intuitive templating, server-side validation, and more.
There's no database connection made until you use one, so you're not forced to use any technologies until they're a requirement of your application's functionality - sometimes a directory structure or a CSV file is all you need!
The Object Relational Mapper (ORM) automates database persistence, but allows you to get your hands dirty with custom SQL queries when you need to.
Client-side development is handled automatically through the build process. A sensible set of default build steps can be extended when needed.
Turbo is a micro framework on the client side gives your pages live updates and transitions out of the box.
If you've never developed anything in PHP before, take a look at the basics of PHP and WebEngine. The guide covers the steps involved in getting a PHP development environment up and running on your computer, and then goes on to explain the basics of PHP syntax and getting started with WebEngine application development.
If you're familiar with starting PHP projects using Composer, head over to the quick start guide - you'll be up and running in 30 seconds.
If you've found a bug, or have a feature request, read the guide on how to contribute issues to PHP.GT.
If you're interested in contributing code, but don't know where to start, learn how to contribute to open source by creating a pull request to be guided in finding an issue to implement or fix, coding the feature, and submitting your first pull request.