On 10/25/06, Levi McCallum <[EMAIL PROTECTED]> wrote:
>
> Ok then,
>
> I might just ask some questions.
>
> I'm not quite familiar with the whole 'application' side of things.
>
> For example, I have 3 sections. First an about page, an article page
> and a media page.
>
> I will later do the code for them, but, would I make a separate
> application for each? I really don't know how the MTV structure works.

The application structure is really independent of the MTV idea.

MTV (Model, Template, View) is a description of how you separate the
Model (the data/database you are representing), from the View (the way
in which the model data can be accessed) from the Template (how the
view looks to the end user). This separation allows you to change the
look of a website without changing its content (by modifying
templates), or changing the underlying data that is stored with
minimal effect on existing look and feel.

The application structure is a way of organizing large projects. An
'application' is a collection of Models and Views that are cohesive.
The idea is that an application could be easily migrated from one
deployed website to another. For example, one application could e a
wiki; another could be a 'shopping basket' system. Each application
has a set of models (wikipage; inventory item, basket), and a set of
views (edit wiki page, create wiki page; show basket, checkout) that
could be deployed into _any_ project.

You could build your website as a single application, or as a large
number of applications - it just depends on how modular the pieces
are. In your case, it sounds like you might have three distinct
applications, but you could just as easily write the whole thing as a
single application. The only downside to the 'single app' approach
would be that at a later date, if you wanted to write a new website
with a media section, you need to extract from your old application
the models and views that are useful, rather than just copying the
entire 'media' application. This design aspect isn't anything new or
Django specific - it's the old 'do I write a single executable, or put
it in a DLL' argument.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to