Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » TEXO based application architecture(integrating texo in an existing java backend)
TEXO based application architecture [message #1140217] Wed, 16 October 2013 07:54 Go to next message
namboka david is currently offline namboka david
Messages: 13
Registered: September 2013
Junior Member
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 controllers.

But I may be mistaken. I would have wanted some other opinions.
Re: TEXO based application architecture [message #1140411 is a reply to message #1140217] Wed, 16 October 2013 10:40 Go to previous message
Martin Taal is currently offline Martin Taal
Messages: 5335
Registered: July 2009
Senior Member
Hi David,
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.

gr. Martin

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
> controllers.
> But I may be mistaken. I would have wanted some other opinions.


--

With Regards, Martin Taal

Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
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
Previous Topic:[CDO] Code Review for a faster Horizontal Mapping
Next Topic:Create EMF model
Goto Forum:
  


Current Time: Wed Oct 01 00:03:13 GMT 2014

Powered by FUDForum. Page generated in 0.01979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software