I've just returned back after a short camping trip out in the woods. It was wonderful as camping trips have a tendency of being, but now I'm back coding away.

I find it a little odd how a trip away from programming makes everything fall in to place in my head, and even though I couldn't actually implement anything out in the wild, I couldn't help but getting an idea about something related to the project every so often, so today have been spent trying to implement them all. It's been a productive day.

Strangely enough one of my ideas (working with the information flow between script component during execution) happened to solve a nasty bug I've been wrestling with for a long time. It's a mixed blessing since I still have no clue what caused the bug in the first place. For some reason it made php display no information whatsoever to screen so debugging it was a little tiresome.

Anywho, most of my time so far have been focusing on making a script that creates a basic component which is now working really well. To give an impression of what that looks like, here is the script I'm testing with:

$component = DevTools::_("component","TestComponent","Jonas");
$component->controller();
$component->model("item");
$component->view("item","html")->tmpl("default");

The script here creates a component called "TestComponent" with the author set as "Jonas" and a view, a model and a template. This is hopefully fairly obvious from the script itself.

I don't expect most developers to start scripting themselves, so what I'm working on now is a system to automatically create a form with input based on the script so I can make a bunch of general scripts suited most tasks that asks the user for the neccesary details. Say, something like this:

$input     = DevTools::_("form");
$name    = $input->text("Name of Component:");
$author   = $input->text("Name of Author:");
$view     = $input->text("Name of View:");
$model    = $input->text("Name of Model:");

$component    = DevTools::_("component",$name,$author);
$component->controller();
$component->model($model);
$component->view($view,"html")->tmpl("default");

The point is then that the user wanting to create a component is presented with a nice form based on the above script asking for the neccesary information and then creating the component. It's exciting!