SlideShare a Scribd company logo
Domain Logic Patterns
Guided by :Priya Deshpande
Presented By:Shweta Ghate
 Domain Logic describe the functional
algorithms or business logic that handle the
information exchange between a database and
a user interfaces.
 A well organized Domain Logic components
are easy to maintain and scale.
 Transition Script
 Domain Model
 Table Moduless
 A Service Layer is placed over an underlying
Domain Model or Table Module
 Transaction Script organizes business logic by
procedures where each procedure handles a
single request from the presentation.
Revenue Recognition Problem
 A Transaction Script organizes all this logic
primarily as a single procedure, making calls
directly to the database or through a thin
database wrapper
 Each transaction will have its own Transaction
Script, although common subtasks can be
broken into sub procedures.
 With Transaction Script the domain logic is
primarily organized by the transactions that you
carry out with the system.
 For e.g.: If your need is to book a hotel room,
the logic to check room availability, calculate
rates, a the database is found inside the Book
Hotel Room procedure
Advantages
It is independent of other transaction.
It allow you to manipulate instances of scripts
as objects at runtime.
When to use it…?
Glory of Transaction Script is its simplicity .
As the business logic gets more complicated
,we can move to the Domain Model.
 Domain Model is an object model of the
domain that incorporates both behavior
and data.
Revenue Recognition Problem
 More complex business domains need to build in
Domain Model.
 It will give you many more options in structuring the
code, increasing readability and decreasing
duplication.
 Domain Model mingles data and process, has
multivalued attributes and a complex web of
associations, and uses inheritance.
 Simple Domain Model
 looks very much like the database design with
mostly one domain object for each database table.
 use Active Record
 Rich Domain Model
 look different from the database design, with
inheritance, strategies, and other patterns, and
complex webs of small interconnected objects.
 requires Data Mapper
 If you have complicated and ever changing business rules
involving validation, calculations, and derivations,
chances are that you'll want an object model to handle
them.
 Data Mapper which helps keep your Domain Model
independent from the database and is the best approach
to handle cases where the Domain Model and database
schema diverge.
 One of the problems with Domain Model is
the interface with relational databases.
 If you have many orders, a Domain Mode
will have one order object per order.
To overcome such problems we move to Table
Module.
 Table Module is a single instance that
handles the business logic for all rows in
a database table or view.
Revenue Recognition Problem
 A Table Module organizes domain logic with
one class per table in the database and a single
instance of a class contains the various
procedures that will act on the data.
 Table Module will have one object to handle
all orders.
 The strength of the of Table Module is that it allows
you to package the data and behavior together and at
the same time play to the strengths of the relational
database.
 We use Table Module with a backing data structure
that's table oriented.
 The tabular data is normally the result of SQL call
and is held in a Record Set that mimics a SQL table .
 Grouping the behavior with the table gives you many
of the benefits of encapsulation.
 The Table Module may be an instance or it may be a
collection of static methods.
 The Table Module may include queries as factory
methods.
 Table Module is very much based on table-oriented
data ,so we can use it when we access tabular data
using Record Set .
 Table Module allows you to fit business logic into the
application in a well-organized manner, without
losing the way the various elements work on the
tabular data.
 Service Layer defines an application's boundary with
a layer of services that establishes a set of available
operations and coordinates the application's response
in each operation.
 It encapsulates the application's business
logic, controlling transactions and coordinating
responses in the implementation of its operations
 Service Layer is a pattern for organizing business
 Service Layer factors each kind of business logic into
a separate layer, yielding the usual benefits of
layering and rendering the pure domain object classes
more reusable from application to application.
2 Basic implementation variations are
 Domain facade approach
 Operation script approach
 Service Layer is implemented as a set of thin facades
over a Domain Model
 The classes implementing the facades don't
implement any business logic but the Domain Model
implements all the business logics
 The thin facades establish a boundary and set of
operation through which client layers interact with
the application, exhibiting the defining characteristics
of Service Layer.
 Service Layer is implemented as a set of thicker
classes that directly implement application logic but
delegate to encapsulated domain object classes for
domain logic.
 A Service Layer is comprised of these application
service classes, which should extend a Layer
Supertype , abstracting their responsibilities and
common behaviors.

 Service Layer classes are well remote invocation
from an interface granularity perspective.
 Starting with a locally invocable Service Layer
whose method signatures deal in domain object, we
can add services remotability when we need it by
putting Remote Facades on your Service Layer .
 Identifying the operations needed on a Service Layer
boundary is pretty straightforward and they're
determined by the needs of Service Layer clients.
 The starting point for identifying Service Layer
operations is the use case model and the user
interface design for the application.
 The benefit of Service Layer is that it defines a
common set of application operations available to
many kinds of clients.
 An application with more than one kind of type of its
business logic, and complex response in its use cases
involving multiple transaction resources, it makes a
lot of sense to include a Service Layer with container-
managed, transactions, even in an undistributed
architecture.
 Domain Model you may want to consider Service
Layer to give your Domain Model a more distinct
API
 Patterns of Enterprise Application Architecture,
Martin Fowler, Addison-Wesley Professional,
2003,ISBN-10: 0321127420 ISBN-13:
9780321127426
 Paper :Homework 1 : Domain Logic , by Basanta Raj
Onta (111701), Computer Science – August 2010.
Domain logic patterns of Software Architecture

More Related Content

What's hot

Chapter18
Chapter18Chapter18
Chapter18
gourab87
 
Chapter 5 Database Transaction Management
Chapter 5 Database Transaction ManagementChapter 5 Database Transaction Management
Chapter 5 Database Transaction Management
Eddyzulham Mahluzydde
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
Neha Kulkarni
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systemsViet-Trung TRAN
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database Performance
Mark Ginnebaugh
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
Dhani Ahmad
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)welcometofacebook
 
3 Tier Architecture
3 Tier Architecture3 Tier Architecture
3 Tier Architecture
guestd0cc01
 
Normalization
NormalizationNormalization
Normalization
Salman Memon
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple language
FirstWire Apps
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Advance database system (part 3)
Advance database system (part 3)Advance database system (part 3)
Advance database system (part 3)
Abdullah Khosa
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
ngupt28
 
Dbms acid
Dbms acidDbms acid
Dbms acid
Zaheer Soomro
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMSkoolkampus
 
Database normalization
Database normalizationDatabase normalization
Database normalization
Edward Blurock
 
Fundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of recordsFundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of records
Devyani Vaidya
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
Arno Huetter
 
Database performance tuning and query optimization
Database performance tuning and query optimizationDatabase performance tuning and query optimization
Database performance tuning and query optimization
Dhani Ahmad
 

What's hot (20)

Chapter18
Chapter18Chapter18
Chapter18
 
Chapter 5 Database Transaction Management
Chapter 5 Database Transaction ManagementChapter 5 Database Transaction Management
Chapter 5 Database Transaction Management
 
Ext filesystem4
Ext filesystem4Ext filesystem4
Ext filesystem4
 
Introduction to distributed file systems
Introduction to distributed file systemsIntroduction to distributed file systems
Introduction to distributed file systems
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database Performance
 
Transaction management and concurrency control
Transaction management and concurrency controlTransaction management and concurrency control
Transaction management and concurrency control
 
Physical database design(database)
Physical database design(database)Physical database design(database)
Physical database design(database)
 
3 Tier Architecture
3 Tier Architecture3 Tier Architecture
3 Tier Architecture
 
Normalization
NormalizationNormalization
Normalization
 
Learn Normalization in simple language
Learn Normalization in simple languageLearn Normalization in simple language
Learn Normalization in simple language
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Advance database system (part 3)
Advance database system (part 3)Advance database system (part 3)
Advance database system (part 3)
 
Chapter 3
Chapter 3Chapter 3
Chapter 3
 
Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Dbms acid
Dbms acidDbms acid
Dbms acid
 
17. Recovery System in DBMS
17. Recovery System in DBMS17. Recovery System in DBMS
17. Recovery System in DBMS
 
Database normalization
Database normalizationDatabase normalization
Database normalization
 
Fundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of recordsFundamental file structure concepts & managing files of records
Fundamental file structure concepts & managing files of records
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
 
Database performance tuning and query optimization
Database performance tuning and query optimizationDatabase performance tuning and query optimization
Database performance tuning and query optimization
 

Viewers also liked

Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Paulo Gandra de Sousa
 
MVVM de A à Z
MVVM de A à ZMVVM de A à Z
MVVM de A à Z
Microsoft
 
Cache memory
Cache memoryCache memory
Cache memory
Eklavya Gupta
 
HATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from RESTHATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from RESTelliando dias
 
Cache Design for an Alpha Microprocessor
Cache Design for an Alpha MicroprocessorCache Design for an Alpha Microprocessor
Cache Design for an Alpha Microprocessor
Bharat Biyani
 
Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...
Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...
Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...
Mikhail Kurnosov
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
Chinh Ngo Nguyen
 
Ensayo observación
Ensayo observaciónEnsayo observación
Ensayo observaciónlauhernagar
 
Cache optimization
Cache optimizationCache optimization
Cache optimizationKavi Kathir
 
Cache Optimization with Akamai
Cache Optimization with AkamaiCache Optimization with Akamai
Cache Optimization with AkamaiBlake Crosby
 
Memory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureMemory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureShweta Ghate
 
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address TranslationMemory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
Farwa Ansari
 
Classification of memory hierarchy in system unit
Classification of memory hierarchy in system unitClassification of memory hierarchy in system unit
Classification of memory hierarchy in system unit
Deepjyoti Talukdar
 
A summary of software architecture guide
A summary of software architecture guideA summary of software architecture guide
A summary of software architecture guideTriet Ho
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
Mudasir Qazi
 
Future of Integration | MuleSoft
Future of Integration | MuleSoftFuture of Integration | MuleSoft
Future of Integration | MuleSoft
MuleSoft
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewBrett Meyer
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoft
MuleSoft
 
Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models
Marraju Bollapragada V
 

Viewers also liked (20)

Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)Patterns of Enterprise Application Architecture (by example)
Patterns of Enterprise Application Architecture (by example)
 
MVVM de A à Z
MVVM de A à ZMVVM de A à Z
MVVM de A à Z
 
Cache memory
Cache memoryCache memory
Cache memory
 
HATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from RESTHATEOAS: The Confusing Bit from REST
HATEOAS: The Confusing Bit from REST
 
Cache Design for an Alpha Microprocessor
Cache Design for an Alpha MicroprocessorCache Design for an Alpha Microprocessor
Cache Design for an Alpha Microprocessor
 
Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...
Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...
Лекция 4. Оптимизация доступа к памяти (Memory access optimization, cache opt...
 
3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Patterns of enterprise application architecture
Patterns of enterprise application architecturePatterns of enterprise application architecture
Patterns of enterprise application architecture
 
Ensayo observación
Ensayo observaciónEnsayo observación
Ensayo observación
 
Cache optimization
Cache optimizationCache optimization
Cache optimization
 
Cache Optimization with Akamai
Cache Optimization with AkamaiCache Optimization with Akamai
Cache Optimization with Akamai
 
Memory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer ArchitechtureMemory technology and optimization in Advance Computer Architechture
Memory technology and optimization in Advance Computer Architechture
 
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address TranslationMemory Hierarchy Design, Basics, Cache Optimization, Address Translation
Memory Hierarchy Design, Basics, Cache Optimization, Address Translation
 
Classification of memory hierarchy in system unit
Classification of memory hierarchy in system unitClassification of memory hierarchy in system unit
Classification of memory hierarchy in system unit
 
A summary of software architecture guide
A summary of software architecture guideA summary of software architecture guide
A summary of software architecture guide
 
Design Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVMDesign Pattern - MVC, MVP and MVVM
Design Pattern - MVC, MVP and MVVM
 
Future of Integration | MuleSoft
Future of Integration | MuleSoftFuture of Integration | MuleSoft
Future of Integration | MuleSoft
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate Overview
 
Application Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoftApplication Architecture: The Next Wave | MuleSoft
Application Architecture: The Next Wave | MuleSoft
 
Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models Agile vs Iterative vs Waterfall models
Agile vs Iterative vs Waterfall models
 

Similar to Domain logic patterns of Software Architecture

Domain Logic Patterns
Domain Logic PatternsDomain Logic Patterns
Domain Logic Patterns
ElifTech
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Context
phanleson
 
L07 Oranizing Domain Logic
L07 Oranizing Domain LogicL07 Oranizing Domain Logic
L07 Oranizing Domain Logic
Ólafur Andri Ragnarsson
 
L13 Oranizing Domain Logic
L13 Oranizing Domain LogicL13 Oranizing Domain Logic
L13 Oranizing Domain Logic
Ólafur Andri Ragnarsson
 
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
iasaglobal
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSMizanur Sarker
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
Naga Muruga
 
Super applied in a sitecore migration project
Super applied in a sitecore migration projectSuper applied in a sitecore migration project
Super applied in a sitecore migration projectdodoshelu
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
GlobalLogic Ukraine
 
Peoplesoft PIA architecture
Peoplesoft PIA architecturePeoplesoft PIA architecture
Peoplesoft PIA architectureAmit rai Raaz
 
Soa interview questions (autosaved)
Soa interview questions (autosaved)Soa interview questions (autosaved)
Soa interview questions (autosaved)
xavier john
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
Muhammad Ali
 
Soa interview questions
Soa interview questionsSoa interview questions
Soa interview questions
xavier john
 
Contract First Modeling Services Using Uml
Contract First Modeling Services Using UmlContract First Modeling Services Using Uml
Contract First Modeling Services Using Uml
Rody Middelkoop
 
Overview of atg framework
Overview of atg frameworkOverview of atg framework
Overview of atg framework
Yousuf Roushan
 
J2EE Notes JDBC database Connectiviy and Programs related to JDBC
J2EE Notes JDBC database Connectiviy and Programs related to JDBCJ2EE Notes JDBC database Connectiviy and Programs related to JDBC
J2EE Notes JDBC database Connectiviy and Programs related to JDBC
ChaithraCSHirematt
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
Liran Zelkha
 
Serverless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdfServerless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdf
John Brian Ngugi Njuguna
 

Similar to Domain logic patterns of Software Architecture (20)

Domain Logic Patterns
Domain Logic PatternsDomain Logic Patterns
Domain Logic Patterns
 
Lecture 9 - SOA in Context
Lecture 9 - SOA in ContextLecture 9 - SOA in Context
Lecture 9 - SOA in Context
 
L07 Oranizing Domain Logic
L07 Oranizing Domain LogicL07 Oranizing Domain Logic
L07 Oranizing Domain Logic
 
L13 Oranizing Domain Logic
L13 Oranizing Domain LogicL13 Oranizing Domain Logic
L13 Oranizing Domain Logic
 
Building a SaaS Style Application
Building a SaaS Style ApplicationBuilding a SaaS Style Application
Building a SaaS Style Application
 
DDD
DDDDDD
DDD
 
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
 
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRSSeminar - Scalable Enterprise Application Development Using DDD and CQRS
Seminar - Scalable Enterprise Application Development Using DDD and CQRS
 
J2EE pattern 5
J2EE pattern 5J2EE pattern 5
J2EE pattern 5
 
Super applied in a sitecore migration project
Super applied in a sitecore migration projectSuper applied in a sitecore migration project
Super applied in a sitecore migration project
 
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
Java TechTalk "Spring boot made life easier with Kubernetes and Microservices"
 
Peoplesoft PIA architecture
Peoplesoft PIA architecturePeoplesoft PIA architecture
Peoplesoft PIA architecture
 
Soa interview questions (autosaved)
Soa interview questions (autosaved)Soa interview questions (autosaved)
Soa interview questions (autosaved)
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Soa interview questions
Soa interview questionsSoa interview questions
Soa interview questions
 
Contract First Modeling Services Using Uml
Contract First Modeling Services Using UmlContract First Modeling Services Using Uml
Contract First Modeling Services Using Uml
 
Overview of atg framework
Overview of atg frameworkOverview of atg framework
Overview of atg framework
 
J2EE Notes JDBC database Connectiviy and Programs related to JDBC
J2EE Notes JDBC database Connectiviy and Programs related to JDBCJ2EE Notes JDBC database Connectiviy and Programs related to JDBC
J2EE Notes JDBC database Connectiviy and Programs related to JDBC
 
Technology Overview
Technology OverviewTechnology Overview
Technology Overview
 
Serverless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdfServerless Computing and Serverless Patterns .pdf
Serverless Computing and Serverless Patterns .pdf
 

Recently uploaded

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
Jheel Barad
 

Recently uploaded (20)

Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Instructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptxInstructions for Submissions thorugh G- Classroom.pptx
Instructions for Submissions thorugh G- Classroom.pptx
 

Domain logic patterns of Software Architecture

  • 1. Domain Logic Patterns Guided by :Priya Deshpande Presented By:Shweta Ghate
  • 2.  Domain Logic describe the functional algorithms or business logic that handle the information exchange between a database and a user interfaces.  A well organized Domain Logic components are easy to maintain and scale.
  • 3.  Transition Script  Domain Model  Table Moduless  A Service Layer is placed over an underlying Domain Model or Table Module
  • 4.  Transaction Script organizes business logic by procedures where each procedure handles a single request from the presentation.
  • 6.  A Transaction Script organizes all this logic primarily as a single procedure, making calls directly to the database or through a thin database wrapper  Each transaction will have its own Transaction Script, although common subtasks can be broken into sub procedures.
  • 7.  With Transaction Script the domain logic is primarily organized by the transactions that you carry out with the system.  For e.g.: If your need is to book a hotel room, the logic to check room availability, calculate rates, a the database is found inside the Book Hotel Room procedure
  • 8. Advantages It is independent of other transaction. It allow you to manipulate instances of scripts as objects at runtime. When to use it…? Glory of Transaction Script is its simplicity . As the business logic gets more complicated ,we can move to the Domain Model.
  • 9.  Domain Model is an object model of the domain that incorporates both behavior and data.
  • 11.  More complex business domains need to build in Domain Model.  It will give you many more options in structuring the code, increasing readability and decreasing duplication.  Domain Model mingles data and process, has multivalued attributes and a complex web of associations, and uses inheritance.
  • 12.  Simple Domain Model  looks very much like the database design with mostly one domain object for each database table.  use Active Record  Rich Domain Model  look different from the database design, with inheritance, strategies, and other patterns, and complex webs of small interconnected objects.  requires Data Mapper
  • 13.  If you have complicated and ever changing business rules involving validation, calculations, and derivations, chances are that you'll want an object model to handle them.  Data Mapper which helps keep your Domain Model independent from the database and is the best approach to handle cases where the Domain Model and database schema diverge.
  • 14.  One of the problems with Domain Model is the interface with relational databases.  If you have many orders, a Domain Mode will have one order object per order. To overcome such problems we move to Table Module.
  • 15.  Table Module is a single instance that handles the business logic for all rows in a database table or view.
  • 17.  A Table Module organizes domain logic with one class per table in the database and a single instance of a class contains the various procedures that will act on the data.  Table Module will have one object to handle all orders.
  • 18.  The strength of the of Table Module is that it allows you to package the data and behavior together and at the same time play to the strengths of the relational database.  We use Table Module with a backing data structure that's table oriented.  The tabular data is normally the result of SQL call and is held in a Record Set that mimics a SQL table .
  • 19.  Grouping the behavior with the table gives you many of the benefits of encapsulation.  The Table Module may be an instance or it may be a collection of static methods.  The Table Module may include queries as factory methods.
  • 20.  Table Module is very much based on table-oriented data ,so we can use it when we access tabular data using Record Set .  Table Module allows you to fit business logic into the application in a well-organized manner, without losing the way the various elements work on the tabular data.
  • 21.  Service Layer defines an application's boundary with a layer of services that establishes a set of available operations and coordinates the application's response in each operation.  It encapsulates the application's business logic, controlling transactions and coordinating responses in the implementation of its operations
  • 22.
  • 23.  Service Layer is a pattern for organizing business  Service Layer factors each kind of business logic into a separate layer, yielding the usual benefits of layering and rendering the pure domain object classes more reusable from application to application.
  • 24. 2 Basic implementation variations are  Domain facade approach  Operation script approach
  • 25.  Service Layer is implemented as a set of thin facades over a Domain Model  The classes implementing the facades don't implement any business logic but the Domain Model implements all the business logics  The thin facades establish a boundary and set of operation through which client layers interact with the application, exhibiting the defining characteristics of Service Layer.
  • 26.  Service Layer is implemented as a set of thicker classes that directly implement application logic but delegate to encapsulated domain object classes for domain logic.  A Service Layer is comprised of these application service classes, which should extend a Layer Supertype , abstracting their responsibilities and common behaviors. 
  • 27.  Service Layer classes are well remote invocation from an interface granularity perspective.  Starting with a locally invocable Service Layer whose method signatures deal in domain object, we can add services remotability when we need it by putting Remote Facades on your Service Layer .
  • 28.  Identifying the operations needed on a Service Layer boundary is pretty straightforward and they're determined by the needs of Service Layer clients.  The starting point for identifying Service Layer operations is the use case model and the user interface design for the application.
  • 29.  The benefit of Service Layer is that it defines a common set of application operations available to many kinds of clients.  An application with more than one kind of type of its business logic, and complex response in its use cases involving multiple transaction resources, it makes a lot of sense to include a Service Layer with container- managed, transactions, even in an undistributed architecture.
  • 30.  Domain Model you may want to consider Service Layer to give your Domain Model a more distinct API
  • 31.  Patterns of Enterprise Application Architecture, Martin Fowler, Addison-Wesley Professional, 2003,ISBN-10: 0321127420 ISBN-13: 9780321127426  Paper :Homework 1 : Domain Logic , by Basanta Raj Onta (111701), Computer Science – August 2010.