I think this looks good and will be a give improvement over what we
currently have. Here's a few notes/comments ...
1. I don't understand what "Page models return collections of POJOs"
means. I don't consider that a requirement of a PageModel. I think a
PageModel can return any type of object it wants. Can you explain what
you meant by that? Aside from that I agree with your definition and
what models we will have.
2. I am a little uncertain about the whole website.pageModels and
configuring different blogs with different models. I think this idea
sounds good, but I am worried it's going to invite lots of problems,
particularly for sites that are upgrading. Older sites are going to
have a mix of old stuff on their site which needs to be supported, so
I'm not sure we can really offer a weblog by weblog config option to
alter the model. For example, what if someone upgrading from 2.x wants
to keep some older themes available, then we have a problem.
3. I think we need to have a little more discussion about the feed urls.
I didn't realize that the comment feeds needed to be available in both
rss and atom, because that causes a problem with the current url
proposal. If we are planning to offer each possible feed in multiple
flavors (rss, atom, etc) then we need to plan for that a bit better.
4. I'd like to suggest that the new WeblogPageModel have a different
name. $pageModel doesn't mean anything to ordinary users, so picking
something shorter and more descriptive would be good. I think the names
for $config, $site, and $planet are all good. All the other context
objects sound fine to me as well.
5. I'm questioning if the WeblogPageModel should really provide methods
for accessing entry, bookmark, category, and page collections. My take
is that those things should be part of the Weblog pojo, so rather than
construct a model and methods for that we should just giving the user
access to their weblog and letting them use the pojo methods.
6. You have a section called "Changes to existing POJOs" where you list
new methods to be added. This is the part I disagree with the most so
far. I don't think those methods should be added to our existing POJOs
because they are not related to the domain model in any way, they are
only related to the way we render our UI. I would much prefer to see
these methods be added to a class which extends the current pojos. This
also has the benefit that we don't need new methods for some things like
getTransformedText(), instead I think we should just override the
default pojos getText() method to return the transformed text.
7. I think the macros look pretty good except that I would prefer to see
the macros not have empty param lists unless they really don't need any
variables to do their work. I think that any variable that is needed to
do the work should be passed in (except for the utility classes). For
example, #showBookmarkList($weblog).
8. I would also prefer that the #showWeblogEntryPager() macros *not*
display the next/prev links as part of the macro. I think that
functionality should be in a separate macro.
Overall I think this is a very solid approach. As you work on the
macros and page models I'd like to see them in the 3.0 branch so that I
can actually see the code itself. I think the more people we have
actually looking at that stuff the better so that we can try and spot
potential pitfalls and ways we can keep things as tidy as possible.
It's also more productive if we can watch and comment as progress is
being made.
-- Allen
Dave Johnson wrote:
I've already started implementation of the new Atlas frontpage proposal:
http://rollerweblogger.org/wiki/Wiki.jsp?page=Proposal_Atlas
And today I posted the first draft of a new Atlas Page Macro/Models
proposal:
http://rollerweblogger.org/wiki/Wiki.jsp?page=ProposalAtlasMacroModels
The new Atlas macro/models proposal is pretty significant. I'm
proposing that we replace the old page models and macros that are used
in all existing Roller themes with an entirely new set of models and
macros. It's important that we get this right -- we don't want to have
to do this again.
The old system will still be available, but it will be possible to
either 1) leave it in place, 2) leave it in place but not allow new
blogs to use it or 3) to turn if off entirely.
Please review and offer feedback.
- Dave