I wanted to make a Superset of the MVC framework, that focuses purely on the Business Logic part of your application, hence the name
StarLogic
.This pattern models an event listener pattern, but does it in a functionally reactive way. Take the following example:
The idea with this framework, is to define a bunch of simple rules, and have your business logic execute your functions based on the rules. In the above case, any object that passes through the
app.route()
function will receive an ID if it isn't set already.High level application routing can occur when you push a route object to a router like this:
Any object pushed through app will now be checked to see if every rule definition provided is correct, then it will execute
_getUser
and _routeApplication
passing the business object in question to the functions.Hey wait a minute, what about complex routing and nested routers? Easy. The route function is portable and doesn't rely on
this
being anything. Here are some examples of where the route function is placed in a proper way.Essentially you get to design data processes, define application level logic, and design a framework for your application on top of
StarLogic
. Move over angular, StarLogic is coming to a store near you.
No comments:
Post a Comment