Solved

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

Posted on 2008-10-17
6
258 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction (All good things must come to an end (http://en.wikipedia.org/wiki/All_Good_Things...))The original MySQL API (http://php.net/manual/en/book.mysql.php) has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all current…
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 …
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

910 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

19 Experts available now in Live!

Get 1:1 Help Now