grails 3 - dynamic scaffolding?

1,772 views
Skip to first unread message

zyro

unread,
Mar 6, 2015, 7:15:51 AM3/6/15
to grails-de...@googlegroups.com
hi,

just tried to create a scaffolding controller (static scaffold = true)
with grails 3 but that gives me a 404, e.g. on /controllerName/index.

just wanted to make sure that dynamic scaffolding is supposed to work as
we are used to from previous version (including partially "implemented"
controllers)?

thanks, zyro

Graeme Rocher

unread,
Mar 6, 2015, 7:54:46 AM3/6/15
to grails-de...@googlegroups.com
We have not as of yet implemented this, and it probably won't make the
cut for 3.0 GA

However, you can get largely the same behaviour with a domain that has:

@Resource
class Book {
String title
}

And then just running 'generate-views'

The only difference is you have to regenerate the views on each change.

Dynamic scaffolding was one of the biggest contributors to startup
time slowness so in its current form it won't go into 3.0

Cheers
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to grails-dev-disc...@googlegroups.com.
> To post to this group, send email to grails-de...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/54F99A6E.2090507%40zyro.net.
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher

Søren Berg Glasius

unread,
Apr 2, 2015, 7:41:46 PM4/2/15
to grails-de...@googlegroups.com
Not having the option of dynamic scaffolding is really bad for several reasons:

1) Newcomers to the framework will read books and tutorials and will have no clue why it's not working. Their conclusion will be: I'll move to the next framework and try that
2) Prototyping is really fast with scaffolding and greatly outweighs the negative startup time
3) Impressing people when writing a demo is also going away, and this is one of the whoas you get: Is it really that easy? Well right now, not any more

So please help us being able to impress and help newcomers by having dynamic scaffolding available, even if it's just optional, or make so that it will be easy to turn off, if startup time is essential.

Best regards,
Søren Berg Glasius

Henrique Lobo Weissmann

unread,
Apr 2, 2015, 8:34:31 PM4/2/15
to grails-de...@googlegroups.com

Dynamic scaffolding have been always one of Grails more important features!

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Göran Ehrsson

unread,
Apr 3, 2015, 6:37:23 AM4/3/15
to grails-de...@googlegroups.com
Dynamic scaffolding as we saw it in Grails 1.x and 2.x was way to limited for my use-cases and if it increased startup time then I'm happy that it was removed in Grails 3.0. I't may have worked well for live demos and very simple "static" applications but in my experience it was to inflexible for serious use.

The major problem I had with dynamic scaffolding was that is was not possible (from my research) to have different templates based on certain rules. For example one set of templates for a specific set of domain packages (regex). Or one set of templates for domains that was instanceof some class.

In the GR8 CRM plugins that I authored dynamic scaffolding would be a perfect fit, especially for all metadata/lookup entities. But it was not possible to get all the functionality I needed so I generated views instead. And I'm not happy with that solution.

If we rethink dynamic scaffolding and make it much more flexible and if it does not hurt startup time then I would be very happy to have it back in Grails 3.x.

Some features I like to see:

  • Give the developer control of what templates to use for dynamic scaffolding. The framework should not even care if the template is a GSP template in the file system or retrieved from a CMS, or anything else.
  • Let plugins take part in template generation and decoration. That way we can have "theme plugins" or plugins that inject new features into scaffolding templates
  • Don't increase startup time!

Regards,

/Göran Ehrsson

Jeff Scott Brown

unread,
Apr 3, 2015, 12:36:05 PM4/3/15
to grails-de...@googlegroups.com

> On Apr 3, 2015, at 5:37 AM, Göran Ehrsson <gehr...@gmail.com> wrote:
>
> Dynamic scaffolding as we saw it in Grails 1.x and 2.x was way to limited for my use-cases and if it increased startup time then I'm happy that it was removed in Grails 3.0. I't may have worked well for live demos and very simple "static" applications but in my experience it was to inflexible for serious use.

Dynamic scaffolding is really helpful for only a really small number of apps out there. It demos well and is useful for very simple tasks, but for the great majority of applications it isn’t a particularly important piece of the framework.

The @Resource annotation added to a domain class will satisfy a lot of the use cases where dynamic scaffolding used to be used. This is simpler and doesn’t require an additional source file (the controller).

For applications that still want to use scaffolding for some reason, you can generate-all and go about your business that way. It isn’t dynamic but @Resource covers most of the scenarios where dynamic is desired.

If there really are important use cases that aren’t covered well by @Resource and/or generate-all and there is a justifiable demand then a plugin could be developed to provide the old dynamic scaffolding. I personally do not think that would be particularly valuable.



JSB

--
Jeff Scott Brown
je...@jeffandbetsy.net

Autism Strikes 1 in 166
Find The Cause ~ Find The Cure
http://www.autismspeaks.org/

Lucas Frare Teixeira

unread,
Apr 3, 2015, 1:36:42 PM4/3/15
to grails-de...@googlegroups.com

+1


--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-discuss+unsub...@googlegroups.com.
To post to this group, send email to grails-dev-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/4A3C15B3-9327-4C0D-B14E-69340AD2D91B%40jeffandbetsy.net.

Kenneth Kousen

unread,
Apr 3, 2015, 4:51:02 PM4/3/15
to grails-de...@googlegroups.com
I'm sorry, but I strongly disagree with this. You've thrown away a fundamental part of Grails history and made the framework far less appealing to newcomers.

I teach software development training classes for a living, with an emphasis on Groovy and Grails. Every time I teach it I point out:

1. The dynamic scaffolding is there do allow you to experiment with your domain model without having to worry about controllers and views, and

2. The word "scaffolding" should be taken literally, in that it shouldn't survive into production code.

That's why when I teach Grails we always start with simple controllers and views, without domain classes, so everyone can see how Grails thinks. Then, when it's time to discuss domain classes, we use the dynamic scaffolding in order to understand the persistence model and how constraints are enforced. Once the domain model has settled down, we switch to either static scaffolding, or remove the views entirely and write our own.

The productivity gain you get from the dynamic scaffolding, however, is significant. You can write one line of code, and then you can edit the domain model to your heart's content without worrying about the views and controllers. It's all so easy, and it's a great selling point for the framework.

What about the proposed solutions Jeff suggests?

- Just use generate-all and go from there.

That means that every time you change the domain model you'll have to regenerate everything. At the very least, you'll have to continually say "yes" every time an IDE asks whether it's okay to overwrite an existing file. Why add that kind of friction to the development process, when you're trying to get something up and running as quickly as possible?

(It may be true that the "fields" plugin may make that easier, but that's not installed by default and still changes the basic approach.)

- The @Resource annotation does most everything you need, so use that instead.

Unless it's changed dramatically in Grails 3.0 (I haven't checked that yet), the @Resource annotation simply receives and returns JSON or XML data based on URL requests. While that's a seriously cool capability, it isn't the same thing at all. You still have to write your own views, even to try it out. All the existing demos use curl or some other command line tool to show how it works. While that's great if all you care about is RESTful web services, it lacks the visual expressiveness of the web.

Jeff also says that the dynamic scaffolding is applicable to only a small number of simple use cases. Again, I would submit that that misses the point. I'm certainly not advocating you use dynamic scaffolding in production (unless you're building an admin interface to a set of db tables). It's a tool, designed to help the developer understand their domain model and how adding and removing constraints and relationships affects the overall application.  It's a way to get started, not a way to finish.

It's also the first thing a newcomer sees when they learn about Grails. Every single tutorial, book*, or even blog post that introduces Grails to a new audience starts with dynamic scaffolding. Heck, it's practically the first thing demonstrated in Agile Development with Rails, for many of the same reasons. It's been in Grails since the beginning, and now it's gone.

*Okay, Definitive Guide to Grails 2 waits until Chapter 2 to use it, but it's there as soon as Grails moves beyond a single, trivial controller

By eliminating dynamic scaffolding, you've also made it so any person who reads one of those tutorials or books and tries to use Grails 3.0 will now fail, and they won't know why.

Why was this done? The reason given is that dynamic scaffolding makes the start up time take longer. Fine. Just say that**. Tell everybody that using the dynamic scaffolding can lead to performance issues, so you should switch to something else as soon as possible. Maybe, when I'm in development mode, I don't care about performance.

**Especially in the the "Changes in Grails 3.0" section of the User Guide. The lack of dynamic scaffolding isn't mentioned anywhere in the User Guide, which still actually advocates using it. That's fixable, but not enough. This is such a fundamental change that it ought to be right up front, in bold letters.

Look, I don't want to come across as difficult or hostile. I greatly admire the Grails team (including Jeff :), and I love what you've done. As much as anything, a large part of my job acts as a developer advocate for both Groovy and Grails, and I'm very happy to do that.

The problem, IMHO, is that the dev team is composed of experts. They know the limitations of dynamic scaffolding and how to work without it. But that's not normal -- most people coming to Grails aren't going to know what to do, and while the static scaffolding does the trick, it's a lot of code they're potentially going to get lost in before they're ready. The last thing we want to do right now is to make it harder for a newcomer to adopt Grails.

Please restore the dynamic scaffolding capability, with whatever warnings or caveats you think are appropriate.

David Estes

unread,
Apr 4, 2015, 8:46:55 AM4/4/15
to grails-de...@googlegroups.com
In my experience, it is true that this is commonly used by newcomers onto teams and even teams I've worked on. But this is a huge mistake because I have seen this make it into production code on so many occasions that its frightening. If they want to use it I definitely think its better to be explicit about it. And the other benefit of not having it is people will try to test their domain models out maybe programmatically rather than by using scaffolds :)

Jeff Scott Brown

unread,
Apr 4, 2015, 10:11:16 AM4/4/15
to grails-de...@googlegroups.com

> On Apr 3, 2015, at 3:51 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
>
> Please restore the dynamic scaffolding capability, with whatever warnings or caveats you think are appropriate.

That is a reasonable request and we can consider it of course. I think that this represents very low value (more value to teachers and speakers than to application developers) but if it turns out that a lot of folks want the feature then we will look at a solution. That solution might be a plugin so it doesn’t have any impact on the great majority of apps that don’t use it, or maybe it will end up back in core if there is some reason that a plugin complicates things unnecessarily.

We welcome everyone’s feedback so if you have an opinion to express on the matter, please do.

Henrique Lobo Weissmann

unread,
Apr 4, 2015, 1:13:33 PM4/4/15
to grails-de...@googlegroups.com
It should have a mention on the "Upgrading from Grails 2.x" section of the documentation: http://grails.github.io/grails-doc/latest/guide/upgrading.html

This absence will hurt the image of the framework with anyone which uses dynamic scaffolding on their projects and are wanting to migrate for this new version.

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/FF106F1D-F1F3-4661-B5EB-0C9C1B82F890%40jeffandbetsy.net.

For more options, visit https://groups.google.com/d/optout.



--
Henrique Lobo Weissmann (Kico)
(55) 31 9226-0459
http://devkico.itexto.com.br
http://www.twitter.com/loboweissmann

Jeff Scott Brown

unread,
Apr 4, 2015, 2:33:54 PM4/4/15
to grails-de...@googlegroups.com
I am going to investigate what it takes to reinstate the dynamic scaffold behavior and let the outcome of that factor into a decision for the at forward. 



JSB

Sent from my iPhone

Jeff Scott Brown

unread,
Apr 4, 2015, 2:46:37 PM4/4/15
to grails-de...@googlegroups.com
Phone typo... I meant "...for the way forward". 



JSB

Sent from my iPhone

zyro

unread,
Apr 4, 2015, 2:57:47 PM4/4/15
to grails-de...@googlegroups.com
thanks jeff!

-------- Original Message --------
Subject: Re: grails 3 - dynamic scaffolding?
From: Jeff Scott Brown <je...@jeffandbetsy.net>
To: grails-de...@googlegroups.com
<grails-de...@googlegroups.com>
Date: Sat, 4 Apr 2015 13:33:48 -0500

> I am going to investigate what it takes to reinstate the dynamic
> scaffold behavior and let the outcome of that factor into a decision for
> the at forward.
>
>
>
> JSB
>
> Sent from my iPhone
>
> On Apr 4, 2015, at 12:13 PM, Henrique Lobo Weissmann
> <lobowe...@gmail.com <mailto:lobowe...@gmail.com>> wrote:
>
>> It should have a mention on the "Upgrading from Grails 2.x" section of
>> the documentation:
>> http://grails.github.io/grails-doc/latest/guide/upgrading.html
>>
>> This absence will hurt the image of the framework with anyone which
>> uses dynamic scaffolding on their projects and are wanting to migrate
>> for this new version.
>>
>> On Sat, Apr 4, 2015 at 11:11 AM, Jeff Scott Brown
>> <je...@jeffandbetsy.net <mailto:je...@jeffandbetsy.net>> wrote:
>>
>>
>> > On Apr 3, 2015, at 3:51 PM, Kenneth Kousen <ken.k...@kousenit.com <mailto:ken.k...@kousenit.com>> wrote:
>> >
>> >
>> > Please restore the dynamic scaffolding capability, with whatever warnings or caveats you think are appropriate.
>>
>> That is a reasonable request and we can consider it of course. I
>> think that this represents very low value (more value to teachers
>> and speakers than to application developers) but if it turns out
>> that a lot of folks want the feature then we will look at a
>> solution. That solution might be a plugin so it doesn’t have any
>> impact on the great majority of apps that don’t use it, or maybe
>> it will end up back in core if there is some reason that a plugin
>> complicates things unnecessarily.
>>
>> We welcome everyone’s feedback so if you have an opinion to
>> express on the matter, please do.
>>
>>
>>
>> JSB
>>
>> --
>> Jeff Scott Brown
>> je...@jeffandbetsy.net <mailto:je...@jeffandbetsy.net>
>>
>> Autism Strikes 1 in 166
>> Find The Cause ~ Find The Cure
>> http://www.autismspeaks.org/
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Grails Dev Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to grails-dev-disc...@googlegroups.com
>> <mailto:grails-dev-discuss%2Bunsu...@googlegroups.com>.
>> To post to this group, send email to
>> grails-de...@googlegroups.com
>> <mailto:grails-de...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grails-dev-discuss/FF106F1D-F1F3-4661-B5EB-0C9C1B82F890%40jeffandbetsy.net.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>>
>> --
>> Henrique Lobo Weissmann (Kico)
>> (55) 31 9226-0459
>> http://devkico.itexto.com.br
>> http://www.twitter.com/loboweissmann
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Grails Dev Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send
>> an email to grails-dev-disc...@googlegroups.com
>> <mailto:grails-dev-disc...@googlegroups.com>.
>> To post to this group, send email to
>> grails-de...@googlegroups.com
>> <mailto:grails-de...@googlegroups.com>.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/grails-dev-discuss/CAKQDOQX5JHOZOzpmbukYjG%3DLZwhLY%3DMFq4exO_zLXfT%3DQbd5mg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/grails-dev-discuss/CAKQDOQX5JHOZOzpmbukYjG%3DLZwhLY%3DMFq4exO_zLXfT%3DQbd5mg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to grails-dev-disc...@googlegroups.com
> <mailto:grails-dev-disc...@googlegroups.com>.
> To post to this group, send email to grails-de...@googlegroups.com
> <mailto:grails-de...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/grails-dev-discuss/29B4391D-D0ED-4148-843F-3E1622DC9DF4%40jeffandbetsy.net
> <https://groups.google.com/d/msgid/grails-dev-discuss/29B4391D-D0ED-4148-843F-3E1622DC9DF4%40jeffandbetsy.net?utm_medium=email&utm_source=footer>.

Jeff Scott Brown

unread,
Apr 4, 2015, 8:55:21 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 3, 2015, at 3:51 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
>
> - Just use generate-all and go from there.
>
> That means that every time you change the domain model you'll have to regenerate everything. At the very least, you'll have to continually say "yes" every time an IDE asks whether it's okay to overwrite an existing file. Why add that kind of friction to the development process, when you're trying to get something up and running as quickly as possible?

I am trying to figure out for which scenarios that is true. I think that is only true if the change you are making to your domain model is changing the name of the domain class, which is really just creating a new domain class.

Am I wrong about that?

Kenneth Kousen

unread,
Apr 4, 2015, 8:58:57 PM4/4/15
to grails-de...@googlegroups.com

I mean adding and removing attributes from domain classes, or trying out different constraints. Also, adding different relationships, with directionality and multiplicities.

Ken

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/F53B4A4E-D3EB-4637-8FA8-0C4C3C29F75F%40jeffandbetsy.net.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:09:41 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 7:58 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
> I mean adding and removing attributes from domain classes, or trying out different constraints. Also, adding different relationships, with directionality and multiplicities.
>
> Ken

I don’t think any of those changes require regenerating the scaffolding.

Are you saying that reloading those changes doesn’t work, or are you thinking that the generated views need to be updated. I don’t think the generated views need to be updated.

Kenneth Kousen

unread,
Apr 4, 2015, 9:14:24 PM4/4/15
to grails-de...@googlegroups.com

The generated views don't need to be regenerated? Even if you add attributes that hadn't been there before? Why not?

Ken

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:15:48 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:14 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
> The generated views don't need to be regenerated? Even if you add attributes that hadn't been there before? Why not?
>
> Ken
>

Because the generated scaffolding doesn’t make any reference to property names.

Kenneth Kousen

unread,
Apr 4, 2015, 9:17:09 PM4/4/15
to grails-de...@googlegroups.com

But the form fields and tables use them, and the type of form field is dependent on the new attribute.

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:19:31 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:17 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
> But the form fields and tables use them, and the type of form field is dependent on the new attribute.

See https://github.com/jeffbrown/kousencomments/tree/master/grails-app/views/person

Jeff Scott Brown

unread,
Apr 4, 2015, 9:25:49 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:19 PM, Jeff Scott Brown <je...@jeffandbetsy.net> wrote:
>
>
>> On Apr 4, 2015, at 8:17 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>>
>> But the form fields and tables use them, and the type of form field is dependent on the new attribute.
>
> See https://github.com/jeffbrown/kousencomments/tree/master/grails-app/views/person
>
>

Maybe this is part of the confusion. Have you looked at the views generated by scaffolding in a 3.0 app? It doesn’t work the same way that older versions of the scaffolding plugin. If you haven’t looked at that, that might affect how you perceive the flexibility of the generated scaffolding. With old versions of the scaffolding plugin, regenerating would be necessary but with 3.0 that isn’t the case.

Is that a point of confusion to this point?

Kenneth Kousen

unread,
Apr 4, 2015, 9:26:39 PM4/4/15
to grails-de...@googlegroups.com

Huh. Those f: tags are new to me. I've always seen the generated html instead.
If that's all we need, then a single generate-all really will do the trick. All that's necessary is to tell people to do it.

Where is that documented?

Ken

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:35:41 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:26 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
> Huh. Those f: tags are new to me.

See http://grails3-plugins.github.io/fields/

Those docs need to be updated but the gist is there.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:37:31 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:26 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
> Huh. Those f: tags are new to me. I've always seen the generated html instead.
> If that's all we need, then a single generate-all really will do the trick. All that's necessary is to tell people to do it.
>
> Where is that documented?


I assumed that since you were commenting about the Grails 3 generated scaffolding that you had looked at it. That was my mistake.

Does this revelation turn your request for reinstating the old scaffolding approach into a request for improved documentation?

Kenneth Kousen

unread,
Apr 4, 2015, 9:37:40 PM4/4/15
to grails-de...@googlegroups.com

That's definitely a huge part of my confusion at least. I had no idea the new gsps were different.

Ken

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:40:50 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:37 PM, Jeff Scott Brown <je...@jeffandbetsy.net> wrote:
>
>
>> On Apr 4, 2015, at 8:26 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>>
>> Huh. Those f: tags are new to me. I've always seen the generated html instead.
>> If that's all we need, then a single generate-all really will do the trick. All that's necessary is to tell people to do it.
>>
>> Where is that documented?
>
>
> I assumed that since you were commenting about the Grails 3 generated scaffolding that you had looked at it. That was my mistake.
>
> Does this revelation turn your request for reinstating the old scaffolding approach into a request for improved documentation?
>


Pull requests to https://github.com/grails/grails-doc are welcomed… :)

Kenneth Kousen

unread,
Apr 4, 2015, 9:41:17 PM4/4/15
to grails-de...@googlegroups.com

I had only tried the dynamic scaffolding. I didn't know the 3.0 static files were different.

Graeme mentioned something about the field plugin. When I looked at the Gradle build file I didn't see it, so I didn't know it was already being used.

Ken

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Kenneth Kousen

unread,
Apr 4, 2015, 9:42:17 PM4/4/15
to grails-de...@googlegroups.com

That I can probably do. ☺

Ken

--
You received this message because you are subscribed to a topic in the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/grails-dev-discuss/6R2YaF96Uts/unsubscribe.
To unsubscribe from this group and all its topics, send an email to grails-dev-disc...@googlegroups.com.
To post to this group, send email to grails-de...@googlegroups.com.

Jeff Scott Brown

unread,
Apr 4, 2015, 9:45:06 PM4/4/15
to grails-de...@googlegroups.com

> On Apr 4, 2015, at 8:42 PM, Kenneth Kousen <ken.k...@kousenit.com> wrote:
>
> That I can probably do. ☺
>

Thank you.

Sapan Parikh

unread,
Apr 30, 2015, 5:31:50 AM4/30/15
to grails-de...@googlegroups.com
When I run generate-views I get this error 
Error Command not found generate-views

On Friday, March 6, 2015 at 7:54:46 AM UTC-5, Graeme Rocher wrote:
We have not as of yet implemented this, and it probably won't make the
cut for 3.0 GA

However, you can get largely the same behaviour with a domain that has:

@Resource
class Book {
    String title
}

And then just running 'generate-views'

The only difference is you have to regenerate the views on each change.

Dynamic scaffolding was one of the biggest contributors to startup
time slowness so in its current form it won't go into 3.0

Cheers

On Fri, Mar 6, 2015 at 1:15 PM, zyro <zy...@zyro.net> wrote:
> hi,
>
> just tried to create a scaffolding controller (static scaffold = true) with
> grails 3 but that gives me a 404, e.g. on /controllerName/index.
>
> just wanted to make sure that dynamic scaffolding is supposed to work as we
> are used to from previous version (including partially "implemented"
> controllers)?
>
> thanks, zyro
>
> --
> You received this message because you are subscribed to the Google Groups
> "Grails Dev Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> To post to this group, send email to grails-de...@googlegroups.com.
> To view this discussion on the web visit
> For more options, visit https://groups.google.com/d/optout.



--
Graeme Rocher

James Cook

unread,
May 1, 2015, 3:56:57 PM5/1/15
to grails-de...@googlegroups.com
I would very much like feature back (as a plugin if that is what it takes).

I use it in production for many of my grails apps for the simple reason that it removes boilerplate code.

I have an app with 10 domain classes (not an excessive amount) and that would create 40 GSPs - I have 6. It's very obvious to anyone looking at the code that these are the ones that are 'non-standard' as they are the only ones that exist, how would you see that if they were all generated? I have a many other GSPs that are not to do with CRUD, of course, so why pollute the code base with unnecessary files?
Same goes for controllers, all have their own controllers, but all but one has 'static scaffold = true' which removes the need for me to maintain 10 copies of the same code. If I want a method to do something different I simply create that single method and alter it.
This also eases migration to new versions of grails (of which I have seen many!) as there is less code to wade through and change; the majority of my controllers/views are automatically up to date.

Unless I'm missing the point here, these docs are misleading: http://grails.github.io/grails-doc/3.0.x/guide/scaffolding.html

James

Ed Young

unread,
May 5, 2015, 12:53:20 PM5/5/15
to grails-de...@googlegroups.com
I was mighty surprised when this morning I learned that dynamic scaffolding is no longer part of grails. It was a genuine wtf moment. 

I'm glad to hear that the generated views don't need to be re-generated with each change, but like Ken Kousan, I didn't realize that until JSB alerted us to that fact. 

The removal of dynamic scaffolding will cause a lot more confusion, but I believe the generate-all command with no need to re-generate is probably an improvement. I know there were times when I felt like dynamic scaffolding might have been a little too much like magic for some folks.  It's good to be able to see the code, after all. 

Steve Dowey

unread,
May 22, 2015, 6:34:27 AM5/22/15
to grails-de...@googlegroups.com
Hello all,
As a newcomer to the framework and one reading the books and watching  tutorials on youtube, I did have no clue as to why it's not working!  I could create a simple working static scaffold example but not a dynamic one...  I had done a few months ago (with an earlier version) but not with 3.0.1.  and that was really confusing.  I'm developing a database at work and on the side learning Java and looking at RAD tools for a CRUD application.  Trying to get simple working examples, whilst managing proxies and group policies has been a taxing (for an engineer not a developer) experience.
The current documentation does not do a good job of informing me that 'static scaffold = true' isn't going to work in this version.  However I am glad that I finally found this thread via: http://stackoverflow.com/questions/29892605/grails-3-0-1-dynamic-scaffolding-is-not-working.

I'm completely agnostic when it comes to having the dynamic feature. So I would re-enforce the problem being one of documentation rather than of the feature itself.
Best regards,
Steve
Reply all
Reply to author
Forward
0 new messages