AnswerBun.com

client-server API architecture

Software Engineering Asked by BoJl4apa on September 6, 2020

Premise:

Language/Framework: C# / .NET + Core

I provide a desktop, multi-platform client-server API for HW control related purposes. The "Server" is communicating with multiple HW components. The "Client" is used to develop desktop applications that can communicate with the HW, using the "Server" as a proxy and for synchronization purposes. system topology

Currently, both client and server are built to dll assemblies, and the UI for both is developed separately. This produces 4 files: 2 dll’s, and 2 exe’s (Client and Server run in different processes)

There are shared resources (as "links") in the code-base: client-server comms protocol, timeouts, etc.

The question: is it architecturally correct to "merge" the client and server API’s into a single assembly?

This will provide many benefits: single dll for development, maintenance, and deployment. The only drawback I see, is violating "decoupling". On the other hand though, these 2 components are strongly coupled, as they share comms interface and other necessary information.

Thanks

One Answer

is it architecturally correct to "merge" the client and server API's into a single assembly?

I wouldn't do that.

Having interfaces and necessary information in common (by which I'm assuming communication protocol and data transfer objects) does not mean that clients and server are strongly coupled, unless they share the code that does the logic or makes the functionality happen.

Having clients and server in different assemblies adds a layer of separation that forces you to keep the functionality decoupled and makes you think deeper about where certain code should reside, inside the client or inside the server. If you accidentally couple server and client too much, assemblies will no longer compile independently.

But if you deploy them together into one assembly, it will be easy to end up with too much coupled code without knowing it, simply because everything sits together and compiles together. And when you need to add another client or separate an existing one further, you will have a harder time decoupling them at that point, than if you kept things separated from the beginning.

There are good things that come out from keeping code loosely coupled, separating responsibilities and separating concerns, which you can't really substitute with "but now my build creates one dll file instead of four".

Answered by Bogdan on September 6, 2020

Add your own answers!

Related Questions

Handling Networking on Android

1  Asked on January 31, 2021 by derek

       

How to handle API token(s) that expires after time

1  Asked on January 19, 2021 by inx51

     

Single vs Multiple Technology Stacks

1  Asked on January 6, 2021 by daniel-voina

   

Why Don’t We Add `Attributes` To Use Case Diagrams?

1  Asked on January 3, 2021 by saif-ul-islam

   

Name for unnecessary transcoding antipattern?

1  Asked on December 30, 2020 by bart-robinson

 

What’s the opposite of primitive?

2  Asked on December 24, 2020 by dwjohnston

 

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP