Organizing rhtml and rjs files?

Is it possible to keep rjs and rhtml files in different subdirectories
of a view, for purely organizational reasons? On a very AJAX heavy
view, there are a LOT of partials, and it just gets a bit messy.

(I’d love to see the page that has THAT many partials being called.)

Well, assume a user has a list of things. There is a partial for the
entire list, so that you can delete a couple at a time and re-render the
entire list. There is also a partial for each row. That pattern repeats
for several other lists of things associated with the user.

Then there are some selection/editing containers that are loaded
asynchronously when an item is selected, and their contents are in
partials. And, of course, those partials might in turn have their own
listings of things, which can be asynchronously manipulated.

(This app is more of a local intranet thing that looks more like a
desktop app than a web app. To be honest, it evolved into AJAX overkill,
and I’m regretting it.)

Dave S. wrote:

Is it possible to keep rjs and rhtml files in different subdirectories
of a view, for purely organizational reasons? On a very AJAX heavy
view, there are a LOT of partials, and it just gets a bit messy.

If you call the ALL your views directly using “render :action / :partial
=> :blah” I don’t see why not.

But otherwise I will have to assume (since I really don’t know for sure)
you’re breaking the conventions issued by Rails… and Rails is all about
“Coding by Convention”.

(I’d love to see the page that has THAT many partials being called.)

Wish I could be more helpful.

Can anyone recommend a good resource for learning good MVC design
techniques for working with AJAX? I have some questions about what is
the “correct” way to delegate responsibility between controllers, etc.,
and how much to assume about the callers and associated views from
within ajaxy controllers.