Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Recently I decided to start developing a client/service based system using WCF a

ID: 644848 • Letter: R

Question

Recently I decided to start developing a client/service based system using WCF and a Duplex Channel (callbacks from Service to client). The clients will behave as "slaves", that is, they will only connect to server and from then on, only the server communicates with them. Eventually the server may request that the clients send "data streams" to him (frequent updates of new content/objects).

I want to make my software as loosely coupled as possible, but even reading about the different patterns for this, such as MVC and MVP, they don't seem to be designed to fulfill my specific requirements.

What is the best code architecture or pattern for my problem? Considering the technologies I am using?

Explanation / Answer

Patterns Abstract Details, not Vice Versa

The clients will behave as "slaves", that is, they will only connect to server and from then on, only the server communicates with them. Eventually the server may request that the clients send "data streams ... MVC and MVP, ... don't seem to be designed to fulfill my specific requirements."

I'm getting the feeling that you are trying to find a pattern that maps directly to your hardware/network setup. This is the antithesis of Object Oriented design patterns.

Software Systems are Organic Molecules of Patterns

As in chains of patterns. The high-level parts of M.V.P. are in turn their own complex Object Oriented structures as needed to represent nested abstract layers eventually getting to the servers. You're missing all the design between the top layer MVC concept and the server - server communication.

Prototyping

Perhaps you should take a prototype mindset. As Fred Brooks said in the Mythical Man Month