开发者

Design pattern for Fat Client - Thin Client to use Common code?

Windows-based client application and web-client application(consuming the same code which windows-client uses) what is the preferable pattern for this scenario? Is it ok to have the code in the common place where both the projects and refer it as dll i.e one which is a windows app and other which is going c开发者_如何学编程onsume the same code which windows client will be exposing.


This is the classic reason behind an n-tier architecture and for the most part, most design patterns like MVC or any other design that separates the UI ( view ) from the application logic.

As to sharing code, most definitely. Assuming you are using Visual Studio in my terminology, I would have (at least) one project specifically for the fat client, one for the web client, then multiple projects for your DLLs ( by making multiple DLLs, it enables easier code re-use if you just need a piece here and there ). Then have all your DLLs output to the same location using a post build event, so when you recompile either of your apps, they are always most current.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜