According to some of the books I have been reading, like Advanced C# Remoting by Ingo R., it is considered best practice to keep your data access implementation away from the client.
That being said, in order for a developer to create an instance of a typed object on the client, the type definition (i.e. meta data) needs to be on the client. There should also be some sort of contract between the client and the server side implementation that ensures that the client wont be attempting to invoke methods that are not on the server anymore, i.e. a public interface that defines the server side methods.
My solutions typically follow these guidelines, there is a presentation layer, a facade layer, and a framework layer. The framework layer consists of the llblgen entities and the database specific objects, or sometimes I have a selfservicing framework. The facade typically always consists of a mix of fine grained methods and coarse/broad methods. The fine grained methods are chatty methods, like "get this data by some key", etc. and the broader methods are major things like "here is a group of invoices and all of their associated invoice details, now go do updates and inserts based on the internal business rules and implementation."
So now that we know how I write apps, and what the "best practices" are, we arrive at my question. In my opinion, I can use the adapter pattern and publish the database generic assembly to the client, because it doesnt contain any implementation for data access operations. I also beleive that I can wrap facade objects into objects that derive from MarshalByRefObject and implement my public interfaces. I should only need to distribute the public interfaces, the database generic assembly, and the LLBLGen.ORMSupport assemblies to the client.
Does my opinion on how I should implement remoting seem to be normal or overly complicated? Here is the flip side, I could just skip remoting all together and use COM+ / Enterprise Services, but that really is remoting, and in my personal experiences, COM+ proxy deployment can be a nightmare.
Any opinions on this topic would be greatly appreciated.
Cheers