I'm creating an N-Tier (or at least I think its N-Tier!) solution where I have the following:
WPF client side application (presentation layer)
WCF service hosted in a windows service (data access layer)
SQL database (data layer)
Now bearing in mind this is the first time I've tried to design anything like this, I might be going about it completely the wrong way...
I've created 3 examples classes that would be my 'business objects' (im not quite sure where that fits in within the layers I listed above, because these business objects would be defined in a DLL that would be used by both the presentation layer and the data access layer). You can see them here:
So then in my WCF service (data access layer) I would have methods like this that would be exposed to the WPF client:
These are just examples but you get the idea. Is this the right way to do something like this?
I saw one design that someone had posted somewhere that basically looked to me like it merged the Business Objects and the DAL together because in their class that represented an order, they had properties like you would expect for Order Number etc etc but then they also had methods like "GetOrders" within there too.
I dunno I'm still very new to this type of design but I thought that the idea of the business objects was that they just represented business items, such as orders etc, so I thought they would just purely hold properties/fields and no methods or anything like that.
Just wanted your thoughts and suggestions on whether im on the right track or not
Thanks
Chris








Reply With Quote