Yep from a programming perspective there's probably more complication; but from a user perspective nothing beats type or saving some persistent intelligent name for locating objects; we used monikers on a large scale telecoms systems that allowed engineers to enter tower location by name and kit within the tower by number. The engineers dealt naturally with this in there everyday job.
-----Original Message----- From: Jade Burton [mailto:[EMAIL PROTECTED] Sent: Wednesday, 25 June 2003 9:53 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Constructing Objects From Strings in dotnet But they [Monikers] didn't catch on properly because they were so incredibly complicated! Programmers often asked themselves: why not just directly use a file path or a URL - or a table? Why do I have to perform 27 steps just to locate an object? Truth be known, I've just implemented a set of polymorphic Moniker objects in a current distributed project of mine and I'm beginning to realise that it actually hasn't simplified my design pattern much at all.. (Quite the opposite, in fact.) But despite this, I think Monikers (implemented in a programmer-accessible fashion) are a natural part of any system where things need to be elegantly located and accessed - such as .NET remoting. Jade -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED] Behalf Of Robert Rolls Sent: Wednesday, 25 June 2003 9:25 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Constructing Objects From Strings in dotnet Too true I believe Monikers were one of the most under-utilised facets of COM. We've written interfaces similar to what monikers had but support like this in .Net should have been there from the start. -----Original Message----- From: Doug Ransom [mailto:[EMAIL PROTECTED] Sent: Tuesday, 24 June 2003 11:14 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Constructing Objects From Strings in dotnet I think the approach I will take will follow the com moniker pattern. From a string like "uri![constructor-string]" I will just create a factory object with the object uri and then have it create a new instance from the constructor string. This is somewhat oversimplified compared to the COM moniker, but I can deal with it for now. I have no immediate need for anything other than simple naming of ojbects with constructor strings. It would be nice if there were the equivilent of the DCOM moniker interfaces for parsing object names, composing monikers, and creating objects. I miss IMoniker. Doug > -----Original Message----- > From: Jérôme Grelier [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 12:54 PM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Constructing Objects From Strings in > dotnet > > > What about one of these method of Activator: > > public static ObjectHandle CreateInstance( > string assemblyName, > string typeName, > object[] activationAttributes > ); > > or > > public static object CreateInstance( > Type type, > object[] args > ); > > where the array let you pass arguments to the constructor of > the object you > want to instantiate. > > I you use the second one, you can first get the Type by > reflection based on > the name of the class expressed as a string (with the method > GetType of the > Assembly class). > > Would that be useful for what you want to do? > > Jerome > > > -----Message d'origine----- > > De : Moderated discussion of advanced .NET topics. [mailto:ADVANCED- > > [EMAIL PROTECTED] De la part de Doug Ransom > > Envoyé : mardi 17 juin 2003 00:03 > > À : [EMAIL PROTECTED] > > Objet : [ADVANCED-DOTNET] Constructing Objects From Strings > in dotnet > > > > The COM platform provided the moniker mechanism to create > objects in a > > certain fashion and initialize those objects a certain way. > This was > > quite convenient when representing the object specification > as a string. > > > > If I want a user to be able to configure a .net object > construction, how > > would I go about this. > > > > For example the string "object:foo.bar!r=6" is equivelent > to the C# code: > > > > int r=6; > > new foo.bar(r); > > > > and I would like to create or get a reference to the object > by calling > > something analagous to > > GetObject("object:foo.bar!r=6"); > > > > > > Creating the class dynamically doesn't seem to be a problem with the > > Activator methods, but what can be used to turn the > intializer string into > > constructor arguments? > > > > > > > > Doug Ransom > > Software Interoperability Architect > > Power Measurement > > 2195 Keating X Road > > Saanichton, BC, Canada V8M 2A5 > > Tel: 1-(250) 652-7100 > > E-Mail: <mailto:[EMAIL PROTECTED]> > > Website: <http://www.pwrm.com/> > > > > ION(r) smart energy everywhere(tm) > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.