Scaffolding

5 views
Skip to first unread message

Thierry

unread,
Nov 19, 2009, 5:47:40 AM11/19/09
to Django developers
Ok scaffolding has seen a lot of ups and downs in the dev community.

Type 1
"lets generate code, because that way our programming language sucks
less" approach some PHP frameworks take.

Type 2
Intelligent code snippets (generation) such as create_app

Django needs more of the later.
If i have a model, i would like to be able to generate:
- 2 views (list, edit-detail-remove)
- 2 templates
- a modelform
- the neccesary url config

So I can start working from there, instead of starting from scratch.
Symfony had this nicely worked out.
Is there any django design convention which stops us from having a
management command for this type of Scaffolding?

Russell Keith-Magee

unread,
Nov 19, 2009, 6:32:17 AM11/19/09
to django-d...@googlegroups.com
Well, there isn't a formal design convention prohibiting such an
approach - we just haven't seen the need. Generic views cover most of
the simple cases without the need for any sort of scaffolding, and if
you have a complex case, writing the code from scratch just isn't that
hard. Personally, I don't even use startapp that much - it's just as
easy to create a directory and put files in it.

However, if you're enthused about having more scaffolding-style tools,
then you can start this as a standalone project - after all, you are
able to define your own management commands if you want. If it turns
out that your management commands are particularly useful and develop
a strong following as an external project, then we can see about
merging them into the core.

Yours,
Russ Magee %-)

gareth rushgrove

unread,
Nov 19, 2009, 7:34:52 AM11/19/09
to django-d...@googlegroups.com
2009/11/19 Russell Keith-Magee <freakb...@gmail.com>:
> On Thu, Nov 19, 2009 at 6:47 PM, Thierry <thierrysc...@gmail.com> wrote:
>> Ok scaffolding has seen a lot of ups and downs in the dev community.
>>
>> Type 2
>> Intelligent code snippets (generation) such as create_app
>>
>> Django needs more of the later.
>> If i have a model, i would like to be able to generate:
>> - 2 views (list, edit-detail-remove)
>> - 2 templates
>> - a modelform
>> - the neccesary url config
>>
>> So I can start working from there, instead of starting from scratch.
>> Symfony had this nicely worked out.
>> Is there any django design convention which stops us from having a
>> management command for this type of Scaffolding?
>
>
> However, if you're enthused about having more scaffolding-style tools,
> then you can start this as a standalone project - after all, you are
> able to define your own management commands if you want. If it turns
> out that your management commands are particularly useful and develop
> a strong following as an external project, then we can see about
> merging them into the core.
>

I've been using paster for this and it works really well. I've started
compiling these into a project on GitHub based on a few conventions
myself and a few others use:

http://github.com/garethr/django-project-templates

At the moment I only have one overall template but am just finishing
off templates for production configs on different environments
(apache, mod_wsgi, spawning) and but I'd be happy for others to get
involved. If nothing else feel free to steal the paster template code.

Reading this makes me think wrapping this in a management command
would make it easier for Django people to get started.

Ta

G

> Yours,
> Russ Magee %-)
>
> --
>
> You received this message because you are subscribed to the Google Groups "Django developers" group.
> To post to this group, send email to django-d...@googlegroups.com.
> To unsubscribe from this group, send email to django-develop...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-developers?hl=.
>
>
>



--
Gareth Rushgrove

Web Geek
Member WaSP Education Task Force

morethanseven.net
garethrushgrove.com

Jean-Christophe Kermagoret

unread,
Nov 23, 2009, 10:46:31 PM11/23/09
to django-d...@googlegroups.com
Hi,
I'm working a lot on Model Driven Software Development in the SIDE-Labs
project and your approach definitely has a lot of interests for me. We
currently chose to work on Alfresco as a framework but we are looking
after technological alternatives.

Have you been a little further in your thinking?

JC

gareth rushgrove a �crit :
http://www.side-labs.org / Model.Generate.Deploy

--
Jean-Christophe Kermagoret
Directeur associe

BlueXML
40, bd Jean Ingres
44100 Nantes

Tel. : +33.2.40.46.62.78
Mob. : +33.6.08.56.83.80

BlueXML : http://www.bluexml.com
SIDE-Labs : http://www.side-labs.org
KerBlue : http://www.kerblue.org


Reply all
Reply to author
Forward
0 new messages