SlideShare a Scribd company logo
1 of 21
Download to read offline
10/12/2015
1
Sustainable Architecture
“Supporting Data Variability”
Copyright 2014 Joseph W. Yoder & The Refactory, Inc.
JDD – October 12th, 2015
Joseph W. Yoder -- www.refactory.com
Sustaining Your Architecture
Sustaining
Architecture
When dealing with data variability…
“What can be done to help sustain
our architecture in the long run?”
10/12/2015
2
Sustaining Your Architecture
Motivation:
Need to Quickly
Adapt to Change
 Business Rules and Domain Elements
are varying a lot and changing quickly:
 New calculations for insurance policies
and new types of policies offered
 Online store catalog with new products
and services and rules applying to them
 New cell phone product and services…
 Need quick ways to develop and adapt
to these varying requirements
Sustaining Your Architecture
Core Ideas
Separate what changes
from what doesn’t change
Protect core components
Find the variability points and provide
ways to support this variability in data
 Description of changes (metadata)
 Hook Points for variability
 Dynamic Process Rules using Metadata
4
10/12/2015
3
Sustaining Your Architecture
Stuart Brand’s Shearing Layers
 Buildings are a set of components that
evolve in different timescales
 Layers: site, structure, skin, services,
space plan, stuff. Each layer has its own
value, and speed of change (pace)
 Buildings adapt because
faster layers (services) are
not obstructed by slower
ones (structure)
—Stuart Brand, How Buildings Learn
Sustaining Your Architecture
Yoder and Foote’s
Software Shearing Layers
“Factor your system so that artifacts that change at
similar rates are together.”—Foote & Yoder, Ball of
Mud, PLoPD4.
• The platform
• Infrastructure
• Data schema
• Standard frameworks, components, services
• Abstract classes, Interfaces, APIs, Schemas
• Classes, Lambdas
• Code (functions, algorithms)
• Data (metadata)
LayersSlower
Faster
10/12/2015
4
Sustaining Your Architecture
Sweep It Under the Rug
Cover it up to keep other areas clean
(Façade and other Wrapper Patterns)
Sustaining Your Architecture
Put a rug at the Front Door
Protect Important Components!
Keep other parts of the system clean
Sometimes Glue code (Mediators) helps
keep others parts of the system cleaner
(Anti-Corruption Layer -- Eric Evans)
10/12/2015
5
Sustaining Your Architecture
Wipe your Feet
at the Front Door
ALIAS: ENCAPSULATE AND IGNORE
KEEPING THE INTERNALS CLEAN
Patterns for
Sustaining Architecture
PLoP 2012 Paper
Sustaining Your Architecture
Wipe your Feet
at the Front Door
Filtering and Cleansing Sequence to keep
Place Order Interface Clean
Protected
Components
S1
S2
S3
Sn
Adapter/
Proxy/
Façade
Frontdoor
Wrapper
Filtering,
Cleansing,
Security
Checks
...
10/12/2015
6
Sustaining Your Architecture
THINGS ARE CHANGING:
SYSTEMS NEED TO QUICKLY
ADAPT TO VARIATIONS!!!
Sustaining Your Architecture
In my youth…two bad words
M and R words
Metadata and Reflection
10/12/2015
7
Sustaining Your Architecture
Metadata
Sustaining Your Architecture
The Power of Metadata
Code is data, data is code. Everything
is data. And data can drive behavior
Meta data simply describes other data.
“If something is going to vary in a
predictable way, store the description
of the variation in a database so that it
is easy to change”—Ralph Johnson
"Anything you can do, I can do Meta"
”Meta is Beta"
10/12/2015
8
Sustaining Your Architecture
What is Metadata
“Data about Data”
Document Type Book
Authors
Erich Gamma, John Vlissides,
Ralph Johnson, and Richard Helm
Year of
Publication
1994
Title
Design Patterns: Elements of
Reusable Object-Oriented Software
Page Count 395
Publisher Addison-Wesley
Description
Software engineering book describing
recurring solutions to common problems
in software design...
Sustaining Your Architecture
Metadata – the Three “M”s
Metaobjects
Markup Manifest
Brian Foote: Metadata, The Good, The Bad, The Ugly
Mini-SugarLoaf PLoP, São Paulo, Brazil - September 2011
10/12/2015
9
Sustaining Your Architecture
Metadata – Markup
<xsl:stylesheet xmlns:xsl="http://www.w3.org/
1999/XSL/Transform" version="1.0">
<xsl:key match="/publisher/books/book" use="author-ref/@ref"
name="books-by-author"/>
<xsl:template match="/"><bestsellers-list> <xsl:apply-templates
select="/publisher/authors/author"> <xsl:sort select="sum(key('books-by-
author', @id)/sold)"/> <xsl:sort select="last_name"/> </xsl:apply-
templates> </bestsellers-list></xsl:template>
<xsl:template match="author"> <copy> <name> <xsl:value-of
select="last_name"/>, <xsl:value-of select="first_name"/> </name>
<total_publications> <xsl:value-of select="count(key('books-by-author',
@id))"/> </total_publications> <total_sold> <xsl:value-of
select="sum(key('books-by-author', @id)/sold)"/>
</total_sold> <rank> <xsl:value-of select="position()"/>
</rank> </copy> </xsl:template>
</xsl:stylesheet>
Sustaining Your Architecture
public class Car {
// Injectable constructor
@Inject public Car(Engine engine) { ... }
// Injectable field
@Inject private Provider<Seat> seatProvider;
// Injectable package-private method
@Inject void install(Windshield windshield, Trunk trunk) { ... }
}
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD) //can use in method only.
public @interface Test {…}
Metadata – Annotations
10/12/2015
10
Sustaining Your Architecture
JUnit Annotations
Annotation Description
@Test public void method() Annotation @Test identifies that method is a test method.
@Before public void method()
Will perform the method() before each test. This method
can prepare the test environment, e.g. read input data,
initialize the class)
@After public void method() Test method must start with test
@BeforeClass
public void method()
Will perform the method before the start of all tests. This
can be used to perform time intensive activities such as
connecting to or loading data from a database.
@AfterClass
public void method()
Will perform the method after all tests have finished. This
can be used to perform clean-up activities for example be
used to disconnect to a database
@Ignore
Will ignore the test method. Useful if the underlying code
has changed and the test has not yet been adapted or if
running the test takes too long.
@Test(expected=IllegalArgume
ntException.class)
Tests if named exception is thrown.
@Test(timeout=100) Fails if the method takes longer then 100 milliseconds
Sustaining Your Architecture
Metadata – Most use 2*M
Markup and Manifest are “good”
enough for most successful
meta-architectures…
Metadata For Online Store Catalog
Sweaters (size=(S,M,L,XL),
color=(red, green, blue, yellow,…))
Canoes (length=float, width=float,
color=(red, brown, blue, silver,…))
Video (name=string, rating=(P,PG,R,…),
category=(Action, Drama,…))
10/12/2015
11
Sustaining Your Architecture
Custom Metadata
Sustaining Your Architecture
AOM and TypeSquare
(code example)
public class EntityType {
private string _typeName;
private Type _type;
public EntityType
(string name, Type type) {
_typeName = name;
_type = type; }
public string Name {
get{return _typeName;}
set{_typeName = value;} }…}
http://www.codeproject.com/
Christopher G. Lasater
<entities>
<entity name="President"
entityType="TopLevelExecutiveType"
actualAttributes="EmployeeId"
/>
<entity name="VicePresident"
entityType="ExecutiveType"
actualAttributes="EmployeeId"
/>
….
</entities>
10/12/2015
12
Sustaining Your Architecture
Dynamic Hook Points
Eli Acherkan, Atzmon Hen-Tov, David H. Lorenz,
Lior Schachter, Rebecca Wirfs-Brock, Joseph W. Yoder
Asian PLoP 2012
When building dynamic systems, it is often the case
that new behavior is needed which is not supported
by the core architecture. One way to vary the behavior
quickly is to provide well-defined variation points,
called hook-points, in predefined places in the
systems where new behavior can be dynamically
looked up and invoke at runtime when desired.
Can use metadata annotations to look up and invoke!
Sustaining Your Architecture
Dynamic Hook Points
Eli Acherkan, Atzmon Hen-Tov, David H. Lorenz,
Lior Schachter, Rebecca Wirfs-Brock, Joseph W. Yoder
Asian PLoP 2012
10/12/2015
13
Sustaining Your Architecture
Paving over the
Wagon Trail
ALIAS: MAKE REPETITIVE TASKS EASIER
STREAMLINING REPETITIVE CODE TASKS
Create simple examples, templates, & scripts
Develop a tool that generates code
Identify and use existing tools or frameworks
Develop a framework &/or runtime environment
Develop a domain-specific language
Patterns for Sustaining Architecture
PLoP 2012 Paper
Sustaining Your Architecture
Paving over the
Wagon Trail
Patterns for Sustaining Architecture
PLoP 2012 Paper
10/12/2015
14
Alternative Computation Styles
Imperative
Traditional programming
Define a series of steps
with conditionals and
loops to vary sequence
Declarative
Executable specifications
Many options:
DSLs (Special language)
Decision tables
State machines
Production rule systems
Adaptive Model Systems
Domain Specific Languages, Martin Fowler and Rebecca Parsons
Architecture of DSL Processing
__________
__________
__________
__________
__________ DSL Script
parse
semantic
model
generate
__________
__________
__________
__________
______
__________
______
_________
__________
DSL Script target code
optional
Domain Specific Languages, Martin Fowler and Rebecca Parsons
✗
DSLs can be a scripting language and work by means of parameterization,
They don’t need to have a meta-level but they often do have one!!!
10/12/2015
15
Sustaining Your Architecture
IMPORT EXAMPLE:
HOW TO DEAL WITH
CLIENT VARIABILITY???
Sustaining Your Architecture
Import Orders
 Provided a standard
format for imports
 Lots of duplication
 If Clients needed to
vary from that format,
we had to write or update a complete,
self-contained custom import program
 Imports that need special processing, or
had client specific rules, required to write
a complete, self-contained import program
10/12/2015
16
Sustaining Your Architecture
Motivation:
Need to Quickly
Adapt to Change
 Business Rules or Domain Elements
are changing quickly:
 New calculations for insurance policies
and new types of policies offered
 Online store catalog with new products
and services and rules applying to them
 New cell phone product and services…
 Need quick ways to develop and adapt
to these changing requirements.
Sustaining Your Architecture
Import Validation
[ValidationRule(“Joes Validation Rule")]
public class JoesValidationRule : ValidationRule {
public JoesValidationRule () : base() { }
public override void Validate(ImportContext context)
…}
Validate
Process
Core Rules
Load and Process
Cleint Specific Rules
• Dynamic
Hook Point
10/12/2015
17
Sustaining Your Architecture
Architectural Practice:
Support Data Variability
 Separate what
changes from stable
part of system and
provide support for
adaptability/flexibility
 Integrate new
learning into
your architecture
 Refactoring
 Redesign
 Rework
 Code clean up
Sustaining Your Architecture
Sustaining an
Architecture
 Minimize architectural
debt: Support the ability
to change/adapt what
needs to change
 Make what is too
difficult, time consuming,
or tedious easier
 Decide at the most
responsible moment,
not the last possible
moment
 Learn and evolve
Keep the system “livable” for its users and developers
10/12/2015
18
Sustaining Your Architecture
Sustainable
Architecture
Stewardship
 Follow through
 Ongoing attention
 Not ignoring the little
things that can undermine
our ability to grow, change
and adapt our systems
Sustaining Your Architecture
Indicators You’ve Paid Enough
Attention to Architecture
 Defects are localized
 Stable interfaces
 Consistency
 Developers can easily
add new functionality
 New functionality doesn’t
“break” existing architecture
 Few areas that developers avoid
because they are too difficult to work in
 Able to incrementally integrate new functionality
10/12/2015
19
Sustaining Your Architecture
Continuous Inspection
Asian PLoP 2014 Paper
Sustaining Your Architecture
Continuous Inspection
Asian PLoP 2014 Paper
CODE SMELL DETECTION
METRICS (TEST COVERAGE, CYCLOMATIC COMPLEXITY,
TECHNICAL DEBT, SIZES, …)
APPLICATION SECURITY CHECKS
ARCHITECTURAL CONFORMANCE
AUTOMATE WHERE YOU CAN!!!
10/12/2015
20
Sustaining Your Architecture
Design Values
Supporting Variability
 Respect your system’s shearing layers
 Understand the rates of what changes
 Determine & support who should be able
to make changes, when, and at what cost
 Make what is too difficult, time
consuming, or tedious easier
 Create tools, leverage design
patterns, use data to drive behavior…
 Don’t overdesign!!! (Only design
what you need when you need it)
Sustaining Your Architecture
Resources
Adaptive Object Models
 www.adaptiveobjectmodel.com
 www.metaplop.org
Teams That Innovate
 www.teamsthatinnovate.org
Refactoring www.refactory.com
Hillside Patterns www.hillside.net
10/12/2015
21
Dziękuję!!!
joe@refactory.com
Twitter: @metayoda

More Related Content

Viewers also liked

PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...
PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...
PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...PROIDEA
 
4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript
4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript
4Developers2016: Piotr Miazga - Typescript - an OO approach in JavascriptPROIDEA
 
PLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i Widoczność
PLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i WidocznośćPLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i Widoczność
PLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i WidocznośćPROIDEA
 
PLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment Routing
PLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment RoutingPLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment Routing
PLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment RoutingPROIDEA
 
JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?
JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?
JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?PROIDEA
 
The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...Brian Solis
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakShelly Sanchez Terrell
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerLuminary Labs
 

Viewers also liked (8)

PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...
PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...
PLNOG 17 - Andrzej Jeruzal - Dell Networking OS10: sieciowy system operacyjny...
 
4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript
4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript
4Developers2016: Piotr Miazga - Typescript - an OO approach in Javascript
 
PLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i Widoczność
PLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i WidocznośćPLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i Widoczność
PLNOG 17 - Alexis Dacquay - 100 G, Skalowalność i Widoczność
 
PLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment Routing
PLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment RoutingPLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment Routing
PLNOG 17 - Leonir Hoxha - Next Generation Network Architecture - Segment Routing
 
JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?
JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?
JDD 2016 - Maciej Schmidt - Jak AR i VR Pomogą w Produkcji Twoich Produktów?
 
The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...The impact of innovation on travel and tourism industries (World Travel Marke...
The impact of innovation on travel and tourism industries (World Travel Marke...
 
Teaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & TextspeakTeaching Students with Emojis, Emoticons, & Textspeak
Teaching Students with Emojis, Emoticons, & Textspeak
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Similar to JDD2015: Sustainability Supporting Data Variability: Keeping Core Components Clean While Dealing with Data Variability - Joseph W. Yoder

Sql interview question part 5
Sql interview question part 5Sql interview question part 5
Sql interview question part 5kaashiv1
 
Writting Better Software
Writting Better SoftwareWritting Better Software
Writting Better Softwaresvilen.ivanov
 
A Look into the Apache OODT Ecosystem
A Look into the Apache OODT EcosystemA Look into the Apache OODT Ecosystem
A Look into the Apache OODT EcosystemChris Mattmann
 
Presentations and articles
Presentations and articlesPresentations and articles
Presentations and articlesDavid Hall
 
Presentations and articles
Presentations and articlesPresentations and articles
Presentations and articlesDavid Hall
 
Data kitchen 7 agile steps - big data fest 9-18-2015
Data kitchen   7 agile steps - big data fest 9-18-2015Data kitchen   7 agile steps - big data fest 9-18-2015
Data kitchen 7 agile steps - big data fest 9-18-2015DataKitchen
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auevanbottcher
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4kaashiv1
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4kaashiv1
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedJoão Pedro Martins
 
Workshop BI/DWH AGILE TESTING SNS Bank English
Workshop BI/DWH AGILE TESTING SNS Bank EnglishWorkshop BI/DWH AGILE TESTING SNS Bank English
Workshop BI/DWH AGILE TESTING SNS Bank EnglishMarcus Drost
 
Building a Testable Data Access Layer
Building a Testable Data Access LayerBuilding a Testable Data Access Layer
Building a Testable Data Access LayerTodd Anglin
 
Creating Your Data Governance Dashboard
Creating Your Data Governance DashboardCreating Your Data Governance Dashboard
Creating Your Data Governance DashboardTrillium Software
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Enkitec
 
Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)
Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)
Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)Rittman Analytics
 
Azure presentation nnug dec 2010
Azure presentation nnug  dec 2010Azure presentation nnug  dec 2010
Azure presentation nnug dec 2010Ethos Technologies
 

Similar to JDD2015: Sustainability Supporting Data Variability: Keeping Core Components Clean While Dealing with Data Variability - Joseph W. Yoder (20)

Ebook5
Ebook5Ebook5
Ebook5
 
Sql interview question part 5
Sql interview question part 5Sql interview question part 5
Sql interview question part 5
 
Writting Better Software
Writting Better SoftwareWritting Better Software
Writting Better Software
 
A Look into the Apache OODT Ecosystem
A Look into the Apache OODT EcosystemA Look into the Apache OODT Ecosystem
A Look into the Apache OODT Ecosystem
 
Presentations and articles
Presentations and articlesPresentations and articles
Presentations and articles
 
Presentations and articles
Presentations and articlesPresentations and articles
Presentations and articles
 
Data kitchen 7 agile steps - big data fest 9-18-2015
Data kitchen   7 agile steps - big data fest 9-18-2015Data kitchen   7 agile steps - big data fest 9-18-2015
Data kitchen 7 agile steps - big data fest 9-18-2015
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.au
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4
 
Ebook4
Ebook4Ebook4
Ebook4
 
Sql interview question part 4
Sql interview question part 4Sql interview question part 4
Sql interview question part 4
 
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons LearnedITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
ITARC15 Workshop - Architecting a Large Software Project - Lessons Learned
 
Workshop BI/DWH AGILE TESTING SNS Bank English
Workshop BI/DWH AGILE TESTING SNS Bank EnglishWorkshop BI/DWH AGILE TESTING SNS Bank English
Workshop BI/DWH AGILE TESTING SNS Bank English
 
Building a Testable Data Access Layer
Building a Testable Data Access LayerBuilding a Testable Data Access Layer
Building a Testable Data Access Layer
 
Creating Your Data Governance Dashboard
Creating Your Data Governance DashboardCreating Your Data Governance Dashboard
Creating Your Data Governance Dashboard
 
Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12Kelly potvin nosurprises_odtug_oow12
Kelly potvin nosurprises_odtug_oow12
 
Data vault what's Next: Part 2
Data vault what's Next: Part 2Data vault what's Next: Part 2
Data vault what's Next: Part 2
 
Daniel Villani
Daniel VillaniDaniel Villani
Daniel Villani
 
Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)
Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)
Data Integration for Big Data (OOW 2016, Co-Presented With Oracle)
 
Azure presentation nnug dec 2010
Azure presentation nnug  dec 2010Azure presentation nnug  dec 2010
Azure presentation nnug dec 2010
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 

JDD2015: Sustainability Supporting Data Variability: Keeping Core Components Clean While Dealing with Data Variability - Joseph W. Yoder

  • 1. 10/12/2015 1 Sustainable Architecture “Supporting Data Variability” Copyright 2014 Joseph W. Yoder & The Refactory, Inc. JDD – October 12th, 2015 Joseph W. Yoder -- www.refactory.com Sustaining Your Architecture Sustaining Architecture When dealing with data variability… “What can be done to help sustain our architecture in the long run?”
  • 2. 10/12/2015 2 Sustaining Your Architecture Motivation: Need to Quickly Adapt to Change  Business Rules and Domain Elements are varying a lot and changing quickly:  New calculations for insurance policies and new types of policies offered  Online store catalog with new products and services and rules applying to them  New cell phone product and services…  Need quick ways to develop and adapt to these varying requirements Sustaining Your Architecture Core Ideas Separate what changes from what doesn’t change Protect core components Find the variability points and provide ways to support this variability in data  Description of changes (metadata)  Hook Points for variability  Dynamic Process Rules using Metadata 4
  • 3. 10/12/2015 3 Sustaining Your Architecture Stuart Brand’s Shearing Layers  Buildings are a set of components that evolve in different timescales  Layers: site, structure, skin, services, space plan, stuff. Each layer has its own value, and speed of change (pace)  Buildings adapt because faster layers (services) are not obstructed by slower ones (structure) —Stuart Brand, How Buildings Learn Sustaining Your Architecture Yoder and Foote’s Software Shearing Layers “Factor your system so that artifacts that change at similar rates are together.”—Foote & Yoder, Ball of Mud, PLoPD4. • The platform • Infrastructure • Data schema • Standard frameworks, components, services • Abstract classes, Interfaces, APIs, Schemas • Classes, Lambdas • Code (functions, algorithms) • Data (metadata) LayersSlower Faster
  • 4. 10/12/2015 4 Sustaining Your Architecture Sweep It Under the Rug Cover it up to keep other areas clean (Façade and other Wrapper Patterns) Sustaining Your Architecture Put a rug at the Front Door Protect Important Components! Keep other parts of the system clean Sometimes Glue code (Mediators) helps keep others parts of the system cleaner (Anti-Corruption Layer -- Eric Evans)
  • 5. 10/12/2015 5 Sustaining Your Architecture Wipe your Feet at the Front Door ALIAS: ENCAPSULATE AND IGNORE KEEPING THE INTERNALS CLEAN Patterns for Sustaining Architecture PLoP 2012 Paper Sustaining Your Architecture Wipe your Feet at the Front Door Filtering and Cleansing Sequence to keep Place Order Interface Clean Protected Components S1 S2 S3 Sn Adapter/ Proxy/ Façade Frontdoor Wrapper Filtering, Cleansing, Security Checks ...
  • 6. 10/12/2015 6 Sustaining Your Architecture THINGS ARE CHANGING: SYSTEMS NEED TO QUICKLY ADAPT TO VARIATIONS!!! Sustaining Your Architecture In my youth…two bad words M and R words Metadata and Reflection
  • 7. 10/12/2015 7 Sustaining Your Architecture Metadata Sustaining Your Architecture The Power of Metadata Code is data, data is code. Everything is data. And data can drive behavior Meta data simply describes other data. “If something is going to vary in a predictable way, store the description of the variation in a database so that it is easy to change”—Ralph Johnson "Anything you can do, I can do Meta" ”Meta is Beta"
  • 8. 10/12/2015 8 Sustaining Your Architecture What is Metadata “Data about Data” Document Type Book Authors Erich Gamma, John Vlissides, Ralph Johnson, and Richard Helm Year of Publication 1994 Title Design Patterns: Elements of Reusable Object-Oriented Software Page Count 395 Publisher Addison-Wesley Description Software engineering book describing recurring solutions to common problems in software design... Sustaining Your Architecture Metadata – the Three “M”s Metaobjects Markup Manifest Brian Foote: Metadata, The Good, The Bad, The Ugly Mini-SugarLoaf PLoP, São Paulo, Brazil - September 2011
  • 9. 10/12/2015 9 Sustaining Your Architecture Metadata – Markup <xsl:stylesheet xmlns:xsl="http://www.w3.org/ 1999/XSL/Transform" version="1.0"> <xsl:key match="/publisher/books/book" use="author-ref/@ref" name="books-by-author"/> <xsl:template match="/"><bestsellers-list> <xsl:apply-templates select="/publisher/authors/author"> <xsl:sort select="sum(key('books-by- author', @id)/sold)"/> <xsl:sort select="last_name"/> </xsl:apply- templates> </bestsellers-list></xsl:template> <xsl:template match="author"> <copy> <name> <xsl:value-of select="last_name"/>, <xsl:value-of select="first_name"/> </name> <total_publications> <xsl:value-of select="count(key('books-by-author', @id))"/> </total_publications> <total_sold> <xsl:value-of select="sum(key('books-by-author', @id)/sold)"/> </total_sold> <rank> <xsl:value-of select="position()"/> </rank> </copy> </xsl:template> </xsl:stylesheet> Sustaining Your Architecture public class Car { // Injectable constructor @Inject public Car(Engine engine) { ... } // Injectable field @Inject private Provider<Seat> seatProvider; // Injectable package-private method @Inject void install(Windshield windshield, Trunk trunk) { ... } } @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) //can use in method only. public @interface Test {…} Metadata – Annotations
  • 10. 10/12/2015 10 Sustaining Your Architecture JUnit Annotations Annotation Description @Test public void method() Annotation @Test identifies that method is a test method. @Before public void method() Will perform the method() before each test. This method can prepare the test environment, e.g. read input data, initialize the class) @After public void method() Test method must start with test @BeforeClass public void method() Will perform the method before the start of all tests. This can be used to perform time intensive activities such as connecting to or loading data from a database. @AfterClass public void method() Will perform the method after all tests have finished. This can be used to perform clean-up activities for example be used to disconnect to a database @Ignore Will ignore the test method. Useful if the underlying code has changed and the test has not yet been adapted or if running the test takes too long. @Test(expected=IllegalArgume ntException.class) Tests if named exception is thrown. @Test(timeout=100) Fails if the method takes longer then 100 milliseconds Sustaining Your Architecture Metadata – Most use 2*M Markup and Manifest are “good” enough for most successful meta-architectures… Metadata For Online Store Catalog Sweaters (size=(S,M,L,XL), color=(red, green, blue, yellow,…)) Canoes (length=float, width=float, color=(red, brown, blue, silver,…)) Video (name=string, rating=(P,PG,R,…), category=(Action, Drama,…))
  • 11. 10/12/2015 11 Sustaining Your Architecture Custom Metadata Sustaining Your Architecture AOM and TypeSquare (code example) public class EntityType { private string _typeName; private Type _type; public EntityType (string name, Type type) { _typeName = name; _type = type; } public string Name { get{return _typeName;} set{_typeName = value;} }…} http://www.codeproject.com/ Christopher G. Lasater <entities> <entity name="President" entityType="TopLevelExecutiveType" actualAttributes="EmployeeId" /> <entity name="VicePresident" entityType="ExecutiveType" actualAttributes="EmployeeId" /> …. </entities>
  • 12. 10/12/2015 12 Sustaining Your Architecture Dynamic Hook Points Eli Acherkan, Atzmon Hen-Tov, David H. Lorenz, Lior Schachter, Rebecca Wirfs-Brock, Joseph W. Yoder Asian PLoP 2012 When building dynamic systems, it is often the case that new behavior is needed which is not supported by the core architecture. One way to vary the behavior quickly is to provide well-defined variation points, called hook-points, in predefined places in the systems where new behavior can be dynamically looked up and invoke at runtime when desired. Can use metadata annotations to look up and invoke! Sustaining Your Architecture Dynamic Hook Points Eli Acherkan, Atzmon Hen-Tov, David H. Lorenz, Lior Schachter, Rebecca Wirfs-Brock, Joseph W. Yoder Asian PLoP 2012
  • 13. 10/12/2015 13 Sustaining Your Architecture Paving over the Wagon Trail ALIAS: MAKE REPETITIVE TASKS EASIER STREAMLINING REPETITIVE CODE TASKS Create simple examples, templates, & scripts Develop a tool that generates code Identify and use existing tools or frameworks Develop a framework &/or runtime environment Develop a domain-specific language Patterns for Sustaining Architecture PLoP 2012 Paper Sustaining Your Architecture Paving over the Wagon Trail Patterns for Sustaining Architecture PLoP 2012 Paper
  • 14. 10/12/2015 14 Alternative Computation Styles Imperative Traditional programming Define a series of steps with conditionals and loops to vary sequence Declarative Executable specifications Many options: DSLs (Special language) Decision tables State machines Production rule systems Adaptive Model Systems Domain Specific Languages, Martin Fowler and Rebecca Parsons Architecture of DSL Processing __________ __________ __________ __________ __________ DSL Script parse semantic model generate __________ __________ __________ __________ ______ __________ ______ _________ __________ DSL Script target code optional Domain Specific Languages, Martin Fowler and Rebecca Parsons ✗ DSLs can be a scripting language and work by means of parameterization, They don’t need to have a meta-level but they often do have one!!!
  • 15. 10/12/2015 15 Sustaining Your Architecture IMPORT EXAMPLE: HOW TO DEAL WITH CLIENT VARIABILITY??? Sustaining Your Architecture Import Orders  Provided a standard format for imports  Lots of duplication  If Clients needed to vary from that format, we had to write or update a complete, self-contained custom import program  Imports that need special processing, or had client specific rules, required to write a complete, self-contained import program
  • 16. 10/12/2015 16 Sustaining Your Architecture Motivation: Need to Quickly Adapt to Change  Business Rules or Domain Elements are changing quickly:  New calculations for insurance policies and new types of policies offered  Online store catalog with new products and services and rules applying to them  New cell phone product and services…  Need quick ways to develop and adapt to these changing requirements. Sustaining Your Architecture Import Validation [ValidationRule(“Joes Validation Rule")] public class JoesValidationRule : ValidationRule { public JoesValidationRule () : base() { } public override void Validate(ImportContext context) …} Validate Process Core Rules Load and Process Cleint Specific Rules • Dynamic Hook Point
  • 17. 10/12/2015 17 Sustaining Your Architecture Architectural Practice: Support Data Variability  Separate what changes from stable part of system and provide support for adaptability/flexibility  Integrate new learning into your architecture  Refactoring  Redesign  Rework  Code clean up Sustaining Your Architecture Sustaining an Architecture  Minimize architectural debt: Support the ability to change/adapt what needs to change  Make what is too difficult, time consuming, or tedious easier  Decide at the most responsible moment, not the last possible moment  Learn and evolve Keep the system “livable” for its users and developers
  • 18. 10/12/2015 18 Sustaining Your Architecture Sustainable Architecture Stewardship  Follow through  Ongoing attention  Not ignoring the little things that can undermine our ability to grow, change and adapt our systems Sustaining Your Architecture Indicators You’ve Paid Enough Attention to Architecture  Defects are localized  Stable interfaces  Consistency  Developers can easily add new functionality  New functionality doesn’t “break” existing architecture  Few areas that developers avoid because they are too difficult to work in  Able to incrementally integrate new functionality
  • 19. 10/12/2015 19 Sustaining Your Architecture Continuous Inspection Asian PLoP 2014 Paper Sustaining Your Architecture Continuous Inspection Asian PLoP 2014 Paper CODE SMELL DETECTION METRICS (TEST COVERAGE, CYCLOMATIC COMPLEXITY, TECHNICAL DEBT, SIZES, …) APPLICATION SECURITY CHECKS ARCHITECTURAL CONFORMANCE AUTOMATE WHERE YOU CAN!!!
  • 20. 10/12/2015 20 Sustaining Your Architecture Design Values Supporting Variability  Respect your system’s shearing layers  Understand the rates of what changes  Determine & support who should be able to make changes, when, and at what cost  Make what is too difficult, time consuming, or tedious easier  Create tools, leverage design patterns, use data to drive behavior…  Don’t overdesign!!! (Only design what you need when you need it) Sustaining Your Architecture Resources Adaptive Object Models  www.adaptiveobjectmodel.com  www.metaplop.org Teams That Innovate  www.teamsthatinnovate.org Refactoring www.refactory.com Hillside Patterns www.hillside.net