Forums Register Login

Newbie to ORM

+Pie Number of slices to send: Send
Hello,

I wasnt sure if I should post this in the newbie section or here.. Anyway I am trying to find the right way do desgin a program. I have multiple data sources from which I will create my objects. Would it be correct to create the objects as I want (merging multiple sources) in the data layer and return a complete object to the service layer (even if it requires a bit of business logic) or should the data layer be completly "dumb" and return multiple sets of data to the service layer where I will then create my objects?

Thanks.
+Pie Number of slices to send: Send
Actually, I've been using a 2-layer approach lately. I need "business logic" that must run inside a transaction with attached objects. Those functions go in my Service layer. To keep access to individual tables simple, the Service layer calls DAO objects in the lower-level Persistence Layer.

I put quotes around "business logic" because most of the "business" involves manipulating object relationships and stuff like that. I prefer the real business logic to be above the database transaction level, working with the detached objects.
Space seems cool in the movies, but once you get out there, it is super boring. Now for a fascinating tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 690 times.
Similar Threads
Newbie - web service design assistance needed
building a search feature in my application, what is the best approach
Should an Object look itself up from db?
Understanding a DAO v Service seperation...
Questions regarding the DAO pattern
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 01:52:07.