On Fri, Jun 15, 2007 at 11:46:34PM -0000, John W. Long wrote:
> 
> On Jun 15, 6:29 pm, DHH <[EMAIL PROTECTED]> wrote:
> > Thanks for thinking about this John, but I don't see Rails adopting
> > something along those lines right now. We can definitely do more to
> > improve high-level reuse for the sub-set of users who need it, but it
> > probably won't be setting the tone quite as dramatically as this. I
> > much prefer to have things divided by type when I'm just working on a
> > single application.
> 
> Help me out here. I'm not sure I understand why type is better.
> Setting the modularization argument aside grouping your application
> into logical parts seems like a win to me.

The thing that immediately struck me about this proposal was the
interdependencies between the different parts of the application.  The
example in the original post showed several (of what I presume are) models
in the app/blog subdirectory, but I'd expect that the models and controllers
in that subdir also require the model in the app/account subdirectory.  If
you wanted to give someone else the app/blog subdirectory to use in their
application, then some degree of scaffolding or similar would be required in
the user model to make it work.  I'm curious if django has a solution to
this problem?  Usually, in my applications, there would almost always be a
single directory that had all of the models and controllers, since there's
almost always a dependency chain that links all of them together.

As I understand it, the purpose of the rearrangement would be to support
making it trivial to carve out subsets of a Rails application for re-use,
but in my experience, the directory structure is the *last* thing you need
to be worrying about.  There are many, many more important things to decide
on before concerning yourself with how many different directories you need to
copy files out of.

If your goal is only to allow people to structure plugins in a more
Rails-like manner, rather than assisting so much in the *extraction* of the
plugins, then I would suggest that adding
vendor/plugins/<plugin_name>/app?/{models,controllers,helpers,views} to the
search paths would achieve that aim without requiring what is a fairly
fundamental change to the way in which all Rails applications are
structured.

For myself, I think that the proposed change is an aesthetic loss, but that
may simply be familiarity with the existing layout talking.

- Matt

-- 
I killed init(8) and all I got was this lousy kernel panic.
                -- Graham Reed, in the Monastery

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to