SlideShare a Scribd company logo
1 of 29
ROLE-BASED COMPONENT
ENGINEERING
 Submitted By-
Rahul(2k11/SE/054)
Suraj Prakash(2k11/SE/078)
OVERVIEW
 Role-based components
 Motivating the use of roles
 Role technology
 Frameworks and roles
ROLE-BASED COMPONENTS
 Focusing on the following aspects of object-oriented
components:
 The interface
 The size or granularity
 Encapsulation
 Composition mechanisms
COMPONENTS
 The interface of a component defines the syntax of
how to use a component. The semantics of the
interface are usually implicit.
 Reusability
 Plug-ability
CONCEPT OF ROLES
 Components may have several different uses in a system
that are dependent on the different roles a component can
play in the various component collaborations in the
system.
 With role-based components is that the public interface is
separated into smaller interfaces, which model these different
roles.
KEMERER AND CHIDAMBER’S SIX
METRICS
 WMC: Weighted Methods per Class
 DIT: Depth of Inheritance Tree
 NOC: Number Of Children
 CBO: Coupling Between Object classes
 RFC: Response For a Class
 LCOM: Lack of COhesiveness in Methods
WMC - WEIGHTED METHODS PER
CLASS
 In terms of classes:
 This metric reflects the notion that a complex class has a
larger influence on its subclasses than a small class.
 In terms of roles:
 Roles model only a small part of a class interface.
 The amount of WMC of a role is typically less than that of
a class.
 Components are accessed using the role interfaces.
 A smaller part of the interface must be understood than
when the same component is addressed using its full
interface.
DIT - DEPTH OF INHERITANCE TREE
 In terms of classes:
 This metric reflects the notion that a deep inheritance
hierarchy constitutes a more complex design.
 In terms of roles:
 The DIT value will increase since inheritance is the
mechanism for imposing roles on a component.
 It should be noted however that roles only define the
interface, not the implementation.
 Thus while the DIT increases, the distribution of
implementation throughout the inheritance hierarchy is not
affected.
NOC - NUMBER OF CHILDREN
 In terms of classes:
 This metric reflects the notion that classes with many
subclasses are important classes in a design.
 In terms of roles:
 Since role interfaces are typically located at the top of the
hierarchy, the NOC metric will typically be high.
 In a conventional class hierarchy, a high NOC for a class
expresses that that class is important in the hierarchy.
 Similarly, roles with a high NOC are important and have a
high cohesiveness value.
CBO - COUPLING BETWEEN OBJECT
CLASSES
 In terms of classes:
 This reflects that excessive coupling inhibits reuse and
that limiting the number of relations between classes
helps to increase their reuse potential.
 In terms of roles:
 The CBO metric will decrease since implementation
dependencies can be avoided by only referring to role
interfaces rather than by using classes as types.
RFC - RESPONSE FOR A CLASS
 In terms of classes:
 This metric measures the number of methods, which can
be executed in response to a message.
 In terms of roles:
 Since roles do not provide any implementation, the RFC
value will not increase in implementation classes.
 It may even decrease because class inheritance will be
necessary to inherit implementation only, interfaces no
longer.
LCOM - LACK OF COHESIVENESS IN
METHODS
 In terms of classes:
 This metric reflects the notion that non-cohesive classes
should probably be separated into two classes and that
classes with a low degree of cohesiveness are more
complex.
 In terms of roles:
 Roles typically are very cohesive in the sense that the
methods for a particular role are closely related and roles
will thus, typically, have a lower LCOM value.
TRANSFORMATION CONCLUSIONS
 Roles reduce complexity (improvement in CBO, RFC and
LCOM metrics).
 Roles increase complexity in the upper half of the
inheritance hierarchy (Higher DIT and NOC values).
ROLE TECHNOLOGY
 Using roles at the design level
 Using roles at the implementation level
USING ROLES AT THE DESIGN LEVEL
 Reenskaug proposes an extension to UML:
 General way to express object collaborations
 Not too general (class diagrams)
 Not too specific (object diagrams)
 Uses classifier -roles to denote the position an object
holds in an object structure.
CATALYSIS
 Catalysis:
 Is a very extensive methodology based on UML, using the
concepts of frameworks to model component interactions.
 It includes a notion of types and type models.
 A type corresponds to a role.
 A type model describes typical collaborations between
objects of that type.
USING ROLES AT THE
IMPLEMENTATION LEVEL
 Implementation languages:
 Are typically on a lower abstraction level than the design.
 Relations between classes in UML are commonly
translated to pointers and references when a UML class
diagram is implemented in, for example, C++.
 With roles, a similar loss of information occurs.
 The advantage of expressing roles in this way is that
references to other classes can be typed using the
interfaces.
MIXING CLASSES
 Interfaces can be simulated by using abstract classes
containing only virtual methods without
implementation.
 Since C++ supports multiple inheritance, these abstract
classes can be combined as in Java.
 This style of programming is often referred to as using
mixing classes.
USING MULTIPLE LANGUAGES
 Roles can also be mapped to IDL interfaces, which makes
it possible to use multiple languages (even those not
object-oriented) in one system.
USING MULTIPLE LANGUAGES:
EXAMPLE
 According to the API Documentation, the JButton
class in the Swing Framework implements the
following Java interfaces:
 Accessible, ImageObserver, ItemSelectable,
MenuContainer, Serializable, SwingConstants.
 These interfaces can be seen as roles, which this class
can play in various collaborations.
 The Serializable interface, for example, makes it
possible to write objects of the JButton class to a binary
stream.
FRAMEWORKS AND ROLES
 Using roles together with object-oriented frameworks
is useful.
 Object- oriented frameworks are partial designs and
implementations for applications in a particular domain.
 By using a framework, the repeated re-implementation of
the same behaviour is avoided and much of the
complexity of the interactions between objects can be
hidden by the framework.
 An example of this is the Hollywood principle ("don't call
us, we'll call you") often used in frameworks.
BLACK-BOX AND WHITE-BOX
FRAMEWORKS
Classes
Components
Abstract classes
Interfaces
Design documents
Are a part of
Inherit
Implement
Partially implement
Reflect
FRAMEWORK ELEMENTS
 Design documents
 Role Interfaces
 Abstract classes
 Components
 Classes
A MODEL FOR FRAMEWORKS
 In this section we will do so by specifying the general
structure of a framework and comparing this with
some existing ideas on this topic.
 Composition of framework control
 Composition with legacy code
 Framework gap
 Overlap of framework functionality
DEALING WITH COUPLING
 More coupling between components means higher
maintenance costs (McCabe’s cyclomatic complexity).
STRATEGIES FOR DEALING WITH
COUPLING
 That which they have in common is that for component X
to use component Y, X will need a reference to Y.
 Y is created by X and then discarded.
 Y is a property of X.
 Y is passed to X as a parameter of some method.
 Y is retrieved by requesting it from a third object.
DEPENDENCIES BETWEEN
COMPONENTS
 Regardless of how the reference is obtained, there
are two types of dependencies between components:
 Implementation dependencies: The references used in
the relations between components are typed using
concrete classes or abstract classes.
 Interface dependencies: The references used in the
relations between components are typed using only
interfaces.
DEPENDENCY CONSIDERATIONS
 Disadvantage of implementation dependencies
 It is more difficult to replace the objects to which the
component delegates.
 When interface dependencies are used, the object
can be replaced with any other object implementing
the same interface.
 Interface dependencies are thus more flexible and should
always be preferred to implementation dependencies.
 In the model presented in this section, all
components implement interfaces from role models
making the use implementation dependencies in the
implementation of these components unnecessary.
THANK YOU !

More Related Content

What's hot

Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialscesarmendez78
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on lineMilind Patil
 
What are Abstract Classes in Java | Edureka
What are Abstract Classes in Java | EdurekaWhat are Abstract Classes in Java | Edureka
What are Abstract Classes in Java | EdurekaEdureka!
 
006 Osi Model
006 Osi Model006 Osi Model
006 Osi ModelBELKA08
 
Software architecture styles families_research_gssi_nov2013
Software architecture styles families_research_gssi_nov2013Software architecture styles families_research_gssi_nov2013
Software architecture styles families_research_gssi_nov2013Henry Muccini
 
A Technical Seminar on OSI model
A Technical Seminar on OSI modelA Technical Seminar on OSI model
A Technical Seminar on OSI modelLikan Patra
 
Osi model in networking
Osi model in networkingOsi model in networking
Osi model in networkingsheikhparvez4
 
Dc lec-06 & 07 (osi model)
Dc lec-06 & 07 (osi model)Dc lec-06 & 07 (osi model)
Dc lec-06 & 07 (osi model)diaryinc
 
Networking (osi model)
Networking (osi model)Networking (osi model)
Networking (osi model)Pooja Bhojwani
 

What's hot (16)

Abap Objects for BW
Abap Objects for BWAbap Objects for BW
Abap Objects for BW
 
Abap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorialsAbap object-oriented-programming-tutorials
Abap object-oriented-programming-tutorials
 
Lecture13 abap on line
Lecture13 abap on lineLecture13 abap on line
Lecture13 abap on line
 
What are Abstract Classes in Java | Edureka
What are Abstract Classes in Java | EdurekaWhat are Abstract Classes in Java | Edureka
What are Abstract Classes in Java | Edureka
 
006 Osi Model
006 Osi Model006 Osi Model
006 Osi Model
 
Design pattern
Design patternDesign pattern
Design pattern
 
Osi modal
Osi modalOsi modal
Osi modal
 
Software architecture styles families_research_gssi_nov2013
Software architecture styles families_research_gssi_nov2013Software architecture styles families_research_gssi_nov2013
Software architecture styles families_research_gssi_nov2013
 
OOP design patterns
OOP design patternsOOP design patterns
OOP design patterns
 
A Technical Seminar on OSI model
A Technical Seminar on OSI modelA Technical Seminar on OSI model
A Technical Seminar on OSI model
 
OSI Layers
OSI LayersOSI Layers
OSI Layers
 
Layering and Architecture
Layering and ArchitectureLayering and Architecture
Layering and Architecture
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Osi model in networking
Osi model in networkingOsi model in networking
Osi model in networking
 
Dc lec-06 & 07 (osi model)
Dc lec-06 & 07 (osi model)Dc lec-06 & 07 (osi model)
Dc lec-06 & 07 (osi model)
 
Networking (osi model)
Networking (osi model)Networking (osi model)
Networking (osi model)
 

Similar to Rbce

Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netmekhap
 
Object Interconnections
Object InterconnectionsObject Interconnections
Object Interconnectionsadil raja
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagramskebsterz
 
Software architecture
Software architectureSoftware architecture
Software architectureInam Soomro
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAravinth NSP
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .NetGreg Sohl
 
Slide Presentasi Teknik OO pada Desain Software
Slide Presentasi Teknik OO pada Desain SoftwareSlide Presentasi Teknik OO pada Desain Software
Slide Presentasi Teknik OO pada Desain SoftwareBayu Rimba
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patternsiasaglobal
 
Top 30 Technical interview questions
Top 30 Technical interview questionsTop 30 Technical interview questions
Top 30 Technical interview questionsSohailSaifi15
 

Similar to Rbce (20)

Uml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot netUml class diagram and packages ppt for dot net
Uml class diagram and packages ppt for dot net
 
Object Interconnections
Object InterconnectionsObject Interconnections
Object Interconnections
 
08 class and sequence diagrams
08   class and sequence diagrams08   class and sequence diagrams
08 class and sequence diagrams
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
General oops concepts
General oops conceptsGeneral oops concepts
General oops concepts
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
Software Testing and UML Lab
Software Testing and UML LabSoftware Testing and UML Lab
Software Testing and UML Lab
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
OOP_Module 2.pptx
OOP_Module 2.pptxOOP_Module 2.pptx
OOP_Module 2.pptx
 
Oop
OopOop
Oop
 
Advance oops concepts
Advance oops conceptsAdvance oops concepts
Advance oops concepts
 
Object Oriented Programming In .Net
Object Oriented Programming In .NetObject Oriented Programming In .Net
Object Oriented Programming In .Net
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Uml - An Overview
Uml - An OverviewUml - An Overview
Uml - An Overview
 
Slide Presentasi Teknik OO pada Desain Software
Slide Presentasi Teknik OO pada Desain SoftwareSlide Presentasi Teknik OO pada Desain Software
Slide Presentasi Teknik OO pada Desain Software
 
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design PatternsNina Grantcharova - Approach to Separation of Concerns via Design Patterns
Nina Grantcharova - Approach to Separation of Concerns via Design Patterns
 
Top 30 Technical interview questions
Top 30 Technical interview questionsTop 30 Technical interview questions
Top 30 Technical interview questions
 
Csci360 20 (1)
Csci360 20 (1)Csci360 20 (1)
Csci360 20 (1)
 
Csci360 20
Csci360 20Csci360 20
Csci360 20
 

More from Saransh Garg

Technical non-technical-requirement-of-cots-selection
Technical non-technical-requirement-of-cots-selectionTechnical non-technical-requirement-of-cots-selection
Technical non-technical-requirement-of-cots-selectionSaransh Garg
 
Selecting with multiple interfaces
Selecting with multiple interfacesSelecting with multiple interfaces
Selecting with multiple interfacesSaransh Garg
 
Selecting cots vendor in cbse process
Selecting cots vendor in cbse processSelecting cots vendor in cbse process
Selecting cots vendor in cbse processSaransh Garg
 
Predicting system trustworthyness
Predicting system trustworthynessPredicting system trustworthyness
Predicting system trustworthynessSaransh Garg
 
Koala component model (1)
Koala component model (1)Koala component model (1)
Koala component model (1)Saransh Garg
 
Integration in component based technology
Integration in component based technologyIntegration in component based technology
Integration in component based technologySaransh Garg
 
Embedded system.pptx
Embedded system.pptxEmbedded system.pptx
Embedded system.pptxSaransh Garg
 
Composition of cots
Composition of cotsComposition of cots
Composition of cotsSaransh Garg
 
Components in real time systems
Components in real time systemsComponents in real time systems
Components in real time systemsSaransh Garg
 
Component object model and
Component object model andComponent object model and
Component object model andSaransh Garg
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technologySaransh Garg
 
Cbt component based technology architectures
Cbt   component based technology architecturesCbt   component based technology architectures
Cbt component based technology architecturesSaransh Garg
 
Architecture support for component
Architecture support for component Architecture support for component
Architecture support for component Saransh Garg
 

More from Saransh Garg (18)

Technical non-technical-requirement-of-cots-selection
Technical non-technical-requirement-of-cots-selectionTechnical non-technical-requirement-of-cots-selection
Technical non-technical-requirement-of-cots-selection
 
Selecting with multiple interfaces
Selecting with multiple interfacesSelecting with multiple interfaces
Selecting with multiple interfaces
 
Selecting cots vendor in cbse process
Selecting cots vendor in cbse processSelecting cots vendor in cbse process
Selecting cots vendor in cbse process
 
Scs.pptx repaired
Scs.pptx repairedScs.pptx repaired
Scs.pptx repaired
 
Repo for cbt
Repo for cbtRepo for cbt
Repo for cbt
 
Predicting system trustworthyness
Predicting system trustworthynessPredicting system trustworthyness
Predicting system trustworthyness
 
Koala component model (1)
Koala component model (1)Koala component model (1)
Koala component model (1)
 
Javabean1
Javabean1Javabean1
Javabean1
 
Integration in component based technology
Integration in component based technologyIntegration in component based technology
Integration in component based technology
 
Embedded system.pptx
Embedded system.pptxEmbedded system.pptx
Embedded system.pptx
 
Cots integration
Cots integrationCots integration
Cots integration
 
Corba model ppt
Corba model pptCorba model ppt
Corba model ppt
 
Composition of cots
Composition of cotsComposition of cots
Composition of cots
 
Components in real time systems
Components in real time systemsComponents in real time systems
Components in real time systems
 
Component object model and
Component object model andComponent object model and
Component object model and
 
Component based models and technology
Component based models and technologyComponent based models and technology
Component based models and technology
 
Cbt component based technology architectures
Cbt   component based technology architecturesCbt   component based technology architectures
Cbt component based technology architectures
 
Architecture support for component
Architecture support for component Architecture support for component
Architecture support for component
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 

Rbce

  • 1. ROLE-BASED COMPONENT ENGINEERING  Submitted By- Rahul(2k11/SE/054) Suraj Prakash(2k11/SE/078)
  • 2. OVERVIEW  Role-based components  Motivating the use of roles  Role technology  Frameworks and roles
  • 3. ROLE-BASED COMPONENTS  Focusing on the following aspects of object-oriented components:  The interface  The size or granularity  Encapsulation  Composition mechanisms
  • 4. COMPONENTS  The interface of a component defines the syntax of how to use a component. The semantics of the interface are usually implicit.  Reusability  Plug-ability
  • 5. CONCEPT OF ROLES  Components may have several different uses in a system that are dependent on the different roles a component can play in the various component collaborations in the system.  With role-based components is that the public interface is separated into smaller interfaces, which model these different roles.
  • 6. KEMERER AND CHIDAMBER’S SIX METRICS  WMC: Weighted Methods per Class  DIT: Depth of Inheritance Tree  NOC: Number Of Children  CBO: Coupling Between Object classes  RFC: Response For a Class  LCOM: Lack of COhesiveness in Methods
  • 7. WMC - WEIGHTED METHODS PER CLASS  In terms of classes:  This metric reflects the notion that a complex class has a larger influence on its subclasses than a small class.  In terms of roles:  Roles model only a small part of a class interface.  The amount of WMC of a role is typically less than that of a class.  Components are accessed using the role interfaces.  A smaller part of the interface must be understood than when the same component is addressed using its full interface.
  • 8. DIT - DEPTH OF INHERITANCE TREE  In terms of classes:  This metric reflects the notion that a deep inheritance hierarchy constitutes a more complex design.  In terms of roles:  The DIT value will increase since inheritance is the mechanism for imposing roles on a component.  It should be noted however that roles only define the interface, not the implementation.  Thus while the DIT increases, the distribution of implementation throughout the inheritance hierarchy is not affected.
  • 9. NOC - NUMBER OF CHILDREN  In terms of classes:  This metric reflects the notion that classes with many subclasses are important classes in a design.  In terms of roles:  Since role interfaces are typically located at the top of the hierarchy, the NOC metric will typically be high.  In a conventional class hierarchy, a high NOC for a class expresses that that class is important in the hierarchy.  Similarly, roles with a high NOC are important and have a high cohesiveness value.
  • 10. CBO - COUPLING BETWEEN OBJECT CLASSES  In terms of classes:  This reflects that excessive coupling inhibits reuse and that limiting the number of relations between classes helps to increase their reuse potential.  In terms of roles:  The CBO metric will decrease since implementation dependencies can be avoided by only referring to role interfaces rather than by using classes as types.
  • 11. RFC - RESPONSE FOR A CLASS  In terms of classes:  This metric measures the number of methods, which can be executed in response to a message.  In terms of roles:  Since roles do not provide any implementation, the RFC value will not increase in implementation classes.  It may even decrease because class inheritance will be necessary to inherit implementation only, interfaces no longer.
  • 12. LCOM - LACK OF COHESIVENESS IN METHODS  In terms of classes:  This metric reflects the notion that non-cohesive classes should probably be separated into two classes and that classes with a low degree of cohesiveness are more complex.  In terms of roles:  Roles typically are very cohesive in the sense that the methods for a particular role are closely related and roles will thus, typically, have a lower LCOM value.
  • 13. TRANSFORMATION CONCLUSIONS  Roles reduce complexity (improvement in CBO, RFC and LCOM metrics).  Roles increase complexity in the upper half of the inheritance hierarchy (Higher DIT and NOC values).
  • 14. ROLE TECHNOLOGY  Using roles at the design level  Using roles at the implementation level
  • 15. USING ROLES AT THE DESIGN LEVEL  Reenskaug proposes an extension to UML:  General way to express object collaborations  Not too general (class diagrams)  Not too specific (object diagrams)  Uses classifier -roles to denote the position an object holds in an object structure.
  • 16. CATALYSIS  Catalysis:  Is a very extensive methodology based on UML, using the concepts of frameworks to model component interactions.  It includes a notion of types and type models.  A type corresponds to a role.  A type model describes typical collaborations between objects of that type.
  • 17. USING ROLES AT THE IMPLEMENTATION LEVEL  Implementation languages:  Are typically on a lower abstraction level than the design.  Relations between classes in UML are commonly translated to pointers and references when a UML class diagram is implemented in, for example, C++.  With roles, a similar loss of information occurs.  The advantage of expressing roles in this way is that references to other classes can be typed using the interfaces.
  • 18. MIXING CLASSES  Interfaces can be simulated by using abstract classes containing only virtual methods without implementation.  Since C++ supports multiple inheritance, these abstract classes can be combined as in Java.  This style of programming is often referred to as using mixing classes.
  • 19. USING MULTIPLE LANGUAGES  Roles can also be mapped to IDL interfaces, which makes it possible to use multiple languages (even those not object-oriented) in one system.
  • 20. USING MULTIPLE LANGUAGES: EXAMPLE  According to the API Documentation, the JButton class in the Swing Framework implements the following Java interfaces:  Accessible, ImageObserver, ItemSelectable, MenuContainer, Serializable, SwingConstants.  These interfaces can be seen as roles, which this class can play in various collaborations.  The Serializable interface, for example, makes it possible to write objects of the JButton class to a binary stream.
  • 21. FRAMEWORKS AND ROLES  Using roles together with object-oriented frameworks is useful.  Object- oriented frameworks are partial designs and implementations for applications in a particular domain.  By using a framework, the repeated re-implementation of the same behaviour is avoided and much of the complexity of the interactions between objects can be hidden by the framework.  An example of this is the Hollywood principle ("don't call us, we'll call you") often used in frameworks.
  • 22. BLACK-BOX AND WHITE-BOX FRAMEWORKS Classes Components Abstract classes Interfaces Design documents Are a part of Inherit Implement Partially implement Reflect
  • 23. FRAMEWORK ELEMENTS  Design documents  Role Interfaces  Abstract classes  Components  Classes
  • 24. A MODEL FOR FRAMEWORKS  In this section we will do so by specifying the general structure of a framework and comparing this with some existing ideas on this topic.  Composition of framework control  Composition with legacy code  Framework gap  Overlap of framework functionality
  • 25. DEALING WITH COUPLING  More coupling between components means higher maintenance costs (McCabe’s cyclomatic complexity).
  • 26. STRATEGIES FOR DEALING WITH COUPLING  That which they have in common is that for component X to use component Y, X will need a reference to Y.  Y is created by X and then discarded.  Y is a property of X.  Y is passed to X as a parameter of some method.  Y is retrieved by requesting it from a third object.
  • 27. DEPENDENCIES BETWEEN COMPONENTS  Regardless of how the reference is obtained, there are two types of dependencies between components:  Implementation dependencies: The references used in the relations between components are typed using concrete classes or abstract classes.  Interface dependencies: The references used in the relations between components are typed using only interfaces.
  • 28. DEPENDENCY CONSIDERATIONS  Disadvantage of implementation dependencies  It is more difficult to replace the objects to which the component delegates.  When interface dependencies are used, the object can be replaced with any other object implementing the same interface.  Interface dependencies are thus more flexible and should always be preferred to implementation dependencies.  In the model presented in this section, all components implement interfaces from role models making the use implementation dependencies in the implementation of these components unnecessary.