Hi everyone i'm pretty new to the tiered development process. I'm currently developing an app and i have some basic questions regarding the best practices / architectural questions with todays technology. I'm going to be using WCF as the service layer. Note i'm trying to decouple things as much as possible. I don't want anything in the upper tiers to have to know about anything in the lower tiers which is one of the reasons i don't like LINQ TO SQL or the entity framework.
1) What is the best way to pass data between the tiers? I know either a dataset or a datatable would be easy but i wouldn't think passing this bloated data structure between tiers would be the best solution. Also debugging would be harder if the datatables / datasets were large. Would maybe an array of POCO objects be the best solution or is there a better way?
2) The next question is a little trickier. A lot of applications will have a bunch of different views of the data. You might have multiple reports, a variety of datagrids, and maybe a chart or two. How do you go about designing your data tier for this? Do you just design a a "Get" type function for each table and then try to combine them into useful views for say a grid or a report in your buisness layer or do you have a specialized function for each view you need in the buisness layer.
To be honest i don't like either solution. If you decide on specialized logic per view then you would need to create a POCO object (assuming your going to be returning an array of POCO objects) per view. If you decide later you need to add more columns to one of the view then you would be breaking the existing code (because your changing the interface on the POCO). If you decide to return a view of each table and try to combine it in the buisness layer than that could get REALLY messy. TSQL has joins for a reason :). Also you could possibly be returning a lot more data then you need depending on your design which would be inefficient.
I have some more questions but i will save that to later. I don't want this post to become to large :)
Ncage