CSC/ECE 517 Fall 2012/Table Of Contents: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 4: Line 4:


='''Object Oriented Programming in Ruby'''=
='''Object Oriented Programming in Ruby'''=
Ruby is a dynamic, reflective, general-purpose object-oriented programming language.Ruby is all about objects.


[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F ''Object Oriented Programming'']
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F ''Object Oriented Programming'']
Line 16: Line 18:


[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables Class variables] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Methods Class Methods] in Ruby are defined. The basic syntax to declare them as class variables and instance variables is given.
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables Class variables] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Methods Class Methods] in Ruby are defined. The basic syntax to declare them as class variables and instance variables is given.
='''Code Reuse'''=
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].
==Techniques in Code Reuse==
There are several [
http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable. 
==Advantages and Disadvantages of Code Reuse==
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.
=References=
http://en.wikipedia.org/wiki/Component-based_software_engineering

Revision as of 09:03, 7 November 2012

Introduction

This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.

Object Oriented Programming in Ruby

Ruby is a dynamic, reflective, general-purpose object-oriented programming language.Ruby is all about objects.

Object Oriented Programming

The link given above contains an introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained. It mainly explains Object Oriented Programming in Ruby. A brief outline is given on objects,classes and inheritance.

Instance Variables,Instance Methods and Accessor Methods

Instance variables in ruby are defined.Instance methods and Accessor methods are explained briefly along with examples.

Class Variables and Class Methods

Class variables and Class Methods in Ruby are defined. The basic syntax to declare them as class variables and instance variables is given.


Code Reuse

Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found here.

Techniques in Code Reuse

There are several [ http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding. For example, using a single line of code, we can reuse the code.Procedures and macros are the low level code reuse techniques.Methods can be used in code reuse, a method can be defined and declared multiple times wherever required. An individual software component is a software package, a Web service, or a module that encapsulates a set of related functions. All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.

With the help of Packages,modules and inheritance, we can achieve code reuse.

Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL) are more techniques of code reuse.

Here are some of the best practices to be followed to make sure that the code that is being written is reusable.

Advantages and Disadvantages of Code Reuse

Advantages and disadvantages of code reuse can be found here.

Here are few of the tradeoffs for code reuse at various levels of components.


References

http://en.wikipedia.org/wiki/Component-based_software_engineering