On Tue, 2006-02-28 at 20:50, Sean Gilligan wrote:
> (Allen: I just realized that I sent my previous message to you 
> personally and not to the list, so I resent it to the list for thread 
> archival purposes.  I was going to send this response to the list, too, 
> but I'm not sure if you meant all your below comments for the user list.)

no worries, this is all meant for the list.

> 
> Allen Gilliland wrote:
> > On Tue, 2006-02-28 at 16:44, Sean Gilligan wrote:
> >> Allen Gilliland wrote:
> >>> one entry per page is just a permalink and roller alreayd supports
> >>> that.  by default a permalink will contain links to the previous/next
> >>> permalinks chronologically.
> >> Right.  The permalink  page has links to previous/next.  I'd like the 
> >> home page and the category pages to be (or look like) the permalink 
> >> pages of the most recent entry (in that category.)  I'm not sure what 
> >> the best way to do that is...
> > 
> > I'm not sure I understand what you here.  Do you just mean you want them
> > to be pagable?
> > 
> > Do you want the blog homepage to only have a single entry on it and then
> > be pagable like the permalink urls?
> 
> Right.  And I'd like to do the same thing for categories and be pageable 
> within that category.

hmmm.  unfortunately i doubt this is going to be very easy to do right
now :(

you'd probably have to hack a fair amount of code to get that stuff.

> 
> > 
> >> I don't fully understand how the Weblog template, Velocity context, and 
> >> macros are used 
> 
> > Unfortunately, I think that process is a bit wacky myself.  
> 
> The bum part is that I don't think
> > there is any concrete way to know exactly what objects you have access
> > to for any url, other than trial and error or tracing through the code.
> 
> That's what I was afraid of...
> 
> > 
> > Speaking somewhat abstractly I think my issue with the current process
> > is that Roller tries to do too much for the user, rather than just
> > giving the user access to all the relevant data for their weblog and
> > letting them format it however they like via their templates.  I am also
> > not really a fan of the idea of prefetching data for the velocity
> > context, since we don't really know what data is meant to be used
> > anyways.
> 
> It seems like these two goals (#1 - putting all the relevant data in the 
> context and #2 - only fetching what data is going to be used) can be in 
> conflict.  (Unless you want the getters in the context objects to 
> actually do the DB fetching.)  There are certainly some trade-offs here 
> that I don't fully understand at this point.  (If you remember we bumped 
> against this issue with the RSDServlet/FlavorServlet stuff.)

yep, that's why i am starting to believe more and more that it probably
doesn't make sense to try and prefetch everything.

> 
>    In the long run I would prefer to see an nice object
> > hierarchy/api placed into the velocity context which provides the user
> > an easy way of accessing any data specific to their weblog.
> 
> Simple, consistent, and well-documented, of course.  ;)
> Oh yeah, and efficient...

i think efficiency is probably the most difficult part of this
approach.  i really don't know what effect there would be if we were
allowing data to be retrieved during the velocity rendering process.  i
would guess it's fine, but we would need to play with it.

from a conceptual standpoint i would like to think that all the relvant
data could be retrieved through the "weblog" object.  i.e. something
like (in velocity) ...

weblog.getName()
weblog.getHandle()
weblog.getEntries()
weblog.getCategories()
weblog.getFolders()
weblog.getBookmarks()

and on and on.

> 
> > 
> > IMO many of the macros also try and do "too much" and in some ways end
> > up making things more confusing.  I think my biggest pet peeve would be
> > that we do a little too much of this ...
> > 
> > #showSomeUrl()
> > 
> > and then out pops an html anchor element.  while that works i like the
> > idea of having the user do the html part themselves, like this ...
> > 
> > <a href="$roller.someobj.properUrl"
> > class="foo">$roller.someobj.properUrlText</a>
> > 
> > and we wrap all the proper logic for constructing the url into the code
> > somewhere.
> 
> I agree with you 100% (or more) on this one.  If you look at the 
> templates in Movable Type or Blogger they don't hide any of the html. 
> There are container elements that can do loops  or conditionals, but 
> none of them (IIRC) actually generate HTML.

yeah, i am pretty familiar with MT and i do like the way it does
templates a little better.  unfortunately we are bound by velocity,
which can't do the custom loops/conditionals.

> 
> I think the way Roller employs macros is the right thing from a software 
> developer's point of view:  encapsulating logic and eliminating 
> duplicate code.  But HTML designers and bloggers who dabble in HTML are 
> not programmers.  What makes maintaining the templates for the Roller 
> developers easier makes it  harder for blog authors to modify their 
> templates.

agreed.

> 
> (One idea that might be useful is to use macros (or macro-like 
> functionality) at build time to generate the common/default parts of the 
> generated templates.)
> 
> > 
> >>    i don't think there is an easy way to have
> >>> a permalink point to the previous/next permalink in a given category.
> >> What's the hard way?
> > 
> > hacking away at the code :(
> 
> I'll take a look, with an eye towards submitting any useful changes I 
> can produce.

coolio.

-- Allen


> 
> -- Sean

Reply via email to