This document discusses design patterns and their use in software engineering. It defines what design patterns are, how they are categorized, and provides examples of common design patterns. The document also discusses the benefits of using design patterns, such as enabling reuse and improving communication. However, it notes some drawbacks, such as patterns not leading to direct code reuse and the potential for "pattern overload". It concludes with suggestions for effectively integrating and applying patterns.
This document provides an overview of different data types in programming languages. It discusses primitive data types like integers, floating point numbers, Booleans, characters and strings. It also covers user-defined types like enumerated types, subrange types, arrays, associative arrays and records. For each type, it describes common design considerations, examples from different languages, and how they are typically implemented.
This document discusses designing classes in object-oriented design. It covers designing class attributes and methods, class visibility including private, protected, and public protocols, refining class attributes with data types and initial values, designing methods using activity diagrams, avoiding pitfalls like overly large classes, and presenting classes using UML notation. The goal is to design well-structured, reusable classes through an iterative refinement process.
The document discusses various data types used in programming languages including primitive types like integer, floating point, boolean, character; composite types like arrays, records, unions, pointers; and how different languages implement and check these types both statically at compile time and dynamically at runtime.
This document discusses different data types in programming languages. It begins by introducing primitive data types like integers, floating point numbers, decimals, Booleans, and characters. It then covers string types, describing how they are implemented in different languages like C, Java, and SNOBOL4. The document also discusses user-defined types and structured types like arrays and records. It provides details on key topics related to data types, including type operators, descriptors, objects, and design issues around operations and representation.
Object Oriented Database Management systems evolved to address the complex objects in emerging applications that could not be effectively represented in the relational model. ODBMSs provide a direct representation of objects to the database, overcoming the impedance mismatch between application data structures and the relational model. ODBMSs take two approaches - persistent object oriented programming languages that add persistence to programming language objects, and object-relational databases that extend relational databases with object features. The Object Database Management Group developed standards including an object model, query language, and language bindings to allow portability between ODBMS systems.
Model-Driven Software Development - Language Workbenches & Syntax DefinitionEelco Visser
This document provides an overview of language workbenches and syntax definition. It discusses how language workbenches integrate development environments for language definition and application. Key components include syntax definition using grammars, parsing to construct abstract syntax trees, static analysis like type checking and name resolution, model-to-model transformations, and code generation. Editor services for modern IDEs are also covered, like syntax highlighting and code completion. The Spoofax/IMP language workbench is demonstrated, which uses SDF for declarative syntax definition and Stratego for transformations and analysis. The document schedules upcoming assignments and lectures.
1) Object oriented databases were developed to directly represent complex objects from emerging applications that could not be effectively modeled in the relational model. 2) Embedded SQL allows SQL queries to be embedded within a general purpose programming language to access and manipulate database objects. 3) Object oriented database management systems can be either pure object oriented programming languages with persistence or extend relational databases with object oriented features as defined in the SQL3 standard.
This document provides an overview of design patterns in software engineering. It discusses the motivation for using design patterns to solve recurring problems in software design. It describes what constitutes a design pattern and the key elements of a pattern including the pattern name, problem, solution, and consequences. The document also categorizes common design patterns into creational, structural, and behavioral patterns and provides examples of patterns from each category.
This document provides an overview of different data types in programming languages. It discusses primitive data types like integers, floating point numbers, Booleans, characters and strings. It also covers user-defined types like enumerated types, subrange types, arrays, associative arrays and records. For each type, it describes common design considerations, examples from different languages, and how they are typically implemented.
This document discusses designing classes in object-oriented design. It covers designing class attributes and methods, class visibility including private, protected, and public protocols, refining class attributes with data types and initial values, designing methods using activity diagrams, avoiding pitfalls like overly large classes, and presenting classes using UML notation. The goal is to design well-structured, reusable classes through an iterative refinement process.
The document discusses various data types used in programming languages including primitive types like integer, floating point, boolean, character; composite types like arrays, records, unions, pointers; and how different languages implement and check these types both statically at compile time and dynamically at runtime.
This document discusses different data types in programming languages. It begins by introducing primitive data types like integers, floating point numbers, decimals, Booleans, and characters. It then covers string types, describing how they are implemented in different languages like C, Java, and SNOBOL4. The document also discusses user-defined types and structured types like arrays and records. It provides details on key topics related to data types, including type operators, descriptors, objects, and design issues around operations and representation.
Object Oriented Database Management systems evolved to address the complex objects in emerging applications that could not be effectively represented in the relational model. ODBMSs provide a direct representation of objects to the database, overcoming the impedance mismatch between application data structures and the relational model. ODBMSs take two approaches - persistent object oriented programming languages that add persistence to programming language objects, and object-relational databases that extend relational databases with object features. The Object Database Management Group developed standards including an object model, query language, and language bindings to allow portability between ODBMS systems.
Model-Driven Software Development - Language Workbenches & Syntax DefinitionEelco Visser
This document provides an overview of language workbenches and syntax definition. It discusses how language workbenches integrate development environments for language definition and application. Key components include syntax definition using grammars, parsing to construct abstract syntax trees, static analysis like type checking and name resolution, model-to-model transformations, and code generation. Editor services for modern IDEs are also covered, like syntax highlighting and code completion. The Spoofax/IMP language workbench is demonstrated, which uses SDF for declarative syntax definition and Stratego for transformations and analysis. The document schedules upcoming assignments and lectures.
1) Object oriented databases were developed to directly represent complex objects from emerging applications that could not be effectively modeled in the relational model. 2) Embedded SQL allows SQL queries to be embedded within a general purpose programming language to access and manipulate database objects. 3) Object oriented database management systems can be either pure object oriented programming languages with persistence or extend relational databases with object oriented features as defined in the SQL3 standard.
This document provides an overview of design patterns in software engineering. It discusses the motivation for using design patterns to solve recurring problems in software design. It describes what constitutes a design pattern and the key elements of a pattern including the pattern name, problem, solution, and consequences. The document also categorizes common design patterns into creational, structural, and behavioral patterns and provides examples of patterns from each category.
This document discusses the design patterns used in the Lexi document editor. It describes problems related to document structure, formatting, user interface, multiple platforms, and user operations. Patterns used include Composite to represent document structure, Strategy for formatting algorithms, Decorator for embellishing the UI, Abstract Factory for look and feel, Bridge for multiple platforms, Command for undoable operations, Iterator for traversal, and Visitor for analysis capabilities. The goal was to design for flexibility, independence of components, and extensibility.
The document discusses several object-oriented design patterns including Iterator, Decorator, Strategy, and Observer providing an overview and examples of each pattern describing how they address common programming problems and their benefits for reusable and flexible code. It also discusses how design patterns were documented in influential books and how they provide solutions to problems that occur frequently in software design through interfaces and classes that can be implemented in many different ways.
The document introduces design patterns and their key elements. It discusses how design patterns help address common object-oriented design problems like determining appropriate objects, object granularity, specifying interfaces, and implementations. Key points made include: design patterns make reuse easier, express proven techniques, help choose reusable designs, and get a design "right" faster. Each pattern has a name, problem description, solution, and consequences. Patterns are organized by purpose (creational, structural, behavioral) and scope (class, object).
This document introduces design patterns and their key elements. Design patterns help designers solve common problems in object-oriented software design and make reusable designs more accessible. A pattern has four elements - a name, the problem it addresses, the solution, and consequences of applying the pattern. Patterns are organized based on their purpose (creational, structural, behavioral) and scope (object, class, etc.). The document outlines 23 classic design patterns organized in a catalog.
This document discusses the design of a document editor called Lexi. It addresses several design problems including document structure, formatting, user interface embellishment, supporting multiple look-and-feel standards and window systems, and user operations like undo/redo. It proposes solutions to these problems using several design patterns like composite, decorator, factory, bridge, command, and iterator patterns to achieve flexibility, extensibility and independence of algorithms and structures. The goal is to create a reusable and extensible design that can be understood and communicated effectively between team members.
The document discusses object-oriented modeling and the Unified Modeling Language (UML). It describes the evolution of UML from earlier object-oriented modeling methods to its current standardization. The key aspects of UML covered include its scope as a standard modeling language, the modeling elements it incorporates like use cases, classes, objects, and diagrams, and how it addresses complexity through concepts like abstraction, encapsulation, and inheritance.
- An object-relational database (ORD) or object-relational database management system (ORDBMS) supports objects, classes, and inheritance directly in the database schema and query language, while also retaining the relational model.
- An ORDBMS supports an extended form of SQL called SQL3 for handling abstract data types. It allows storage of complex data types like images and location data.
- Key advantages of ORDBMS include reuse and sharing of code through inheritance, increased productivity for developers and users, and more powerful query capabilities. Key challenges include complexity, immaturity of the technology, and increased costs.
Andrii Sliusar "Module Architecture of React-Redux Applications"LogeekNightUkraine
This document discusses module architecture for React-Redux applications. It recommends splitting an application into semantically named modules to improve development speed, scalability, and reduced maintenance costs. The modularity level depends on the application scale, with everything identifiable as a separate component separated. Minimal connectivity between modules ensures the architecture remains scalable and readable. Business logic and data models should be extracted and organized by domain. Selectors wire components to the state model in a clear way. Actions are standardized between modules. A modular architecture has pros like scalability and reduced costs, and a potential con of increased number of files/folders.
Domain Driven Design main concepts
This presentation is a summary of the book "Domain Driven Design" from InfoQ.
Here is the link: http://www.infoq.com/minibooks/domain-driven-design-quickly
Older (2008) presentation I gave internally to SunGard to educate developers on C# and LINQ. LINQ still rocks, and the concepts I cover are important language features while C# developers should be asked in interviews event today.
This document provides an introduction to the Unified Modeling Language (UML). It discusses the origins of UML and how it was created through the unification of several object-oriented modeling languages. It then describes the main types of UML diagrams including use case diagrams, activity diagrams, class diagrams, state machine diagrams, and others. For each diagram type, it provides an example diagram and discusses when and how it should be used. The document is intended to teach students about UML and the various diagrams that can be used for software modeling and design.
Idea: add OO features to the type system of SQL. I.e. “plain old SQL”, but...
columns can be of new types (ADTs)
user-defined methods on ADTs
columns can be of complex types
reference types and “deref”
inheritance and collection inheritance
old SQL schemas still work! (backwards compatibility)
Relational vendors all moving this way (SQL:1999).
The document discusses various design patterns categorized as creational, structural, and behavioral. Creational patterns deal with object creation mechanisms and include singleton, factory method, abstract factory, builder, and prototype patterns. Structural patterns focus on class and object composition and include adapter, bridge, composite, decorator, facade, flyweight, and proxy patterns. Behavioral patterns deal with communication between objects and include observer, strategy, chain of responsibility, command, interpreter, iterator, mediator, memento, state, template method, and visitor patterns. Each pattern is explained with an example.
This document discusses object-oriented programming (OOP) concepts and languages. It begins with an introduction to programming languages from low-level machine languages to high-level languages. It then covers OOP concepts like classes, objects, encapsulation, inheritance, and polymorphism. It provides examples to illustrate these concepts. The document also discusses advantages and disadvantages of OOP as well as its suitability for complex, modular systems that can benefit from code reuse.
The document discusses key concepts related to memory models in C#, including:
1. The compilation process involves lexical analysis, parsing, semantic analysis, optimization, and code generation.
2. Value types are stored on the stack while reference types are stored on the heap.
3. The garbage collector performs memory management by freeing up unused memory on the heap.
The document discusses Unit II of a syllabus which covers class diagrams, including elaboration, domain modeling, finding conceptual classes and relationships. It discusses when to use class diagrams and provides examples of a class diagram for a hotel management system. It also discusses inception and elaboration phases in software development processes and provides artifacts used in elaboration. Finally, it discusses domain modeling including how to identify conceptual classes, draw associations, and avoid adding too many associations.
The document provides an overview of system development methodologies, with a focus on structured analysis and design versus object-oriented analysis and design. It discusses the analysis, design, and implementation phases of an object-oriented systems development life cycle. In the analysis phase, it describes how use case diagrams and class diagrams are used to model object-oriented analysis using the Unified Modeling Language. It also provides guidance on identifying domain classes from problem statements by looking for noun phrases and applying subject matter expertise.
The document provides an overview of design patterns, including creational patterns. It defines the Abstract Factory pattern, which provides an interface for creating families of related or dependent objects without specifying their concrete classes. The Abstract Factory pattern allows for creating objects in a generic way and enforces creation constraints. It works by having a super-factory that creates other factories to generate related object types. The document outlines the intent, structure, collaboration and consequences of applying the Abstract Factory pattern, as well as how to implement and apply it to solve object creation problems in a flexible manner.
Marco Mancuso - Data Context InteractioncosenzaLab
DCI is a software design paradigm that separates an application into three main components: the domain model (data), contexts (use cases or system behaviors), and roles that objects take within interactions. It aims to separate code for changing system behaviors from code representing stable domain knowledge. This improves code readability and allows developers to reason about system-level behaviors rather than just object-level behaviors. DCI was created by Trygve Reenskaug and refined by James O. Coplien. It is meant to complement MVC by focusing more on system behaviors and user mental models.
This document discusses the design patterns used in the Lexi document editor. It describes problems related to document structure, formatting, user interface, multiple platforms, and user operations. Patterns used include Composite to represent document structure, Strategy for formatting algorithms, Decorator for embellishing the UI, Abstract Factory for look and feel, Bridge for multiple platforms, Command for undoable operations, Iterator for traversal, and Visitor for analysis capabilities. The goal was to design for flexibility, independence of components, and extensibility.
The document discusses several object-oriented design patterns including Iterator, Decorator, Strategy, and Observer providing an overview and examples of each pattern describing how they address common programming problems and their benefits for reusable and flexible code. It also discusses how design patterns were documented in influential books and how they provide solutions to problems that occur frequently in software design through interfaces and classes that can be implemented in many different ways.
The document introduces design patterns and their key elements. It discusses how design patterns help address common object-oriented design problems like determining appropriate objects, object granularity, specifying interfaces, and implementations. Key points made include: design patterns make reuse easier, express proven techniques, help choose reusable designs, and get a design "right" faster. Each pattern has a name, problem description, solution, and consequences. Patterns are organized by purpose (creational, structural, behavioral) and scope (class, object).
This document introduces design patterns and their key elements. Design patterns help designers solve common problems in object-oriented software design and make reusable designs more accessible. A pattern has four elements - a name, the problem it addresses, the solution, and consequences of applying the pattern. Patterns are organized based on their purpose (creational, structural, behavioral) and scope (object, class, etc.). The document outlines 23 classic design patterns organized in a catalog.
This document discusses the design of a document editor called Lexi. It addresses several design problems including document structure, formatting, user interface embellishment, supporting multiple look-and-feel standards and window systems, and user operations like undo/redo. It proposes solutions to these problems using several design patterns like composite, decorator, factory, bridge, command, and iterator patterns to achieve flexibility, extensibility and independence of algorithms and structures. The goal is to create a reusable and extensible design that can be understood and communicated effectively between team members.
The document discusses object-oriented modeling and the Unified Modeling Language (UML). It describes the evolution of UML from earlier object-oriented modeling methods to its current standardization. The key aspects of UML covered include its scope as a standard modeling language, the modeling elements it incorporates like use cases, classes, objects, and diagrams, and how it addresses complexity through concepts like abstraction, encapsulation, and inheritance.
- An object-relational database (ORD) or object-relational database management system (ORDBMS) supports objects, classes, and inheritance directly in the database schema and query language, while also retaining the relational model.
- An ORDBMS supports an extended form of SQL called SQL3 for handling abstract data types. It allows storage of complex data types like images and location data.
- Key advantages of ORDBMS include reuse and sharing of code through inheritance, increased productivity for developers and users, and more powerful query capabilities. Key challenges include complexity, immaturity of the technology, and increased costs.
Andrii Sliusar "Module Architecture of React-Redux Applications"LogeekNightUkraine
This document discusses module architecture for React-Redux applications. It recommends splitting an application into semantically named modules to improve development speed, scalability, and reduced maintenance costs. The modularity level depends on the application scale, with everything identifiable as a separate component separated. Minimal connectivity between modules ensures the architecture remains scalable and readable. Business logic and data models should be extracted and organized by domain. Selectors wire components to the state model in a clear way. Actions are standardized between modules. A modular architecture has pros like scalability and reduced costs, and a potential con of increased number of files/folders.
Domain Driven Design main concepts
This presentation is a summary of the book "Domain Driven Design" from InfoQ.
Here is the link: http://www.infoq.com/minibooks/domain-driven-design-quickly
Older (2008) presentation I gave internally to SunGard to educate developers on C# and LINQ. LINQ still rocks, and the concepts I cover are important language features while C# developers should be asked in interviews event today.
This document provides an introduction to the Unified Modeling Language (UML). It discusses the origins of UML and how it was created through the unification of several object-oriented modeling languages. It then describes the main types of UML diagrams including use case diagrams, activity diagrams, class diagrams, state machine diagrams, and others. For each diagram type, it provides an example diagram and discusses when and how it should be used. The document is intended to teach students about UML and the various diagrams that can be used for software modeling and design.
Idea: add OO features to the type system of SQL. I.e. “plain old SQL”, but...
columns can be of new types (ADTs)
user-defined methods on ADTs
columns can be of complex types
reference types and “deref”
inheritance and collection inheritance
old SQL schemas still work! (backwards compatibility)
Relational vendors all moving this way (SQL:1999).
The document discusses various design patterns categorized as creational, structural, and behavioral. Creational patterns deal with object creation mechanisms and include singleton, factory method, abstract factory, builder, and prototype patterns. Structural patterns focus on class and object composition and include adapter, bridge, composite, decorator, facade, flyweight, and proxy patterns. Behavioral patterns deal with communication between objects and include observer, strategy, chain of responsibility, command, interpreter, iterator, mediator, memento, state, template method, and visitor patterns. Each pattern is explained with an example.
This document discusses object-oriented programming (OOP) concepts and languages. It begins with an introduction to programming languages from low-level machine languages to high-level languages. It then covers OOP concepts like classes, objects, encapsulation, inheritance, and polymorphism. It provides examples to illustrate these concepts. The document also discusses advantages and disadvantages of OOP as well as its suitability for complex, modular systems that can benefit from code reuse.
The document discusses key concepts related to memory models in C#, including:
1. The compilation process involves lexical analysis, parsing, semantic analysis, optimization, and code generation.
2. Value types are stored on the stack while reference types are stored on the heap.
3. The garbage collector performs memory management by freeing up unused memory on the heap.
The document discusses Unit II of a syllabus which covers class diagrams, including elaboration, domain modeling, finding conceptual classes and relationships. It discusses when to use class diagrams and provides examples of a class diagram for a hotel management system. It also discusses inception and elaboration phases in software development processes and provides artifacts used in elaboration. Finally, it discusses domain modeling including how to identify conceptual classes, draw associations, and avoid adding too many associations.
The document provides an overview of system development methodologies, with a focus on structured analysis and design versus object-oriented analysis and design. It discusses the analysis, design, and implementation phases of an object-oriented systems development life cycle. In the analysis phase, it describes how use case diagrams and class diagrams are used to model object-oriented analysis using the Unified Modeling Language. It also provides guidance on identifying domain classes from problem statements by looking for noun phrases and applying subject matter expertise.
The document provides an overview of design patterns, including creational patterns. It defines the Abstract Factory pattern, which provides an interface for creating families of related or dependent objects without specifying their concrete classes. The Abstract Factory pattern allows for creating objects in a generic way and enforces creation constraints. It works by having a super-factory that creates other factories to generate related object types. The document outlines the intent, structure, collaboration and consequences of applying the Abstract Factory pattern, as well as how to implement and apply it to solve object creation problems in a flexible manner.
Marco Mancuso - Data Context InteractioncosenzaLab
DCI is a software design paradigm that separates an application into three main components: the domain model (data), contexts (use cases or system behaviors), and roles that objects take within interactions. It aims to separate code for changing system behaviors from code representing stable domain knowledge. This improves code readability and allows developers to reason about system-level behaviors rather than just object-level behaviors. DCI was created by Trygve Reenskaug and refined by James O. Coplien. It is meant to complement MVC by focusing more on system behaviors and user mental models.
How to Fix the Import Error in the Odoo 17Celine George
An import error occurs when a program fails to import a module or library, disrupting its execution. In languages like Python, this issue arises when the specified module cannot be found or accessed, hindering the program's functionality. Resolving import errors is crucial for maintaining smooth software operation and uninterrupted development processes.
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
Main Java[All of the Base Concepts}.docxadhitya5119
This is part 1 of my Java Learning Journey. This Contains Custom methods, classes, constructors, packages, multithreading , try- catch block, finally block and more.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
it describes the bony anatomy including the femoral head , acetabulum, labrum . also discusses the capsule , ligaments . muscle that act on the hip joint and the range of motion are outlined. factors affecting hip joint stability and weight transmission through the joint are summarized.
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...PECB
Denis is a dynamic and results-driven Chief Information Officer (CIO) with a distinguished career spanning information systems analysis and technical project management. With a proven track record of spearheading the design and delivery of cutting-edge Information Management solutions, he has consistently elevated business operations, streamlined reporting functions, and maximized process efficiency.
Certified as an ISO/IEC 27001: Information Security Management Systems (ISMS) Lead Implementer, Data Protection Officer, and Cyber Risks Analyst, Denis brings a heightened focus on data security, privacy, and cyber resilience to every endeavor.
His expertise extends across a diverse spectrum of reporting, database, and web development applications, underpinned by an exceptional grasp of data storage and virtualization technologies. His proficiency in application testing, database administration, and data cleansing ensures seamless execution of complex projects.
What sets Denis apart is his comprehensive understanding of Business and Systems Analysis technologies, honed through involvement in all phases of the Software Development Lifecycle (SDLC). From meticulous requirements gathering to precise analysis, innovative design, rigorous development, thorough testing, and successful implementation, he has consistently delivered exceptional results.
Throughout his career, he has taken on multifaceted roles, from leading technical project management teams to owning solutions that drive operational excellence. His conscientious and proactive approach is unwavering, whether he is working independently or collaboratively within a team. His ability to connect with colleagues on a personal level underscores his commitment to fostering a harmonious and productive workplace environment.
Date: May 29, 2024
Tags: Information Security, ISO/IEC 27001, ISO/IEC 42001, Artificial Intelligence, GDPR
-------------------------------------------------------------------------------
Find out more about ISO training and certification services
Training: ISO/IEC 27001 Information Security Management System - EN | PECB
ISO/IEC 42001 Artificial Intelligence Management System - EN | PECB
General Data Protection Regulation (GDPR) - Training Courses - EN | PECB
Webinars: https://pecb.com/webinars
Article: https://pecb.com/article
-------------------------------------------------------------------------------
For more information about PECB:
Website: https://pecb.com/
LinkedIn: https://www.linkedin.com/company/pecb/
Facebook: https://www.facebook.com/PECBInternational/
Slideshare: http://www.slideshare.net/PECBCERTIFICATION
3. R
R
R
Motivation
• Developing software is hard
• Designing reusable software is more
challenging
– finding good objects and abstractions
– flexibility, modularity, elegance reuse
– takes time for them to emerge, trial and
error
• Successful designs do exist
– exhibit recurring class and object
structures
4. R
R
R
Design Pattern
• Describes recurring design structure
– names, abstracts from concrete designs
– identifies classes, collaborations,
responsibilities
– applicability, trade-offs, consequences
5. R
R
R
Becoming a Chess Master
• First learn rules and physical requirements
– e.g., names of pieces, legal movements, chess
board geometry and orientation, etc.
• Then learn principles
– e.g, relative value of certain pieces, strategic value
of center squares, power of a threat, etc.
• To become a Master of chess, one must
study the games of other masters
– These games contain patterns that must be
understood, memorized, and applied repeatedly.
• There are hundreds of these patterns
6. R
R
R
Becoming a Software Design Master
• First learn rules
– e.g., algorithms, data structures, and languages of
software.
• Then learn principles
– e.g., structured programming, modular
programming, object-oriented programming, etc.
• To become a Master of SW design, one must
study the designs of other masters
– These designs contain patterns that must be
understood, memorized, and applied repeatedly.
• There are hundreds of these patterns
7. R
R
R
Design Patterns
• Design patterns represent solutions to
problems that arise when developing
software within a particular context
– “Patterns == problem/solution pairs in a
context”
• Patterns capture the static and dynamic
structure and collaboration among key
participants in software designs
– Especially good for describing how and
why to resolve non-functional issues
8. R
R
R
Applications
• Wide variety of application domains:
– drawing editors, banking, CAD, CAE,
cellular network management, telecomm
switches, program visualization
• Wide variety of technical areas:
– user interface, communications, persistent
objects, O/S kernels, distributed systems
9. R
R
R
Design Pattern Descriptions
• Main Parts:
– Name and Classification (see table in two more slides)
– Intent: Problem and Context
– Also known as (other well-known names)
– Motivation: scenario illustrates a design problem
– Applicability: situations where pattern can be applied
– Structure: graphical representation of classes (class diagram, interaction
diagram)
– Participants: objects/classes and their responsibilities
– Collaborations: how participants collaborate
– Consequences: trade-offs and results
– Implementation: pitfalls, hints, techniques for coding; language-specific issues
– Sample Code
– Known Uses: examples of pattern in real systems
– Related Patterns: closely related; what are diffs.
• Pattern descriptions are often independent of programming language or
implementation details
10. R
R
R
Design Pattern Space
• Creational patterns:
– Deal with initializing and configuring classes and
objects
• Structural patterns:
– Deal with decoupling interface and implementation
of classes and objects
– Composition of classes or objects
• Behavioral patterns:
– Deal with dynamic interactions among societies of
classes and objects
– How they distribute responsibility
11. R
R
R
Categorize Design Patterns
Characterization
Creational Structural Behavioral
Class Factory Method Adapter (class) Template Method
Bridge (class)
Object Abstract Factory Adapter (object) Chain of Responsibility
Prototype Bridge (object) Command
Singleton Flyweight Iterator (object)
Decorator Mediator
Proxy Memento
Observer
State
Strategy
Comp Builder Composite Interpreter
Façade Iterator (compound)
Visitor
12. R
R
R
Categorization Terms
• Jurisdiction/Scope: domain over which a
pattern applies
– Class Jurisdiction: relationships between base
classes and their subclasses
• Static semantics
– Object Jurisdiction: relationships between peer
objects
– Compound Jurisdiction: recusrive object structures
• Some patterns apply to multiple jurisdictions.
13. R
R
R
Class Jurisdiction
• Class Creational: abstract how objects are instantiated
– hide specifics of creation process
– may want to delay specifying a class name explicitly when
instantiating an object
– just want a specific protocol
• Example:
– Use of Factory Method: instantiate members in base classes with
objects created by subclasses.
– Abstract Application class: create application-specific documents
conforming to particular Document type
– Application instantiates these Document objects by calling the
factory method DoMakeDocument
– Method is overridden in classes derived from Application
– Subclass DrawApplication overrides DoMakeDocument to return a
DrawDocument object
14. R
R
R
Class Jurisdiction
• Class Structural: use inheritance to compose protocols
or code
– Example:
• Adapter Pattern: makes one interface (Adaptee’s) conform to
another --> uniform abstraction of different interfaces.
• Class Adapter inherits privately from an Adaptee class.
• Adapter then expresses its interface in terms of the Adaptee’s.
• Class Behavioral: capture how classes cooperate with
their subclasses to satisfy semantics.
– Template Method: defines algorithms step by step.
– Each step can invoke an abstract method (that must be defined
by the subclass) or a base method.
– Subclass must implement specific behavior to provide required
services
15. R
R
R
Object Jurisdiction
• Object Patterns all apply various forms of
non-recursive object composition.
• Object Composition: most powerful form of
reuse
• Reuse of a collection of objects is better
achieved through variations of their
composition, rather than through subclassing.
16. R
R
R
Object Creational
• Creational Object Patterns: abstract how sets of objects are
created
• Example:
– Abstract Factory: create “product” objects through generic
interface
• Subclasses may manufacture specialized versions or compositions
of objects as allowed by this generic interface
– User Interface Toolkit: 2 types of scroll bars (Motif and Open Look)
– Don’t want to hard-code specific one; an environment variable decides
– Class Kit: encapsulates scroll bar creation; an abstract factory that
abstracts the specific type of scroll bar to instantiate
– Kit: defines protocol for creating scroll bars (and other UI entities)
– Subclasses of Kit refine operations in the protocol to return specialized
types of scroll bars.
– Subclasses MotifKit and OpenLookKit each have scroll bar operation.
17. R
R
R
Object Structural
• Describe ways to assemble objects to realize new
functionality
– Added flexibility inherent in object composition due to ability
to change composition at run-time
– not possible with static class composition.
• Example:
– Proxy: acts as convenient surrogate or placeholder
for another object.
• Remote Proxy: local representative for object in a different
address space
• Virtual Proxy: represent large object that should be
loaded on demand
• Protected Proxy: protect access to the original object
18. R
R
R
Object Behavioral
• Describe how a group of peer objects cooperate to
perform a task that can be carried out by itself.
• Example:
– Strategy Pattern: objectifies an algorithm
– Text Composition Object: support different line breaking algorithms
• Don’t want to hard-code all algs into text composition class/subclasses
– Objectify different algs and provide them as Compositor
subclasses (contains criteria for line breaking strategies)
– Interface for Compositors defined by Abstract Compositor Class
• Derived classes provide different layout strategies (simple line breaks,
left/right justification, etc.)
– Instances of Compositor subclasses couple with text composition at
run-time to provide text layout
– Whenever text composition has to find line breaks, forwards the
responsibility to its current Compositor object.
19. R
R
R
Compound Jurisdiction
• Affect Recursive Object Structures
• Compound Creational: creation of recursive object
structures
• Example:
– Builder Pattern: Builder base class defines a generic interface
for incrementally constructing recursive object structures
• Hides details of how objects in structure are created,
represented, and composed
• Changing/adding new representation only requires defining a
new Builder Class
• Clients are unaffected by changes to Builder
20. R
R
R
Compound Jurisdiction Example
• RTF (Rich Text Format) Parser for document exchange format:
handle multiple format conversions (ASCII, also be able to edit
in text viewer object)
– Make the parser independent of different conversions
• Create RTFReader class that takes a Builder object as argument
– RTFReader knows how to parse the RTF format and notifies the
Builder whenever it recognizes text or an RTF control word
– Builder is responsible for creating corresponding data structure
– Builder separates the parsing algorithm from the creation of the
structure resulting from the parsing
– Parsing algorithm can be reused to create any number of different
data representations
– ASCII builder ignores all notifications except plain text
– Text builder uses the notifications to create more complex text
structure
21. R
R
R
Compound Structural
• Capture Techniques for structuring recursive object
structures
• Example:
– Facade Pattern (Wrapper): describes how to flexibly attach
additional properties and services to an object
• Can be nested recursively; compose more complex object
structures
– User Interface Example:
• A Facade containing a single UI component can add decorations
such as border, shadows,scroll bars, or services (scrolling and
zooming)
• Facade must conform to interface of its wrapped component and
forward messages to it
• Facade can perform additional actions (e.g., drawing border
around component) either before or after forwarding a message.
22. R
R
R
Compound Behavioral
• Deal with behavior in recursive object structures
• Example:
– Iterator Pattern: Iteration over a recursive structure
– Traversal strategies for a given structure:
• Extract and implement ea traversal strategy in an Iterator class.
• Iterators objectify traversal algs over recursive structures
• Different iterators can implement pre-order, in-order, post-order
traversals
• Require nodes in structure to provide services to enumerate
their sub-structures
• Don’t need to hard-code traversal algs throughout classes of
objects in composite structure
• Iterators may be replaced at run-time to provide alternate
traversals.
23. R
R
R
Creational Patterns
• Factory Method:
– method in a derived class creates associates
• Abstract Factory:
– Factory for building related objects
• Builder:
– Factory for building complex objects incrementally
• Prototype:
– Factory for cloning new instances from a prototype
• Singleton:
– Factory for a singular (sole) instance
24. R
R
R
Structural Patterns:
• Adapter:
– Translator adapts a
server interface for a
client
• Bridge:
– Abstraction for binding
one of many
implementations
• Composite:
– Structure for building
recursive aggregations
• Decorator:
– Decorator extends an
object transparently
• Facade:
– simplies the interface for
a subsystem
• Flyweight:
– many fine-grained
objects shared efficiently.
• Proxy:
– one object approximates
another
25. R
R
R
Behavioral Patterns
• Chain of Responsibility
– request delegated to the
responsible service
provider
• Command:
– request is first-class
object
• Interpreter:
– language interpreter for a
small grammar
• Iterator:
– Aggregate elements are
accessed sequentially
• Mediator:
– coordinates interactions
between its associates
• Memento:
– snapshot captures and
restores object states
privately
• Observer:
– dependents update
automatically when
subject changes
• State:
– object whose behavior
depends on its state
26. R
R
R
Behavior Patterns (more)
• Strategy:
– Abstraction for selecting one of many algorithms
• Template Method:
– algorithm with some steps supplied by a derived class
• Visitor:
– operations applied to elements of a heterogeneous object
structure
27. R
R
R
When to Use Patterns
• Solutions to problems that recur with variations
– No need for reuse if problem only arises in one context
• Solutions that require several steps:
– Not all problems need all steps
– Patterns can be overkill if solution is a simple linear set of
instructions
• Solutions where the solver is more interested in the
existence of the solution than its complete derivation
– Patterns leave out too much to be useful to someone who
really wants to understand
• They can be a temporary bridge
28. R
R
R
What Makes it a Pattern
A Pattern must:
– Solve a problem
• must be useful
– Have a context
• describe where the
solution can be used
– Recur
• relevant in other
situations
– Teach
• provide sufficient
understanding to tailor
the solution
– have a name
• referenced consistently
29. R
R
R
Benefits of Design Patterns
• Design patterns enable large-scale reuse of
software architectures
– also help document systems
• Patterns explicitly capture expert knowledge
and design tradeoffs
– make it more widely available
• Patterns help improve developer
communication
– Pattern names form a vocabulary
• Patterns help ease the transition to OO
technology
30. R
R
R
Drawbacks to Design Patterns
• Patterns do not lead to direct code reuse
• Patterns are deceptively simple
• Teams may suffer from pattern overload
• Patterns are validated by experience and
discussion rather than by automated testing
• Integrating patterns into a SW development
process is a human-intensive activity.
31. R
R
R
Suggestions for Effective Pattern Use
• Do not recast everything as a pattern
– Instead, develop strategic domain patterns and reuse
existing tactical patterns
• Institutionalize rewards for developing patterns
• Directly involve pattern authors with application
developers and domain experts
• Clearly document when patterns apply and do not
apply
• Manage expectations carefully.