Junal on the run

Cake scaffolding vs CodeIgniter scaffolding .

Posted by: junal on: November 3, 2007

This time I’m serious about CI. I gave a lazy effort for this framework as a result I couldn’t go so far with it. Anyways I found CI’s scaffolding is better than Cake’s scaffolding.

In cake Once you add this variable called $scaffold in your controller it gives an idea about early parts of development of your application.

Example:  <?php

class YourController extends AppController

{

var $scaffold;

}

?>

But what if you forget to take it off before you up the project in real server and somebody guesses your URL? Well certainly scaffolfding has edit and delete option right. So it’s not secured I guess.

I like how CodeIgniter is dealing with scaffolding. Almost same but there is an option for you to set secured scaffolding. You have a secret word option which will be set here:

application/config/routes.php in CI like this

$route ['scaffolding_trigger'] = ' sewt '; //assume your secret word is “sewt”

So now use your scaffolding in the controller

<?php
class YourController extends Controller {

function Test()
{
parent::Controller();

$this->load->scaffolding(‘table_name’);
}
}
?>

To see this scaffolding you have to follow this URL path:

www.your-site.com/index.php/YourController/sewt/.

Isn’t it better eh?

1 Response to "Cake scaffolding vs CodeIgniter scaffolding ."

The only trouble with CI’s “scaffolding” is it’s not true scaffolding… Just gives you a temporary interface for CRUD stuff and can’t be used in a production environment.

I like CI, but don’t know why they didn’t make it so it could actually *generate* the scaffolding for permanent use or to build upon (as Cake and Rails do)…

Leave a Reply