View Single Post
  #5 (permalink)  
Old 04-13-2008, 08:52 AM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,336
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

I'm afraid that things don't work that way Robert. There is nothing that this library can do that could not be done more efficiently at design/compile time in the IDE should Erel choose to implement it.

This library is of use only at runtime. It takes advantage of a .NET feature called "reflection". Basically every .NET "assembly" (dll or exe) carries a description of what it includes in a set of "metadata" within itself. This metadata can be accessed by a program at runtime to find out what objects, methods and properties are included in the assembly. By this mean new objects from that assembly may be instantiated and the methods and properties of those existing and new objects accessed.

This can be loosely described as "dynamic programming" or "late binding" and it comes with a performance cost as rather than being tightly bound and efficiently pre-compiled this library has to search for each property and method before invoking it, and that invocation has to do further work to coerce the arguments of that method or property call into the correct type. This comes at quite a cost in performance so is better suited for one-off types of access such as defining a controls' style rather than e.g. incrementing a property in a loop.

The above barely touches on a large subject and the knowledgeable could quibble with the huge simplifications I've made in the above description, but in the context of the use of this library it is largely accurate.
Reply With Quote