alexandreabade / delphi-orm

Automatically exported from code.google.com/p/delphi-orm
0 stars 0 forks source link

3Tier system #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
How u dont have a forum yet, i dont know where put this message, then i will 
put here ok?

I whould like see a 3tier system sample. Can you show us?

Remove this message and send me a mail if u think better!

Original issue reported on code.google.com by mrbar2000@gmail.com on 7 Nov 2011 at 12:06

GoogleCodeExporter commented 8 years ago
In the DEV branch (dorm_generics_collection) there is a sample for datasnap. Is 
not working 100%, I'm still working on it, but the dorm side is done.

Original comment by daniele....@gmail.com on 7 Nov 2011 at 3:31

GoogleCodeExporter commented 8 years ago
Very good. I see the sample, but ihave some doubts. 
Where put bussiness rule? i would like put just on server layer. 

In this situation we need have 2 set of classes?
TPerson, TLaptop // server layer
TPersonpValueObject, TLaptopValueObject // Client Layer

This is a good approach?

On Server Layer maybe could have some services classes to receive the 
valueobjects from client and assign to server instances.

Other approach:

Let bussiness class without rules and create classes to put this rules.

What u think?

Original comment by mrbar2000@gmail.com on 8 Nov 2011 at 1:16

GoogleCodeExporter commented 8 years ago
Usually I use ServiceLayer pattern 
(http://martinfowler.com/eaaCatalog/serviceLayer.html)
So you should put your BL in the Service Layer and use dorm only in the domain 
model. I prefer to put the domainobject also in the client side because dorm 
allows NO dependencies between mapping and objects. SO you can use dorm objects 
also in the client side. But, if you want, you can also use value objects.

Original comment by daniele....@gmail.com on 13 Nov 2011 at 10:38

GoogleCodeExporter commented 8 years ago
What about validations? 
Some validations (required, email, etc...) could be treat on client side
other should be treat on server side. What u suggest?

And about GUI interaction. With new XE2 databinding we need notify the widgets 
that objects changed, generaly using the Setter's of properties. What u does?

Original comment by mrbar2000@gmail.com on 15 Nov 2011 at 3:14

GoogleCodeExporter commented 8 years ago
Currently I'm using "Setter" validation for client side and "Validate" method 
on the server side. Check the unit tests.

Original comment by daniele....@gmail.com on 22 Nov 2011 at 6:32

GoogleCodeExporter commented 8 years ago

Original comment by daniele....@gmail.com on 5 Feb 2013 at 3:01