- A unified experience for web development! -
Empowering dreams, pushing boundaries, and exploring limitless possibilities.
Fresh perspectives and updates
We discovered that AlpineJS and PHPue Framework works flawlessly, apart from that "x-for" attribute, which was far from what we needed. After some research, we found there was 3 issues, and 1 pull request with AlpineJS:
The creator of PHPue Framework created a extension for AlpineJS, that introduces a x-ssr attribute! This is similar to x-for, though it respects what HTML blocks exist, then you define a "csrTemplate" variable when the array changes, which holds the building blocks for CSR controlled elements!
(This may feel like a sacrifice for DX, although, the choice derived from lack of performance, from how x-for was handled!)
Usage (The extension is still new, so any bugs, please create issues, and if you are down to contribute, fork and edit /assets/js/phpue-ext-csr/alpine.ext.prod.ssr.js, and minify the file
(I used https://www.minifier.org/):
<div x-data="customDataHandler">
<ul x-ssr="varArrayName">
<li p-for="$item in $items">{{ $item }}</li>
</ul>
</div>
(OR)
(Managed by customDataHandler and csrTemplate! (just like x-for, but the definition is inside customDataHandler))
<ul x-data="customDataHandler" x-ssr="varArrayName">
</ul>
Checkout PHPue's AlpineJS Extension by:
PHPue Extensions - AlpineJS SSR Extension
I have tested it, not thoroughly though! (There may still be some bugs or optimisations I may have missed over!) - From my personal testing, I have not seen any errors, or development strains.
Happy developing, Edward!
#opensource #alpine #alpinejs #phpueframework #development #php #js
^^ Want your name here Fork from Here or Let me know of your PHP/JS Experiments with PHPue! ^^
--- Feedback ---
mailto:feedback@phpue.co.uk
What's the trick, Edward?
In PHP, developers work directly with the browserβs native JavaScript - thereβs no Node.js runtime, no bundlers, and no build pipeline by default.
That constraint is actually a strength.
AlpineJS fits this world incredibly well! It is lightweight, browser-native, and gives developers a clean way to write PHP-driven markup with JavaScript listeners - without falling back to heavy jQuery-style writing or complex frontend tooling.
PHPue takes this a step further by allowing you to define AJAX listeners directly inside the view, without ever leaving the file. This keeps SSR and CSR in sync, dramatically improving the developer experience and restoring a sense of control and clarity.
Creating endpoints inside the view genuinely lifts the weight off your shoulders. The best part?! You can build anything from pure motivation and creativity, with or without additional PHP or JavaScript library use!
Checkout the PHPue + TailwindCSS + AlpineJS Library on GitHub!
Note: NodeJS is required to build the TailwindCSS Styles in this template: simply run npm run build to build the TailwindCSS Minimalistic file.
If you are new to PHPue, please use Native PHPue Framework and learn first with native JS, before trying Alpine.JS! - Get Started
You can build PHP submit forms and just point to your designated view, '/submit' or your designated PHP submission file, '/components/form/submit.php'. No framework lock in.
If you become stuck, use backend/ for scripts that boots up / registers at request, or use components/ creating a components/submit.php file, or use PHPue's native view system, 'views/' creating a views/submit.pvue view, adding your PHP logic to the <script> block.
Otherwise, you want to use JS communication to submit a form?! Just create a @AJAX('POST') with a $input body parameter or @AJAX('GET') with $_GET('') PHP variable. Calling the endpoint with fetch('', ...) (no need to enter a route, PHPue sets all endpoints at entry). This way you can manipulate the form on the Client-side, and have full control of submission data on the Server-side!
I personally try to stay away from framework wars! PHPue, tries to bridge the gap between PHP and JS, whilst simply providing a better developer experience, and lightweight framework/template engine without complexity!
It doesnβt dilute PHP or JavaScript β it reinforces each language where it performs best.
PHPue is a framework that dissolves on compile, leaving beautiful .php files. If you lose the source files, you can still edit the PHP files, and still make workable applications! Though, we do recommend backing up your IP, of course!
Check out our Latest Campaign:
Are you a JavaScript developer?
Test which JavaScript libraries work well with PHPue β and why they do.
For example, does HTMX + PHPue make sense for SPA-style flows? Try it and share your findings.
Are you a PHP developer?
Youβve got options.
Is the framework missing something you need? Fork it and add the feature.
Want to experiment instead? Try different PHP / Composer libraries inside backend/ and see which ones PHPue does (or doesnβt) support cleanly.
Interested in routing? You could be the first to add more complex patterns like [:id].pvue or /user/login.
(I personally prefer /user?login using native PHP $_GET, but PHPue could benefit from all approaches.)
Also, you could create a backend/ library to enable new functionality without modifying the framework directly β just something to keep in mind.
Just remember β try to KISS.
Refer to PHPue Releases for more details.
Hello everyone - itβs been a minute!
We are excited to kick things off with the PHPue v0.0.2 update, packed with improvements and refinements to keep development smooth and powerful.
Updating from
v0.0.1>>v0.0.2is 100% safe and seamless.
HTML Language Support
Per-view language configuration via <meta name="lang" content="fr">.
Comment syntax: <!-- lang: es -->.
Global PHPUE_LANG constant fallback.
Supports multi-language applications.
Header Control System
Smart output buffering for HTTP headers.
Send headers from backend/ files and .pvue files.
Eliminates "Cannot modify header information - headers already sent" errors.
Enhanced Deployment
New .dist/ directory deployment method.
Simple copy-paste to server root.
Build with ?build=1 parameter.
Two deployment options:
Upload entire .dist/ directory.
Copy .dist/ contents to server root.
Smart Hot Reload
Monitors view/ and components/ directories.
Instant page refresh on file changes.
Autoload Detection
Smart autoload.php detection.
Fixes "class already declared" errors.
Composer integration.
assets/ folder is root level with your App.php!public_html/
|-- App.php
|-- ajax/
|-- assets/
|-- backend/
|-- components/
|-- httpReqs/
|-- pages/
|-- conversion.php
|-- index.php
Absolutely nothing.
PHPue v0.0.2 keeps all features from v0.0.1 β no deprecations, no breaking changes, just pure upgrades.
# Clone and install
$ git clone git@github.com:PHPue/PHPue.git
$ php -S localhost:8000
Want a place to feature your work that you created with PHPue? We will look into making a featured space, so that we can star your project, to show what is possible with PHPue!
Want your PHPue Project featured in our posts!?
Simply share this post, use #PHPueFramework on social media, and screenshot evidence to community@phpue.co.uk.
Documentation | Get Started | Latest Releases | PHPue Tutorials | Official GitHub
Want to contribute? Fork the Repo! | Want to Sponsor us? | Have feedback?
In this update, weβve added in-code comments marking version-specific changes. These help contributors understand the internal flow and experiment safely with framework behavior β such as modifying auto-routing or extending architecture.
We encourage exploration, but always try to keep PHPueβs philosophy in mind: simplicity over complexity.
Tutorials are Now Available for PHPue
We have three specialised tutorials to help get you started in the best possible way!
We have a tutorial for setting up Apache or Native PHP on your system with step-by-step instructions on how to copy your project over into the specialised htdocs/ filing system.
Though I haven't tested if Hot Reload (?live) works effectively in Apache yet!
Big shout out to Taonga for giving this suggestion!
Check it out at: PHPue Tutorials - Setting up a PHP Server
We created a tutorial that walks you through the process and structure of how PHPue works. We used the Git Repository as the base, described the code and added comments to help getting used to the structure.
Check out this tutorial: PHPue Tutorials - Creating your First PHPue App
Even though PHPue Framework tries to keep it simple, we understand the new structure and mindset can cause confusion when it comes to global, scoping and even just how it works!
We guide you through the 4 methods that are enabled in PHPue Framework, and how you can utilize styling! From Global methods like assets/css/styles.css, to scoped methods found in the views themselves. We even went as far to show what you could do, even if it's an unclean way. This allows you to better understand how the framework operates and provides a clearer sense of its strengths and limitations.
Style your App with This Suggestion:
PHPue Tutorials - Setting up a PHP Server
Quick Links:
Ready to start building? Let's go!
PHPue v0.0.1 is here - stable, production-ready, and cleaner than ever!
I'm thrilled to announce the first stable release of PHPue, now with even more power and flexibility. This isn't just a "framework update" - it's a new way to build PHP applications with clarity, simplicity, and modern features.
Why PHPue?
A modern PHP framework for simplicity, speed, and developer joy, stripping away complexity while enhancing the development experience.
What's new in PHPue?:
Core Philosophy & Features:
| True SSR & Unified CSR - PHPue keeps logic balanced
| Component and view system with @require & #require
| Template directives: p-if, p-for
| Secure, context-aware XSS protection with {{ }} syntax.
| AJAX with @AJAX decorators
| Zero-build process - no Webpack, no config
| Hot Reload - Documentation - Hot Reload
Get Started:
Download the latest release, start the server, and begin developing immediately.
PHPue v0.0.1 is stable, powerful, and ready for production. The modern PHP experience is here - clean, unified, and joyful.
What if much of the "modern" web development complexity we accept is unnecessary?
I built PHPue not as just another framework, but as a challenge to the status quo. It's born from a simple question: Why can't we write server logic and client interactivity in one unified workflow, without constant context switching?
PHPue is a philosophical stance. It's about Unlearning Complication. The framework is inspired from Vite and Vue; without 'reinventing' the wheel. Instead, we added 9 new syntax patterns on top of PHP, and created a framework in two principle files! One to compile .pvue files back to PHP before runtime, and one to serve and build production quality files!
It's not just "PHP with some helpers." It's a new mental model where PHP and JavaScript coexist seamlessly in the same file:
PHPue is an invitation to rethink the basics, whilst always having pure PHP syntax and JS on standby, without breaking the framework!
See the philosophy behind the code: Philosophy
See the unified architecture in action: Features
Get Started: Get Started
Contribute on GitHub: Contribute Now
We have Syntax Highlighting already! PHPue Syntax Highlighter Repo
I've been working on this framework, and I am proud to announce PHPue. Say hello to a cleaner way of building with PHP.
I'm excited to share PHPue, a new open-source PHP framework built on a philosophy of clarity and simplicity. It's for developers who believe that powerful tools should also be a joy to use.
We've focused on:
Dive in and see how PHPue can streamline your next project.
Explore the Features: Features
Read the Docs: Documentation
Get Started Today: Get Started
GITHUB - PHPue: PHPue Repository
GITHUB - PHPue Syntax Highlighter: PHPue Syntax Highlighter