What is the benefit of developing the application as a windows service?

前端 未结 4 800
[愿得一人]
[愿得一人] 2021-01-03 22:31

I am going to develop an application which will process online data (comming through socket) and it does not need any user interaction.

I am thinking of a simple con

4条回答
  •  执念已碎
    2021-01-03 23:06

    I can't add anything to VonC's list but I would add that if you're using the usual Microsoft tools (VS & .net) it's easy to do both.

    I create a class library that contains all my application logic and a MyServer class which has .Start() and .Stop() methods. You can then create both a console app and winservice app that both reference this. E.g. the console App instantiates a new MyServer, calls Start, waits for a key press and calls Stop.

    I use the console app during development and the windows service for deployment.

提交回复
热议问题