Terminology - Reflection

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DesCF

    #1

    Terminology - Reflection


    What exactly is Reflection ? I've looked at the definition in Help but I
    don't find it very helpful! I just stare at it blankly and can't quite
    seem to grasp its meaning conceptually. Reflection implies something
    reflected. Does anyone have a good cogent description of its meaning ?





    Des



    --
    Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
  • Lloyd Sheen

    #2
    Re: Terminology - Reflection


    "DesCF" <descf@aol.comw rote in message news:op.twbk16f bupgxg0@descsta r...
    >
    What exactly is Reflection ? I've looked at the definition in Help but I
    don't find it very helpful! I just stare at it blankly and can't quite
    seem to grasp its meaning conceptually. Reflection implies something
    reflected. Does anyone have a good cogent description of its meaning ?
    >
    You are on the right track. Reflection is a set of classes that allow you
    to examine the details of those classes. You can obtain all the information
    about properties, methods etc. There are also methods which allow you to
    create an object using reflection and call the methods of the object without
    having compiled code to access the object (actually there is compiled code
    but that code is the reflection code not the object code).

    It can be used to dynamically load assemblies for things like application
    plug-ins.

    To illustrate what reflection can do, I created a navigator control which
    shows the contents of a SQL Server. It uses the classes from SMO and
    reflection. There is only one entry which is required for SMO to work and
    that is a connection. After that I use reflection to enumerate the
    properties such that I can determine collections etc.

    Hope this helps
    Lloyd Sheen

    Comment

    • tommaso.gastaldi@uniroma1.it

      #3
      Re: Terminology - Reflection

      On 31 Lug, 10:11, DesCF <de...@aol.comw rote:
      What exactly is Reflection ? I've looked at the definition in Help but I
      don't find it very helpful! I just stare at it blankly and can't quite
      seem to grasp its meaning conceptually. Reflection implies something
      reflected. Does anyone have a good cogent description of its meaning ?
      >
      Des
      >
      --
      Using Opera's revolutionary e-mail client:http://www.opera.com/mail/
      I think this can be understood well, just like all the programming
      concepts, only by practice,
      especially on some meaningful project.

      I could tell you I could not live without reflection ! :-)))

      Anyway, to start with here is an excercise which will make you
      understand it better.


      Homework :-)
      ===========

      Take o write a program where you have a serializable class with a
      some
      <non serializedfield s and some "reference" type fields (not only
      value type fields).

      Create a dialog form to allow an user editing the field and the
      properties of an instance of this class
      with a "CANCEL" feature. In other words, if the user "cancels" the
      dialog, the object must be
      "restored" completely and perfectly to its original state [careful
      with non serialized reference values].

      Post here your solution for discussion and grade :-))

      Tommaso






      Comment

      • Armin Zingler

        #4
        Re: Terminology - Reflection

        "DesCF" <descf@aol.coms chrieb
        >
        What exactly is Reflection ? I've looked at the definition in Help
        but I don't find it very helpful! I just stare at it blankly and
        can't quite seem to grasp its meaning conceptually. Reflection
        implies something reflected. Does anyone have a good cogent
        description of its meaning ?

        Reflection means that the code can reflect about itself. Code can examine
        and get information about itself. This is possible by additionally having
        meta data in the assemblies that describes the code
        (classes/types/methods/parameters...).


        Armin

        Comment

        • DesCF

          #5
          Re: Terminology - Reflection

          This is the conceptually most intesting reply. It suggests that the
          correct understanding of the term Reflection is not 'reflection in a
          mirror' but reflection upon something (ones life for example) ?



          On Tue, 31 Jul 2007 11:54:59 +0100, Armin Zingler <az.nospam@free net.de>
          wrote:
          "DesCF" <descf@aol.coms chrieb
          >>
          >What exactly is Reflection ? I've looked at the definition in Help
          >but I don't find it very helpful! I just stare at it blankly and
          >can't quite seem to grasp its meaning conceptually. Reflection
          >implies something reflected. Does anyone have a good cogent
          >description of its meaning ?
          >
          >
          Reflection means that the code can reflect about itself. Code can
          examine and get information about itself. This is possible by
          additionally having meta data in the assemblies that describes the code
          (classes/types/methods/parameters...).
          >
          >
          Armin


          --
          Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

          Comment

          • Armin Zingler

            #6
            Re: Terminology - Reflection

            "DesCF" <descf@aol.coms chrieb
            This is the conceptually most intesting reply. It suggests that the
            correct understanding of the term Reflection is not 'reflection in a
            mirror' but reflection upon something (ones life for example) ?

            Hmmm...
            Isn't a mirror a mean to reflect yourself reflecting your own life. :-)


            Armin

            Comment

            Working...