SlideShare a Scribd company logo
‌‫‌ای‌بر‬‫ه‬‫مقدم‬
‫‌وجهی‬‫ش‬‫معماری‌ش‬
‌‫دانشکده‌مهندسی‌کامپیوتر‌دانشگاه‌صنعتی‌شریف‬
‫مهدی‌لشکری‬
LASHKARI.MA@GMAIL.COM
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
BOUNDED CONTEXT
•‌‫‌ها‌باید‌ابتدا‌یک‬‫ت‬‫برای‌مدلسازی‌موجودی‬Ubiquitous Language‫ایجاد‌کرد‬.
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
BOUNDED CONTEXT
•‫‌ها،‌ممکن‌است‌بعضی‌از‬‫ت‬‫با‌بزرگ‌شدن‌دامنه‌و‌افزایش‌تعداد‌موجودی‬
‫‌ها‌چندین‌مفهوم‌را‌در‌برداشته‌باشند‬‫ت‬‫موجودی‬.
•‫باید‌دامنه‌را‌به‌چندین‌دامنه‌شکست‌که‌در‌هر‌دامنه‌هر‌موجودیت‌فقط‬
‫دارای‌یک‌مفهوم‌باشد‬.
•‌‫هر‌زیر‌دامنه‌را‌یک‬BC‫است‬
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‌‫یک‬BC‫به‌ازای‌هر‌زیردامنه‬
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‫‌های‌متفاوت‬‫د‬‫‌های‌یکسان‌با‌دی‬‫ت‬‫موجودی‬
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‫‌های‌متفاوت‌با‌اسم‌یکسان‬‫ت‬‫موجودی‬
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‫یکپارچه‌سازی‬
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
•Allow an application to equally be driven by users,
programs, automated test or batch scripts, and to be
developed and tested in isolation from its eventual run-
time devices and databases.
•The article takes on a shape of a hexagon.The number of
sides is actually arbitrary.The point is that is has many sides.
Each side represents a "port" into or out of our application
‫وجهی‬ ‫شش‬ ‫معماری‬
‌‫‌ای‌که‌در‌آن‬‫ه‬‫یک‌معماری‌الی‬
‫‌ها‌به‌سه‌الیه‌دامنه،‌کارب‬‫د‬‫ک‬‌‫رد‬
‫‌شوند‬‫ی‬‫‌ورک‌تقسیم‌م‬‫م‬‫و‌فری‬.
Framework
Application
Domain
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‫معماری‌شش‌وجهی‬
•‌‫‌ها‌به‌سه‌الیه‌دامنه،‌کاربرد‌و‬‫د‬‫‌ای‌که‌در‌آن‌ک‬‫ه‬‫یک‌معماری‌الی‬
‫‌شوند‬‫ی‬‫‌ورک‌تقسیم‌م‬‫م‬‫فری‬.
•‌‫‌ها‌به‌صورت‬‫ه‬‫الی‬port/adapter‫با‌هم‌درتعامل‌هستند‬.
•Port‫همان‬Interface‫است‬ ‫جاوا‬ ‫زبان‬ ‫در‬.
•Adapter‫همان‬Implementation‫است‬ ‫جاوا‬ ‫زبان‬ ‫در‬.
‫ای‬ ‫الیه‬ ‫معماری‬
‫ارتباطات‌فقط‌به‌سمت‌پائ‬‌‫ین‬
‫است‬.
‌‫هر‌الیه‌به‌الیه‌پائین‌تر‬
‫وابستگی‌دارد‬‌‌.
‫دامنه‌به‌زیرساخت‌وابستگ‬‌‫ی‬
‫دارد‬!!.
‫ای‬ ‫الیه‬ ‫معماری‬
‫برنامه‌به‌طور‌کلی‌به‌سه‌ب‬‌‫خش‬
front-end‌‌‫و‬Core‌‫و‬
back-end‫‌شود‬‫ی‬‫تقسیم‌م‬.
‫وجهی‬ ‫شش‬ ‫معماری‬
‌‫برنامه‌به‌دو‌بخش‌هسته‌و‬
‫‌شود‬‫ی‬‫بیرونی‌تقسیم‌م‬.
Front-end‌‫و‬Back-end
‫هر‌دو‌بیرونی‌هستند‬.
‫برنامه‌به‌هرچه‌بیرونی‌است‬
‫استقالل‌دارد‬.
BUSINESS LOGIC
•‫در‌مرکز‌این‌معماری‌منطق‬
‫کسب‌و‌کار‌قرار‌دارد‬‌‌.
•‌‫خلق‌ارزش‌در‌اینجا‌صورت‬
‫‌پذیرد‬‫ی‬‫م‬.
BUSINESS LOGIC
•‌‫‌های‌کسب‌و‌کار‌در‬‫ر‬‫رفتا‬
‫‌گیرد‬‫ی‬‫اینجا‌قرار‌م‬.
•‫مثال‌انتساب‌یک‌شخص‌به‌یک‌پروژ‬‫ه‬
BUSINESS LOGIC
•‌‫تمامی‌قوانین‌و‌قواعد‬
‌‫کسب‌و‌کار‌در‌این‌الیه‬
‫قرار‌دارد‬.
•‌‫مثال‌قانون‌حداکثر‌تعداد‬
‫پروژه‌منتسب‌به‌یک‌شخص‬
BUSINESS LOGIC
•‌‫‌های‌کسب‌و‌کار‬‫د‬‫تمام‌رویدا‬
‌‫در‌اینجا‌تولید‌و‌مصرف‬
‫‌گردد‬‫ی‬‫م‬.
•‌‫مثال‌ایجاد‌یک‬user story
‫جدید‬.
•‫ایجاد‌کاربر‌جدید‬
APPLICATION
LAYER
‌‫مسئول‌هماهنگی‌و‬Orchestration‌‫بین‬
‫‌های‌الیه‌کسب‌و‌کار‌است‬‫ت‬‫موجودی‬.
‌‫یک‬Use Case‌‫را‬‫تعریف‬‫‌کند‬‫ی‬‫م‬.
‫دو‌نوع‌‌دارد‬‌:Inbound and Outbound
INBOUND PORT
Use Case‌‫هایی‌را‌تعریف‬
‫‌کند‌که‌بوسیله‌یک‌عام‬‫ی‬‫م‬‌‫ل‬
‌‫‌گردد‌تا‌اجرا‬‫ی‬‫خارجی‌فعال‌م‬
‫شود‬.
‫مثال‌یک‌واسط‌برای‌تعریف‬
‫‌کند‬‫ی‬‫کاربر‌تعریف‌م‬.
OUTBOUND PORT
Use Case‌‫هایی‌را‌تعریف‬
‫‌کند‌که‌در‌خود‌الیه‌کسب‬‫ی‬‫م‬
‫و‌کار‌فعال‌میگردد‌و‌باید‌اج‬‌‫را‬
‫شود‬‌.
‫مثال‌ذخیره‌کردن‌یک‌داده‌ی‬‌‫ا‬
‌‫‌های‬‫س‬‫پیام‌دهی‌به‌سروی‬
‫خارجی‬
FRAMEWORK
LAYER
‌‌‫یوزکیس‌های‌الیه‌کاربرد‌را‬
‫‌کند‬‫ی‬‫پیاده‌سازی‌م‬.
INBOUND
ADAPTER
‌‫پیاده‌سازی‌یک‬Inbound
Port‫‌دهد‬‫ی‬‫را‌انجام‌م‬.
‌‫مثال‌واسط‌تعریف‌کاربر‌را‬
‌‫بوسیله‌پروتکل‬SOAP‌‫پیاده‬
‫‌کند‬‫ی‬‫سازی‌م‬.
OUTBOUND
ADAPTER
‌‫یک‬Outbound port‌‫را‬
‫‌کند‬‫ی‬‫پیاده‌سازی‌م‬.
‌‫‌ها‬‫ه‬‫مثال‌واسط‌ذخیره‌سازی‌داد‬
‌‫را‌در‌پایگاه‌داده‌رابطه‌ای‌یا‬
NoSQL‫‌دهد‬‫ی‬‫انجام‌م‬.
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‫فواید‬
•‌‫به‌تاخیر‌انداختن‌تصمیمات‌فنی‬(Technical Decision)
•‫تغییرات‌زیرساخت‌ساده‌است‬
•‌‫قابلیت‌آزمون‌باال‬‌(‫جایگزینی‌و‌ماکینگ‬)
•‫تمرکز‌بر‌هسته‌کار‬
‫لشکری‬ ‫مهدی‬ ،‫وجهی‬ ‫شش‬ ‫معماری‬ ‫بر‬ ‫ای‬ ‫مقدمه‬
‫سوال؟‬

More Related Content

Featured

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
Alireza Esmikhani
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
Erica Santiago
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Featured (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

معماری شش وجهی