|Re: TEXO based application architecture [message #1140411 is a reply to message #1140217]
||Wed, 16 October 2013 10:40
| Martin Taal
Registered: July 2009
In my view we should move/do business logic as much as possible outside of the entities/pojos. Within the pojos only
simple business logic (related to some computation of a value or a member or something) should remain.
But if a pojo has more complex logic also involving other pojos (which is often the case) then I would move this logic
to service classes (which correspond to your controllers I guess). Having the logic in service classes makes it easier
to generalize them and also to make them more pluggable (and also accessible as a webservice).
Afaics we are moving more and more in a direction where a pojo evolves back to its simplest form: a key-value hashmap
with a type denoter and listeners to handle object state changes and act upon them (listeners have their logic also
implemented outside of the pojo).
Hope my reply helps somewhat.
On 10/16/2013 09:54 AM, namboka david wrote:
> I am being confronted to a subtle issue. I have to port an existing c++ client software to the web. We are having
> discussions about how and where business logic must be implemented.
> Historically in the program I have to port, the behaviours would directly be hard-coded on object methods. Using TEXO,
> this would mean directly on the POJOs generated from the ecore files. Typically the need to control data on an object
> Accessors was given as an example.
> In my opinion using TEXO is smart way of abstracting the access to a set of given database objects. literaly giving a
> handy, DAO based, read or write routine over the web. All the business logic being above in a set of design patterned
> But I may be mistaken. I would have wanted some other opinions.
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@xxxxxxxx - mtaal@xxxxxxxx
Web: www.springsite.com - www.elver.org
Powered by FUDForum
. Page generated in 0.04502 seconds