Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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?

It really end up depending on how much you will need to scale.

I would say that you should start with simply reusing the libraries in your web applications directly. This has least cost in terms of speed of development, simplicity and low IO overhead (speaking about network traffic), as well as having the benefit of running in-process.

Using web services is an expensive proposition (extra hardware, maintenance costs, extra software layer, IO overheads etc...) and will be slower than going in-proc.

share|improve this answer
I need to get to know both more about c# and common class libraries AND asp web services. So to try both things at the same time is quite dangerous. After all i do care about being correct in my strategy. After knowledge comes i will advance to more efficient use of the theory..Thanks! – earthdog Apr 4 '12 at 15:17
@earthdog - I am not suggesting doing both. I am saying to use the libraries directly in your web application, not using web services at all at this stage. YAGNI. – Oded Apr 4 '12 at 15:18
yeap i got my friend, i mentioned web services because at this point (at least for some simpl ethings) i need to have web services to get some data from other countries, in order to lighten my ETL needs....For sure the first steps will be to simple reuse the dlls.... – earthdog Apr 4 '12 at 15:21

This sounds like the ideal scenario for a Service Oriented Architecture using web services.

Encapsulate any discrete units of business knowledge, functionality that could be shared between one or more services, and allow other apps to use them.

This centralising of functionality means all apps can be updated if the central business functionality changes in some way.

If some change in the interface is to take place, you have to be aware that all consuming apps will be affected, but there are ways around this with versioning etc.

share|improve this answer
I m ade a comment above but your answer at least shows me that i am not far from the best practices. Indeed having different ERP servers (one at each country), and an ERP that is not web enabled , shows the way to build ALSO web services that i can use to consume enterprise data when needed. I think for the time being i will concentrate n building common class libraries that are sound and clear , and then maybe i will try to use them in simple web services.... – earthdog Apr 4 '12 at 15:20
Oded's answer is spot on too, don't run before you can walk! – ozz Apr 4 '12 at 15:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.