CSC/ECE 517 Fall 2009/wiki2 8 RP: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
Line 17: Line 17:
=== '''Reflection''' ===
=== '''Reflection''' ===


Reflection is the process of converting a pro grammatically expressed value into a component of interpreter state [http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/sobel/rop.html]. In the case of usual programs the information about itself (i.e the program) is lost as soon as it finishes compilation ,but in Reflection the program (object) needs to have information about its structures. This is done by storing it in the form of metadata.
Reflection is the process of converting a pro grammatically expressed value into a component of interpreter state [http://www2.parc.com/csl/groups/sda/projects/reflection96/docs/sobel/rop.html]. In the case of usual programs the information about itself (i.e the program) is lost as soon as it finishes compilation ,but in Reflection the program (object) needs to have information about its structures. This is done by storing it in the form of metadata[http://en.wikipedia.org/wiki/Metadata].


There are two types of reflection based on its dynamic nature.Few programs support reflection during compilation. They are called as compile time or static reflection. Runtime reflections are those which are carried on during runtime and its the usual form of reflections.
There are two types of reflection based on its dynamic nature.Few programs support reflection during compilation. They are called as compile time or static reflection. Runtime reflections are those which are carried on during runtime and its the usual form of reflections.
Line 27: Line 27:
  puts 12.kind_of?
  puts 12.kind_of?


The above code dynamically finds out what kind is 12 ? It returns the value integer. Thus reflection is enabled in ruby code to carry out operations during runtime with metaprogramming enabled.
The above code dynamically finds out what kind is 12 ? It returns the value integer. Thus reflection is enabled in ruby code to carry out operations during runtime with metaprogramming[http://en.wikipedia.org/wiki/Metaprogramming] enabled.

Revision as of 20:53, 7 October 2009

Reflection Oriented Programming


Definition

Reflection is a process of reasoning about and acting up on by itself [1]. Throwing more clarity we can presume reflection as a computer code which can be dynamically modified in the process of execution. The dynamic modification depends on the code features and its run time behavior.A system which exhibits such reflective behavior is called as reflection oriented system.


Overview

This Article throws light up on what Reflection Oriented language is about. It deals with the need for such dynamic aspect and how it is useful in satisfying the practical needs.Further it highlights the research work that is carried out in this area and scope for future improvements.


Reflection oriented programming – Insights

Reflection

Reflection is the process of converting a pro grammatically expressed value into a component of interpreter state [2]. In the case of usual programs the information about itself (i.e the program) is lost as soon as it finishes compilation ,but in Reflection the program (object) needs to have information about its structures. This is done by storing it in the form of metadata[3].

There are two types of reflection based on its dynamic nature.Few programs support reflection during compilation. They are called as compile time or static reflection. Runtime reflections are those which are carried on during runtime and its the usual form of reflections.

Example of Reflections:

A simple ruby code does enough to understand the concept behind reflections

puts 12.kind_of?

The above code dynamically finds out what kind is 12 ? It returns the value integer. Thus reflection is enabled in ruby code to carry out operations during runtime with metaprogramming[4] enabled.