Archive for the 'Frameworks' Category

HTML Helpers: Friend or foe?

Ever since getting on the rapid development framework bandwagon, the one part I’ve not been totally sold on is the use of helpers, specifically, helpers which replace HTML code.

The reasoning is that I’ve never really seen the point of them. To give an example, CakePHP has an HTML helper for creating links - and the code looks a little something like this:
<?php echo $html->link('link text description', '/path/to/link') ?>

Which isn’t really much more efficient than it’s HTML counterpart, written like this:
<a href="url">link text description</a>

In fact, the HTML is shorter to write out. So why even bother with HTML helpers?

More >>

Frameworks: Light on the SQL, Please

Cake, the rapid development framework for PHP, makes life 10,000% easier for developers everywhere by providing us with an ActiveRecord pattern for performing the most used database interaction methods: Create, Read, Update, and Delete (CRUD). It’s modeled closely off of Ruby on Rails’s ActiveRecord, for those who are more familiar with that framework.

As a Rails developer I’ve seen the limits of ActiveRecord, and the performance issues it gets when dealing with large, complex database types. But to be honest, I’ve never been a big fan of the Ruby language, and part of me assumed that was just Ruby being slow. I was convinced that with a good framework, ActiveRecord could be used (efficiently) in complex database environments.

Yesterday that blind faith was taken to the test as I attempted to optimize a CSV generator. The problem was simple: the query which collected a table’s information, was producing an array which was way too large - the database table had close to 60,000 records and at 9.something MB, was throwing PHP memory allocation errors left and right.

Right now it stands at Heavyweight SQL: 1 / CakePHP: 0. However, I am determined to find a way to make complex databases work well with Cake - I still have a lot to learn about this framework, and I have belief in it.

The Power Behind Frameworks

Ever since discovering the Ruby on Rails craze last spring, I’ve been falling more and more interested in frameworks. It’s quite amazing how they help web developers not only develop applications faster, but create them with less code, cleaner code, and more maintainable code.

New frameworks are popping out all the time, and it’s really amazing that this is starting to catch on in the web industry. Ruby has Rails, PHP has Cake, Python has Django… and that’s just the top of the pile.

More >>