[Yanel-dev] architecture burdens

Michael Wechner michael.wechner at wyona.com
Fri Jan 25 21:16:32 CET 2008


Evaldas Taroza wrote:

> Hi,
>
> I have some doubts about the usefulness/usage of all the 
> *.attributes.* interfaces. I understand that they are supposed to 
> allow the resources to be as generic as possible. However, when I am 
> doing something I usually need very specific things to do, i.e. 
> viewable resource must only be viewed, modifieable only updated, 
> deletable only deleted, etc.
>
> Now, when I implement ModifiableV2, I have to implement some weired 
> methods, when the only useful is delete(); when I implement 
> CreatableV2, I have to implement many methods, although I need only 
> create()...
>
> So far, for Viewable resources I find BasicXMLResource most useful. It 
> allows to switch views, apply stylesheets etc. In other words it gives 
> a resource a polymorphic view, that's I think is general enough and 
> quite nice.
>
> MofifiableV2 seems to be good only because it has delete(). So as I 
> earlier suggested, it should make sense to have Deletable interface. 
> To make 'modifiable' action as generic as possible it should be 
> possible to do that through properties.
>
> CreatableV2 I don't understand at all. To my mind it should only have 
> create() method, and as with 'modifiable' generic part is done through 
> prescribed properties.
>
> Hence I say that Modifiable, Creatable, Viewable, Deletable are good, 
> but should only have modify(), create(), getView(), delete() methods. 
> These methods would behave differently with respect to what properties 
> are set for the Resource. Therefore all these interfaces could 
> implement HasProperties interface which would provide property names 
> and values. Implementations would make a good use of those properties 
> as well as clients would do. (All this sounds like JCR ...).
>
> Now I find the best practice for CRUD as follows:
> C: not sure it should be easy with Creatable but looks like its even 
> easier with usecases
> R: have a resource type extending BasicXMLResource
> U: have a resource type extending ExecutableUsecaseResource
> D: have a resource type extending ExecutableUsecaseResource
>
> But if my best practice for CRUD is as listed above, then where is the 
> power of Yanel?


well, it's about integration with all kind of other applications and 
data repositories. I think I understand what you are saying and very 
much appreciate your directness and speaking out what you think, but I 
would argue if you see other usecases (and content management is not 
just about "simple" websites), then you might change your mind ;-) Your 
feedback is also very much appreciated, because it shows once more that 
we have to document all the stuff we did so far and why we did it this way.

So I think before we get into a lengthy discussion, we first should 
document and then discuss if it makes sense or not, because I believe 
strongly that it makes sense of course :-)

So I would suggest that I/we will try to document all the points which 
you are pointing to as quickly as possible and then we go through them 
within separate emails.

> It looks like all the content management projects for every Web site 
> will have to be heavily custom,


no,no,no ;-) Yanel is currently a Content Management Framework and the 
goal is to add on top of this CMF a CMSystem such that one can easily 
build stuff very quickly. I would say the BasicXMLResource is one big 
step into this direction, but there are others well, you might haven't 
discovered them yet ;-) (again because of lack of documentation)

Think of Java itself. It's very generic, but tells you to use classes, 
inheritance, interfaces, etc.

So Yanel tells you how to build content management applications ...

I hope you understand what I am trying to say

> and therefore I am not even sure if it is easier to implement them 
> using Yanel, or simply with JSPs, XSLTs and Jelly.
>
> Generally speaking, I think that the whole architecture of Yanel 
> should be revised and cleaned-up.


shoud be documented ;-)

Cheers

Michi

>
> Evaldas
>


-- 
Michael Wechner
Wyona      -   Open Source Content Management - Yanel, Yulup
http://www.wyona.com
michael.wechner at wyona.com, michi at apache.org
+41 44 272 91 61



More information about the Yanel-development mailing list