Scaffold: A few more features

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

Scaffold: A few more features

Jose da Silva-2

Hi there

I've been playing with scaffold, and found come neat features that
could be usefull, i'd like to know what is the comunity feeling about.

I agree with nate's opinion, expressed in many post on this newsgroup,
that scaffolding is for a aleterate the project start, athought i think
one feature like.

In model we could defined an array, like

$fieldTypes = Array("field_name"=>READONLY,
"field_name"=>HIDDEN,
"fieldname"=>FILE,...);

Could be very usefull, what do you think about that?

jose Silva


--~--~---------~--~----~------------~-------~--~----~
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: Scaffold: A few more features

John David Anderson (_psychic_)


On Oct 30, 2006, at 8:08 AM, Jose da Silva wrote:

>
> Hi there
>
> I've been playing with scaffold, and found come neat features that
> could be usefull, i'd like to know what is the comunity feeling about.
>
> I agree with nate's opinion, expressed in many post on this newsgroup,
> that scaffolding is for a aleterate the project start, athought i  
> think
> one feature like.
>
> In model we could defined an array, like
>
> $fieldTypes = Array("field_name"=>READONLY,
> "field_name"=>HIDDEN,
> "fieldname"=>FILE,...);

I think a feature like this would entice new users to use their  
scaffolding more than is needed.

If you'd like to start customizing what is shown, and how things are  
presented, it's time to bake.

-- 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: Scaffold: A few more features

Nate Abele

What John said.


--~--~---------~--~----~------------~-------~--~----~
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: Scaffold: A few more features

jdowtnon
In reply to this post by Jose da Silva-2

I do like the idea of extending the ability of scaffolding.  I use cake
for work so anything that saves time lets me sleep more ;)

Personally if one could put in the option to hide a field from
scaffolding (like 'id') and format the rows and columns a little more
cleanly it would mean I wouldn't have to bake so quickly.

I've just found that users always want to change a field, add a field,
delete a field.... and this process doesn't seem to stop and once I've
baked my views it means going into the index/add/view/edit templates to
add/delete a field.

These are just my thoughts and I am still learning :)

-Jeff  btw. Hi Jose, you remember 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: Scaffold: A few more features

Larry E. Masters
Scaffold should not be used for production settings, I have said this since I added it to cake. If you want the automagicness that scaffold provides, use bake and edit the files that are created. I will not add any more functionality to scaffold that is not already there.

You can already use methods that are available to extend scaffold on your own.

Controller::_beforeScaffold()
Controller::_afterScaffoldSave()
Controller::_afterScaffoldSaveError()
Controller::_scaffoldError()

And you already have the ability to override the core templates used for scaffold by creating your own views.

app/views/scaffold/scaffold.*.thtml
or
app/views/*/scaffold.*.thtml

With all of this available to you, doing what you need can be done already without having to add it to the core.
--
/**
* @author Larry E. Masters
* @var string $userName
* @param string $realName
* @returns string aka PhpNut
* @access  public
*/

On 10/30/06, jdownton <[hidden email]> wrote:

I do like the idea of extending the ability of scaffolding.  I use cake
for work so anything that saves time lets me sleep more ;)

Personally if one could put in the option to hide a field from
scaffolding (like 'id') and format the rows and columns a little more
cleanly it would mean I wouldn't have to bake so quickly.

I've just found that users always want to change a field, add a field,
delete a field.... and this process doesn't seem to stop and once I've
baked my views it means going into the index/add/view/edit templates to
add/delete a field.

These are just my thoughts and I am still learning :)

-Jeff  btw. Hi Jose, you remember 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: Scaffold: A few more features

Nate Abele

Also, you are able to style the default scaffold templates to your
heart's content, so I'm sure you could find a way to hide a field that
way.


--~--~---------~--~----~------------~-------~--~----~
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: Scaffold: A few more features

jdowtnon

Thanks phpnut, I understand the purpose of scaffolding better and
thanks nate for the style suggestion, both are of great help.

-Jeff


--~--~---------~--~----~------------~-------~--~----~
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: Scaffold: A few more features

Jose da Silva-2
In reply to this post by Nate Abele

Ok,
I agree with your scaffolf point of view, i think the bake feature is
just fine for 99% of cases.

regards
jose


--~--~---------~--~----~------------~-------~--~----~
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: Scaffold: A few more features

Ralph Dratman
In reply to this post by John David Anderson (_psychic_)

John David Anderson (_psychic_) wrote:

> I think a feature like this would entice new users to use their
> scaffolding more than is needed.
>
> If you'd like to start customizing what is shown, and how things are
> presented, it's time to bake.
>
> -- John

John,

What about extensions to Bake? The current version is wonderful, and I
would love to have some more code generation. Many more templates could
be implemented. I looked at the Bake code and it appeared to me (and I
may be wrong) that it is highly specific to the existing templates and
not easily extensible as currently written.

Should I be waiting for a future Cake release which includes more code
generation, or should I be writing my own?

There are open source code generation tools. For example,

http://freshmeat.net/projects/codeworker/

though I haven't tried to customize any of the generators yet.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---