Wrox Programmer Forums
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 14th, 2008, 06:39 PM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Design issue

I am working on designing a web application A and was having some difficulty with the design. Any help is greatly appreciated. Below is my scenario:

Web Application A exists today. And it uses data from Database A.
One page in this web application A should display a conrtol that has data from another application(B) and also a link on the page will lead the user to an external website B.
I am working to develop this new webapplication B which will display data from a Database B.

For the webapplication B, I have an object to encapsulate the Datamodel required for B. Say it is B.DataObjects. I am also building a user control to display the data obtained from B.DataObjects.

Now this user control needs to be embeded in my webapplication A. How can i design this such that if I make changes to B.DataObjects doesnot force Application A to be recompiled and redeployed? From what I understand since I am embedding user control B in my application A, the B.DataObjects.dll will be referenced by app A and hence any changes to my B.DataObjects causes a recompile of A. How can I avoid this recompile?
 
Old February 14th, 2008, 07:52 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Typical project references would require a recompile. In order to remove this dependency you could load the assembly at runtime. This should decouple the reference, but it adds a bit of complication to development. I haven't used this approach myself, so I can't provide much in the way of details or code samples. Try this search result:

    http://www.google.com/search?q=load+assembly+runtime

As I mentioned, I haven't used this technique, mainly because rebuild projects is not that complicated. What concerns do you have about rebuilding dependent projects that is leading you to desire this less coupled approach?

-Peter
 
Old February 15th, 2008, 03:29 PM
Registered User
 
Join Date: Feb 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Peter for the response.
The reason why i dont want to enforce a recompile of dependent projects is as follows:

Currently Web Application A doesnt have frequent releases. By introducing the user control of B in thise application, since i know that app B's dataobjects will be having more releases, i dont want to force a release of app A for every release of app B.

Does that make sense? In my understanding, for changes to any .dll that is in ur projects bin directory, ur project would need to be recompiled irrespective of the number of hops to the actual reference(ex, app X references app y which references app Z. So now APP X has appX.dll,appy.dll and appz.dll in it bin directory. CHange to app Z would cause app X to also be recomipled). Is that correct?
 
Old February 16th, 2008, 01:30 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Yes, typically. Any recompile of a dependent assembly will result in a cascading recompile of assemblies up the dependency chain.

by the nature of your update, I could argue that a change to any referenced assembly constitutes a change to the dependent ones and thus the application as a whole. How do you know that the change won't break your dependent assemblies unless you check it out by recompiling all assemblies that depend on the changed one?

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Design issue DeborahP Access 1 March 24th, 2007 08:57 AM
Design issue debuajm Reporting Services 0 April 24th, 2006 08:11 AM
Java Design issue with UML and Design Patterns the_logical_way Apache Tomcat 0 May 31st, 2004 04:02 AM
design issue(clarification) eyan C# 0 February 19th, 2004 12:42 PM
PHP/Design issue wolftrap1 BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 February 4th, 2004 09:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.