PHPue Insights Hub

- A unified experience for web development! -

PHPue Logo - A modern PHP framework

PHPue Framework

Empowering dreams, pushing boundaries, and exploring limitless possibilities.

PHP Framework β€’ Carmarthen, Wales.
πŸ“

Latest Insights Posts

Fresh perspectives and updates

7
posts published
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch

How is the PHPue Framework reshaping the open-source ecosystem?

How is PHPue Framework impacting the Open-Source community?

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:

Issues:

  • 1.1: alpinejs/alpine#196
    • 1.2: Bind x-for items to server rendered items #196
  • 2.1: alpinejs/alpine#329
    • 2.2: x-for - how to use with pre-existing lists in html? #329
  • 3.1: alpinejs/alpine#450
    • 3.2: [Bug] x-for should generate valid/compliant html when used on elements such as lists, tables, selects etc #450

Pull Request:

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>

Who can use this extension?

  • PHPue Developers!
  • PHP Developers!
  • HTML + CSS + JS Developers!
  • Laravel Developers!
  • Other PHP Frameworks or SSR Frameworks that need AlpineJS!

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

πŸ‘ 0 likes
0 shares
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch
3 weeks ago - Tools and Tips

PHPue + AlpineJS: Why This Lightweight PHP + JS Combo is a Developer's Dream

PHPue + Alpine.JS is fire!!

Experiment by Edward Patch

^^ Want your name here Fork from Here or Let me know of your PHP/JS Experiments with PHPue! ^^

--- Feedback ---
mailto:feedback@phpue.co.uk

Why do PHPue and AlpineJS work so well together?

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

PHP Submission and AJAX synchronization Tricks

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!

Why PHPue, and not other frameworks?

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:

Spring Campaign

Contribute?

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.

πŸ‘ 0 likes
0 shares
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch
2 months ago - Release

PHPue v0.0.2 Update: New Features, Improved Deployment & Hot Reload

PHPue V0.0.2 Release: To New Heights!

PHPue Patch Changes

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.

No Breaking Changes!

Updating from v0.0.1 >> v0.0.2 is 100% safe and seamless.

What's been added in PHPue?

Major New Features:

  1. 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.

  2. 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.

  3. 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.

  4. Smart Hot Reload

    • Monitors view/ and components/ directories.

    • Instant page refresh on file changes.

  5. Autoload Detection

    • Smart autoload.php detection.

    • Fixes "class already declared" errors.

    • Composer integration.

Bug Fixes

  • Fixed inconsistent component auto-loading in nested folders.
  • Added root deployment capability, which means your assets/ folder is root level with your App.php!
  • Improved error handling for missing backend includes

Deployment Structure Example:

public_html/
|-- App.php
|-- ajax/
|-- assets/
|-- backend/
|-- components/
|-- httpReqs/
|-- pages/
|-- conversion.php
|-- index.php

What's Deprecated in PHPue v0.0.2?

Absolutely nothing.

PHPue v0.0.2 keeps all features from v0.0.1 β€” no deprecations, no breaking changes, just pure upgrades.

Quick Start Commands!

# Clone and install
$ git clone git@github.com:PHPue/PHPue.git
$ php -S localhost:8000

Community Spotlight

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.

Hot Links

Documentation | Get Started | Latest Releases | PHPue Tutorials | Official GitHub

Contribution

Want to contribute? Fork the Repo! | Want to Sponsor us? | Have feedback?

Contributors Section (Things to Know)

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.

πŸ‘ 0 likes
1 shares
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch
3 months ago - Announcement

Build Your First PHPue App Today - 3 Free Tutorials Just Dropped!

Tutorials are Now Available for PHPue

We have three specialised tutorials to help get you started in the best possible way!

Starting a PHP Server

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

Create your First PHPue App

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

Styling your 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!

πŸ‘ 1 likes
2 shares
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch
3 months ago - Release

PHPue v0.0.1 is here - stable, production-ready, and cleaner than ever!

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?:

  • Customisable 404 Request Pages – because your app deserves personality.
  • Backend Loaders – effortlessly bring in vendor modules or custom PHP classes for your .pvue files.
  • PHPue Extensions – extend functionality without touching the core.
  • Dynamic & Static Headers – full control over App.pvue headers using {{ }} syntax.
  • Production-Ready Anywhere – deploy instantly to shared hosting.

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.

πŸ‘ 3 likes
4 shares
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch
3 months ago - Philosophy

We've been writing PHP the hard way. Let's change that.

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:

  • Unified File Architecture: Write server-side PHP and client-side JavaScript in the same file. No more searching through multiple files for related logic.
  • Automatic PHP -> JS Data Bridge: Pass PHP variables directly to JavaScript with simple {{$variable}} syntax.
  • Seamless AJAX Handlers: Write PHP functions with @AJAX decorators and call them directly from JavaScript.
  • True Full-Stack Coherence: Stop duplicating validation and business logic. Build reactive applications where the client is a true view of server state.

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

πŸ‘ 3 likes
3 shares
PHPue Framework Logo

PHPue Framework

β€’ Author: Edward Patch
4 months ago - Announcement

Announcing PHPue: A Cleaner Way to Build with PHP

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:

  • An expressive, easy-to-learn syntax; bringing 9 new syntaxes to the table.
  • Creating and deploying a powerful Web Application without the need for NodeJS overhead.
  • Making AJAX functions easier to write and read.
  • Enabling a clear way of writing SSR and CSR without hydration issues.
  • Comprehensive, clear documentation.

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

πŸ‘ 9 likes
0 shares

Latest Blog Posts

No Blog Posts Exist