[Yanel-dev] Resources and Usecases

Paloma Gomez paloma.gomez at wyona.com
Thu Mar 15 16:44:35 CET 2007


Josias Thöny escribió:
> Hi all,
>
> Here's an attempt to define resources and usecases. It's quite similar 
> to how it is in Lenya.
> This is just meant as food for thought. Some people may come up with 
> completely different ideas, and I'm interested to hear them.
>
>
> Resource:
> ========
> A resource is responsible to create/render/deliver the content for a 
> certain url of the website.
>
>
> Usecase:
> =======
> A usecase takes actions and/or delivers the content for any url with a 
> request-parameter yanel.usecase=myusecase
>
> In particular, a usecase may represent an action which may take some 
> user interaction according to a certain "workflow" like e.g. :
> (It would not be limited to this schema though)
>
> show screen
>   |
>   +--> click ok  --> check conditions
>   |                     |
>   |                     +-> if ok: execute  --> handle errors
>   |                     |
>   |                     +-> if nok: go back to 'show screen'
>   |
>   +--> click cancel --> cancel
>
> The usecase framework takes care of the following tasks which are 
> common to most executable usecases:
> - parameter passing (how to pass form parameters to the java code
>   and vice-versa)
> - error handling (check preconditions, handle parameter validation
>   errors and other kind of errors)
> - view processing (creating a view using a template and applying
>   standard xslt or i18n transformer)
>   (jelly support would be nice, it's similar to jx)
> - control flow (handle pre-defined actions like submit/cancel)
> - allow automated execution of a usecase (e.g. by a scheduler)
>
>
> Moreover, I would like to achieve the following with a usecase framework:
> - creation of new usecases is easy (e.g. no need to create individual
>   ant build files for each usecase)
> - a usecase only contains the code which is really necessary
>   (e.g. a java handler class, a view template, and a configuration)
> - no code duplication between usecases
> - common look & feel for form-based usecases
> - no need to register usecases for each realm individually.
+1

However, I admit that I might be influenced by the way things are done 
in Lenya. There might be another way of providing these features without 
a usecase framework ( I don't know how, though ;-)). Any suggestions?

Regards,
Paloma


> josias
>
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://wyona.com/cgi-bin/mailman/listinfo/yanel-development
>
>




More information about the Yanel-development mailing list