Hey All,

Little philosophical/architectural question here...

I'd like to know how many other people are using Restlet to build visual web
applications, and how they feel about aggregating resource data on their
pages?

Let's take a simple example:

We have a Resource for a thread on a forum:
http://somesite.org/forums/helpforum/threads/3

On this page, we display the thread Resource, but we also want to show in a
sidebar, lets say other online users browsing the help forum, and the latest
3 posts to the help forum (the actual data is unimportant, but the fact that
the data is not a part of the single thread Resource is).

In Restlet, accessing this URL would load up a Thread Resource and pick its
HTML representation (let's say using a Freemarker template).  To display the
extraneous data in the sidebar, the Thread resource is going to have to
access other Resources information to then pass to the template.
Additionally, if this forum requires that a user be logged-in to participate
in discussions, the header on the page might contain a "logout" link if the
user is logged in (or "login" link if they weren't already logged-in).

Having "extraneous" information on a web page is pretty common requirement,
but it seems to not "feel right" to me in terms of Resource implementation
in Restlet.  How do people feel about Resources loading the extra Resource
data to feed to the templates?  Is this just par for the course and
necessary? Are there best practices people like to employ to accomplish this
without feeling like you are defeating the nice separation of Resources the
framework creates for you?

Any thoughts would be appreciated... just wanted to hear some ideas/start a
discussion.

Thanks!

Jeff

Reply via email to