object oriented paradigm an evolutionary path. programming at its infancy a program is a single...

31
Object Oriented Object Oriented Paradigm Paradigm An evolutionary path An evolutionary path

Post on 18-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Object Oriented ParadigmObject Oriented Paradigm

An evolutionary pathAn evolutionary path

Page 2: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Programming At Its InfancyProgramming At Its Infancy

A program is a single block of A program is a single block of procedural codeprocedural code

Disadvantages:Disadvantages:

Reusability is practically nil.Reusability is practically nil.

Programming Complexity is high.Programming Complexity is high.

Software cannot not evolve gracefully Software cannot not evolve gracefully as changes in one part of the software as changes in one part of the software can have unwanted side-effects.can have unwanted side-effects.

Page 3: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Software Development- The Structured Software Development- The Structured ApproachApproach

Top-down design followed by bottom-Top-down design followed by bottom-up programmingup programming

Top-down decomposition driven by Top-down decomposition driven by functional criteriafunctional criteria

Architecture reflects system Architecture reflects system functionsfunctions

Page 4: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

The Structured Approach - AdvantagesThe Structured Approach - Advantages

Modularization impliesModularization implies

Reduction in software complexityReduction in software complexity

Increased reusabilityIncreased reusability

Reduction in unwanted side-effects as Reduction in unwanted side-effects as much of the effect is confined to the much of the effect is confined to the module being changed.module being changed.

Page 5: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

The Structured Approach - The Structured Approach - DisadvantagesDisadvantages

Produces satisfactory results only when Produces satisfactory results only when functions have been identified properly and functions have been identified properly and remain unchanged through time.remain unchanged through time.

Software structure is induced by Software structure is induced by functionsfunctions. Thus . Thus evolution of these functions may imply important evolution of these functions may imply important structural modifications.structural modifications.

Guarantees only limited modularizations thereby Guarantees only limited modularizations thereby rendering subsequent modifications difficult and rendering subsequent modifications difficult and filled with side-effects. filled with side-effects.

Page 6: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Software Development - The Object Software Development - The Object Oriented ApproachOriented Approach

A paradigm shift from a A paradigm shift from a function-centricfunction-centric approach to an approach to an object-centricobject-centric approach to approach to software development.software development.

Structure induced by Structure induced by playersplayers (which constitute (which constitute the more static part of the system) rather than by the more static part of the system) rather than by functionsfunctions (the dynamic and evolving part of the (the dynamic and evolving part of the system).system).

Doesn’t replaceDoesn’t replace the structured approach; the structured approach; builds builds on topon top of it. of it.

Further modularization achieved through the Further modularization achieved through the decoupling of the system into independent decoupling of the system into independent objects.objects.

Page 7: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Object Oriented Approach - Object Oriented Approach - AdvantagesAdvantages

Models the real world more closely.Models the real world more closely.

Is easier to maintain because its structure is Is easier to maintain because its structure is inherently decoupled.inherently decoupled.

Leads to reuse which in turn leads to faster Leads to reuse which in turn leads to faster software development and higher quality software development and higher quality programs.programs.

Page 8: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Object Oriented Paradigm – Key Object Oriented Paradigm – Key FeaturesFeatures

AbstractionAbstraction

EncapsulationEncapsulation

Inheritance Inheritance

PolymorphismPolymorphism

Page 9: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Changing ScenarioChanging Scenario

Emergence of networksEmergence of networks – Can the capabilities of – Can the capabilities of networks be exploited to create an application networks be exploited to create an application that is distributed over the network? that is distributed over the network? YESYES

Increasing software complexityIncreasing software complexity – Can a software – Can a software be assembled from a collection of pre-built, plug-be assembled from a collection of pre-built, plug-and-play software components much in the and-play software components much in the same way as a hardware is created? same way as a hardware is created? YESYES

HOW?HOW?

Page 10: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component TechnologyComponent Technology

A software component is defined as an A software component is defined as an independent, binary piece of codeindependent, binary piece of code that can that can connect at run-timeconnect at run-time with other software with other software components to provide the desired components to provide the desired functionality.functionality.

Page 11: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component Technology - GoalsComponent Technology - Goals

Basic InteroperabilityBasic Interoperability – A software component developed – A software component developed by one developer should be able to interoperate with by one developer should be able to interoperate with other components other components

VersioningVersioning – It should be possible to upgrade a – It should be possible to upgrade a component without need to upgrade the entire softwarecomponent without need to upgrade the entire software

Language IndependenceLanguage Independence – Components written in – Components written in different languages should be able to communicatedifferent languages should be able to communicate

Cross-process Interoperability – Cross-process Interoperability – Two software Two software components running in two different process spaces components running in two different process spaces should be interoperableshould be interoperable

Cross-network Interoperability – Cross-network Interoperability – Two software Two software components running in two different machines connected components running in two different machines connected over the network should be interoperableover the network should be interoperable

Page 12: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component Technology – Industry Component Technology – Industry InitiativesInitiatives

Microsoft’s COMMicrosoft’s COM

OMG’s CORBAOMG’s CORBA

SUN’s Java Beans / EJBsSUN’s Java Beans / EJBs

Page 13: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component TechnologyComponent Technology

Microsoft’s COMMicrosoft’s COM

OMG’s CORBAOMG’s CORBA

Java Beans / EJBsJava Beans / EJBs

Page 14: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

COM– Key FeaturesCOM– Key Features

CComponent omponent OObject bject MModel (odel (COMCOM))

A component communication protocol by A component communication protocol by MicrosoftMicrosoft

OS (Windows) dependentOS (Windows) dependent

Language independent Language independent

Provides a standard way of accessing all kinds Provides a standard way of accessing all kinds of software services – be it in a library (DLL), in of software services – be it in a library (DLL), in another process (EXE) or in another machine another process (EXE) or in another machine (DCOM) (DCOM)

Page 15: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component TechnologyComponent Technology

Microsoft’s COMMicrosoft’s COM

OMG’s CORBAOMG’s CORBA

Java Beans / EJBsJava Beans / EJBs

Page 16: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

CORBA SpecificationCORBA Specification

A specification defined by Object A specification defined by Object Management Group (OMG)Management Group (OMG)

Non-profit organizationNon-profit organization

Engaged in promoting vendor-independent solution using Engaged in promoting vendor-independent solution using Object TechnologyObject Technology

Language independentLanguage independent

OS independent OS independent

Page 17: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component TechnologyComponent Technology

Microsoft’s COMMicrosoft’s COM

OMG’s CORBAOMG’s CORBA

Java Beans / EJBsJava Beans / EJBs

Page 18: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

JB/EJB SpecificationsJB/EJB Specifications

JJava ava BBeans (eans (JBJB), ), EEnterprise nterprise JJava ava BBeans eans ((EJBEJB))

Expounded by Sun MicrosystemsExpounded by Sun Microsystems

Language DependentLanguage DependentBuilt around Java LanguageBuilt around Java Language

Java specification – Controlled by Sun MicrosystemsJava specification – Controlled by Sun Microsystems

OS Independent OS Independent

Page 19: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component Technology – Common Component Technology – Common FeaturesFeatures

All the three technologies built on Protocols All the three technologies built on Protocols that guide the inter-Process communication that guide the inter-Process communication among processes on same or different among processes on same or different systemssystems

Adopt the key features of the object-oriented Adopt the key features of the object-oriented paradigmparadigm

Interface is everythingInterface is everything

Page 20: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component based approach to software Component based approach to software developmentdevelopment

Software is developed as a collection of collaborating Software is developed as a collection of collaborating componentscomponents

Collaboration may be intra-process, inter-process or Collaboration may be intra-process, inter-process or inter-networkinter-network

Individual components may be written in multiple-Individual components may be written in multiple-languages (in case of COM)languages (in case of COM)

Components may be ported to multiple platforms (in Components may be ported to multiple platforms (in case of JB/EJB)case of JB/EJB)

Page 21: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Component Based Approach to Component Based Approach to Software DevelopmentSoftware Development

Disadvantages of current technologies:Disadvantages of current technologies:

Limited language independenceLimited language independenceJB/EJB components limited to JavaJB/EJB components limited to Java

COM components support language independence COM components support language independence but require a conscious effort but require a conscious effort

Interacting components must comply to Interacting components must comply to the same standardthe same standard

JB/EJB components can interact only with other JB/EJB components can interact only with other JB/EJB componentsJB/EJB components

Similarly with COMSimilarly with COM

Page 22: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

COM Components – DrawbacksCOM Components – Drawbacks

Allow only limited language independenceAllow only limited language independence

Allow inheritance only if both parent & child Allow inheritance only if both parent & child components are written in the same languagecomponents are written in the same language

Can be accessed only by COM compliant Can be accessed only by COM compliant components components

Create DLL HellCreate DLL Hell

Page 23: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Web ServicesWeb Services

An application delivered as a service that can be An application delivered as a service that can be integrated with other Web services using the integrated with other Web services using the ubiquitous ubiquitous Internet Standards (HTTP, XML, SOAP protocols)Internet Standards (HTTP, XML, SOAP protocols)..

Can be implemented using full feature set of any Can be implemented using full feature set of any language, object model or platform.language, object model or platform.

Can be consumed by applications implemented in any Can be consumed by applications implemented in any language for any platformlanguage for any platform

Built on and an extension of COM TechnologyBuilt on and an extension of COM Technology Abstraction scaled up to higher levelAbstraction scaled up to higher level Group of components, capable of delivering a Group of components, capable of delivering a

meaningful service, is seen as a meaningful service, is seen as a reusable unitreusable unit The service is extended through The service is extended through ContractContract (comparable to (comparable to

Interface in Component)Interface in Component) The The ContractContract is published by provider on web is published by provider on web

Page 24: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

.NET Framework.NET Framework

The Microsoft .NET Framework is a new platform The Microsoft .NET Framework is a new platform for building integrated, for building integrated, internet-basedinternet-based, , service-service-orientedoriented applications to meet the needs of applications to meet the needs of applications that gather information from, and applications that gather information from, and interact with, a wide variety of sources, interact with, a wide variety of sources, regardless of the regardless of the platformsplatforms or or languageslanguages in use. in use.

Page 25: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

.NET Framework - Objectives.NET Framework - Objectives

Use the Right Language for the Right Job – Use the Right Language for the Right Job – Cross Language IntegrationCross Language Integration

Execute on many platforms – Execute on many platforms – Platform Platform IndependenceIndependence

Run Once, Run Always – Run Once, Run Always – The end of DLL HellThe end of DLL Hell

Page 26: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

.NET Framework – Enabling .NET Framework – Enabling FeaturesFeatures Standardisation of language ArchitectureStandardisation of language Architecture

Common data Types, Sys_Lib etc.Common data Types, Sys_Lib etc.

Common Language Runtime (CLR)Common Language Runtime (CLR) Comparable to Java Virtual Machine but Comparable to Java Virtual Machine but

capable of capable of handling multiple languageshandling multiple languages

Microsoft Intermediate Language (MSIL)Microsoft Intermediate Language (MSIL) Comparable to byte code of JavaComparable to byte code of Java

CLR & MSIL enable JIT compilation on CLR & MSIL enable JIT compilation on any platform that supports CLRany platform that supports CLR

Page 27: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Software Development using Software Development using the .NET Frameworkthe .NET Framework

Develop Develop applications asapplications as a collection of a collection of collaborating collaborating componentscomponents or or web web servicesservices that are that are portable across portable across platformsplatforms and can and can interact across interact across language boundarieslanguage boundariesStrengthened by open protocol of Strengthened by open protocol of accessibility like http, xml etcaccessibility like http, xml etc

Web Services assisted by .NETWeb Services assisted by .NETPlatform & language independencePlatform & language independence

Page 28: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

HailStorm – a user-centric web serviceHailStorm – a user-centric web service

.Net based Web Services.Net based Web Services The first paid web-service from MicrosoftThe first paid web-service from Microsoft Based on Microsoft Passport user Based on Microsoft Passport user

AuthenticationAuthentication Domain – Personal Information ManagementDomain – Personal Information Management Helps you manage and protect your Helps you manage and protect your

information and interaction across all information and interaction across all applications and devicesapplications and devices

Strengthened by Authentication, authorization Strengthened by Authentication, authorization and access periodand access period

Page 29: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

Hailstorm ServicesHailstorm Services

myAddressmyAddress

myProfilemyProfile

myContactsmyContacts

myLocationmyLocation

myNotificationsmyNotifications

MyInboxMyInbox

myCalendarmyCalendar

myDocumentsmyDocuments

myApplicationsettingmyApplicationsettingss

myFavouritewebsitesmyFavouritewebsites

myWalletmyWallet

myDevicesmyDevices

myServicesmyServices

myUsagemyUsage

Page 30: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

SoftwareDevelopment using SoftwareDevelopment using HailstormHailstorm

Use HailStorm services in your applications for Use HailStorm services in your applications for user authentication, routing notifications to the user authentication, routing notifications to the users of your applicationsusers of your applications

Page 31: Object Oriented Paradigm An evolutionary path. Programming At Its Infancy A program is a single block of procedural code Disadvantages: Reusability is

FutureFuture

High Independence at Low levelHigh Independence at Low level Easy Integration at middle level Easy Integration at middle level Total Convergence at Application levelTotal Convergence at Application level

Any where – Any Time – Any where – Any Time –

Any Language – Any OS – Any Language – Any OS –

Any DeviceAny Device

ThanxThanx