Draft Reference Architecture
Note: This is the print view with all the Reference Manual pages on one page. The paginated version is available here, if you prefer that.
1. Introduction (by Lupi)
2. Scalability Requirements (by Lupi)
3. Reference Architecture (by Lupi)
4. Rich Text Editor Choice (by Lupi)
5. AJAX Frameworks (by Lupi)
6. Other Media: FAX, SMS... (by Lupi)
7. Miscellaneous Notes on Architecture (by Lupi)
8. Product Recommendations (by Alec)
For Member Profiles it will be necessary to transition away from your current custom solution in favor of one which integrates with PAS. I suggest looking at:
remember
I suspect that the new portlet architecture will be essential to the development of your product, both for your right column and your "dashboard" type views. It would be very wise to have all developers study this architecture intensely. It is included with Plone 3.0 in the packages:
plone.portlets, plone.app.portlets
For calendar related items I recommend a look at:
Plone4Artists Calendar
Which uses Zope 3 techniques to turn any folder (or smart folder) containing events into a calendar with two way sync from desktop applications like iCal. This should also allow a blog to be viewed in a calendar like fashion when suitable adapters for the posts are provided.
For audio and video blog support, I suggest extending existing blog products (including your own via adaptation. Some Zope 3 products which provide relevant adaptations are:
Plone4Artists Audio, p4a.videoembed
The former of which allows 'File' objects to acquire special behavior and UI when marked as containing audio, and the latter of which allows users to embed videos from e.g. YouTube without allowing them to enter potentially dangerous unfiltered HTML (<embed>, <object>, <script>, etc.).
For blogroll, planet, and other RSS aggregation needs it would be worthwhile to look at:
feedfeeder and the rss portlet included in Plone 3.0 in plone.app.portlets
Testimonials should be relatively easy to implement, especially on top of a product like remember. It seems you already have a sketch of an implementation in your MemberProfile product, though that code is not likely to be directly useful in Plone 2.5+, it could reasonably be applied to a remember based member object.
The email, sms, bulletin, ... notification system should be easily implementable using Zope 3 event channels along with some means of storing/retrieving the user preference information.
For a global ratings system look at
'contentratings' or perhaps 'lovely.ratings'
which allows for customizable multivector ratings (though as far as I know it only works in Zope 3).
Globally available voting for and flagging of content should be easily implementable using single adaptation along with annotations, 'contentratings' provides a basic code example of how this sort of thing is accomplished.
9. Implementation of the Generic Listing View Components (by Alec)
My suggestion is that these be implemented as a series of ViewletManagers, where each viewlet is a representation of a list element. There would be a few simple interfaces involved. First the interfaces describing a list items and actions available on these list items:
class IActionItems(Interface):You would then register adapters from each of your potential list items to IListItem. These adapters would likely be incredibly trivial. Then you would register the relevant viewlet managers and viewlets. You would have a named viewlet manager for each type of potential list item ('comment_listing', 'amendment_listing', ...) these implementations would all use the same basic implementation, changing only the content type they choose to list and the name they are registered under.
"""A description of an action available on an object"""
# This may need to be generalized a bit to support actions which
# are more complex than a simple link
title=TextLine(u"Title")
description=TextLine(u"Description")
url=URI(u"Action URL")
category=TextLine(u"Action Category")
class IListItem(Interface):
"""An interface to describe an object which is part of a listing"""
title = TexLine(u"Title")
description = Text(u"Description")
actions = List(u"Actions",
description=u"List of Actions Available on the Item",
value_type=Object(u"Action Item",
interface=IActionItem))
Anyone who ends up making your architectural decisions or doing development should read and understand the very thorough README.txt included in zope.viewlet, which describes a similar pattern for building an extensible folder contents listing using viewlets.
The base implementation of the viewlet manager would get the objects of the desired type (possibly batched), and lookup a viewlet corresponding to each object (a viewlet adapts a context, request, view and the viewlet manager itself). Internally the viewlet would make the adaptation to IListType to get the desired data, and would render some relevant html for that piece. More specific viewlets would be registered for each object type (comment, amendment, etc.) as needed, but 90% of the implementation would remain the same, and these more specific renderings could be added incrementally.
Useful Reading
The main text that developers and architects should read (aside from standard Zope and Plone stuff) is 'Web Component Development with Zope 3' by Philipp von Weitershausen.
Philipp's site also has a lot of useful info, particularly regarding using this stuff in Zope 2. Additionally, Martin Aspeli will be publishing a book on development with Plone 3.0 in the near future, and that will certainly be worth a
look.
Alec.