Smexeeeh
Printable View
Smexeeeh
Great ^^
Hrm, I think the caching is finished, ready for use with memcached. I'll have to write something for APC too, but then I think that areas ready to push.
I just need to test it on *nix.
Okay so, I don't know how much interest is around in this project, but here's how I'm doing with it. Recently, I've actually had time to focus on this and get some stuff done since I've recently finished exams at uni.
Progress!
The controllers and dispatcher is done. This means that it's MVC complete. You can pull a complete MVC application with it already, if you don't want to use the helper classes.
The Logging and Error Helpers (inc. error handler) are pretty much ready to ship. The MVC I'm fairly happy with too. I might look over the dispatcher a bit more, though I'd appreciate it if other people did too (especially those with security backgrounds since its the main point of user input).
The configuration class has been changed slightly. It will now detect if your server has APC installed, and if it does cache the config file for 10 minutes. The reason for this is to cut down on scan() calls (one of the most inefficient functions in PHP).
Performance
I created a Hello World application in my own framework, and in another very popular PHP Framework (CodeIgniter).
With practically the same code, CI executed in 129ms. My own framework completed the execution in 18 - a huge 86% more efficient. (Stats were taken with xDebug).
The reason for a Hello World app is threefold.
Firstly, all the helpers (db, cache, etc) are not yet finished for my framework. Obviously in order to get a final accurate estimate, they'll need to be in a more shippable state.
Secondly, in order to test the 2 fairly, they'd need to be thrown in a production environment with an actual job to do. For example, coding a blog software in each. This is because it's unfair to only test a couple of the helpers. Other frameworks will have their own advantages, and a fair test should take all features into comparison.
Finally, CI and most other frameworks support waaaayyyy more features than mine does. Examples of these are ORMs and Templating engines. Whilst it would be possible to add these to my framework, I personally do not intend to. The original vision of this project is to keep the framework as simple as possible to use, and I don't feel there is any real need to add the bloat of ORMs, Templating Engines, etc into the core build. After all, nobody here will be using the features at the moment (or very few people will be).
It will be difficult to get a fair evaluation of 2 (or more) products when they have different feature sets and different methods of coding.
Testing
I personally have tested the system under both windows (Running an Apache set up) and Debian Lenny (running Lighttpd). They both work (to my knowledge) excellently. However, there's bound to be some bugs somewhere. When I've finished my proposed list of changes, I'm going to set up a production level web project in order to test how well it acts. This will use all the features of the framework, so it should be pretty thorough. It will run on a Linux environment with APC and memcached.
I will also make the source code readily available, with a method of contributing to it. This will allow anybody who wishes to, to adopt the framework and use it in your own projects. Should you encounter any bugs, or wish to make small changes then there will be methods of doing so (See: Contributing).
A Name!
I've tentatively come up with the name 'Gears'. Let me know what you think ;)
Contributing
As aforementioned, when I've made a few changes to the code I'm going to put it in the public domain. This will mean that anybody can access it and use it for their project. Inevitably, at this moment in time, there will be bugs. There will be security issues, areas where efficiency can be improved and features don't work correctly or need to be added/updated. This is an alpha release.
To that end I'll be using a way of allowing others to contribute. If you notice an improvement that can be made (efficiency, security, reliability, etc) then you will be able to. You'll also be officially listed as a contributor to the project (should it remain alive). No firm decisions have been made as of yet, but I'm toying with the idea of Github.
At the moment, feature requests will not be added to the main branch. The reason for this is I want to knock out the main stuff before focusing on anything else. As mentioned before, its not really in the vision to add things like ORMs and other stuff either. If you want that then feel free to fork and add it. Likewise, feel free to write a plugin and distribute that.
The exception to that would be wrappers for Caching and Database engines. Especially MsSQL (which I may add myself - the only thing stopping me at the moment would be concerns with security).
What Now?
Before I'm ready to push, I want to do 1 or 2 more things.
Firstly, I'm going to rewrite the database layers. I'm going to start work on this tonight (design wise). Evidently this is probably going to change, but at the moment I'm toying around with something like this.
When I ship, I aim to support MySQL.PHP Code:<?php
$dbh = Database::connect();
echo "You are connected to a ".$dbh->getEngine();." server";
$args = array("Sephern", 10);
$query = $dbh->query("SELECT * FROM articles WHERE author = ? AND views > ?", $args);
$result = $query->execute();
if ($result->num_rows() == 0)
{
echo "There are no articles by Sephern with more than 10 views.";
}
else if ($result->num_rows() == 1)
{
echo "There is one article by Sephern with more than 10 views. <br />This Article is called: <br />";
echo $result->row()->title;
}
else
{
echo "Sephern has written many articles with more than 10 views. <br /> These articles are as follows: <br />";
foreach ($result->row() as $r)
{
echo $r->title;
}
}
?>
The second thing is to rewrite caching. I'm aiming to launch with support for memcached. Its not hugely efficient at the moment, so I'll probably be looking into that again.
Finally, I'll probably look at working on modules before its distributed. That way you really can create an application completely.
After it's pushed to git, I'll be looking at keeping all the syntax and stuff the same as much as possible so that newer builds don't break old functionality. So theoretically you'll be able to write it when I push, and then just update the framework without anything going wrong (and the backbone of your app improving). Obviously, I can't promise this but I'll try.
So, I think that's about it. If all goes well, we're looking at a release schedule potentially of weeks. I apologise for it taking this long, and I'd appreciate it if I got some gauge of interest and stuff surrounding this project (and if you'd use this in your own stuff - especially the devs around here like Apixen, Trozay, Treachery etc).
Databases are finished, and I'm pretty happy with it. The only difference in syntax from above is that you pass the parameters to the execute function, instead of the query function (which makes more sense). This allows it to take advantage of the prepare() efficiency boosts in PDO.
Next up is probably modules, at which point its (technically) finished feature wise (though caching is probably getting rewritten).