SlideShare une entreprise Scribd logo
1  sur  34
Creating a Plug-in
Architecture
in .NET
ONDREJ BALAS @ONDREJBALAS
WWW.ONDREJBALAS.COM
ONDREJ@ONDREJBALAS.COM
ONDREJ BALAS
Microsoft MVP in .NET
Writer for Visual Studio Magazine
Owner of UseTech Design (est. 2001)
Building software that drives business
W W W.OND REJBALAS.COM
OND REJ@OND REJBALA S.COM
@ OND REJBALAS
• An external piece of functionality that may be
added to an existing system by abiding by a
contract pre-defined by that system.
Plug-in (my definition)
• Split work across natural boundaries
• Incrementally create and deploy features
• Deploy only new and updated modules
• Don’t need source code for existing
system
• Changes to contracts are difficult to
manage
• Increased development time for
small projects
// Get input – “HELLO”
string input = Console.ReadLine().ToUpper();
// "Encrypt" it
string output = "";
foreach (char c in input)
{
byte b = (byte) c;
output += (char)(b < 78 ? b + 13 : b - 13);
}
// Write output – “URYYB”
Console.WriteLine(output);
Tightly Coupled Code
static void Main(string[] args) {
// Get input
string input = Console.ReadLine().ToUpper();
// "Encrypt" it
Rot13 encryptionAlgorithm = new Rot13();
string output = encryptionAlgorithm.Encrypt(input);
// Write output
Console.WriteLine(output);
}
public class Rot13 {
public string Encrypt(string input)
{
string output = "";
foreach (char c in input)
{
output += (char)(c < 78 ? c + 13 : c - 13);
}
return output;
}
}
static void Main(string[] args) {
// Get input
string input = Console.ReadLine().ToUpper();
// "Encrypt" it
IEncryptionAlgorithm encryptionAlgorithm = new Rot13();
string output = encryptionAlgorithm.Encrypt(input);
// Write output
Console.WriteLine(output);
}
public class Rot13 : IEncryptionAlgorithm {
public string Encrypt(string input)
{
string output = "";
foreach (char c in input)
{
output += (char)(c < 78 ? c + 13 : c - 13);
}
return output;
}
}
public interface IEncryptionAlgorithm
{
string Encrypt(string input);
}
Decoupled
Code
• Single - Automatically choose one.
• One of Many - Like Single, but give the user
the choice. Think smart phone apps
• Many Simultaneously – Using the composite
pattern, many plug-ins are treated as one. Like
browser plug-ins; they have the potential of
overlapping
• Most IoC containers
– Ninject (using ninject.extensions.conventions)
– Castle.Windsor
– Unity
– StructureMap
– MEF – Managed Extensibility Framework
– MAF – Managed AddIn Framework
– Many other IoC containers
Add Sales Tax
to Calculation
Toppings!
More Toppings!
• Why not use config files? Config files are for
changing the data/data source. Plug-in
architecture is for dropping in functionality
• Deciding where to put plug-in points
• Recovering from plug-in crashes
• Dynamic loading and unloading at run time
• Updating an application while it’s running
Thanks!
ONDREJ BALAS @ONDREJBALAS
WWW.ONDREJBALAS.COM
ONDREJ@ONDREJBALAS.COM
@ONDREJBALAS
GITHUB.COM/ONDREJBALAS

Contenu connexe

Tendances

Software Engineering - Ch4
Software Engineering - Ch4Software Engineering - Ch4
Software Engineering - Ch4Siddharth Ayer
 
SOLID - Những nguyên lí sống còn
SOLID - Những nguyên lí sống cònSOLID - Những nguyên lí sống còn
SOLID - Những nguyên lí sống cònNhật Nguyễn Khắc
 
Manual testing 1
Manual testing 1Manual testing 1
Manual testing 1Ion Griu
 
The Myths and Facts Surrounding Software Testing
The Myths and Facts Surrounding Software TestingThe Myths and Facts Surrounding Software Testing
The Myths and Facts Surrounding Software TestingSoftware Testing Solution
 
Software Engineering (Requirements Engineering & Software Maintenance)
Software Engineering (Requirements Engineering  & Software Maintenance)Software Engineering (Requirements Engineering  & Software Maintenance)
Software Engineering (Requirements Engineering & Software Maintenance)ShudipPal
 
Bug reporting and tracking
Bug reporting and trackingBug reporting and tracking
Bug reporting and trackingVadym Muliavka
 
Feature Driven Development
Feature Driven DevelopmentFeature Driven Development
Feature Driven Developmentdcsunu
 
INTEGRATION TESTING
INTEGRATION TESTINGINTEGRATION TESTING
INTEGRATION TESTINGRohitK71
 
Requirements engineering processes
Requirements engineering processesRequirements engineering processes
Requirements engineering processessommerville-videos
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberKnoldus Inc.
 
Chapter19 rapid application development
Chapter19 rapid application developmentChapter19 rapid application development
Chapter19 rapid application developmentDhani Ahmad
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration ManagementPratik Tandel
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process ModelsNana Sarpong
 
Prototype model of SDLC
Prototype model of SDLCPrototype model of SDLC
Prototype model of SDLCKumar Sethi
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Chinmoy Mohanty
 
Software testing
Software testingSoftware testing
Software testingmkn3009
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jestpksjce
 

Tendances (20)

Software Engineering - Ch4
Software Engineering - Ch4Software Engineering - Ch4
Software Engineering - Ch4
 
Gathering requirements
Gathering requirementsGathering requirements
Gathering requirements
 
SOLID - Những nguyên lí sống còn
SOLID - Những nguyên lí sống cònSOLID - Những nguyên lí sống còn
SOLID - Những nguyên lí sống còn
 
Manual testing 1
Manual testing 1Manual testing 1
Manual testing 1
 
The Myths and Facts Surrounding Software Testing
The Myths and Facts Surrounding Software TestingThe Myths and Facts Surrounding Software Testing
The Myths and Facts Surrounding Software Testing
 
Software Engineering (Requirements Engineering & Software Maintenance)
Software Engineering (Requirements Engineering  & Software Maintenance)Software Engineering (Requirements Engineering  & Software Maintenance)
Software Engineering (Requirements Engineering & Software Maintenance)
 
Bug reporting and tracking
Bug reporting and trackingBug reporting and tracking
Bug reporting and tracking
 
Feature Driven Development
Feature Driven DevelopmentFeature Driven Development
Feature Driven Development
 
INTEGRATION TESTING
INTEGRATION TESTINGINTEGRATION TESTING
INTEGRATION TESTING
 
Requirements engineering processes
Requirements engineering processesRequirements engineering processes
Requirements engineering processes
 
API Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+CucumberAPI Automation Testing Using RestAssured+Cucumber
API Automation Testing Using RestAssured+Cucumber
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Chapter19 rapid application development
Chapter19 rapid application developmentChapter19 rapid application development
Chapter19 rapid application development
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
SDLC and Software Process Models
SDLC and Software Process ModelsSDLC and Software Process Models
SDLC and Software Process Models
 
Prototype model of SDLC
Prototype model of SDLCPrototype model of SDLC
Prototype model of SDLC
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)Plugin architecture (Extensible Application Architecture)
Plugin architecture (Extensible Application Architecture)
 
Software testing
Software testingSoftware testing
Software testing
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 

En vedette

An easy guide to Plugin Development
An easy guide to Plugin DevelopmentAn easy guide to Plugin Development
An easy guide to Plugin DevelopmentShinichi Nishikawa
 
Building an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developersBuilding an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developerskim.mens
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingDougal Campbell
 
Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)andrewnacin
 
So, you want to be a plugin developer?
So, you want to be a plugin developer?So, you want to be a plugin developer?
So, you want to be a plugin developer?ylefebvre
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14Salesforce Developers
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third PluginJustin Ryan
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creationbenalman
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicketnielsvk
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design PatternsRobert Casanova
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview Lars Vogel
 
Building GPE: What We Learned
Building GPE: What We LearnedBuilding GPE: What We Learned
Building GPE: What We Learnedrajeevdayal
 
Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginDaniel Spilker
 

En vedette (13)

An easy guide to Plugin Development
An easy guide to Plugin DevelopmentAn easy guide to Plugin Development
An easy guide to Plugin Development
 
Building an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developersBuilding an Eclipse plugin to recommend changes to developers
Building an Eclipse plugin to recommend changes to developers
 
Jumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin ProgrammingJumping Into WordPress Plugin Programming
Jumping Into WordPress Plugin Programming
 
Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)Best Practices in Plugin Development (WordCamp Seattle)
Best Practices in Plugin Development (WordCamp Seattle)
 
So, you want to be a plugin developer?
So, you want to be a plugin developer?So, you want to be a plugin developer?
So, you want to be a plugin developer?
 
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
The Open-source Eclipse Plugin for Force.com Development, Summer ‘14
 
Writing your Third Plugin
Writing your Third PluginWriting your Third Plugin
Writing your Third Plugin
 
jQuery Plugin Creation
jQuery Plugin CreationjQuery Plugin Creation
jQuery Plugin Creation
 
A Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for WicketA Simple Plugin Architecture for Wicket
A Simple Plugin Architecture for Wicket
 
Plugin jQuery, Design Patterns
Plugin jQuery, Design PatternsPlugin jQuery, Design Patterns
Plugin jQuery, Design Patterns
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Building GPE: What We Learned
Building GPE: What We LearnedBuilding GPE: What We Learned
Building GPE: What We Learned
 
Configuration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL PluginConfiguration as Code: The Job DSL Plugin
Configuration as Code: The Job DSL Plugin
 

Similaire à Creating a Plug-In Architecture

How to lock a Python in a cage? Managing Python environment inside an R project
How to lock a Python in a cage?  Managing Python environment inside an R projectHow to lock a Python in a cage?  Managing Python environment inside an R project
How to lock a Python in a cage? Managing Python environment inside an R projectWLOG Solutions
 
Basic html5 and javascript
Basic html5 and javascriptBasic html5 and javascript
Basic html5 and javascriptwendy017
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitDimitry Snezhkov
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java DevelopersYakov Fain
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_netNico Ludwig
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Windows Developer
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assemblyShakacon
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Asher Martin
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with VoltaDaniel Fisher
 
Future-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointFuture-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointBob German
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Itzik Kotler
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code維佋 唐
 
Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2Ruben Haeck
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014biicode
 

Similaire à Creating a Plug-In Architecture (20)

How to lock a Python in a cage? Managing Python environment inside an R project
How to lock a Python in a cage?  Managing Python environment inside an R projectHow to lock a Python in a cage?  Managing Python environment inside an R project
How to lock a Python in a cage? Managing Python environment inside an R project
 
Basic html5 and javascript
Basic html5 and javascriptBasic html5 and javascript
Basic html5 and javascript
 
Typhoon Managed Execution Toolkit
Typhoon Managed Execution ToolkitTyphoon Managed Execution Toolkit
Typhoon Managed Execution Toolkit
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net(1) c sharp introduction_basics_dot_net
(1) c sharp introduction_basics_dot_net
 
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
Build 2016 - B880 - Top 6 Reasons to Move Your C++ Code to Visual Studio 2015
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Web (dis)assembly
Web (dis)assemblyWeb (dis)assembly
Web (dis)assembly
 
Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3Cape Cod Web Technology Meetup - 3
Cape Cod Web Technology Meetup - 3
 
2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta2008 - TechDays PT: Building Software + Services with Volta
2008 - TechDays PT: Building Software + Services with Volta
 
Future-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointFuture-proof Development for Classic SharePoint
Future-proof Development for Classic SharePoint
 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
 
Hidden Dragons of CGO
Hidden Dragons of CGOHidden Dragons of CGO
Hidden Dragons of CGO
 
Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)Hack Like It's 2013 (The Workshop)
Hack Like It's 2013 (The Workshop)
 
Node azure
Node azureNode azure
Node azure
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2Get together on getting more out of typescript &amp; angular 2
Get together on getting more out of typescript &amp; angular 2
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Fp201 unit2 1
Fp201 unit2 1Fp201 unit2 1
Fp201 unit2 1
 
Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014Dependencies Managers in C/C++. Using stdcpp 2014
Dependencies Managers in C/C++. Using stdcpp 2014
 

Plus de ondrejbalas

Power BI - Data from any Source
Power BI - Data from any SourcePower BI - Data from any Source
Power BI - Data from any Sourceondrejbalas
 
Open Source Game Development in C#
Open Source Game Development in C#Open Source Game Development in C#
Open Source Game Development in C#ondrejbalas
 
Game Jams - Yum!
Game Jams - Yum!Game Jams - Yum!
Game Jams - Yum!ondrejbalas
 
Creating scalable solutions with aws
Creating scalable solutions with awsCreating scalable solutions with aws
Creating scalable solutions with awsondrejbalas
 
Identity in ASP.NET Core
Identity in ASP.NET CoreIdentity in ASP.NET Core
Identity in ASP.NET Coreondrejbalas
 
Monetize yourself
Monetize yourselfMonetize yourself
Monetize yourselfondrejbalas
 
ReSharper: Discover the Secrets
ReSharper: Discover the SecretsReSharper: Discover the Secrets
ReSharper: Discover the Secretsondrejbalas
 

Plus de ondrejbalas (7)

Power BI - Data from any Source
Power BI - Data from any SourcePower BI - Data from any Source
Power BI - Data from any Source
 
Open Source Game Development in C#
Open Source Game Development in C#Open Source Game Development in C#
Open Source Game Development in C#
 
Game Jams - Yum!
Game Jams - Yum!Game Jams - Yum!
Game Jams - Yum!
 
Creating scalable solutions with aws
Creating scalable solutions with awsCreating scalable solutions with aws
Creating scalable solutions with aws
 
Identity in ASP.NET Core
Identity in ASP.NET CoreIdentity in ASP.NET Core
Identity in ASP.NET Core
 
Monetize yourself
Monetize yourselfMonetize yourself
Monetize yourself
 
ReSharper: Discover the Secrets
ReSharper: Discover the SecretsReSharper: Discover the Secrets
ReSharper: Discover the Secrets
 

Dernier

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Dernier (20)

From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Creating a Plug-In Architecture

  • 1. Creating a Plug-in Architecture in .NET ONDREJ BALAS @ONDREJBALAS WWW.ONDREJBALAS.COM ONDREJ@ONDREJBALAS.COM
  • 2. ONDREJ BALAS Microsoft MVP in .NET Writer for Visual Studio Magazine Owner of UseTech Design (est. 2001) Building software that drives business W W W.OND REJBALAS.COM OND REJ@OND REJBALA S.COM @ OND REJBALAS
  • 3.
  • 4. • An external piece of functionality that may be added to an existing system by abiding by a contract pre-defined by that system. Plug-in (my definition)
  • 5.
  • 6.
  • 7.
  • 8. • Split work across natural boundaries • Incrementally create and deploy features • Deploy only new and updated modules • Don’t need source code for existing system
  • 9.
  • 10.
  • 11. • Changes to contracts are difficult to manage • Increased development time for small projects
  • 12.
  • 13. // Get input – “HELLO” string input = Console.ReadLine().ToUpper(); // "Encrypt" it string output = ""; foreach (char c in input) { byte b = (byte) c; output += (char)(b < 78 ? b + 13 : b - 13); } // Write output – “URYYB” Console.WriteLine(output);
  • 15. static void Main(string[] args) { // Get input string input = Console.ReadLine().ToUpper(); // "Encrypt" it Rot13 encryptionAlgorithm = new Rot13(); string output = encryptionAlgorithm.Encrypt(input); // Write output Console.WriteLine(output); } public class Rot13 { public string Encrypt(string input) { string output = ""; foreach (char c in input) { output += (char)(c < 78 ? c + 13 : c - 13); } return output; } }
  • 16. static void Main(string[] args) { // Get input string input = Console.ReadLine().ToUpper(); // "Encrypt" it IEncryptionAlgorithm encryptionAlgorithm = new Rot13(); string output = encryptionAlgorithm.Encrypt(input); // Write output Console.WriteLine(output); } public class Rot13 : IEncryptionAlgorithm { public string Encrypt(string input) { string output = ""; foreach (char c in input) { output += (char)(c < 78 ? c + 13 : c - 13); } return output; } } public interface IEncryptionAlgorithm { string Encrypt(string input); }
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. • Single - Automatically choose one. • One of Many - Like Single, but give the user the choice. Think smart phone apps • Many Simultaneously – Using the composite pattern, many plug-ins are treated as one. Like browser plug-ins; they have the potential of overlapping
  • 26. • Most IoC containers – Ninject (using ninject.extensions.conventions) – Castle.Windsor – Unity – StructureMap – MEF – Managed Extensibility Framework – MAF – Managed AddIn Framework – Many other IoC containers
  • 27.
  • 28. Add Sales Tax to Calculation Toppings! More Toppings!
  • 29.
  • 30.
  • 31.
  • 32. • Why not use config files? Config files are for changing the data/data source. Plug-in architecture is for dropping in functionality • Deciding where to put plug-in points
  • 33. • Recovering from plug-in crashes • Dynamic loading and unloading at run time • Updating an application while it’s running

Notes de l'éditeur

  1. The icons use FontAwesome. If they appear to be missing, try installing the font from here: http://fortawesome.github.io/Font-Awesome/ As you may have guessed, this talk is about plug-in architectures in .NET.
  2. Whenever you talk about plugin architectures, the canonical example is this: our electrical system. It’s a great example because you can plug things into it without affecting other devices plugged into the same system. It also represents a common standard that vendors can comply with.
  3. My definition. Read it.
  4. After this slide, jump into example 4-ConsoleEncrypter
  5. After this slide, jump into example 5-CompositionRoot and 6-IoCContainer
  6. Mention the real application that I put into production based on this sample code