Creating A Loosely-Coupled / Scalable software architecture

前端 未结 4 901
[愿得一人]
[愿得一人] 2021-01-02 19:38

I\'ve been researching this for weeks. I\'m currently designing a loosely-coupled architecture design using n-tier (3-layered) method and factory design ap

4条回答
  •  不知归路
    2021-01-02 20:20

    this question came out too broad, there is not a single best for all approach.

    Personally basing extension points in adding classes and inheritance without a real case that strongly benefits from it is something I've seen ending in great complexity all around.

    Its very hard to tell with the amount of info provided, but consider the alternative of using a more configuration based approach / don't mean config files, just configurations that are passed into the system.

    You can have a set of basic rules, and a default configuration that applies a set of those rules to a client. If you are doing it in code, when adding a client's config you may just say .AddClient("ClientA"), and it'll use only default rules.

    Alternatively you can specify the rules that apply to the client's processes when adding the client, which can involve setting different rules or even different configuration values for those.

    ClientA can have a need that's not included in the basic rules, then a custom/code business rule can be applied to the client process.

    I wouldn't try to make the jump all the way to such a generic framework. Instead I'd keep the above focused on the specific processes and exposing extension points for those. As you work in the solution, common patterns should emerge and then if appropriate (a real benefit is seen) you can refactor it to something more general.

提交回复
热议问题