سؤال

I'm currently working on my own open source project.

There are two parts to it at the moment, a .NET core web API and an Angular client side app.

I would like to get your views on installation/setup for my users. What I have at the moment is an install endpoint in the API itself and an install component/page on the angular app.

This all works well but after giving it more thought it doesn't feel right. It feels I've ended up coupling the app and API when they should be completely separate and independent of each other. The client app should not really have to be concerned with the installation of the API.

Would it be better to build a CLI responsible for installing/upgrade both the API and APP that can be downloaded and run separately?

هل كانت مفيدة؟

المحلول

While SRP (Single Responsibility Principle) is useful, and probably motivating your desire to split the functionality up, the end goal is a good User Experience.

So ask yourself what is best for your user base?

  • Does the user want an installer?
  • Does the user want the client to figure out what needs to happen and do it?
  • Does the user want a portable application? (ie on a flashdrive/not a system directory)
  • Does the user want the API to self-update, and proved an updated client?

Whichever is most relevant is how you should be engineering your solution. If several are needed then you'll need enough flexibility to provide for them.

That being said, underneath the hood I would apply the SRP and keep the install feature set as a separate module in both the client and the API. This way should you choose to offer a separate installer, etc... you can easily re-bundle those modules, and offer a consistent UI/Feature set across installation methods. I would also be approaching the rest of the UI and API in this manner, treating the actual client/server each as a bundle of modules.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى softwareengineering.stackexchange
scroll top