[Yanel-dev] Need help to figure out things

Michael Wechner michael.wechner at wyona.com
Wed Feb 20 10:05:29 CET 2008


Evaldas Taroza wrote:

> Hi,
>
> I still can't avoid comparing Yanel CMS framework to Servlet API. Ok 
> ok, I know that Servlet API does not know anything about repositories 
> nor resources, nor realms. Still
> - A "realm" is quite similar to a "webapp"


yes, there are similarities, but AFAIK one cannot make use of 
"sub-webapps", I mean nest one webapp into the webapp

Also if one would use a webapp instead of a realm, all the core 
functionality of Yanel would have to reployed for each webapp/realm

> - A "resource" is quite similar to a "servlet"


yes, there are similarities, but for instance a resource does not have 
to run within a servlet container, whereas I have to admit that we 
didn't take enough care to really make this properly, because 99% of the 
cases are running within a servlet container.

The main difference is that the resource interface is as minimal as 
possible and all the functionality should be added through versioned 
interfaces such that the resource stay backwards compatible

> - A "repository" is quite similar to a "db" to which a servlet can 
> connect to


yes, there are similarities ;-) but it is very important to recognize 
the need for an abstraction layer, either through a custom data model or 
an abstract data repository API such as Yarep or JCR. Also see

http://yanel.wyona.org/en/documentation/resources/creatable.html

>
> To elaborate more on this similarity. A database in Servlet API can be 
> accessed through JNDI either globally or only in a specfic context 
> (webapp). This database can well be a Yarep or JCR repository, or any 
> other data store. Then, I can have servlets behaving like Viewable, 
> Creatable, Modifiable, Deletable simply by implementing doGet, doPost, 
> etc. I have standard user's repository that I can access in each servlet.


but how exactly shall the core make use of methods such as doGet and 
doPost? I do not think that these methods are sufficient to support 
standard CMS functionality


> I can configure servlet mappings. All in all, it looks that I can do 
> much of the stuff that I can do with Yanel.


give it a try to rebuild Yanel functionality with only webapp/servlet/db 
and I am pretty convinced you will come back to the Yanel architecture, 
but the important thing is that you really try it :-) This is why there 
are some many CMS out there ;-)

http://www.oscom.org/matrix/index.html

>
> I understand, that with the Servlet API I don't talk in terms of 
> content management as I do with Yanel. But still it looks that I can 
> do the same with both. Actually if I had nicely called interfaces and 
> abstract classes then I could say, that my servlet extends 
> BasicXMLResource or something like that.
>
> Hm, maybe this similarity is actually a good thing...


it's definitely a good thing, because it's a general pattern which is 
true for many things. Just as the pipleine priciple of Coocon and UNIX 
pipes is a general pattern which can be used for many things

>
> I haven't worked with CMSs before, and probably this is my problem why 
> I don't get it.


Content Management is basically

- CRUD (Create, Read, Update, Delete)
- Access Control
- Workflow

One might note that one can also use SVN (Subversion) in combination 
with WebDAV to build a content management system, whereas I do not mean 
this in a cynical way, but rather to show how endless the possibilities 
are to build a CMS

>
> So can somebody clarify, why do we need such a thick layer on top of 
> Servlet API,


I don't think it's big layer at all. Please check how small the Yanel 
core is

> when it looks more like renaming concepts than implementing something 
> completely new and original? I may need to read about CMSs in general, 
> but what are the most important things that a CMS should provide?


try Google or see the Yanel website or see my three bullet points above

> What is it so valuable about a CMS (and maybe Yanel in particular) 
> comparing to some Web framework like Ruby on Rails, Symphony, JBoss 
> Seam, etc.?


these are more application frameworks, but not content management frameworks

>
> I raise these questions in order not to criticize but rather to better 
> understand Yanel.


I am glad you are raising these questions, because it helps us to better 
specify/document what we are doing and please keep asking.

>
> Thanks for help,


Hope my answers helped a bit

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