Tag: Xoket

Xoket: The Learning Framework

February 16, 2012 » Geek

If you are new to it, frameworks are confusing, and just hard. Books and tutorials help, but there’s still a lot of “magic” going on in the background. This is good if you can treat it as a black box, but it’s better if you can find out what’s going on in there.

To this end, I have decided to write a framework, piece by piece, from scratch.

This framework does not have delusions of grandeur. I don’t expect anyone to actually use it in production, that is not what it’s for.

This framework is about learning and sharing. I’m going to blog my way through every component, as I build it, and keep a full history in github. I’m not going to lie, there will be mis-steps, but you’ll be able to see it all evolve commit by commit.

Principles

Principles are a good place to start – here are some for Xoket (zah-ket)

1. Documentation

As stated above, documentation is essential. PHPDoc formatting will be used.

2. MVC

Xoket will be a single request, MVC framework. HMVC is popular, but in the interest of complexity, we will not be implementing multiple request.

3. Explicit is better than Implicit

Taking a queue from The Zen of Python I will try to write explicitly, instead of using implicit magic. Unusual technique will be commented and discussed.

4. Modular

As much functionality that can be moved out of the core, should be kept out of the core. Auto-loading will be PSR-0 compatible, but also include some cascading functionality similar to Kohana.

5. Modern

Xoket will be designed for PHP 5.3 and higher. If you aren’t running modern PHP you should, there really isn’t a good excuse.

Getting Started

That’s the outline of Xoket – my next post will be about the early implementation of, well, whatever I decide to write first.