Home / About Cognifty Framework

Why Another PHP Framework?

This question is probably best answered with another question: why all these other frameworks? Cognifty is based on LogiCreate, which, as of this writing, is 7 years old. Cognifty is a clean room implementation of an OOP approach to serving Web pages which pre-dates so called "MVC" frameworks, and will still be around after MVC frameworks have gone away.

The same ideas that made LogiCreate so powerful are finding renewed life amongst this new wave of PHP frameworks. Just to give an idea about the landscape of PHP at the time, other projects which were popular when LogiCreate first came out were:

  • PHP-Nuke
  • Fast Templates
  • PHPLib
  • PHP Shop
  • EZ Publish
  • Mambo

Cognifty History

Cognifty was born from LogiCreate. LogiCreate was one of the first PHP frameworks (http://www.faqs.org/docs/Linux-HOWTO/PHP-HOWTO.html#s11). Unfortunately, it was probably ahead of its time, using all the OOP features of PHP 4 for serving Web requests just didn't jive with the PHP community of 2001-2002.

MVC Doesn't Work on the Web

One of the key features of Cognifty is that it does not try to emulate the MVC pattern for serving Web pages. Instead, Cognifty uses the Module/Service/Event structure (MSE) for organizing code. This does not mean that MVC does not have its placel real MVC libraries for are supplied for individual widgets.

The MVC pattern was first implemented to help deal with setting up complicated GUI widgets. Trying to cram an entire Web page into an MVC pattern can feel kludgy. The more dynamic your page, the more information from different sources must be represented, thus piling unwanted complexity onto the MVC pattern, whose sole purpose is to reduce complexity.

Although the specific MVC pattern does not function well for highly dynamic Web pages, this doesn't mean that any structure or separation does not work well for Web pages. The Module/Service/Event (MSE) pattern of Cognifty looks a lot like MVC at first glance; but it doesn't force one data model or one data domain on your request cycle.

Generated Code

One of the major differences between Cognifty and LogiCreate is the use of generated code. LogiCreate relied on the PBDO program to generate data objects. Cognifty uses no generated code, opting for configurable libraries instead.

Having good libraries with good defaults is sometimes called coding by "convention". Not having to learn a set of command line functions to generate stub code and then having to learn library concepts to take your code beyond the basics should reduce the learning curve and overall maintainability of any project.