Mar
22

history behind theKolonee and WoxCore

By Luc  //  Php, Programming  //  2 Comments

You may wonder why I felt the need to write another PHP framework when there are already plenty freely available on the market. I will do my best to describe my problems.

Like many people, I have to maintain several web sites. The web sites I maintain are often built from the ground up but I wanted something new. I tried every versions of Drupal and WordPress and none of them perfectly suit my needs. WordPress by default is slow and does not support multiple languages content without external plug-ins. If you install any of these plugins you cannot upgrade the main WordPress version without making sure there is a new version of the plug-in also. Drupal support multiple language but does not work the way I expect it to work. If you post a page with pictures and want to translate the page to another language, you need to re-upload all the images, so they end up stored twice. The problem could be fix with external plug-ins.

Solution  –> theKolonee <–

theKolonee will be a mix of my favorites features from various CMS, it will have extended default functionnality without requiring the use of any external plug-ins. The problem with that is letting other people extend your product so I required a framework. I checked some frameworks: Zend, Symphony. There all nice but they will slow down any application to a crawl.

The problem with these frameworks is that they are starting small and they end up having more than a hundred source files. They often focus on features  without being speed demon.

Solution –> WoxCore <–

WoxCore if my answer. It’s a framework used by theKolonee CMS and features are added when they are really needed. Performance and usefulness are top priorities. The framework support a basic MV / MVC mechanism. Here is a list of the core modules currently implemented:

  • Core: provide several functions to read $_GET and $_POST, language detection and more
  • Comment: functions related to comments handling
  • DB : database wrapper
  • Controller: define the MVC mechanism
  • Directory: functions to handle filesystem functions
  • Files: functions to handle filesystem functions
  • Import: all import functions (misc files, images, videos)
  • Log : helper class for logging events in the database
  • HTML: html helper, let you write html ouput without knowing any HTML coding standard.
  • Security: Handle authentication and access control
  • Caching:  pages  and data caching
  • and more… :-)

Data  classes

  • Events: functions related to events management
  • News: functions related to news management

Okay, that may sound a lot, you may think there are hundred of files also?  yes and no! there are a few files yes, but they are compiled in a single file that is used by your pages. The file itself is 19k (as we speak), so that’s not scary at all.

Caching mechanism

Each page can be set to be cached or not individually, the built-in modules will also used cache by default when fetching data from the MYSQL database.

Time for examples
This is a basic MVC example. Here you have the controller which will handle caching, creation of a page name ‘Error’, and when the framework’s Render() function is called, it will display a linked html file name ‘error-default-html-en.php’

Woxcore supports multiple render targets (web, mobile, ….) and multi-languages. So depending of the current language or render target, another html file may be linked


function __autoload($class_name) { include '../woxcore/'. $class_name . '.php';}$ctrl = new wcController('error','html');
switch( $ctrl->Action )
{
default:
break;
}
$ctrl->Render();

examples of the wcHTML helper class


echo wcHtml::EncodeHeader('hello world'); //produce

hello world

echo wcHtml::EncodeHeader(‘hello world’,2); //produce

hello world

if you want to transform an array to list items

$my_array=array(1,2,3)
wcHtml::encodeList( $my_array )/*
will produce

  • 1
  • 2
  • 3

want to know more? drop me a line

LINKS

theKolonee web site

2 Comments to “history behind theKolonee and WoxCore”

  • Je suis prêt à faire le beta tester!!!

  • Strongly suggest adding a “google+” button for the blog!

Leave a comment