SlideShare ist ein Scribd-Unternehmen logo
1 von 46
.NET Solutions DSK Chakravarthy http://dskc.blogspot.com
Who am I? ,[object Object],[object Object],[object Object],[object Object]
Agenda for the Day ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Pre Lunch Session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Best architecture design ,[object Object],[object Object],[object Object],[object Object]
Design Patterns ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Design Patterns  should not be confused as a ready made detail of a particular implementation, it’s a template There are almost 26 patterns, which fall in 3 categories…
[object Object],[object Object],[object Object],Design Patterns Note : The  PatternForm  is invented by Mr. Christopher Alexander, and he calls them as just “ Patterns ”, but not as “ Design Patterns ” In the current world you’ve around  62 kinds  of patterns in practice
Design Patterns Full List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design Patterns Full List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design Patterns Full List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design Patterns an Example Problem: You are building a Quote Application, which contains a class that is responsible for managing all the quotes in the system. It is important that all quotes interact with  one and only one  instance of this class. How do you structure your design so that only one instance of this class is accessible with in the application? Solution: A simple solution to this problem is to create a  QuoteManager  class with a private constructor so that no other class can instantiate it. This class contains a static instance of  QuoteManager  that is returned with a static method named  GetInstance () . Can you design the code for the same?
Design Patterns an Example public class  QuoteManger { // NOTE: For single threaded application only private static  QuoteManagaer  _Instance = null; private  QuoteManager () {} private static  QuoteManager   GetInstance () { if (_Instance==null) { _Instance = new  QuoteManager  (); } return _Instance; } } NOTE: This kind of Pattern is said as “Singleton Pattern”
[object Object],Our Focus – Distributed Application Design ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Services  n  Integration Specialisation means not doing the Extraordinary things, but doing Ordinary things Extraordinarily well... So, What are you doing?
[object Object],Services  n  Integration  ?s  What are services? # C onceptually,  they are similar to the Traditional Components  How are they? # They encapsulate their own data and remember, they are not  a part of your application, rather they are used by your application  What is the difficulty with services? # They might have built on different platforms by different teams  on different schedules and may be maintained & Updated  independently Therefore, it’s critical to implement communication between them
 How do I resolve? # You can implement communication between them by using  message-based technologies # You can implement message communication by i) Explicitly – By writing code to send and receive Message  Queuing Messages.  Ex. MSMQ ii) Implicitly – By using Infrastructure components that  manage communication.  Ex. A Web service proxy by VS.NET Services  n  Integration  ?s
 How are the services differ from Components? # Services exists in their own trust boundary and manage their  own data, out side your application  What is crucial between Services & Application integration? # Establishing a secure, authenticated connection  What should I be aware, while using a service? # The internal implementation is irrelevant to your design # But need to know the business functionality that the service  provides # Also the details of the contract you must adhere to in order to  communicate with it such as i) Communication Format ii) Data Schema iii) Authentication Mechanism etc., Services  n  Integration  ?s
 What a service contain? # The same kind of components that any traditional application do # You can categorise them as  i)  Logic  Components : That orchestrate the tasks they do ii)  Business  Components : That implement the actual BL iii)  Data Access  Components : that access the service’s data store iv)  Interfaces  : That expose the functionality  What happens when I integrate a service? # Your application will also call other services through “ Service  agents ”, which communicate with service on behalf of the calling  client application Services  n  Integration  ?s
A small scenario A Retail application ,[object Object],[object Object],[object Object],[object Object]
A small scenario A Retail application Sequence Diagram
Components and Tiers in Application Imagination is more important than knowledge
Distributed design Distributed Application Design means, “You should divide your application into components providing  PBD  ( Presentation ,  Business  and  Data ) Services”. While doing the same follow the below rules. ,[object Object],[object Object],
Points to Note ,[object Object],[object Object],# Conceptually, the services can be seen as components of overall solution. # Internally, each service is made up of software components, just like any other application and these components are logically grouped into Presentation / Business Logic /Data Services # While designing the application, follow the below steps 1) ( Can you ) Draw a block diagram for the ( previous ) scenario ! % & $ # ? 2) Explain the bits & pieces of each block as internal elements 3) Finally, prepare a simplified view of any application and it’s layers 4) But remember that, each service  encapsulates its own data  and  manages  atomic  transactions on it’s own For now, sketch a component design for the previous  scenario
Component design A Retail application Component Diagram You might design the one like this . . .
Simplified View Here comes the simplified view of any general application and it’s layers
A Detailed View The previous scenario for the detailed design would look like . . . .
General Design Recommendations for Applications and Services ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Tea Break
Components - In detail Knowing the path to failure is  as important as Knowing the path to success
Component Types Note : The term  component  is used in the sense of a piece or part of the overall solution. This includes compiled software components such as Microsoft .NET assemblies, and other software artifacts such as Web pages and Microsoft BizTalk Server schedules
Components In detail ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Designing Presentation Layers
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],UI Components  &  Types
Designing UI Components ShowProducts() { // Code to // get product // data } Controller When a user interacts with a user interface element, an event is raised that calls code in a controller function, which inturn calls business components, data access logic components (or) user process components to implement the desired action and retrieve any necessary data..
A Small Scenario You are designing a web-based quote application containing a great deal of business and presentation logic, which, in turn, depends on numerous platform software components to provide a suitable execution environment. How do you organise your system at a high level to be flexible, loosely coupled, and yet highly cohesive? Can you rearrange wrf to Layers? CustomerManagement Inventory Management CustomerWebPages Utility Quote WebPages Quote Management Price Engine ADO.NET QuoteDataAccess
Solution Scenario Can you rearrange any? The solution could be as.. .. .. ..  CustomerManagement Inventory Management CustomerWebPages Utility Quote WebPages Quote Management Price Engine ADO.NET QuoteDataAccess Quote Presentation Layer Quote Business Layer Quote Data Access Layer
UI Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Windows Desktop –  UIs Recommendations When creating a Windows Forms-based application, consider the following recommendations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
iNET Browser UIs Recommendations When you are implementing an application and publish a Web page-based user interface for a browser, consider the following design recommendations for ASP.NET user interfaces   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Process Components ,[object Object],[object Object],[object Object]
These help the user interactions synchronize with the  UI Components , it is a best practise to  drive the process using separate User Process Components User process components are typically implemented as .NET classes that expose methods that can be called by user interfaces. Each method encapsulates the logic necessary to perform a specific action in the UP The user interfaces creates instances of the user process component and uses it to transition through the steps of process You should design them with globalization in mind to allow for localization to be implemented in the User Interface Note : User process components co-ordinate the display of user interface elements Task for You : Can you design common ProcessComponent for the previous Retail application ? UP Components
UP Components Example namespace PurchaseUserProcess{ public class PurchaseUserProcess{ public PurchaseUserProcess(){ userActivityID= System.Guid.NewGuid(); } private int intCustomerID; private DataSet dsOrderData; private DataSet dsPaymentData;   private Guid userActivityID; public bool webUI; public void ShowOrder() { if(webUI){ System.Web.HttpContext.Current.Response.Redirect("http://www.myserver.com/orderDetails.aspx"); } else{ OrderDetails = new OrderDetailsForm(); OrderDetails.Show(); } } public void EnterPaymentDetails() { // code to display the Payment details page or window goes here } public void ShowConfirmation() { // code to place the order goes here } public void Finish() { // code to go back to the main page or window goes here } public void SaveToDataBase() { // code to save order and payment info in the private variables to a database } public void ResumeCheckOut(System.Guid ProcessID) { // code to reload the process state from the Database } public void Validate() { // code to make sure the process instance variables have the right information for the current step } } }
UP Components Advantages ,[object Object],[object Object],[object Object]
UP Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
UP Design ,[object Object],[object Object],[object Object],4) Control functions that let you start, pause, restart, and cancel a particular user Process(4) : Control methods could load required reference data for the UI from data access logic components (7)  or delegate this work to the UI Component that needs the data
 

Weitere ähnliche Inhalte

Ähnlich wie Distributed Application Design Recommendations

From Components To Services
From Components To ServicesFrom Components To Services
From Components To ServicesJames Phillips
 
Architecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachArchitecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachBen Stopford
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitectureABDEL RAHMAN KARIM
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patternsMd. Sadhan Sarker
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architectureshuchi tripathi
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven DesignMuhammad Ali
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicDavid Solivan
 
ASAS 2014 - Simon Brown
ASAS 2014 - Simon BrownASAS 2014 - Simon Brown
ASAS 2014 - Simon BrownAvisi B.V.
 
Architecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsArchitecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsGem WeBlog
 
CRM system for WeLoveVideo.pptCRM System for WeLoveVid.docx
CRM system for WeLoveVideo.pptCRM System for WeLoveVid.docxCRM system for WeLoveVideo.pptCRM System for WeLoveVid.docx
CRM system for WeLoveVideo.pptCRM System for WeLoveVid.docxmydrynan
 
How to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First TimeHow to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First TimeDavid Linthicum
 
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
 
Service Analysis And Design
Service Analysis And DesignService Analysis And Design
Service Analysis And DesignRody Middelkoop
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...ijcseit
 
CONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCYCONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCYijcseit
 
Configuration inerpsaas multi tenancy
Configuration inerpsaas multi tenancyConfiguration inerpsaas multi tenancy
Configuration inerpsaas multi tenancyijcseit
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for EnterprisesWade Wegner
 

Ähnlich wie Distributed Application Design Recommendations (20)

From Components To Services
From Components To ServicesFrom Components To Services
From Components To Services
 
Architecting for Change: An Agile Approach
Architecting for Change: An Agile ApproachArchitecting for Change: An Agile Approach
Architecting for Change: An Agile Approach
 
Over view of software artitecture
Over view of software artitectureOver view of software artitecture
Over view of software artitecture
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
 
Pattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecturePattern oriented architecture for web based architecture
Pattern oriented architecture for web based architecture
 
Resume
ResumeResume
Resume
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
The Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs PublicThe Magic Of Application Lifecycle Management In Vs Public
The Magic Of Application Lifecycle Management In Vs Public
 
ASAS 2014 - Simon Brown
ASAS 2014 - Simon BrownASAS 2014 - Simon Brown
ASAS 2014 - Simon Brown
 
Architecting and Designing Enterprise Applications
Architecting and Designing Enterprise ApplicationsArchitecting and Designing Enterprise Applications
Architecting and Designing Enterprise Applications
 
Thoughtful Software Design
Thoughtful Software DesignThoughtful Software Design
Thoughtful Software Design
 
CRM system for WeLoveVideo.pptCRM System for WeLoveVid.docx
CRM system for WeLoveVideo.pptCRM System for WeLoveVid.docxCRM system for WeLoveVideo.pptCRM System for WeLoveVid.docx
CRM system for WeLoveVideo.pptCRM System for WeLoveVid.docx
 
icv
icvicv
icv
 
How to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First TimeHow to Get Cloud Architecture and Design Right the First Time
How to Get Cloud Architecture and Design Right the First Time
 
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"
 
Service Analysis And Design
Service Analysis And DesignService Analysis And Design
Service Analysis And Design
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...
 
CONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCYCONFIGURATION INERPSAAS MULTI-TENANCY
CONFIGURATION INERPSAAS MULTI-TENANCY
 
Configuration inerpsaas multi tenancy
Configuration inerpsaas multi tenancyConfiguration inerpsaas multi tenancy
Configuration inerpsaas multi tenancy
 
.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
 

Mehr von DSK Chakravarthy (19)

Break the ICE with DSK
Break the ICE with DSKBreak the ICE with DSK
Break the ICE with DSK
 
Intelligent Machines for Industry 4.0
Intelligent Machines for Industry 4.0Intelligent Machines for Industry 4.0
Intelligent Machines for Industry 4.0
 
Initial Meetup of Hyderabad Chapter of BAI
Initial Meetup of Hyderabad Chapter of BAIInitial Meetup of Hyderabad Chapter of BAI
Initial Meetup of Hyderabad Chapter of BAI
 
ROC, not ROI
ROC, not ROIROC, not ROI
ROC, not ROI
 
Hacking the Quality
Hacking the QualityHacking the Quality
Hacking the Quality
 
agile 3.0
agile 3.0 agile 3.0
agile 3.0
 
Architectures
ArchitecturesArchitectures
Architectures
 
ROC for DevOPs
ROC for DevOPsROC for DevOPs
ROC for DevOPs
 
Cognitive agility
Cognitive agilityCognitive agility
Cognitive agility
 
Microsoft Products and Classification
Microsoft Products and ClassificationMicrosoft Products and Classification
Microsoft Products and Classification
 
What's new in Wcf4
What's new in Wcf4What's new in Wcf4
What's new in Wcf4
 
XML and XPath details
XML and XPath detailsXML and XPath details
XML and XPath details
 
The Degree of Understanding
The Degree of UnderstandingThe Degree of Understanding
The Degree of Understanding
 
What's new in .NET Framework v4.5
What's new in .NET Framework v4.5What's new in .NET Framework v4.5
What's new in .NET Framework v4.5
 
Relat EVE estimates
Relat EVE estimatesRelat EVE estimates
Relat EVE estimates
 
Journey to Next level Agility
Journey to Next level AgilityJourney to Next level Agility
Journey to Next level Agility
 
It Market
It MarketIt Market
It Market
 
Intro Cloud Computing
Intro Cloud ComputingIntro Cloud Computing
Intro Cloud Computing
 
Cs30 New
Cs30 NewCs30 New
Cs30 New
 

Kürzlich hochgeladen

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Kürzlich hochgeladen (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Distributed Application Design Recommendations

  • 1. .NET Solutions DSK Chakravarthy http://dskc.blogspot.com
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11. Design Patterns an Example Problem: You are building a Quote Application, which contains a class that is responsible for managing all the quotes in the system. It is important that all quotes interact with one and only one instance of this class. How do you structure your design so that only one instance of this class is accessible with in the application? Solution: A simple solution to this problem is to create a QuoteManager class with a private constructor so that no other class can instantiate it. This class contains a static instance of QuoteManager that is returned with a static method named GetInstance () . Can you design the code for the same?
  • 12. Design Patterns an Example public class QuoteManger { // NOTE: For single threaded application only private static QuoteManagaer _Instance = null; private QuoteManager () {} private static QuoteManager GetInstance () { if (_Instance==null) { _Instance = new QuoteManager (); } return _Instance; } } NOTE: This kind of Pattern is said as “Singleton Pattern”
  • 13.
  • 14. Services n Integration Specialisation means not doing the Extraordinary things, but doing Ordinary things Extraordinarily well... So, What are you doing?
  • 15.
  • 16.  How do I resolve? # You can implement communication between them by using message-based technologies # You can implement message communication by i) Explicitly – By writing code to send and receive Message Queuing Messages. Ex. MSMQ ii) Implicitly – By using Infrastructure components that manage communication. Ex. A Web service proxy by VS.NET Services n Integration ?s
  • 17.  How are the services differ from Components? # Services exists in their own trust boundary and manage their own data, out side your application  What is crucial between Services & Application integration? # Establishing a secure, authenticated connection  What should I be aware, while using a service? # The internal implementation is irrelevant to your design # But need to know the business functionality that the service provides # Also the details of the contract you must adhere to in order to communicate with it such as i) Communication Format ii) Data Schema iii) Authentication Mechanism etc., Services n Integration ?s
  • 18.  What a service contain? # The same kind of components that any traditional application do # You can categorise them as i) Logic Components : That orchestrate the tasks they do ii) Business Components : That implement the actual BL iii) Data Access Components : that access the service’s data store iv) Interfaces : That expose the functionality  What happens when I integrate a service? # Your application will also call other services through “ Service agents ”, which communicate with service on behalf of the calling client application Services n Integration ?s
  • 19.
  • 20. A small scenario A Retail application Sequence Diagram
  • 21. Components and Tiers in Application Imagination is more important than knowledge
  • 22.
  • 23.
  • 24. Component design A Retail application Component Diagram You might design the one like this . . .
  • 25. Simplified View Here comes the simplified view of any general application and it’s layers
  • 26. A Detailed View The previous scenario for the detailed design would look like . . . .
  • 27.
  • 29. Components - In detail Knowing the path to failure is as important as Knowing the path to success
  • 30. Component Types Note : The term component is used in the sense of a piece or part of the overall solution. This includes compiled software components such as Microsoft .NET assemblies, and other software artifacts such as Web pages and Microsoft BizTalk Server schedules
  • 31.
  • 33.
  • 34. Designing UI Components ShowProducts() { // Code to // get product // data } Controller When a user interacts with a user interface element, an event is raised that calls code in a controller function, which inturn calls business components, data access logic components (or) user process components to implement the desired action and retrieve any necessary data..
  • 35. A Small Scenario You are designing a web-based quote application containing a great deal of business and presentation logic, which, in turn, depends on numerous platform software components to provide a suitable execution environment. How do you organise your system at a high level to be flexible, loosely coupled, and yet highly cohesive? Can you rearrange wrf to Layers? CustomerManagement Inventory Management CustomerWebPages Utility Quote WebPages Quote Management Price Engine ADO.NET QuoteDataAccess
  • 36. Solution Scenario Can you rearrange any? The solution could be as.. .. .. .. CustomerManagement Inventory Management CustomerWebPages Utility Quote WebPages Quote Management Price Engine ADO.NET QuoteDataAccess Quote Presentation Layer Quote Business Layer Quote Data Access Layer
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. These help the user interactions synchronize with the UI Components , it is a best practise to drive the process using separate User Process Components User process components are typically implemented as .NET classes that expose methods that can be called by user interfaces. Each method encapsulates the logic necessary to perform a specific action in the UP The user interfaces creates instances of the user process component and uses it to transition through the steps of process You should design them with globalization in mind to allow for localization to be implemented in the User Interface Note : User process components co-ordinate the display of user interface elements Task for You : Can you design common ProcessComponent for the previous Retail application ? UP Components
  • 42. UP Components Example namespace PurchaseUserProcess{ public class PurchaseUserProcess{ public PurchaseUserProcess(){ userActivityID= System.Guid.NewGuid(); } private int intCustomerID; private DataSet dsOrderData; private DataSet dsPaymentData; private Guid userActivityID; public bool webUI; public void ShowOrder() { if(webUI){ System.Web.HttpContext.Current.Response.Redirect("http://www.myserver.com/orderDetails.aspx"); } else{ OrderDetails = new OrderDetailsForm(); OrderDetails.Show(); } } public void EnterPaymentDetails() { // code to display the Payment details page or window goes here } public void ShowConfirmation() { // code to place the order goes here } public void Finish() { // code to go back to the main page or window goes here } public void SaveToDataBase() { // code to save order and payment info in the private variables to a database } public void ResumeCheckOut(System.Guid ProcessID) { // code to reload the process state from the Database } public void Validate() { // code to make sure the process instance variables have the right information for the current step } } }
  • 43.
  • 44.
  • 45.
  • 46.