SlideShare a Scribd company logo
1 of 61
IT Architect Regional Conference 2009
Taking your strategy to new heights!




    Architecture Enforcement and
     Governance Using Aspects



 Srini Penchikala
 Enterprise Architect
About the Speaker
• Enterprise Architect
• Editor: InfoQ, Java & Architecture communities
• Writer: InfoQ, TSS, ONJava, DevX Java, java.net
• Speaker
• Detroit Java User Group Leader
• Using Java since 1996 & JEE since 2000
• SOA/Web Services since 2006
• PowerPoint since September 2008

                                           Sponsor Logo
Goals for this Presentation




• Overview of Reference Architecture (RA) and its
  significance in EA
• How Aspects and AOP can help to enforce RA and
  manage Architecture Governance

                                        Sponsor Logo
Format
    Interactive



    Demos



    Duration: ~60 minutes



    Q&A





                            Sponsor Logo
Before we start…




• How many currently have some kind of Reference
  Architecture in place?
• How many actually use RA to enforce architecture?


                                          Sponsor Logo
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Reference Architecture
•   A high-level system design which
    consists of:
    –   description of system components
    –   definitions of relationships between
        components
    –   definitions of relationships between
        system components & elements external
        to the system
Architecture Maturity Model
• Level 0: No RA
• Level 1: RA is described in a Word/HTML/PDF
  document
• Level 2: Semi-automated checking mechanism
  for architecture enforcement
• Level 3: Fully automated checking mechanism
Architecture Enforcement
     Architecture Rules:



      Rules (compile time as well as run time) used to
    


      assert architecture.
     Architecture Governance:



      Construct an Architecture Contract to govern
    


      overall implementation & deployment process.
      Perform appropriate governance functions while
    


      system is being implemented and deployed.
      Ensure conformance with defined architecture by
    


      implementation projects
Why Architecture Enforcement?
• Checking mechanism to enforce Reference
  Architecture.
• Match Requirements (Architecture) to
  Implementation (Code).
• Detect and prevent structural complexity.
• Promotes consistency & modularity in the
  System.
• Aids in Architecture, Design, and Code
  refactoring efforts.
• Collaboration tool between Developers &
  Architects
Architecture Rules
     Business v. Architecture Rules



      Architecture rules are as important as business
    


      rules.
     Code Quality By Design



      Unit tests, TDD & BDD only help with code quality
    


      from functional requirements stand-point.
      Need for a process to ensure code quality from
    


      design & architectural stand-point.
     Technical Credit



      Good Design, Testable and Integrated Code
    


      Code that complies with Architecture/Design
    


      Policies
Types of Enforcement
• Layered architecture and application
  module dependencies
• API usage (internal and 3rd party)
• Coding Policies/Design Patterns/Best
  Practices
• Code-Naming Conventions
Setup Types
    Static analysis



        Based on the structure of the code base
    


        Allows for easy visual representation
    


        Techniques: AOP, AspectJ
    


        Tools: Structure 101,SonarJ, Lattix
    



    Dynamic analysis



        Based on the program flow
    


        Rule-set usable at runtime
    


        AspectJ/Spring AOP
    
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Rule Categories
•   Layered Architecture
•   Separation Of Concerns
•   Domain-Driven Design
•   Infrastructure
•   Miscellaneous
Rules - Layered Architecture
• Presentation layer should not use DAO
  classes directly.
• Service layer never calls web layer.
• DAO (Persistence) layer depends on no
  other layer except domain.
Rules - Separation of Concerns
• No transaction management in DAO classes.
• Only DAO's should reference javax.sql classes.
• Only Controller classes are aware of Web/HTTP
  objects.
• Service layer should be transactional.
• External systems can not access internal
  implementation classes (*Impl classes).
Rules – Domain-Driven Design
• Service object creation via a Factory (i.e.
  no “new Service()” code).
• No direct access to DAO’s except from
  Domain classes.
• Business service that fails with a
  concurrency related failure can be retried.
Rules - Infrastructure
• No direct use of API:
  – Log4J or Commons Logging (use Framework
    Logger)
  – JavaMail (use MailService component)
  – FTP (use FileTransferService component)
• No System.out.println statement anywhere
  in the code.
Rules - Miscellaneous
• All primary key classes (*PK.java) should
  implement Serializable interface.
• All test classes should be named with the suffix
  “Test”.
Persistence
• Hibernate session close only allowed in
  EJB's and Servlet Filters.
• DAO's accessing DB Views use JDBC (no
  Hibernate).
• Use SpringJdbcTemplate for JDBC data
  access requirements.
Other Concerns
    Auditing



        Domain state change tracking
    



    Monitoring



        Aspects to implement MonitorMBean interface
    


        Expose Results as an MBean
    


        Publish results using RSS feeds
    
Approaches
•   Code Inspections
•   Architecture Reconstruction
•   Model Driven Architecture (MDA)
•   Code Generation
•   Byte Code Instrumentation
•   Enforcement Tools
•   Aspect-oriented Programming (AOP)
Architecture Analysis Tools
•   Macker
•   ArchitectureRules
•   Classycle
•   PatternTesting
•   Contract4J
•   Structure 101, Lattix, SonarJ
Architecture Analysis Tools
    Structure 101



        Slicing / Rules
    



    SonarJ



        Logical architecture definition & Physical
    


        mapping of architecture to Java code.
    Lattix



        Dependency Structure Matrix showing the
    


        Desired vs. the Realized architecture
        implementation.
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Aspect-oriented Programming
• Allows developers to add behavior to
  objects in a non-obtrusive manner through
  use of static and dynamic crosscutting.
• Main goal is to code cross-cutting
  concerns in separate modules and apply
  them in a declarative way.



                                  Sponsor Logo
AOP Use Cases
    Framework Built-In Aspects:



        Transaction Management
    


        Security
    



    Custom Aspects:



        Profiling
    


        Caching
    


        Architecture Rules
    


        Contract Enforcement
    



                                  Sponsor Logo
AOP Rules
• provides the necessary abstraction to
  enforce rules.
• customized compile-time error or warning
  messages.
• less intrusive.
• target application code is not modified in
  any form.
• rules can be turned on or off any time.
Architecture Rules Enforcement
• IDE (Eclipse, AJDT)
• Build Process Changes (Ant, CruiseControl)
• RSS Feeds (Rome)




                                      Sponsor Logo
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Sample Application
    Tools:



        Eclipse
    


        AspectJ
    


        AJDT
    


        Spring AOP
    


        Ant
    
Sample Application - Eclipse
Layered Architecture Rules
    Service classes should not depend on



    Application layer classes
DEMO
Domain-Driven Design Rules
• No direct access to DAO's except from the
  Domain classes (go through Domain or
  Repository objects).
J2EE Architecture




                    Sponsor Logo
Domain Driven Architecture




                        Sponsor Logo
DEMO
DDD Rules Demo 2
    Business service that fails with a



    concurrency related failure can be retried.
    Caching example



        Spring AOP and EHCache
    


        Requirement: To cache specific data (objects)
    


        using a custom Annotation
        Annotation: @CacheEntity
    




                                           Sponsor Logo
DEMO
Infrastructure Rules
    No direct use of API:



        Log4J or Commons Logging (use Framework
    


        Logger)
DEMO
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
CI Process Changes
    Build process changes to include



    Architecture rules task.
    Part of build process (in Local and



    Integration environments)
    Deviations are published nightly as RSS



    feeds
    Identified deviations are used in conducting



    design and code reviews
Build Process Changes
                                                           Publish
     Compile          Compile                            Architecture/
                                                       Design Violations



                                                              N




                   Run Architecture
  Run Unit Tests                      Violations
                                               ?   Y        Error
                       Rules




                                                              Y



                                                       Display message
    Package        Run Unit Tests     N                 about the Error
                                                       and prevent SCM
                                                           Commit




     Deploy           Package




                       Deploy
Sample Application – Ant Build
Enforcement: Aspects or Tools?
   Tools



    Better enforcement options
  


    Licensing costs
  


   Aspects



    More flexibility for customization
  


    Relatively intrusive
  


    Not backed by an architecture meta
  


    model.
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Implementation Road Map
• Publish rules along with Reference Architecture
  (RA) and Standard Technology/Framework
  Stack.
• Pick a pilot application to enforce architecture
  rules as part of the build process (and Eclipse
  IDE).
• Incorporate architecture enforcement into other
  applications.
• Training/Mentoring as part of an on-going
  Architecture Governance effort.
Case Study
    Implementation Plan:



        Phase 1 (Day 1): Enable rules but not enforce
    


        them (yet).
        Phase 2 (Day 16): Enable rules and enforce only
    


        critical Errors (No Warnings).
        Phase 3: Enable rules and enforce all deviations
    


        (Errors & Warnings).
        Phase 4: Enable rules and enforce all Errors and
    


        Warnings in all applications in the enterprise.
Agenda
•   Reference Architecture & Enforcement
•   Architecture Rules Categories
•   Aspect-oriented Programming
•   Rules Demo(s)
•   CI Process Changes
•   Case Study
•   Architecture Rules Aspects - Open Source
    Project

                                        Sponsor Logo
Architecture Rules Aspects
    Open source Google project



        architecture-rules-aspects
    ●


        (http://code.google.com/p/architecture-rules-
        aspects/
    Future road-map:



        DSL to define architecture rules (e.g. Groovy)
    


        Define the rules in a Rules Engine.
    



    Feedback

Conclusions
• Make architecture rules part of build
  process to detect deviations earlier in
  SDLC.
• Use enforcement check results to improve
  architecture/design/code (via refactoring
  efforts)
• Capture design patterns and best practices
  as policy enforcement Aspects.
• Refine & refactor enforcement rules.
Resources (1/2)
• Architecture Rules Aspects Google Project
  (http://code.google.com/p/architecture-rules-
  aspects/)
• AspectJ In Action (2nd Edition)
• Building Software As Solid As The Pyramids
  (Ramnivas Laddad & Alef Arendsen)
• Using Aspect-Oriented Programming to Enforce
  Architecture (Paulo Merson)
• AOP In the Enterprise (Adrian Colyer)
• Aspects & policy injection - clean up your code
• Policy Injection Application Block
Resources (2/2)
•   Structure 101
•   SonarJ (http://www.hello2morrow.com)
•   Lattix
•   Contract4J (http://www.contract4j.org/contract4j)
•   Macker (http://innig.net/macker/)
AOP Tools
• AJDT
• Spring AOP
• MaintainJ: Sequence Diagram Using
  AspectJ
• PointcutDoctor
• Jexin
Contact Information
• Domain-Driven Design and Enterprise
  Architecture articles on InfoQ.
• InfoQ website (http://www.infoq.com)
• E-Mail: srinipenchikala@gmail.com
• Blog: http://srinip2007.blogspot.com




                                         Sponsor Logo
Q&A




      Sponsor Logo
Thank You
• Thank you for your attention
• SATURN 2009 Conference Presentation
• Feedback survey




                                 Sponsor Logo

More Related Content

What's hot

Software Factory - Overview
Software Factory - OverviewSoftware Factory - Overview
Software Factory - Overviewslides_teltools
 
Oracle fusion middleware training with placements and certification
Oracle fusion middleware training with placements and certificationOracle fusion middleware training with placements and certification
Oracle fusion middleware training with placements and certificationmagnificsmily
 
The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...
The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...
The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...QA Systems
 
Presentation application server diagnostics
Presentation   application server diagnosticsPresentation   application server diagnostics
Presentation application server diagnosticsxKinAnx
 
Sakai Technical Future Musings
Sakai Technical Future MusingsSakai Technical Future Musings
Sakai Technical Future MusingsCharles Severance
 
STX Next - Scrum Development Process Overview
STX Next - Scrum Development Process OverviewSTX Next - Scrum Development Process Overview
STX Next - Scrum Development Process OverviewSTX Next
 
Test Consultant II - Sreekanth Ajith
Test Consultant II  - Sreekanth AjithTest Consultant II  - Sreekanth Ajith
Test Consultant II - Sreekanth AjithSreekanth A
 
Ensuring Design Quality in Mixed Signal IP
Ensuring Design Quality in Mixed Signal IPEnsuring Design Quality in Mixed Signal IP
Ensuring Design Quality in Mixed Signal IPArasan Chip Systems
 
Agile Software Factory - Cloud Expo / DevOps Summit 2014 demo
Agile Software Factory - Cloud Expo / DevOps Summit 2014 demoAgile Software Factory - Cloud Expo / DevOps Summit 2014 demo
Agile Software Factory - Cloud Expo / DevOps Summit 2014 demoGrid Dynamics
 
RemoteLaunch Overview Presentation (2022)
RemoteLaunch Overview Presentation (2022)RemoteLaunch Overview Presentation (2022)
RemoteLaunch Overview Presentation (2022)Inflectra
 
Software Engineering Fundamentals Svetlin Nakov
Software Engineering Fundamentals Svetlin NakovSoftware Engineering Fundamentals Svetlin Nakov
Software Engineering Fundamentals Svetlin Nakovnazeer pasha
 

What's hot (14)

Software Factory - Overview
Software Factory - OverviewSoftware Factory - Overview
Software Factory - Overview
 
Oracle fusion middleware training with placements and certification
Oracle fusion middleware training with placements and certificationOracle fusion middleware training with placements and certification
Oracle fusion middleware training with placements and certification
 
The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...
The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...
The Pursuit of Perfection - Methods, techniques, and tools to achieve robust ...
 
Presentation
PresentationPresentation
Presentation
 
Presentation application server diagnostics
Presentation   application server diagnosticsPresentation   application server diagnostics
Presentation application server diagnostics
 
SAP ABAP Online Training
SAP ABAP Online TrainingSAP ABAP Online Training
SAP ABAP Online Training
 
Sakai Technical Future Musings
Sakai Technical Future MusingsSakai Technical Future Musings
Sakai Technical Future Musings
 
STX Next - Scrum Development Process Overview
STX Next - Scrum Development Process OverviewSTX Next - Scrum Development Process Overview
STX Next - Scrum Development Process Overview
 
Test Consultant II - Sreekanth Ajith
Test Consultant II  - Sreekanth AjithTest Consultant II  - Sreekanth Ajith
Test Consultant II - Sreekanth Ajith
 
Ensuring Design Quality in Mixed Signal IP
Ensuring Design Quality in Mixed Signal IPEnsuring Design Quality in Mixed Signal IP
Ensuring Design Quality in Mixed Signal IP
 
Agile Software Factory - Cloud Expo / DevOps Summit 2014 demo
Agile Software Factory - Cloud Expo / DevOps Summit 2014 demoAgile Software Factory - Cloud Expo / DevOps Summit 2014 demo
Agile Software Factory - Cloud Expo / DevOps Summit 2014 demo
 
Lect3
Lect3Lect3
Lect3
 
RemoteLaunch Overview Presentation (2022)
RemoteLaunch Overview Presentation (2022)RemoteLaunch Overview Presentation (2022)
RemoteLaunch Overview Presentation (2022)
 
Software Engineering Fundamentals Svetlin Nakov
Software Engineering Fundamentals Svetlin NakovSoftware Engineering Fundamentals Svetlin Nakov
Software Engineering Fundamentals Svetlin Nakov
 

Similar to IT Architect Regional Conference 2009 Taking Architecture to New Heights

Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture TrendsSrini Penchikala
 
Reference Architecture
Reference ArchitectureReference Architecture
Reference ArchitectureJohan Eltes
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020Abhijeet Vaikar
 
Cognizant's Zero Deviation Life Cycle - an Overview
Cognizant's Zero Deviation Life Cycle - an OverviewCognizant's Zero Deviation Life Cycle - an Overview
Cognizant's Zero Deviation Life Cycle - an OverviewDr. Bippin Makoond
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Theo Jungeblut
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsRogue Wave Software
 
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxIvan Femia
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008rajivmordani
 
How to Ensure High-Performing Microsoft .NET Applications
How to Ensure High-Performing Microsoft .NET ApplicationsHow to Ensure High-Performing Microsoft .NET Applications
How to Ensure High-Performing Microsoft .NET ApplicationseG Innovations
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioSrini Penchikala
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile DeveloperBSGAfrica
 
[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process ModelsCarles Farré
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development PipelineGlobalLogic Ukraine
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixPeter Nazarov
 
pega cssa sample Resume
 pega cssa sample Resume pega cssa sample Resume
pega cssa sample ResumeAshock Roy
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architectureraginihacks
 
Service Oriented Architecture
Service Oriented Architecture Service Oriented Architecture
Service Oriented Architecture Prabhat gangwar
 

Similar to IT Architect Regional Conference 2009 Taking Architecture to New Heights (20)

Application Architecture Trends
Application Architecture TrendsApplication Architecture Trends
Application Architecture Trends
 
Reference Architecture
Reference ArchitectureReference Architecture
Reference Architecture
 
Django 101
Django 101Django 101
Django 101
 
End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020End-end tests as first class citizens - SeleniumConf 2020
End-end tests as first class citizens - SeleniumConf 2020
 
Cognizant's Zero Deviation Life Cycle - an Overview
Cognizant's Zero Deviation Life Cycle - an OverviewCognizant's Zero Deviation Life Cycle - an Overview
Cognizant's Zero Deviation Life Cycle - an Overview
 
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
Debugging,Troubleshooting & Monitoring Distributed Web & Cloud Applications a...
 
Advanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applicationsAdvanced technologies and techniques for debugging HPC applications
Advanced technologies and techniques for debugging HPC applications
 
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsxABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
ABAP Test Cockpit in action with Doctor ZedGe and abap2xlsx
 
Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008Laird Best Practices Ajax World West2008
Laird Best Practices Ajax World West2008
 
ABAP_STD.pptx
ABAP_STD.pptxABAP_STD.pptx
ABAP_STD.pptx
 
How to Ensure High-Performing Microsoft .NET Applications
How to Ensure High-Performing Microsoft .NET ApplicationsHow to Ensure High-Performing Microsoft .NET Applications
How to Ensure High-Performing Microsoft .NET Applications
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
 
Enter the mind of an Agile Developer
Enter the mind of an Agile DeveloperEnter the mind of an Agile Developer
Enter the mind of an Agile Developer
 
[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models[DSBW Spring 2009] Unit 03: WebEng Process Models
[DSBW Spring 2009] Unit 03: WebEng Process Models
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Ajax World West
Ajax World WestAjax World West
Ajax World West
 
Sitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helixSitecore development approach evolution – destination helix
Sitecore development approach evolution – destination helix
 
pega cssa sample Resume
 pega cssa sample Resume pega cssa sample Resume
pega cssa sample Resume
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Service Oriented Architecture
Service Oriented Architecture Service Oriented Architecture
Service Oriented Architecture
 

Recently uploaded

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
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
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
 
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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
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
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 

Recently uploaded (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 .
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
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
 
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
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
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
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
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.
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 

IT Architect Regional Conference 2009 Taking Architecture to New Heights

  • 1. IT Architect Regional Conference 2009 Taking your strategy to new heights! Architecture Enforcement and Governance Using Aspects Srini Penchikala Enterprise Architect
  • 2. About the Speaker • Enterprise Architect • Editor: InfoQ, Java & Architecture communities • Writer: InfoQ, TSS, ONJava, DevX Java, java.net • Speaker • Detroit Java User Group Leader • Using Java since 1996 & JEE since 2000 • SOA/Web Services since 2006 • PowerPoint since September 2008 Sponsor Logo
  • 3. Goals for this Presentation • Overview of Reference Architecture (RA) and its significance in EA • How Aspects and AOP can help to enforce RA and manage Architecture Governance Sponsor Logo
  • 4. Format Interactive  Demos  Duration: ~60 minutes  Q&A  Sponsor Logo
  • 5. Before we start… • How many currently have some kind of Reference Architecture in place? • How many actually use RA to enforce architecture? Sponsor Logo
  • 6. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 7. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 8. Reference Architecture • A high-level system design which consists of: – description of system components – definitions of relationships between components – definitions of relationships between system components & elements external to the system
  • 9. Architecture Maturity Model • Level 0: No RA • Level 1: RA is described in a Word/HTML/PDF document • Level 2: Semi-automated checking mechanism for architecture enforcement • Level 3: Fully automated checking mechanism
  • 10. Architecture Enforcement Architecture Rules:  Rules (compile time as well as run time) used to  assert architecture. Architecture Governance:  Construct an Architecture Contract to govern  overall implementation & deployment process. Perform appropriate governance functions while  system is being implemented and deployed. Ensure conformance with defined architecture by  implementation projects
  • 11. Why Architecture Enforcement? • Checking mechanism to enforce Reference Architecture. • Match Requirements (Architecture) to Implementation (Code). • Detect and prevent structural complexity. • Promotes consistency & modularity in the System. • Aids in Architecture, Design, and Code refactoring efforts. • Collaboration tool between Developers & Architects
  • 12. Architecture Rules Business v. Architecture Rules  Architecture rules are as important as business  rules. Code Quality By Design  Unit tests, TDD & BDD only help with code quality  from functional requirements stand-point. Need for a process to ensure code quality from  design & architectural stand-point. Technical Credit  Good Design, Testable and Integrated Code  Code that complies with Architecture/Design  Policies
  • 13. Types of Enforcement • Layered architecture and application module dependencies • API usage (internal and 3rd party) • Coding Policies/Design Patterns/Best Practices • Code-Naming Conventions
  • 14. Setup Types Static analysis  Based on the structure of the code base  Allows for easy visual representation  Techniques: AOP, AspectJ  Tools: Structure 101,SonarJ, Lattix  Dynamic analysis  Based on the program flow  Rule-set usable at runtime  AspectJ/Spring AOP 
  • 15. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 16. Rule Categories • Layered Architecture • Separation Of Concerns • Domain-Driven Design • Infrastructure • Miscellaneous
  • 17. Rules - Layered Architecture • Presentation layer should not use DAO classes directly. • Service layer never calls web layer. • DAO (Persistence) layer depends on no other layer except domain.
  • 18. Rules - Separation of Concerns • No transaction management in DAO classes. • Only DAO's should reference javax.sql classes. • Only Controller classes are aware of Web/HTTP objects. • Service layer should be transactional. • External systems can not access internal implementation classes (*Impl classes).
  • 19. Rules – Domain-Driven Design • Service object creation via a Factory (i.e. no “new Service()” code). • No direct access to DAO’s except from Domain classes. • Business service that fails with a concurrency related failure can be retried.
  • 20. Rules - Infrastructure • No direct use of API: – Log4J or Commons Logging (use Framework Logger) – JavaMail (use MailService component) – FTP (use FileTransferService component) • No System.out.println statement anywhere in the code.
  • 21. Rules - Miscellaneous • All primary key classes (*PK.java) should implement Serializable interface. • All test classes should be named with the suffix “Test”.
  • 22. Persistence • Hibernate session close only allowed in EJB's and Servlet Filters. • DAO's accessing DB Views use JDBC (no Hibernate). • Use SpringJdbcTemplate for JDBC data access requirements.
  • 23. Other Concerns Auditing  Domain state change tracking  Monitoring  Aspects to implement MonitorMBean interface  Expose Results as an MBean  Publish results using RSS feeds 
  • 24. Approaches • Code Inspections • Architecture Reconstruction • Model Driven Architecture (MDA) • Code Generation • Byte Code Instrumentation • Enforcement Tools • Aspect-oriented Programming (AOP)
  • 25. Architecture Analysis Tools • Macker • ArchitectureRules • Classycle • PatternTesting • Contract4J • Structure 101, Lattix, SonarJ
  • 26. Architecture Analysis Tools Structure 101  Slicing / Rules  SonarJ  Logical architecture definition & Physical  mapping of architecture to Java code. Lattix  Dependency Structure Matrix showing the  Desired vs. the Realized architecture implementation.
  • 27. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 28. Aspect-oriented Programming • Allows developers to add behavior to objects in a non-obtrusive manner through use of static and dynamic crosscutting. • Main goal is to code cross-cutting concerns in separate modules and apply them in a declarative way. Sponsor Logo
  • 29. AOP Use Cases Framework Built-In Aspects:  Transaction Management  Security  Custom Aspects:  Profiling  Caching  Architecture Rules  Contract Enforcement  Sponsor Logo
  • 30. AOP Rules • provides the necessary abstraction to enforce rules. • customized compile-time error or warning messages. • less intrusive. • target application code is not modified in any form. • rules can be turned on or off any time.
  • 31. Architecture Rules Enforcement • IDE (Eclipse, AJDT) • Build Process Changes (Ant, CruiseControl) • RSS Feeds (Rome) Sponsor Logo
  • 32. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 33. Sample Application Tools:  Eclipse  AspectJ  AJDT  Spring AOP  Ant 
  • 35. Layered Architecture Rules Service classes should not depend on  Application layer classes
  • 36. DEMO
  • 37. Domain-Driven Design Rules • No direct access to DAO's except from the Domain classes (go through Domain or Repository objects).
  • 38. J2EE Architecture Sponsor Logo
  • 40. DEMO
  • 41. DDD Rules Demo 2 Business service that fails with a  concurrency related failure can be retried. Caching example  Spring AOP and EHCache  Requirement: To cache specific data (objects)  using a custom Annotation Annotation: @CacheEntity  Sponsor Logo
  • 42. DEMO
  • 43. Infrastructure Rules No direct use of API:  Log4J or Commons Logging (use Framework  Logger)
  • 44. DEMO
  • 45. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 46. CI Process Changes Build process changes to include  Architecture rules task. Part of build process (in Local and  Integration environments) Deviations are published nightly as RSS  feeds Identified deviations are used in conducting  design and code reviews
  • 47. Build Process Changes Publish Compile Compile Architecture/ Design Violations N Run Architecture Run Unit Tests Violations ? Y Error Rules Y Display message Package Run Unit Tests N about the Error and prevent SCM Commit Deploy Package Deploy
  • 49. Enforcement: Aspects or Tools? Tools  Better enforcement options  Licensing costs  Aspects  More flexibility for customization  Relatively intrusive  Not backed by an architecture meta  model.
  • 50. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 51. Implementation Road Map • Publish rules along with Reference Architecture (RA) and Standard Technology/Framework Stack. • Pick a pilot application to enforce architecture rules as part of the build process (and Eclipse IDE). • Incorporate architecture enforcement into other applications. • Training/Mentoring as part of an on-going Architecture Governance effort.
  • 52. Case Study Implementation Plan:  Phase 1 (Day 1): Enable rules but not enforce  them (yet). Phase 2 (Day 16): Enable rules and enforce only  critical Errors (No Warnings). Phase 3: Enable rules and enforce all deviations  (Errors & Warnings). Phase 4: Enable rules and enforce all Errors and  Warnings in all applications in the enterprise.
  • 53. Agenda • Reference Architecture & Enforcement • Architecture Rules Categories • Aspect-oriented Programming • Rules Demo(s) • CI Process Changes • Case Study • Architecture Rules Aspects - Open Source Project Sponsor Logo
  • 54. Architecture Rules Aspects Open source Google project  architecture-rules-aspects ● (http://code.google.com/p/architecture-rules- aspects/ Future road-map:  DSL to define architecture rules (e.g. Groovy)  Define the rules in a Rules Engine.  Feedback 
  • 55. Conclusions • Make architecture rules part of build process to detect deviations earlier in SDLC. • Use enforcement check results to improve architecture/design/code (via refactoring efforts) • Capture design patterns and best practices as policy enforcement Aspects. • Refine & refactor enforcement rules.
  • 56. Resources (1/2) • Architecture Rules Aspects Google Project (http://code.google.com/p/architecture-rules- aspects/) • AspectJ In Action (2nd Edition) • Building Software As Solid As The Pyramids (Ramnivas Laddad & Alef Arendsen) • Using Aspect-Oriented Programming to Enforce Architecture (Paulo Merson) • AOP In the Enterprise (Adrian Colyer) • Aspects & policy injection - clean up your code • Policy Injection Application Block
  • 57. Resources (2/2) • Structure 101 • SonarJ (http://www.hello2morrow.com) • Lattix • Contract4J (http://www.contract4j.org/contract4j) • Macker (http://innig.net/macker/)
  • 58. AOP Tools • AJDT • Spring AOP • MaintainJ: Sequence Diagram Using AspectJ • PointcutDoctor • Jexin
  • 59. Contact Information • Domain-Driven Design and Enterprise Architecture articles on InfoQ. • InfoQ website (http://www.infoq.com) • E-Mail: srinipenchikala@gmail.com • Blog: http://srinip2007.blogspot.com Sponsor Logo
  • 60. Q&A Sponsor Logo
  • 61. Thank You • Thank you for your attention • SATURN 2009 Conference Presentation • Feedback survey Sponsor Logo