Page 1 of 4

New PHP Framework

Posted: Thu Sep 11, 2008 2:55 pm
by powerofq
Hi,

PHP is a 'second language' for myself, coming more from a LISP background, but over the past few years, I've ported a web development system to LAMP, and incorporated what I feel are some interesting, if not unique, developments including;
  • Incorporating a semantic network model.
    The use of an Entity – Attribute – Value data store using a single MySQL table.
    Very agile, with a strong use of metadata.
    An N-Tier architecture, pulling the business logic from the DB into the PHP tier.
    Everything is an object, with properties stored as metadata.
    Methods are in the form of small PHP modules, that are lazy loaded as required, and are goal based, rather than object based.
    7 or so php functions replace 95% of required SQL, with a library of simple functions for special cases. I haven't coded any MySQL in a long time.
    A single copy of this framework, was handling 35+ domains, a university exchange management system, another company's production line, with numerous developers working on different projects simultaneously, with no namespace conflicts, and rarely pushes 2% cpu utilization.


The concept is based on two fundamental aspects of language.
Every sentence in any language is either a declaration, a query, or a command.
Every sentence consists of a subject, a predicate and a value.

It's not object oriented in the traditional sense, inheritance etc occurs as per a semantic network model ie: we make a few declarations;
tweety isa canary
canary isa bird
bird isa animal

With these 3 simple declarations, we can answer the query “Is Tweety an animal?” through inference.

Of course, there's much more to it. The client side includes drag 'n drop widget development, lazy loading everything, multiple JS library support, and completely Ajax driven. There's a ton of tools that allow clients to build websites using drag and drop, and heavy widget incorporation.

So, what do you think? Is this something anyone would be interested in?

Re: New PHP Framework

Posted: Thu Sep 11, 2008 4:33 pm
by jayshields
Is it closed-source? Why not post your code (or a link to the project)?

Re: New PHP Framework

Posted: Thu Sep 11, 2008 4:51 pm
by powerofq
Currently it's closed.

I'm putting the next version together at the moment, and I'm interested in discussing some of these more advanced systems with some hard-core developers. Would be interested in sharing the source with anyone willing to contribute.

I have some demos and will post the links shortly.

Re: New PHP Framework

Posted: Thu Sep 11, 2008 5:35 pm
by pickle
powerofq wrote: tweety isa canary
canary isa bird
bird isa animal

With these 3 simple declarations, we can answer the query “Is Tweety an animal?” through inference.
powerofq wrote:coming more from a LISP background
Are you sure you didn't mean PROLOG? ;)

Re: New PHP Framework

Posted: Fri Sep 12, 2008 1:31 am
by powerofq
I actually like PROLOG, how mental is that? :crazy:

Re: New PHP Framework

Posted: Fri Sep 12, 2008 3:05 am
by josh
I'd be interested as well

Re: New PHP Framework

Posted: Fri Sep 12, 2008 4:03 am
by powerofq
Here's a demo...

Rockstar is a vertical built on the N-Tier / Semantic Network Database Framework mentioned above.

http://rockst-r.com/admin

Login (using Firefox) as demouser / demopass

(Firefox is required for development of Rockstar sites, but any client can view the results.)

This will take you to the sandbox, where you can add images, text, graphic titles, widgets etc. Sorry, docs are a bit sparse at the moment.. if you have any questions, feel free to post them here.

*Only the owner of a page can add, drag, delete.. and only one owner can be logged in at at time.. so if things stop working, it's probably because someone else has logged in on top of you.

Re: New PHP Framework

Posted: Fri Sep 12, 2008 4:48 am
by powerofq
The flow is like this..

An event is fired by the client as an Ajax request.. every request is handled by a single php script called the 'commander', and every request has a corresponding 'order' value as part of the query string. The commander pulls this order from the database, and executes it, passing any params in the process. The orders are results driven, and a single order can be made up of other orders (modules). The orders build a purely javascript reply, that is then sent back as the response to Ajax request.

Everything, with the exception of files, is stored in the DB.. all javascript, waiting to be lazy loaded as the need arises, same with the PHP business layer.

This system can handle traditional PHP pages as well, augmented with the framework if desired.

But why? 8)

Re: New PHP Framework

Posted: Fri Sep 12, 2008 12:57 pm
by Christopher
I think a little more disclosure about this project would be proper -- especially how it relates to Redwerks? Also, it seems more like a CMS than a framework. Presenting a cool CMS is much different than presenting a framework. Can you provide some API information and code examples?

Re: New PHP Framework

Posted: Fri Sep 12, 2008 1:43 pm
by powerofq
I'm the creator of Redwerks. (Second guy from the left in the video ;)
Redwerks (and this Rockstar demo) are using an earlier version of the Framework. I'm putting together the next generation, and I posted here as I'm curious to know...

- what developers think of the concepts.
- to discuss some of these features in greater depth.
- how much interest would there be in a new Framework like this, both closed or sourced.

Sure, Rockstar is a cool CMS, but I set up the demo merely as a 'proof of concept'. This is the 'Theory and Design' group, and this Framework, at least to me, is a collection of prototypes. Semantic networking (pros and cons), Lazy loading of PHP etc.

At this point I feel the discussion should be more algorithmic, than code examples, as a failure to grasp the fundamentals of meta-data in an N-Tier system where PHP handles all of the business logic, rather than the DB, has proven to confuse developers I've hired in the past. They simply don't get it.

Re: New PHP Framework

Posted: Fri Sep 12, 2008 2:18 pm
by Christopher
powerofq wrote:... as a failure to grasp the fundamentals of meta-data in an N-Tier system where PHP handles all of the business logic, rather than the DB, has proven to confuse developers I've hired in the past. They simply don't get it.
There might be some people around here who can understand fancy stuff like that ...

Re: New PHP Framework

Posted: Fri Sep 12, 2008 3:48 pm
by allspiritseve
powerofq wrote:At this point I feel the discussion should be more algorithmic, than code examples, as a failure to grasp the fundamentals of meta-data in an N-Tier system where PHP handles all of the business logic, rather than the DB, has proven to confuse developers I've hired in the past. They simply don't get it.
It's hard to discuss the theoretical implications of systems we aren't familiar with without concrete code examples. After all, this is PHP Theory and Design, not Application Theory and Design.

Re: New PHP Framework

Posted: Sat Sep 13, 2008 3:38 am
by josh
Personally I'm against the pure JS idea, but I think its a step in the right direction as far as interface design. Can you clarify when you say you view the code like the english language. I view code the same way, a language to describe behaviors, could you clarify by what you mean breaking it down into a subject, predicate etc.. I mean do you have a class that handles different types of "sentences"?

Re: New PHP Framework

Posted: Sat Sep 13, 2008 1:27 pm
by powerofq
could you clarify by what you mean breaking it down into a subject, predicate etc.. I mean do you have a class that handles different types of "sentences"?
Let's take this simple sentence.. a declaration;
"Barack Obama is 46 years old."

subject: "Barack Obama"
predicate: age
value: 46

Any database is simply a storage of declarations.

subject: "Any database"
predicate: definition
value: "simply a storage of declarations"

In the frameworks EAV db, there's a single table, with 3 columns; subject, predicate, value

Code: Select all

 
subject                    predicate          value
Barack Obama               age                46
Any database               definition        "simply a storage of declarations"
 
Because the structure of the entire db never changes, it allows a handful of PHP functions to manage the DB entirely.. with no need to code SQL.

One main rule is that all subjects must be unique to avoid ambiguity.. There may be many Barack Obamas, but there's only one Barack Obama

Re: New PHP Framework

Posted: Sat Sep 13, 2008 5:28 pm
by Christopher
powerofq wrote:Because the structure of the entire db never changes, it allows a handful of PHP functions to manage the DB entirely.. with no need to code SQL.
Yeah, got that from your comments above. I have seen a similar DB design in other CMSs, which is what your system sounds like -- not a framework.