Solved

Advise needed: Asp.Net app architecture (centralising assemblies)

Posted on 2008-10-17
6
257 Views
Last Modified: 2013-12-17
Hello all,

I'd really appreciate any advice from anyone experienced in the field of online application architecture (with Asp.Net apps) as Im a bit stumped on which way to go...

First, some background: We've developed an Asp.Net application that serves many clients. When a client purchases the application, they get their own website set-up with bespoke files (their own web.config, master pages, css etc). In an attempt to centralize this application, we have a directory of shared files 'CoreCode'. Each client website gets a virtual directory that will point to this shared folder.

Our method works well for centralizing the UI layer. The problem is in centralising the business logic layer for our application (app.BLL), which is contained in a separate project. We are constantly developing this application, adding new features and fixing bugs. At the moment, every time we make updates the BLL, we have to manually copy the .dll assembly file to the bin directory of every clients website, we 40+ clients so far and we make updates every week, as you can imagine, this is getting annoying. It has to be done of course because the shared CoreCode files often access the new updates to the BLL.

I need to figure out a better way of doing this, the problem Im having is that none of my options seem very viable...

The obvious solution, which Im sure youre thinking of now, is to put the BLL assembly in the GAC. There are some initial problems here in that the BLL references third party assemblies that are not strongly named so I get an error when I try and add the BLL to the GAC. I could probably get round this one though. The other problem is that Ill have to add a strongly named reference (with version) in the web.config of every client website, so wont that mean that every week when we update the BLL, Ill have to go through every web.config and update that reference?

Another solution would be to somehow have a shared bin folder (via a symbolic link of something). What are the ramifications of doing this? I can imagine wed end up with a pretty huge bin folder somewhere... Is this even possible?

Failing the above, my backup plan is to write a windows app to physically replace the assembly in all the bin files. Id really like to avoid this if at all possible.
Can anyone offer any advice on which route to take here? Any help will be greatly appreciated.

Regards,

Chris.

0
Comment
Question by:senior_internet
  • 3
  • 3
6 Comments
 
LVL 7

Expert Comment

by:keustermans
ID: 22755832
I think the best way to do this is to expose your business logic through a webservice or services.  This will resolve your issues as you clients will have a reference to the webservice or services and any update to the BLL will only be published to the webservices folder. which will automatically be available to the clients.

Hope that this helps

0
 
LVL 3

Author Comment

by:senior_internet
ID: 22756041
keustermans,

Thanks for your reply. That's certainly worth considering, the only problem there is that it would require a huge amount of redevelopment :-/. My knowledge of web services are a rekatively weak, would there be a performance hit with the site having to make calls to a service rather than an assembly? Performance is quite a high priority for us.

Chris.
0
 
LVL 7

Expert Comment

by:keustermans
ID: 22757715
A couple of years back I worked for an onlinegaming company and all of our business logic was exposed through webservices.  We are talking here anythign from 5000 to 60 000 or more concurrent users worldwide and we got very good performance.  Your redevelopment should not be excessive if your business object are loosely coupled to your application. All you would have to do is to expose your public methods in your BLL through a webservice and a facade with exactly the same method names, then you only have to add a web refrence and a facade to call the webmethods to your web app and everything should still be functional.  You might have to refactor your using statements though.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 7

Expert Comment

by:keustermans
ID: 22757849
What you need to do is to create a webservice that exposes all the public methods in your BLL via webmethods. ie if you have a public method in your business method with the following signature

public object DoSomething(string makeAnObject) {...}
then you would have the following in your webservice

[WebMethod(Description="I make an Object")]
public object DoSomething(string makeAnObject){...}

in the facade you have a public method
public object DoSomething(string makeAnObject) {call webmethod DoSomething("Car") deserialize and return the object}

you only requirement is that when you wish to return objects from the webmethod then they need to be serializable so that you can do Serialization and Deserialization as required.

0
 
LVL 3

Accepted Solution

by:
senior_internet earned 0 total points
ID: 22865539
I actually solved this by creating a NTFS junction in each app that points to a central folder and used assembliy probing to point the CLR to them.

Full description here: http://weblogs.asp.net/chrismoseley/archive/2008/10/28/shared-assemblies-without-the-gac.aspx

0
 
LVL 3

Author Comment

by:senior_internet
ID: 22865557
keustermans,

Thanks for your help. In the end I had to find another solution as exposing the BLL methods as services would have taken too much time, resources and testing (the project in question wasn't developed using TDD).

Thanks,

CM.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now