Wednesday 21 September 2011

Object - oriented programming ( OOP )



A type of programming in whichprogrammers define not only the data type of adata structure, but also the types of operations ( functions) that can be applied to the data structure. In this way, the data structure becomes an object that includes both data and functions. In addition, programmers can create relationships between one object and another.
The programming challenge was seen as how to write the logic, not how to define the data. Object-oriented programming takes the view that what we really care about are the objects we want to manipulate rather than the logic required to manipulate them. Examples of objects range from human beings (described by name, address, and so forth) to buildings and floors (whose properties can be described and managed) down to the little widgets on your computer desktop (such as buttons and scroll bars).

Ø  There are some fundamental concepts of OO Language which a language has to follow to be a truly OO language.
  • ENCAPSULATION
  • POLYMORPHISM
  • INHERITANCE
  • OBJECT
  • CLASS
  • ABSTRACTION
  • DATA HIDING / INFORMATION HIDING
  • OBJECT


Encapsulation
Encapsulation is a technique for minimizing interdependencies among separately-written modules by defining strict external interfaces. The external interface of a module serves as a contract between the module and its clients, and thus between the designer of the module and other designers. ... A module is encapsulated if clients are restricted by the definition of the programming language to access the module only via its defined external interface.  ("Encapsulation and Inheritance in Object-Oriented Programming Languages" : OOPSLA 86 proceedings)
Every object has a well-defined interface that specifies the behavior of the object in a manner that is independent of its implementation. This interface defines the collection of services that can be invoked by other objects. The implementation of an object describes how to carry out its services. This includes information private to the object, accessible to other objects only if services exist to provide such access. Similarly, the algorithms that implement services are private to the object. No other object can rely on how another object implements its services. This ability of objects to hide internal structure, thereby defining services independent of implementation, is called  encapsulation.
Polymorphism
Identical (identically-named) operations can behave differently in different contexts. The operations that can be performed on an object make up its interface. They enable you to address operations with the same name in different objects.
Inheritance
You can use an existing type to derive a new type. Derived types inherit the data and operations of the super-type. However, they can overwrite existing operations or add new ones.
Objects
 Object represents real world entity into a program. for example an employee which is real world entity we can make an object of it and then utilize it in a program with its behaviors and actions.
Some other common definitions
1. Object is an instance of a class.
2. Object is a variable of user defined type / abstract data type.
Class
 Class represent template for an object. It actually contains data and their behavior / methods in it and for utilization of it we need to create an object of that particular class. we can create n number of object with one class.
Some other common definitions 
1. A collection of data and code to handle that data.
2. Class is a user defined type / abstract data type.
3. Class defines basic layout and functionality of an object.

Abstraction
 To implement real world entity into program. Class uses the concept of abstraction.
Some other common definitions 
1. Abstraction is a process of mimicking a behavior.
2. Simplifying complex reality by modeling classes appropriate to problem.
3. Abstraction is a process that involves identifying the crucial behavior of an object and eliminating irrelevant and tedious details.

Data Hiding / Information Hiding
 As encapsulation bind data and methods together, data hiding restrict sensitive data accessing to the system. It is also achieved by using access modifiers i.e. Private, Protected and Public.
In Figure 1 you can see in class Employee that there are notations minus(-) and Plus(+) they represents access modifier, minus sign restrict access outside the class and plus sign gives access outside the class.

Done By:
Ahmad Osta

References:
-       Object-Oriented Software Engineering, Stephen Schach .
-       Object-Oriented Analysis and Design with Applications (3rd Edition)  , Bobbi J. Young

Agile Software Development Methodologies XP,SCRUM

Agile Software Development Methodologies
(XP & SCRUM)

Overview

Agile Modeling (AM) is a chaordic, practice-based methodology for effective modeling of software-based systems. based on iterative and incremental development,The AM methodology is a collection of practices – guided by principles and values – that are meant to be applied by software professionals on a day-to-day basis.  AM is not a prescriptive process, in other words it does not define detailed procedures for how to create a given type of model, instead it provides advice for how to be effective as a modeler.  AM is “touchy-feely” in that it is not hard and fast – think of AM as an art, not a science.

Key Features of Agile Software Development:

  • Iterative : Entire application is distributed in incremental units called as iteration. Development time of each iteration is small (couple of weeks), fixed and strictly adhered to. Every Iteration is a mini increment of the functionality and is build on top of previous iteration.
  • Active Customer involvement : There is lot of client involvement and face-to-face interaction. Every iteration is tested and approved by client. The feedback obtained is implemented in subsequent iterations; thus minimizing risk and ensuring higher client satisfaction.
  • Feature driven : More emphasis is on providing the required features in the application. 80/20 principle is applied to decide the 20% features which would be used 80% of the time.
  • Fixed Time : Each iteration has a fixed time span in which it is delivered.
  • Priority based delivery : Features are prioritized depending on customer need, development risk etc. High priority features are developed first. After every iteration, the project priorities are re-evaluated.
  • Adaptive : The methodology in general is very adaptive, so that the application that is developed can cater to inflow of new requirements throughout its development. Goal is not to remove the uncertainty in the very beginning, but is to adapt to the changing needs.
  • Empowered Teams : The project teams are generally small and have lot of interaction and communication. Since entire team is actively involved, team is empowered to take decisions. No separate team to manage project.
  • People Centric : More emphasis is on using the adequately skilled people to do the development than on following the processes. The documentation and other non-development activities are minimized and more time is devoted to development and testing.
  • Rapid development : Generally the development is done rapidly using light weight development technologies.
  • More disciplined : Being rapid, everything has to be delivered correctly first time. So the process involves lot of team and self discipline Thus, it requires highly skilled and organized team members.
  • Simplicity : Emphasis is on keeping things as simple as possible and being open to change.
When to (not!) use Agile?
Before going Agile; Ask
1.    Is functionality split-able
2.    Is customer available
3.    Are requirements flexible
4.    Is it really time -constrained
5.    Is team skilled enough
Various Agile Software development methodologies here i will talk about tow methodologies extreme Programming (XP) and SCRUM.


Extreme programming (XP)

Extreme programming (XP)   or   test driven development  is an agile software development methodology used for a quick delivery of new critical functionality. High-quality deliverables with this agile methodology are ensured by continuous testing (including unit testing), customer collaboration, constant close team members interaction and focus on small releases within 1 to 3 weeks.

§  The benefits of Extreme Programming are: 
1. Unit testing of all code
2. Avoiding programming of capabilities until necessary
3. Programming in pairs or carrying out extensive code review
4. Clarity and simplicity in code
5. Volatile customer requirements much better understood
6. A flag management structure
7. Frequent communication between the programmers and even with the customer
§  The drawbacks of Extreme programming are: 1. No documented compromises of user conflicts
2. Unstable requirements
3. Lack of overall design document or specification
4. Incorporates inadequate software program design
5. Necessitates meetings at recurrent intervals at huge expense to consumers
6. Can enlarge the risk of scope creep due to the lack of thorough requirements documentation
7. Requires excess of cultural change to adopt
§  Programmers don’t build frameworks and infrastructure for the features that might be coming.
§  Small Releases 
Programmers build the system in small releases defined. An iteration is typically two weeks. A release is a group of iterations that provide valuable features to the users of the system.
§  Sustainable Pace 
The team needs to stay fresh to effectively produce software. One way to make sure the team makes many mistakes is to have them work a lot of overtime.
§  Test Driven Design 
Programmers write software in very small verifiable steps. First, we write a small test. Then we write enough code to satisfy the test. Then another test is written, and so on.

SCRUM methodology

The Scrum methodology is an incremental, iterative framework for agile software program development and project management. The word “Scrum” is not actually an acronym. Nonetheless, several firms using this methodology spell it with capital letters. Initially Scrum methodology was focused for management of software development projects, but in recent times it might be employed to run general program/project management approach or software program maintenance teams. Scrum, which contains sets of predefined roles and practices, is a process skeleton. Principal roles in this approach are:
1. Product Owner – Represents Stakeholders
2. Scrum Master – The one responsible for maintaining the processes
3. Team – cross functional group of about 6-8 folks who do actual design, testing, implementation, etc.
Every single of the iteration is known as a”sprint”, typical time frame for which is generally about two to four weeks. The length of every sprint is decided by the team. The item “backlog” pushes the set of capabilities into a spring. These capabilities are prioritized set of greater level requirements for the task to be carried out. Based on this item “backlog”, the team determines how several of the items may be completed inside the next sprint. When the sprint begins, nobody is allowed to alter the sprint backlog, which means that the set of requirements are frozen. On effective completion of a sprint, the team demonstrates the usage of that particular software.
This methodology ought to be encouraged in organizations considering that the major advantage of employing the Scrum is that it enables the creation of teams that are extremely self-organizing in nature. This is achieved by encouraging verbal communication amongst the team members, co-location of all of the team members and disciplines that are involved for the project.
You want two things out of your development vendor: 1) fast results that 2) meet your needs. Mentor Mate uses an SCRUM  agile methodology to make sure that's exactly what you get. You'll have pieces of production-ready code in your hand within weeks of beginning development.
The benefits of this methodology are simple:
  • You've got pieces of working code in your hands every few weeks
  • You can make priority changes and new features as the project progresses
  • You're in constant contact with our team to make sure things are running smoothly
Differences between Scrum and Extreme Programming(XP):
1. The time span for iterative sprints is various in both approaches.
2. Adjustments aren’t allowed by the Scrum teams in the course of their sprints. Whereas Extreme Programming teams need to be much more agreeable to modifications.
3. Function is done by XP teams in strict priority order. Whereas in case of Scrum, the product owner prioritizes the set of activities.
four. XP does prescribe some engineering practices; Scrum doesn’t.

Summary

Both XP and Scrum are approaches to product development.  Oddly enough, product development teams are finding that integrating both approaches together is proving to be an excellent approach to accomplishing their ultimate goal of utilizing strong cohesive teams to develop new software products.  Both Scrum and XP utilize short work periods during which work product is completed by team members, which work closely together with complementary skills and abilities.
Done By : Ahmad Osta

References:
- Agile Software Requirements, for Dean Leffingwe
- The Art of Agile Development , for James Shore