Dynamic Scaffolding

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic Scaffolding

AC-2

I was wondering if Cake has the ability to generate the model, the
controller, and all of the views for you when it comes to CRUD.  Much
like Ruby on Rails.  I know that Cake has the "scaffold" option, but
what I want is base level code generation for creating production CRUD.
 Much like $ ruby script/generate scaffold <name>.  Can bake scripts do
this for me?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Scaffolding

John David Anderson (_psychic_)


On Oct 31, 2006, at 1:16 PM, AC wrote:

>
> I was wondering if Cake has the ability to generate the model, the
> controller, and all of the views for you when it comes to CRUD.  Much
> like Ruby on Rails.  I know that Cake has the "scaffold" option, but
> what I want is base level code generation for creating production  
> CRUD.
>  Much like $ ruby script/generate scaffold <name>.  Can bake  
> scripts do
> this for me?

Yes.

$php cake/scripts/bake.php

-- John

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Scaffolding

AC-2

Thanks John.

On Oct 31, 12:20 pm, "John David Anderson (_psychic_)"
<[hidden email]> wrote:

> On Oct 31, 2006, at 1:16 PM, AC wrote:
>
>
>
> > I was wondering if Cake has the ability to generate the model, the
> > controller, and all of the views for you when it comes to CRUD.  Much
> > like Ruby on Rails.  I know that Cake has the "scaffold" option, but
> > what I want is base level code generation for creating production
> > CRUD.
> >  Much like $ ruby script/generate scaffold <name>.  Can bake
> > scripts do
> > this for me?Yes.
>
> $php cake/scripts/bake.php
>
> -- John


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Scaffolding

cookxyz@gmail.com
In reply to this post by AC-2

I recently started working with cakephp. I liked the scaffolding, and
the bake.php script. However, one obvious short coming to the bake.php
script is it's failure to handle enum fields in the controller.

What is so strange is that the scaffold script handles enum fields, and
the view protion of Bake expects enum values, but Bake doesn't include
them in the controller.

If you use enum fields in your database, you might want to check out
this script to "fix" bake.php
http://cakeforge.org/snippet/detail.php?type=snippet&id=143

On Oct 31, 3:16 pm, "AC" <[hidden email]> wrote:
> I was wondering if Cake has the ability to generate the model, the
> controller, and all of the views for you when it comes to CRUD.  Much
> like Ruby on Rails.  I know that Cake has the "scaffold" option, but
> what I want is base level code generation for creating production CRUD.
>  Much like $ ruby script/generate scaffold <name>.  Can bake scripts do
> this for me?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: Dynamic Scaffolding

gwoo-2

Not all databases support enum, so it is not included in anything  
other than basic scaffolding for mysql.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---