Hey everybody,
I just added the previous/next question navigation stuff (from almost a
month ago) to CVS.
I am also starting to work on converting Jyve to use WebMacro. I have run
into a snag though. I am not sure where the best place (from a combined
OO, MVC, ease of use/maintainability standpoint) is to build links. For
example, a link to the DisplayFaqs screen looks something like
".../Turbine/screen/DisplayFaqs/project_id/1". I have thought of two ways
to build a link like that, but I'm not sure which is better. One way is
to build the link directly in the WebMacro template:
<a href="$link.setTemplate("DisplayFaqs").addPathInfo("project_id",
$project.getId())">Show FAQs</a>
(Assuming there is some sort of "Project" object stored in
"$project" with a "getId()" method.)
The other way is to have the "Project" object build the link. For
example, create a Project class with a method like this:
class Project
{
// other methods & stuff
private int projectid;
public DynamicURI getFaqLink(RunData data)
{
return new DynamicURI(data, "DisplayFaqs")
.addPathInfo("project_id", projectid);
}
}
and then put in the template:
<a href="$project.getFaqLink($data)">Show FAQs</a>
I personally like method #2 better for the sake of simplicity in the
template(s). However, I can see the pros and cons of both ways, and I'm
not sure what the "right" way to go is.
Also, how up-to-date would you all like Jyve to be with respect to
Turbine. The bleeding-edge of Turbine development is moving pretty fast
these days. While I'm working on Jyve, shall I try to keep up with the
latest CVS version of Turbine? Or should I pick a version and stick with
that, and then update Jyve once there is a stable Turbine release?
Specifically, I was just checking the Jyve build and I noticed part of
Jyve is using a depricated part of the Turbine API. (The old Turbine cvs
logs are not readilly available anymore, so I can't find out exactly
*when* it was deprecated but I'm pretty sure it has been in the last 3
weeks.) Should I make it a point to update that code to the latest
Turbine API, or should I wait until there is a stable Turbine release (or
until I happen to be working on that code for some other reason)? And
should I re-work the database stuff to use Turbine's new Torque
OM-generation tool? Or are the *OMGenerators good enough?
One last thing. How do you all feel about having Jyve (optionally?) cache
project/faq/topic/question/answer data so it doesn't have to hit the
database for each request?
--
Greg Morris
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]