Zero Core

At the heart of the Zero Framework is Zero Core. This is the front controller or router for your application.

It takes the URL in the request and calls the proper method in the proper class.

Instead of declaring tedious named routes, Zero Core takes the url and assumes that you're trying to get a class method.

Thus: domain.com/class/method/arg1/arg2/argN...

Once it has found this method, it wraps it with the head, header, navigation panel, and footer that you've defined. Methods are also provided to dynamically insert css and js based on the request the user is making

If there is no method found for that request, the Zero\Core\Response class takes over and attempts to find a reasonable way to respond to the request, first by checking to see if there is a .php view file available to serve, and then by checking if the Index class has a method or view file.

If the Response class cannot find a reasonable response to make, it calls the Err(or // renamed to for php7 compat) class, which generated a 404 page.

Zero\Core also provides a Request class which has all the parts of the URL in static variables, and a Console class for debugging (especially useful for AJAX debugging)

Zero App Template & JS Client

Lots of care has been taken to organize the Zero Framework to be modular and loosely coupled. While the JS Client currently lives inside of the app template, this is planned to change.

While the App Template is not necessary to use Zero Core, it will make getting started much easier. The purpose of the app template is to keep everything particular to your application in a separate repository

This allows cloning the zero framework and getting started on a new application much easier.

JS Client

The JS client was designed with the goal of making everything AJAX. The JS client mirrors the backend core library in that it provides a sort of front-controller and intercepts all clicks. All elements with hrefs are handled with ajax GET, all forms default to POSTing, and when a button with an actionattribute is clicked, the client framework looks in an object named "actionIndex" for a method to call. Elements.js is provided as a demonstration for modeling your elements you wish to manipulate, and actionIndex, in turn manipulates those elements and their methods

We're planning on improving this with the keywords ECMA6 provdes, but when this was originally written, those were not available.

Zero Entity

Zero Entity is an entity framework designed to make database prototyping easier. All you need to do is write a class that extends the base class, give it an a public `$attrs` attribute that contains an array of all columns you want your object model to have, and voila, you have all the CRUD methods at your disposal that you need. You have to create another, empty class to handle the entities en masse, but this distinction makes for more easily readable code.

The furture roadmap includes mock-relational capabilities, an auto-class generator, and something that will actually generate the schema of your prototype once you're satisfied with it.

Zero Material

This project is based on MaterializeCSS

and is really just a set of wrappers around their HTML structure. This allows you to do things like dyamically generate HTML elements, such as the sidebar on this very site.

All in all, it is the youngest memeber of the Zero Framework, and is not fully mature, yet. However, the possibilities are strong, here, especially in conjunction with the Entity framework, potentially allowing for code that generates itself.