I feel empty now I don’t have to work on rewriting Ubuntu Wanted anymore. I feel so empty I only wrote
MVC-pattern rewritten
The MVC-pattern is now applied more strictly.
in the changelog.
After several days of work I know managed to let the code do roughly the same with 3117 lines of code more, which means the codebase has almost doubled.
Why would I do this? Why would I make such an effort to expand the codebase so much while there doesn’t change a lot to the external behaviour?
Because now the MVC-pattern is applied strictly and the models can do more than just presenting information it’s just a matter of connecting wires when you want to add a page. No need for writing lots of queries.
Because of the new store function it’s going to be a a lot easier to add AJAX functionality and it already makes it easier to update entries.
The data is loaded into Model::data and when you call Model::store() the data is compared to a copy (Model::_data_copy) and all changes are written to the database.
Now on something different: I created a milestone for Ubuntu Wanted called usable, if all bugs and blueprints marked for that milestone are finished/fixed we can start with testing Ubuntu Wanted in a Real Life Situation. I found milestones a lot easier to use than mind maps, so I’m going to dump the mind map I blogged about earlier in favour of Launchpad.
Lets show some stats! Everyone loves stats!
I let Ohcount examine the branch before and after revision 18, which gave these results:
Before
Examining 79 file(s).
Ohloh Line Count Summary
Language Files Code Comment Comment % Blank Total
—————- —– ——— ——— ——— ——— ———
php 31 2173 1020 31.9% 646 3839
css 9 2122 73 3.3% 185 2380
html 31 397 9 2.2% 172 578
sql 1 44 33 42.9% 11 88
javascript 2 16 4 20.0% 2 22
—————- —– ——— ——— ——— ——— ———
Total 74 4752 1139 19.3% 1016 6907Platforms detected: PHP, SQL, Drupal
Tools detected: None
After
Examining 118 file(s)..
Ohloh Line Count Summary
Language Files Code Comment Comment % Blank Total
—————- —– ——— ——— ——— ——— ———
php 64 3431 1922 35.9% 1010 6363
css 9 2122 73 3.3% 185 2380
html 64 802 18 2.2% 328 1148
sql 1 46 33 41.8% 11 90
javascript 3 31 8 20.5% 4 43
—————- —– ——— ——— ——— ——— ———
Total 141 6432 2054 24.2% 1538 10024Platforms detected: PHP, SQL, Drupal
Tools detected: None
If you feel like helping the project out a bit, have a look at the usable milestone page to see if there’s anything for you.
Where can I find a preview of the current site?
Nicolas Deschildre kindly generates a website from the trunk, you can visit it at http://ubuntu-wanted-devel.ideatorrent.org/