473,406 Members | 2,343 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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/
Jul 31 '07 #1
5 1370

"DesCF" <de***@aol.comwrote in message news:op.twbk16fbupgxg0@descstar...
>
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

Jul 31 '07 #2
On 31 Lug, 10:11, DesCF <de...@aol.comwrote:
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 serializedfields 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


Jul 31 '07 #3
"DesCF" <de***@aol.comschrieb
>
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

Jul 31 '07 #4
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*******@freenet.de>
wrote:
"DesCF" <de***@aol.comschrieb
>>
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/
Jul 31 '07 #5
"DesCF" <de***@aol.comschrieb
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
Jul 31 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: A. Wiebenga | last post by:
Hi all! I am a student at the Hogeschool van Arnhem en Nijmegen in Holland. I am currently involved in a research project regarding Reflection. Purpose of the research project is to document...
4
by: Dave | last post by:
Hello all, Consider this template: template <typename T> void foo(T bar) {...} Here are three ways to instantiate this: 1.
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
0
by: Shawn Hogan | last post by:
Hi everyone, I've been trying to execute a control's private event code via reflection from another class with the goal of potentially doing some unit testing. The examples below are trying to...
331
by: Xah Lee | last post by:
http://xahlee.org/emacs/modernization.html ] The Modernization of Emacs ---------------------------------------- THE PROBLEM Emacs is a great editor. It is perhaps the most powerful and...
9
by: Kuberan Naganathan | last post by:
Hello all Does anyone know of a good way to use reflection in c++? I don't mean simply using rtti or dynamic casting. I'm talking about java/c# style reflection where an actual instance of...
97
by: xahlee | last post by:
I'd like to introduce a blog post by Stephen Wolfram, on the design process of Mathematica. In particular, he touches on the importance of naming of functions. • Ten Thousand Hours of Design...
12
by: MartinRinehart | last post by:
I'm writing Python as if it were strongly typed, never recycling a name to hold a type other than the original type. Is this good software engineering practice, or am I missing something...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.