Crystal Core

Lots of us in PHP land want a nice framework. Many frameworks out there are either too rigid or too bloated. Many of them don’t have a whiff of documentation, let alone the thought of them being supported.

That being said, there are some wonderful classes out there. The building blocks of the Zend Framework are well built and pretty well documented, and we know that work will continue to be done on them. For database work, there are many abstraction classes, but one that stood out to me was Doctrine.

There are a few tutorials here and there about building your own framework from pieces or from scratch. Who has the time for that? Well, a friend and I did have time a while back, and we came up with a pretty nice solution. Feel free to take a peek at the presentation I threw together for a recent AZphp meeting. The idea was to create a highly flexible modular framework without having to build the whole thing ourselves or continuously reinvent the wheel. We also wanted something that other people are already working on and already being used in applications. We decided to just start with checkouts of ZF and Doctrine

The framework’s “bootstrap” pretty much sets up the basis for a MVC application. Your custom files take it from there utilizing whatever building blocks from Zend Framework (or anything else) you want to use.

Now, I’m not going to say it’s any where near “stable”, but versions of it have been used for production web applications. In the coming weeks, I will be building some usage documentation for the core itself and a few basic application tutorials (the ever-popular “build-a-blog” tutorial that most frameworks release will probably be ready next weekend). Until then, you can check it out via Subversion here. What you check out is to be a “library” directory under your application. You can see the directory layout in the presentation linked above.

Crystal Core

by baohx 0 Comments

I have been working on a project a friend and I started at the company I previously worked at. It’s essentially a framework-framework. A conglomeration of things to use to easily create a web application.

The big pieces:
Zend Framework

In other words, if you know how to use those, you can easily create something with Crystal.

The included bootstrap file takes a config file, sets up all of your general MVC stuff. The way it is set up allows you to easily add modules to your application to the mix as well.

I am using this now in a work project containing over 1 million records and so far it is working great and makes it easy to work with. I’m also using it in a few other personal projects.

A huge problem I have had with frameworks before is the rigidity within them. To do some things you have to code around the framework, which is just silly. With this, I just take the pieces I want, when I need them. The structure is relatively loose so you can drop in whatever components you want.

I’ve kept the name we originally started with (Crystal), but that may change. If I get some interest in it, I will open up the code repository (subversion) for checkouts.

There are a few other custom pieces as well, which fix certain bugs or modify some functionality, but they don’t get in your way. There is also an automatic form builder (based on your model structures). The framework will also automatically pack your javascript libraries and etag them as well as css files so you have a speedy site.

I’ll post some example code as soon as time permits.

Another Project (bug tracker)

by baohx 0 Comments

The Blistmail project is on hold at the moment, so I can work on a bug tracker application.  This is something I will be working on not only to show off, but to actually use.  Most bug trackers out there are either too bulky (too many bells and whistles), or are just built sloppy.

I’m working on something which will be easy to use and have “just the right amount” of configurability (to me anyway).

By the way, the project’s name: BlistBug.

As usual, if you have any ideas or suggestions, feel free to contact me.

Next Project

I’m sure some of you (the few who actually pay attention) noticed that I ditched the old site in favor of wordpress.  I decided I didn’t need anything too crazy and wp is about as simple as it gets.

Anyway, In case you missed the post before I ditched the old site, I am going to be working on a php-based discussion list script utilizing the Zend Framework and Doctrine.  The idea is to have a full featured mailing list like mailman, but without the need of plugging into the server’s actual mail system.  The only requirements will be PHP5, MySQL5, PDO (PHP extension), Apache2, and of course a working mail server that you can add accounts to.

If anyone has any suggestions for features, please let me know.