Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / June 2004

Tip: Looking for answers? Try searching our database.

Use 'new' rather than Activator.CreateInstance for remote objects activation?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hazz - 23 Jun 2004 21:06 GMT
I just read in a coding standard to "Avoid using Activator.GetObject() and
Activator.CreateInstance() for remote objects activation. Use new instead."

Since I have just been instructed to use Activator.CreateInstance() rather
than 'new' on a project,  I would like to know the consequences of doing so.

Thanks,
-Greg
Sunny - 23 Jun 2004 21:17 GMT
Hi,
can you provide a link?

Thanks

> I just read in a coding standard to "Avoid using Activator.GetObject() and
> Activator.CreateInstance() for remote objects activation. Use new instead."
[quoted text clipped - 4 lines]
> Thanks,
> -Greg
Allen Anderson - 24 Jun 2004 01:29 GMT
I would have to strongly disagree with that.  Using GetObject and
CreateInstance mean you aren't having to ship some form of the source
dll but rather just a proxy.  I agree with Sunny in that, who would
say something like that?  You have a link?

Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com

>I just read in a coding standard to "Avoid using Activator.GetObject() and
>Activator.CreateInstance() for remote objects activation. Use new instead."
[quoted text clipped - 4 lines]
>Thanks,
>-Greg
Richard Bell - 24 Jun 2004 11:05 GMT
> I would have to strongly disagree with that.  Using GetObject and
> CreateInstance mean you aren't having to ship some form of the source
> dll but rather just a proxy.  I agree with Sunny in that, who would
> say something like that?  You have a link?

Just out of curiosity, why do you have to distribute a 'source' (or do you
mean implementation?) dll?
Sunny - 24 Jun 2004 15:27 GMT
Hi Richard,
you know what he means ;-)

I know that you prefer soapsuds-ed metainfo, so the you can use "new",
but still Allen's statement is valid, in terms, that if you ship the
implementation, it's not too hard to get the source :)

Sunny

> > I would have to strongly disagree with that.  Using GetObject and
> > CreateInstance mean you aren't having to ship some form of the source
[quoted text clipped - 3 lines]
> Just out of curiosity, why do you have to distribute a 'source' (or do you
> mean implementation?) dll?
Allen Anderson - 24 Jun 2004 16:09 GMT
I meant implementation of course.

>> I would have to strongly disagree with that.  Using GetObject and
>> CreateInstance mean you aren't having to ship some form of the source
[quoted text clipped - 3 lines]
>Just out of curiosity, why do you have to distribute a 'source' (or do you
>mean implementation?) dll?
Richard Bell - 24 Jun 2004 16:50 GMT
But the point is, you do not /*have*/ to distribute 'implementation'
assemblies in either case. Therefore it is not a reason for choosing one
method of instantiating objects over another.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.