NinjaBoard Countdown to launch: Day 6
Follow up:
And to show you why the code reduction is so dramatic, we'll show you the code for creating the category view head to head.
Category view NB 1.0 vs 0.5.3
0.5.3 Does both the categories and the category view in the same file, so we've stripped out the code for categories view in this comparison to keep it fair and square. 1.0 Use two files for the category view.
NinjaBoard 0.5.3
/administrator/components/com_ninjaboard/views/category.php
Lines of "real" code: 81
NinjaBoard 1.0
/administrator/components/com_ninjaboard/views/category/html.php
Lines of "real" code: 12
/administrator/components/com_ninjaboard/views/category/tmpl/form.php
Lines of "real" code: 19
In total: 31 Lines of "real" code. That's not even half! And if you pay attention to the screenshots, you'll notice we've got a much neater state toggler, and that's been added while reducing code.
As a developer I was starting to get used to the general rule for joomla extensions that you can't have both. You can't add features without adding code, and you reach the limit on how much code you can remove without removing features or important code pretty quickly.
I'm still getting used to the other side of the river. As you can see here, you can have both. How cool is that?
Thanks for reading, don't miss day 5




