# App design help for a newbie (trying again)

**URL:** <https://www.ruby-forum.com/t/app-design-help-for-a-newbie-trying-again/82331>\
**Category:** Rails\
**Created:** [March 15, 2006, 7:51pm UTC](https://www.ruby-forum.com/t/app-design-help-for-a-newbie-trying-again/82331 "2006-03-15T19:51:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [March 15, 2006, 7:51pm UTC](https://www.ruby-forum.com/t/app-design-help-for-a-newbie-trying-again/82331/1 "2006-03-15T19:51:40Z")

</div>

Hi there,

I’m working on a new student portal system using Rails for a large  
university. As part of this application, I plan on students being able  
to customize their own calendar, collection of commonly used links,  
aggregation of newsfeeds (from the university, student groups, etc), and  
to see a listing of major announcements they should be aware of.

It seems to me, to make the most sense to have each of these components  
handle their own logic. Optimally, one master controller would receive a  
user’s request for their particular page and would delegate to other  
methods to render user-specific content. To me, it seems like the  
master controller should be delegating this task to other controllers so  
that they can do a render partial of their portion of the page. It  
seems like it would be a bit messy and un-‘rails-like’ to force all of  
this display logic into a single template and a single controller (but  
maybe this is wrong?).

So a few questions: Is this what you would recommend from a design  
perspective? Is it normal to have controllers in a Rails application  
(if we were to go with the above) that are not meant to receive URL  
requests?

Also, for the above which are user-specific, I’d like to do my best to  
cache the result to improve performance. Would the most effective way  
to accomplish user-by-user caching for components specific to them be  
through action-caching?

Many many thanks in advance for helping out a newcomer like myself. I’m  
very excited by Rails and look forward to getting off the ground with  
it!

Michael J.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [March 15, 2006, 11:57pm UTC](https://www.ruby-forum.com/t/app-design-help-for-a-newbie-trying-again/82331/2 "2006-03-15T23:57:54Z")

</div>

> So a few questions: Is this what you would recommend from a design  
> perspective? Is it normal to have controllers in a Rails application  
> (if we were to go with the above) that are not meant to receive URL  
> requests?

I haven’t had a chance to use it yet, but it sounds like what you’re  
describing is ‘rails-like’:  
[Peak Obsession](http://wiki.rubyonrails.com/rails/pages/Components)  
[Peak Obsession](http://manuals.rubyonrails.com/read/chapter/71)

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [March 16, 2006, 1:14am UTC](https://www.ruby-forum.com/t/app-design-help-for-a-newbie-trying-again/82331/3 "2006-03-16T01:14:00Z")

</div>

Many thanks!

Any opinions from anyone on my second question?

> Also, for the above actions which are user-specific, I’d like to do  
> my best to  
> cache the result to improve performance. Would the most effective way  
> to accomplish user-by-user caching for components specific to them be  
> through action-caching?

To add to this, I suppose what I’m trying to figure out is if action-  
caching caches the results of an action from a particular set of  
parameters (if I change the input to the function, will it still  
run?). And if so, how do expire just a specific cache that  
corresponds to one set of parameters?

So, show\_calendar(user), for example. If I do show\_calendar(1) and  
show\_calendar(2), will they be uniquely cached from each other and if  
so, how could I invalidate the cache for user id 2?

Michael J.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![bluetrust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e7dd6/32.png) [@bluetrust](https://www.ruby-forum.com/u/bluetrust)\
**Post date:** [March 16, 2006, 1:32am UTC](https://www.ruby-forum.com/t/app-design-help-for-a-newbie-trying-again/82331/4 "2006-03-16T01:32:11Z")

</div>

## Check out [Rails caching presentation :: scottstuff.net](http://scottstuff.net/blog/articles/2005/09/28/rails-caching-presentation), which introduces caches\_action\_with\_params. This seems like what you’re after.

View this message in context:  
[http://www.nabble.com/App-design-help-for-a-newbie-(trying-again)-t1286510.html#a3427645](http://www.nabble.com/App-design-help-for-a-newbie-%28trying-again%29-t1286510.html#a3427645)  
Sent from the RubyOnRails Users forum at [Nabble.com](http://Nabble.com).
