More Related Content Similar to Is a Monolith Standing in the Way of Your Digital Transformation? Refactor for better Agility (20) More from DevOps.com (20) Is a Monolith Standing in the Way of Your Digital Transformation? Refactor for better Agility1. © 2017 IBM Corporation© 2017 IBM Corporation
Refactoring Monolithic Applications
Bill Alexander, Architect - IBM Developer for z Systems
Paul Pilotto, Solution Architect ADDI
2. © 2017 IBM Corporation
2
Disclaimer
IBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal
without notice and at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general product direction
and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a commitment, promise, or
legal obligation to deliver any material, code or functionality. Information about potential
future products may not be incorporated into any contract.
The development, release, and timing of any future features or functionality described for our
products remains at our sole discretion.
Performance is based on measurements and projections using standard IBM benchmarks in a
controlled environment. The actual throughput or performance that any user will experience will vary
depending upon many factors, including considerations such as the amount of multiprogramming in
the user’s job stream, the I/O configuration, the storage configuration, and the workload processed.
Therefore, no assurance can be given that an individual user will achieve results similar to those
stated here
3. © 2017 IBM Corporation
3
Discussion Topics
Definition of a Monolithic Application
Why refactor
Approaches to refactoring
Detailed walkthrough of scenarios
4. © 2017 IBM Corporation
4
Business Drivers Motivating People to Refactor
Business Agility – Speed of change is faster with a more modular
architecture – micro-services architecture is a popular approach
Accelerate Digital Transformation – Provide more flexibility in what
capabilities to reuse.
Facilitate onboarding of new people – Reduce learning curve by
providing a more understandable architecture
Enable rewrite (e.g. java, node) – Incremental approaches centered on
smaller components radically reduces risk.
5. © 2017 IBM Corporation
5
Monolithic Applications
Monolithic Applications are self-contained applications in which functionally
distinguishable aspects (for example presentation logic, business logic, and data
access) are all interwoven components.
All code exists in a single tier (all combined) and deploys as a single unit.
Business Logic
Data Access LogicPresentation LogicData Access Logic
6. © 2017 IBM Corporation
6
What are the pain points of Monolithic Applications
Lack of Understanding
– Makes simple changes cumbersome
– Next generation programmers have no insight
– Business Logic exponentially grows by copy/paste
• Fear of making mistakes duplication of logic
• Inability to leverage business logic
Lack of Agility
– Small code changes require test and package of the entire application
– Slow response to API Economy
– Difficult integration with new technology (Mobile, Cloud, Continuous DevOps)
– Monoliths were designed assuming infrequent deployment
7. © 2017 IBM Corporation
7
The Danger of the Monolithic App
https://devops.com/danger-monolithic-app/
8. © 2017 IBM Corporation
8
Complementary Approaches to Be Used to Refactor
API enable transactions and other resources
• Enables these resources to be easily reused inside and outside IBM Z
• Moves the needle towards a micro services architectures
Break big applications into smaller applications, incrementally
• Localizes change impact, enabling agile / DevOps styles of development
• Provides a more fine-granular opportunity for reuse and API enablement
Rewrite business logic into business rules managed in a decision management tool
• Enables rules to be updated by SMEs without programming
• Facilitates reuse by ensuring business rule is only captured once
All of these approaches needs to be complemented by
• Governance of the refactoring effort to ensure clear goals are set and managed to
• Regression testing to ensure function and performance are not compromised
9. © 2017 IBM Corporation
9
API enable transactions and other assets
Application Discovery and Delivery
Intelligence (ADDI)
Discover And Understand
Your z/OS Assets
Refactor
applications to
leverage APIs
and test as
needed
Application Delivery
Foundation for z
Systems (ADFz)
Manage and
control the
API’s
IBM z/OS
Connect EE
Create
business API’s
for what you
discovered
IBM API
Connect
10. © 2017 IBM Corporation
10
Break big applications into smaller applications
Application Discovery
and Delivery
Intelligence (ADDI)
Identify code that
appears to be
somewhat loosely
coupled.
Leverage
refactoring wizard
to refactor module
into independent
program. Unit test
the code.
Application Delivery
Foundation for z
Systems (ADFz)
IBM z/OS
Connect EE
If appropriate,
create a
REST-ful API
for the
recently
refactored
application.
Application Discovery
and Delivery
Intelligence (ADDI)
Optimize test effort
and determine
whether acceptable
code coverage of
change code has
been achieved.
11. © 2017 IBM Corporation
11
Rewrite business logic into business rules
Application Discovery
and Delivery
Intelligence (ADDI)
Capture business
information, including
business terms.
Identify Candidate
Business rules and
author them as
Business Rules
(FUTURE)
Refactor code to
replace the
candidate rules with
calls to Business
rules in a business
rules engine like
ODM for
management of
business logic
outside the
Application logic.
Application Delivery
Foundation for z
Systems (ADFz)
Business Rule
Engine
Invoke and
manage
business rules
Application Discovery
and Delivery
Intelligence (ADDI)
Optimize test effort
and determine
whether acceptable
code coverage of
changed code has
been achieved.
12. © 2017 IBM Corporation
12
Refactor to fit in a DevOps strategy
Smaller modules have a more agile impact on DevOps
13. How ADDI and ADFz
help you in this
Refactoring Process
“The GPS for your Mainframe
Developers”
13
14. Increase Agility by
Simplifying and
Standardizing Work
Item Estimation
• Use standardized Metrics (such as Maintainability
Index or Halstead Complexity) to make more
realistic estimations
• Callgraphs, Usage Reports and other Reports help
planning application modernization and make
application portfolio decisions
• Dead-Code Reports give indications about
possible dead-code to remove
14
Accelerate
Transformation
15. Navigate easily inside
large and complex
programs
• Program Flow provides a quick overview about
the parts of a specific program
• Find code lines accessing specific resources or
interacting with other programs
15
Accelerate
Transformation
16. Navigate easily inside
large and complex
programs
• Flow-Charts show an in-detail view of the inner
workings of programs
16
Accelerate
Transformation
17. Accelerate Refactoring
• Reduce guesswork about side-effects while
changing applications
• Navigate the code more effectively
• Understand unknown code faster
• Adopt a more structured approach to changes
using ADDI as a guidance
17
Accelerate
Transformation
18. © 2017 IBM Corporation
18
IBM Application Discovery and Delivery Intelligence V5.0.3
(Available Now)
• Graphical artifact interdependency
analysis
• Web based search
• Extensibility improvements
• Preprocessors
• Custom communication layers
• Additional coding rules
• Additional language translations
• Performance, Scalability and
Usability improvements
• Several customer RFEs
19. © 2017 IBM Corporation
19
A central link in an integrated and flexible DevOps toolchain
IBM Developer for z Systems V14.1 (Available Now)
Issue
Tracker
Source
Code
Repository
Delivery
Pipeline
Insights
and
Analysis
• Refactoring support for monolithic programs
• API Enablement
• Agility through modularization
• Improve Maintainability
• Integration with Application Discovery
• Integration with SonarQube
• Improved Software Analyzer reports
• Enhanced SCM integration
• Day 1 support for IBM Z compilers & z/OS
• Several customer RFEs
https://developer.ibm.com/mainframe/2017/09/08/whats-new-idz-v14-1/
20. © 2017 IBM Corporation
20
Leverage existing investments in new ways
Create new reusable programs from existing logic
Invoke the new program from the original source
Creating opportunities for new APIs
21. © 2017 IBM Corporation
21
IBM z/OS Connect Enterprise Edition
Create new business opportunities
Map RESTful APIs to existing mainframe services and data
Single endpoint for service access
22. © 2017 IBM Corporation
22
Improve testability
Program functionality can be easily tested in isolation
Testing a Monolith Testing individual components
23. © 2017 IBM Corporation
23
Test automation for z/OS applications
Automating regression tests becomes easy using tools
– z/OS Automated Unit Testing Framework (zUnit feature in IDz)
– Rational Test Workbench
– XaTester (Xact Consulting A/S)
– MF-Test (MOST Technologies)
24. © 2017 IBM Corporation
24
Optimize Test Case
Execution
Detect which regression tests cases maps to
changed code to reduce test efforts in early
iterations by a magnitude or more
Optimize test case execution by identifying which
test cases may be redundant, so low value tests can
be reduced
Close test gaps before exiting test phase by
showing code coverage of changed and unchanged
code.
24
Increase
Productivity
25. © 2017 IBM Corporation
25
Improve agility
Multiple developers can work concurrently
Only deploy what has been modified
Underlying technologies can change over time
Parallel component development Linear development of a monolith
26. © 2017 IBM Corporation
26
Reduce program complexity
Program logic is easier to understand by humans and tools
27. © 2017 IBM Corporation
27
Summary
Refactoring monolithic
applications into smaller
components has many potential
benefits, including…
– Reuse
– APIs
– Continuous Testing
– Continuous Feedback
– Continuous Delivery
– Maintainability
IBM has tools that can help,
including…
Application Delivery
Foundation for z Systems
Application Discovery and
Delivery Intelligence
z/OS Connect Enterprise
Edition
28. © 2017 IBM Corporation
© 2017 IBM Corporation
Thank You