How do I share common classes between windows forms and web applications using C#?
- by earthdog
In our environment we have multiple ERP servers plus data that are coming from multiple sources. I need to create a development roadmap for the coming years as it is obvious that side applications will be needed for many things.
The choice is that the development will occur with Microsoft technologies. This means that I will be building either web apps (MVC, web forms e.t.c) or standard windows forms applications.
The thing here is that I will be creating classes that will encapsulate the business logic that I want to apply to the different projects.
What I thought so far:
1) Create class libraries dlls containing the required logic
2) Reuse these libs in my apps.
But what about the web apps? Should I use the dlls directly or I should encapsulate them in web services and consume the web services in web apps? In general I would like to find out how should I build my strategy.