anzeblabla/framework

This package is abandoned and no longer maintained. No replacement package was suggested.

A toy project PHP framework

0.0.8 2023-04-30 22:52 UTC

This package is auto-updated.

Last update: 2023-10-05 19:18:37 UTC


README

This is a PHP framework that is just a fun little project so I have something to do. It is not meant to be used in any way, as it's very bad.

Functionality

The framework is very simple. The basic idea is that every component is it's own file, then you can reuse components with different props (similar to React).

Inside the components you mostly use the helper object provided to do things like add functionality to buttons. You can also store data directly in $this->data and it will be auto-saved to the session.

There's also a built-in connection to the DB. You can use it by calling $this->db->query() or $this->db->queryOne() or $this->db->execute().

Using this feels like a shitty version of React where you have to mess around with PHP's general shittiness. Good luck ;)

Goal

My goal was to create a tool where all the logic (frontend and backend) + styles could be in one file (similar to Next.js).

Todo

  • File system routing
    • Basic functionality
    • Dynamic routes
    • Layouts
    • Rewrites and redirects
  • Documentation
  • Solve problem where data is kept even when you don't want it (duh, everything is stored in session) - for example when a component is rerendered
  • Only rerender components that have changed