|
|
First Question:
Unless the author of the .NET app has added support for Automation it will not have an automation model. If the application does have an automation model you would likely have to get the doc's from the authoring company.
Second Question:
I don't know the answer to this. I would assume there has to be some way.
|
|
|
|
|
|
tlbexp.exe
doc link here[^].
In short, the public types exposed by your assembly are automatically reexposed as a standard tlb to play with.
(regasm.exe both exports a type library and registers it, in one call).
|
|
|
|
|
Hi Thomas,
Thomas George wrote:
When functionality is exposed from a .NET app, are there methods for a non-.NET app (C++ or VB) access it?
This is very much possible. .net classes can be exposed as Components.
Once you have the assembly(dll) written, you need to make sure a couple of things.
There are public methods in your class, only these methods are visible to COM.
You will have to use a tool called regasm to register the dll with the registry so that the COM clients can know about your component.
Have a look at this thread
http://www.codeproject.com/script/comments/forums.asp?msg=360476&forumid=1649#xx360476xx[^]
Regards
Kannan
|
|
|
|
|
Hi All
Need a very basic help!
I need to insert double quotes (") in a string like
sXML = "<dataitems object="patient" ...="">
in the main node itself. How to write a c# stmt for this? I tried with various combinations, but without sucesss...
sXML = "
|
|
|
|
|
code project error !!
it failed to show the xml tags written by mine !!!
the items are dataitems object="patient"
|
|
|
|
|
No, you didn't spot the 'show page as is ( no HTML)' option....
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Try this:
string s= "\"";
Console.WriteLine(s);
Console.ReadLine();
Cheers,
Simon
"From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.
|
|
|
|
|
One of the most important disadvantages of .NET Framework is youth of it. Hence there is not enough open source complementary classes and sources. One of the most important complementary frameworks which .NET needs to have is an OR Mapping tool for mapping persistence data in to classes. Reflection and Attributes in .NET framework make it easier to write such a framework (I’ve written a simple OR mapping framework and it only take 3,000 lines of code!!). Another important issue is distributing persistent objects in multi tire programs. I think it is a good idea to write a flexible framework for publishing persistent data in Object oriented way. Lots of OR mapping tools are available for java (like hibernate and OJB). Hence, I lunched a project in sourceForge for writing such an OR mapping in C# with distribution and remoting support and named the project dotDORM(Distributed OR Mapping). Although the project is not approved , yet I call for arm from any experienced C# developer’s to contribute in this project. If any one wants to know more about the project send an email to me. My email address is Behrang_j@yahoo.co.uk
Regards
Behrang
|
|
|
|
|
behrang Javaaherian wrote:
there is not enough open source complementary classes and sources
Run a search for "csharp" on SourceForge and you'll see that there are many.
Cheers,
Simon
"From now on, if rogue states want to buy weapons of mass destruction, they're going to have to go on eBay," Mr. Bezos said.
|
|
|
|
|
If you compare the number of Java project with C# Projects it is Obvious. Anyway it is not important that how much Open source projects are now lunch. The C# and .NET doesn't have Object Oriented approach for Persistent data and I called for arm.
Behrang
|
|
|
|
|
forgive my ignorance, but do you have some pointers on what is OR Mapping.
I wanted to know more on this.
Cheers
Kannan
|
|
|
|
|
Suppose you want to write an Adress Directory Application. In Object Oriented environment you have a Class called Party. All the information that both companies and persons have goes here. and you have to class Person and Company derived from party that have their own information. in Database you can have two diferrent aproaches:
1. you have a Party table which have all the field that person and company requires then when you have a person , fields which are for company are set to null.
2. you have a Party table contains only common field and another Person and Company tables for storing type dependent information on them ( a one to one relation between party and these two table also required)
in any of these aproaches the object model are the same but the senario in database completely differs and this will influence the code.
OR mapping means mapping between objects in memory and persistence places ( like Relational Database System). We have a object graph in memory and we want to map this object graph into Database and vice versa we have a some database row and want to create Object graph from it!
a good OR mapping completely seperate the Persistecy of objects from the business logics.
Suppose the example agian. if we have a good OR Mapping framework we can simple write the code bellow :
Company comp = Company.getCompany();
comp.Name = "Microsoft";
Person pers = Person.getPerson();
pers.Name = "Bill";
pers.Family = "Gates";
pers.Company = comp;
PersistentLayer.AddForSave(pers);
PersistentLayer.AddForSave(comp);
PersistentLayer.Save();
so the code is not filled with any SELECT or other Sql Commands. All the Sql commands are in one place and PersitentLayer Engine use some logic to create them.
I hope it was useful for you.
Regards
Behrang
|
|
|
|
|
|
Hi leppie,
This is the way that most of the developers do now. this means having some functions in each class for loading from database. but in this the SQL Commands is in all codes and also we have lots of redundant code in each class. Also another problem is with relations. For example a Person may have a property Called Comapany which point to the company which it works! in this way it is hard to figure out this issue. Another problem is that an object may have lots of property which each have Different Persistent places. For example in our current project we are developing an orderprocessing program. The Adress Directory is currently in Lutos notes. so for example we have a Person object the name , family , email adress, etc are comes from LDAP Server in lutos notes. other business dependent properties like Roles which it accepts are come from RDMS.
An OR Mapping Tool use some Descriptor files ( mostly in XML format for describe an object).
Regards
Behrang
|
|
|
|
|
|
For tackle into problem which should delegates all the reffrences into our engine to load from Database. suppose a Person object again it has some properties : (name , family, etc). The key feature here is to capture access to name property and delegate ( means route and have nothing with delegates in C#) into our engine. this is possible in languages like Objective-C ( it is another great programming language from Apple). in C# we should use another way. The way that I used it using Keypath Access instead of Property. means that for example for access name of a person i use person["Name"] instead of person.Name. In this way all the access goes through an indexer function. the indexer function parse the string and find appropiate operation from Descriptor files. if I want to use properties either i should write My own wrapper functions like this
string Name
{
get {return this["Name"];}
set {this["Name"] = value;}
}
I wrote a simple OR Mapping tools in C# but the code is not clean enuogh to understood and it needs refactoring. if anyone wants the code please send an email to me for code.
Regards
Behrang
|
|
|
|
|
|
The Idea i used in my code is like the idea which the EO developer team done in Enterprise Objects. I assumed each table in database have CLASS column. in this class I hold the class of the object which should be instansiated. all the objects are derived from a base class Called Entity. The Entity class is the core class for my framework. I get Entity Objects from another SingleTone class called EntityManager. The code would be like this:
Entity en = EntityManager.getEntity("Party",new EntityKey(123));
this means loading entity which the parent of it is Partey and the primary key is 123 .
The EntityKey is another object. I used this object to be able to have none-numeric primary keys.
The FrameWork First Load the XML File which describe the Party. (Party.XML for example) this Descriptor shows the Primarykey field and also Table name of the Party ( For exmaple pk , Party)
then a Query command for getting the class the sql command is : "SELECT CLASS FROM PARTY WHERE pk=123".
The Query will return For example PERS. the program will create the appropiate class name (Forexample Model.Person) this class should be inherited from Entity. now the Framework loads the person.Xml , find the properties from descriptor and create appropiate SQL Command for loading other information of the Person. The Simple attribute have no problem. The problem is with relations. Suppose a Person have a relation to another Object in another table. The Framework can work in to different way :
Load it when the Parent Object loaded ( Early)
Load when access to it required (Lazy)
the lazy loading is done through proxy objects ( refer to design pattern book to see what is Proxy Object).
Regards
Behrang
|
|
|
|
|
|
|
It is a very good fantastic the Framework would be able to create DDL ( SQL Command for creating tables) file for xml descriptors but the framework is not able to do it.
Regards
Behrang
|
|
|
|
|
I have been doing some looking into OR solutions(open/free & commercial) and found an open source project that is still in the planning stages that looks very promising. So you might want to take a look at it instead of starting another project. From reading some of the discussions it looks like they are going to build something similare to Hibernate.
http://opf.sourceforge.net/[^]
If anybody would like I can post a list of OR mappers for .NET that I have found.
Mike
|
|
|
|
|
thanx Mike,
I have downloaded the opf before. The opf is not design well. Also it has nothing for support Distribution. I worked with lots of OR Mapping tools. The best tool is Cocobase ( $6000 Per developer , Per project !!!!) and the Entriprise Objects (EO)(Part of Web Objects from Apple ) is very good product. so I prefer the same Approach as apple developer's team done in EO.
Regards
Behrang
|
|
|
|