On Posting...

Fear not, dear reader, for I have not forsaken you. In fact, I have been slaving away with pen to paper (yes, real paper) scribing a list of posts to provide for you. That list has grown to far more than I can realistically write in any decent amount of time while still being able to stay employed and continue progress on The Project. Instead, I will post a post about posting posts, and list posts that I would like to post about.

ACL Rules

  • Definition List
    • Module:Controller:Action = Resource
    • Task = Privilege
    • Role = Role
    • User = User
  • Using a View Helper on the Front Controller to hand Access Control
    • Pros: Lots of Extensibility, Easy to Implement & use in Views
    • Cons: Possible Security Risk, Not as accessible across all Modules
    • Need to be able to cache the ACL tree.

AJAX

  • Where and When does it fit?
  • Catch / correct errors - where does this fit
  • Configurable on a per-module basis? (some modules will want to use it, some won't)

Admin Interface & the Pains of Customization

  • Every custom option needs it's own admin interface
  • Every option needs a codename and a user-friendly name

Extensibility

  • Ability to autodetect modules vs "installing" modules
  • Same for View Helpers, and Views

Why Not Smarty / Some Other Template Engine

  • Forces people to learn at least some PHP
  • Make it easy enough to customize with an interface, and only talented people will need to touch code anyway
  • Use what's native, as it (theoretically) is optimized
  • Harder to obfuscate DB and protect application from malicious code.

Data Input Validation

  • Allowing some HTML - and autoclosing the tags
  • Allowing some BBCode - allows for batch formatting ([code][/code] - colors keywords, etc.)
  • Possibly a Force-Preview (another option)

Zend Framework Quick-Start

  • Found most others to be lacking
  • They just get you to Hello World, but don't explain the Start-to-Finish process.

Optimizations to ZF

  • Model Caching
  • Remove all those require_once uses, and just allow __autoload to do all the work.
  • Overwrite Zend_Loader, and track down all explicit Zend_Loader calls
  • Plugin_loader caching (pseudo-caching)

I have a lot more topics on my list, but if I put them all down here, then I just won't have as much time to keep working on code. So, it's back into Eclipse I go...

The Project - Adding to the Library

After a few hours of work last night, I quickly realized that I had run myself into a precarious dilema. I want to have the libraries of this project to be separated from the Zend Framework libraries, but I want to seamlessly integrate the two. Well... hell.

Doing some digging around, I found the Zend_Loader. Personally, I'm a big fan of Autoloading Objects in php. Yes, it may be slower, but I'm lazy; and lazy developers forget where they put files, and where things go. Also, I really hate looking at (and remembering to write) all of the include_once($filename) calls.

The deficiency behind the Zend_Loader is that you have to make a choice: prefix all of your new class names with something other than "Zend", or put files into the "/Zend/" folder. I was not happy with either choice. The first means that I have to remember which classes I'm using from the Zend library, and which I am using in my library. The second means that if I update the Zend Framework, I run into issues if they happen to add a new file that matches the name of one of mine.

class Zend_Loader_MultiIncludes extends Zend_Loader

My solution is to extend the Zend_Loader and allow for multiple root directories. Basically, it will take the "/Zend/" out of the path, and search for the file with a different set of prefixes. For my code, I have it looking into "/RZend/", first.

My root index.php now needs a few new lines to bring the class into place:

// Explicitly load the Zend_Loader and then Zend_Loader_MultiIncludes classes
require_once 'Zend/Loader.php';
require_once 'RZend/Loader/MultiIncludes.php';
Zend_Loader_MultiIncludes::addRootFolder('RZend');
Zend_Loader::registerAutoload('Zend_Loader_MultiIncludes');

For example. If I try to load the interface Zend_Acl_Assert_Interface, it will first look for the file "/RZend/Acl/Assert/Interface.php". If that does not exist, it will look for "/Zend/Acl/Assert/Interface.php". So, if I want to override, replace, or just extend any class in the Zend Framework, I can just add my root directory, and my problem is solved.

The downside is a loss of speed. I'm seeking on the disk for each file, checking to see if it exists, then loading. I'll have to do some benchmarking at somepoint to see where the break-point is where traffic exceeds reasonable hardware capabilities. Unfortunately, this will be widely variable based on the complexity of the website. But for now, it works, and I like it.

The Project - Defining High-level Concepts

At this point, I have had about a week to decide some extremely high-level concepts that I want to adhere to with this project. In no particular order, here they are:

  • Posting shall be both simple HTML tags, and BBCode. HTML allows me to attempt to educate users to the inner workings of a website, and BBCode allows me to package groups of HTML tags together. Something like a [code][/code] tag allows me to run the text through something that does code highlighting for me, without forcing my user to attempt to manhandle all of that.
  • Anything that is customizable by a developer but has default settings should be easy to override. I have been fighting the default Categories widget for the WordPress for the last few days, and all I want to do is change it from displaying as a list to just a set of links. Little things like this, if it was built as a plugin, I wouldn't have to worry about changing core code.
  • The Zend_Acl Resources will match the modular directory structure. In fact, I'm sure someone has written a plugin for the Front Controller to do some of the work for me.
  • The Administrative interface is probably going to take the most time, but will probably be finished last.
  • Modules will need to have a nearly drag-drop ease of install.

Also, I need to find a better way to FTP files up to the webserver. Does anyone know a good plugin for Eclipse that will FTP files for me?

The Project - What is going on here?

I have constantly been going in circles about how I should handle this site. On the one hand, this is (ideally) the first place that people find when they do a search for my name on the internet. On the other hand, it's my damn website, so I should be able to do whatever I damn well feel like doing. As much as I want this to be a complete free-write site of total randomness, eventually I have a sneaking suspicion that it will come back around to bite me in the ass (note that I have not used the ef word yet). I have other sites that are slightly harder to connect to me that allow me to vent. The weblog i hate it here is a place where I can stream along long lines of explitives without any reprocussions. The Work Hole is going to be where I talk about revelations I have in the work place, and probably the occasional programming tip, quirk, or humor. Facebook gives me a central place for people to find out the latest happens in my world, and LinkedIn is how I can keep my professional contacts together.

Having narrowed my focus (only slightly), I have this connundrum of what to do with this site: the homepage to Rovani dot Net.

So, this is going to be the home to the eeeevvvveeerrr sooooo slooooowly evolving project to replace Wordpress, phpBB forums and Gallery2. I am trying to find a way to objectify (is that even a word) each of the components to those three content applications. In a grand attempt to really push my capabilities, I am also dedicating myself to building the entire project in the Zend Framework.

Overall, this is going to continue to be a long process, but it is going to come is slow increments. I am going to identify iterative small processes and roll each of them out into this website.

Step One: Make Content Dynamic(-ish)

Right now, this content is static to the page. I have a page called index.phtml, a default module, default Index controller, and a default Index action, and it just dumps this static HTML. This needs to be pulled from a database.

I will probably use a quick internal Wordpress install to create the actual row in the database, and then pull from that table using The Project. Themes, plugins, widgets, templates, etc., to come later.

Content To Come

Stuff is coming, I promise. I just finally got around to looking at where I left this site after I last was making modifications.

For now, you will just have to admire the work in progress for my wedding's website. It is pretty scary knowing that I am getting married, but at least I have this website to work some stress away.

Additionally, you can see the items that will eventually be here based on the loose menu that I have over to the right. It is pretty, it is incomplete, but it is better than doing nothing (I hope).