[Brug-talk] Controllers owning controllers
Tom Klaasen
tom at 10to1.be
Mon Nov 12 03:47:48 EST 2007
Hi Thomas,
On 11/10/07, Thomas Richard <thomas9999 at gmail.com> wrote:
>
> Hey Belgian Rubyists,
>
> I've just completed the book 'Agile web development in Rails' and I've
> been playing around a bit before i start to work in my first real
> rails application. Now while playing I came to a problem wich i might
> be able to solve but if I'd do it my way it would break all the Rails
> conventions the book was been telling about. So there should be a more
> 'agile' solution to this problem.
>
> Let me try explain the problem:
> The application would be build on a few big modules e.g: projects,
> services, delivery's, stock, ...
> Under these big modules I'd have a few smaller modules e.g: employees,
> products, price requests, ...
What do you understand under "module"? From your explanation, it seems that
you consider one module as one web page.
The big problem now is that i would need to share the functionalirty
> of these smaller modules between the bigger modules. The functions of
> all the smaller modules should be exactly the same everywhere. It
> probably has a simple solution but i can't seem to find one. The way
> I'd try to solve the problem is making a controller for the projects,
> services, .. modules , but i don't know how I'd have to handle the
> smaller ones. I could put them in different rb files and require them
> into the controllers but that just doesn't seem right.
I'm still a bit lost here... How do the smaller modules belong to the bigger
ones? Why are they put "everywhere"?
When i was thinking about the URI's i came to a possible second
> solution. The URI's would have to look something like
> app/projects/pricerequests/new
> Now that gave me a new perspective on the case. I could actually put
> the smaller modules into controllers and just use the greater modules
> as dummies. They're just there to organize the smaller modules into
> groups. Then again, i wouldn't know how i could get something like
> this working in rails as this would screw up the way the view system
> works?
>
> As you can probably see i found it hard to explain the problem but i
> hope any of you can make something out of this. Would be nice of
> someone wants to discuss about this with me (in private or not).
A whiteboard (or a scrap or paper) would indeed be nice, I think. But please
try to explain your problem a bit more here, I'd like to help. What does
your application look like? How do you see the user flow? What are the
relations between the modules?
I
> hope questions like these are allowed in this mailing list ;)
That's why this list is here in the first place, isn't it?
--
Tom Klaasen
10to1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/brug-talk/attachments/20071112/178b4f7c/attachment-0001.html
More information about the Brug-talk
mailing list