SlideShare una empresa de Scribd logo
1 de 43
Descargar para leer sin conexión
Chris Bailey – IBM Java Service Architect

2nd October 2012




Software Archaeology
Rediscovering Your Architecture




                                                          1




                                            © 2012 IBM Corporation
Important Disclaimers



THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.

WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED
IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.

ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE
DIFFERENCES.

ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.

IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT
PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.

IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE
OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.

NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:

- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR
SUPPLIERS AND/OR LICENSORS




2                         Rediscovering Your Architecture: With Software Archaeology    © 2012 IBM Corporation
Introduction to the speaker



■   12 years experience developing and deploying Java SDKs




■   Recent work focus:
     – Java applications in the cloud
     – Java usability and quality
     – Debugging tools and capabilities
     – Requirements gathering
     – Highly resilient and scalable deployments




■   My contact information:
     – baileyc@uk.ibm.com
     – http://www.linkedin.com/profile/view?id=3100666




3                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Goals of the Talk



■   Introduce the concept of Software Archaeology and closing the software lifecycle


■   Discuss some of the available methodologies


■   Show how to rediscover your architecture with a sample application




4                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Agenda



■   The Software Lifecycle


■   Software Archaeology


■   An Introduction to UML


■   Digging into applications




5                               Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
The Software Lifecycle



       “A software development process, also known as a software development life-cycle (SDLC), is a
       structure imposed on the development of a software product. Similar terms include software life
       cycle and software process. It is often considered a subset of systems development life cycle”
       - Wikipedia



■   Should be a closed loop, iterative process


■   Design should relate to Requirements


■   Implementation should relate to Design


■   Even as the application evolves




6                            Rediscovering Your Architecture: With Software Archaeology      © 2012 IBM Corporation
The Waterfall Model



■   Not uncommon for applications to be more like the waterfall model


■   Software lifecycle becomes linear...


■   Changes needed between:
     – Requirements and Design
     – Design and Implementation

       … and as a result of maintenance

       become lost


■   Result is that deployments do not reflect their original designs




7                             Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Legacy Systems and Code



■   Old applications or code that have been inherited


■   Typically in maintenance, and providing a valuable function


■   However it often provides challenges:
     – Maintenance cost is usually high
        • Outside of normal vendor support

     – Little or no requirement and design documentation
         • Potentially even without source code for some parts!




8                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Software Archaeology



       “..the study of poorly documented or undocumented legacy software implementations, as part of
       software maintenance.
       .. includes the reverse engineering of software modules, and the application of a variety of tools
       and processes for extracting and understanding program structure and recovering design
       information.
       .. may reveal dysfunctional team processes which have produced poorly designed or even unused
       software modules.”
       - Wikipedia

■   Software archaeology makes it possible to build designs from legacy systems and code




9                           Rediscovering Your Architecture: With Software Archaeology        © 2012 IBM Corporation
An Introduction to Unified Modelling Language (UML)



        “...a standardized general-purpose modeling language in the field of object-oriented software
        engineering. The standard is managed, and was created, by the Object Management Group.
        ...offers a standard way to visualize a system's architectural blueprints”
        - Wikipedia

■    A unified standard modelling notation
■    Allows the creation of structure and design plans


■    UML provides two categories of diagram:
      – Behaviour Diagrams: show the dynamic behaviour between the elements of the system
      – Structural Diagrams:   show the static structure of the system being modelled




10                            Rediscovering Your Architecture: With Software Archaeology        © 2012 IBM Corporation
UML Behaviour Diagrams



■    Use-case diagram
      – used to visualize the functional requirements of a system
      – shows the relationship of "actors" to essential processes
      – often used to show the relationship between use cases




11                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
UML Behaviour Diagrams



■    Activity Diagram
      – Shows flow of control during an activity
      – Best used to model to model higher-level processes
      – “Less technical" than sequence diagrams




12                          Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
UML Behaviour Diagrams



■    Statechart Diagram
       – Shows the different states that a class can be in
       – Shows the transitions from state to state
       – Usually only covers "interesting" classes




13                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
UML Behaviour Diagrams



■    Sequence Diagram
      – Shows the interactions between objects in the sequential order that those interactions occur
      – Applied to code objects, but can be applied to business objects.
      – Can be used for communication between teams or organisations




14                            Rediscovering Your Architecture: With Software Archaeology        © 2012 IBM Corporation
UML Structural Diagrams



■    Deployment Diagram
      – Shows how a system will be physically deployed in the hardware environment
      – Shows where the different entities of the system will physically run
      – Shows how they will communicate with each other
      – Models the physical deployment




15                          Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
UML Structural Diagrams



■    Component Diagram
      – Shows the dependencies that the software has on the other software components
      – Usually shown at a high level with large-grain components
      – Or at the component package level




16                          Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
UML Structural Diagrams



■    Class diagrams
      – Shows the static structures of the system, generally implementation classes
      – Shows how the different entities relate to each other




■    Object Diagrams:
      – Show a complete or partial view of the structure at a specific time.
      – Focus on a set of object instances and attributes, and the links between the instances
      – More concrete than class diagrams
      – Often used to provide examples, or act as test cases for the class diagrams


17                            Rediscovering Your Architecture: With Software Archaeology         © 2012 IBM Corporation
Software Archaeology: Methodologies



■    Various methods exist for Software Archaeology, including:

      – Static analysis
          • Analysis of source code by tooling or by hand

      – Trace based analysis
          • Injecting trace into running application

      – Debugger based analysis
         • Stepping through code under a debugger




18                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Digging into a Simple Application



■    A simple application: “JavaGrep”


■    Usage:        JavaGrep <pattern> <list of files>

■    Where:
      – Pattern         is a search term
      – List of files   is one of more files to search




19                             Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Digging into a Simple Application
■    JavaGrep.java:




                                                                                   Compile regexp
                                                                                   Add files to fileList


                                                                                            Create FileScanner
                                                                                            scan()
                                                                                            Get matching lines
                                                                                            Print matching lines
                                                                                                                       For Each
                                                                                                                         File
                                                                                             Print summary




20                    Rediscovering Your Architecture: With Software Archaeology                                   © 2012 IBM Corporation
Digging into a Simple Application
■    FileScanner.java:




                                                                                      Create LineNumberReader




                                                                                       Get Line
                                                                                                             For Each
                                                                                       Check for match         Line
                                                                                       Add to matchLines




21                       Rediscovering Your Architecture: With Software Archaeology                  © 2012 IBM Corporation
Digging into a Simple Application



                                                                                Run regexp matcher against line



                                                                                Get ArrayList of matching lines




                                                                                Get scanned line count




                                                                                Get matched line count




22                 Rediscovering Your Architecture: With Software Archaeology                                © 2012 IBM Corporation
Understanding the code behaviour



■    Dynamic behaviour at code level is the method call graph
      – Interaction between classes and objects
      – Sequence of methods called and returned

■    Best fit in UML is the sequence diagram




23                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Generating a sequence diagram



■    Static Analysis
       – Limited tooling exists
       – Really needs to be done manually



■    Runtime Analysis
      – Activate tracing mechanism(s)
      – Run the application
          • Code coverage testing
          • QA or Performance Testing
          • Production!




24                          Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Generated Sequence Diagram: Static Analysis



■    Static Analysis Results:
       – Requires reading of the code!

      – Accurate diagram

      – Limited to available source
          • JavaGrep
          • FileScanner
      – Possible to include other calls
          • Limited to single extra call




25                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Runtime Analysis: Profiling Output



■    Profiling output:
       – Full graph of all running methods

      – Access to call frequency/cost information

      – Requires methods to be run...

      – No call ordering or count data




26                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Runtime Analysis: Profiling Output



■    Digging into FileScanner.scan():
       – FileScanner.scanLine()
       – LineNumberReader.readLine()
       – StringBuilder.append()
       – ArrayList.<init>()
       – StringBuilder.append()
       – ArrayList.add()




27                          Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Generated Sequence Diagram: Runtime Analysis



■    Profiling Analysis:
       – Scope to cover all code

      – No ordering information

      – No call count information




28                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Runtime Analysis: Limited tracing to add order and count information



14:38:09.260*0x6db300    mt.3 > JavaGrep.<clinit>()V Bytecode static method
14:38:09.260 0x6db300     mt.9    < JavaGrep.<clinit>()V
14:38:09.260 0x6db300     mt.3    > JavaGrep.main([Ljava/lang/String;)V
14:38:09.281 0x6db300     mt.0     > FileScanner.<init>(Ljava/lang/String;Ljava/util/regex/Pattern;)V
14:38:09.283 0x6db300     mt.6     < FileScanner.<init>(Ljava/lang/String;Ljava/util/regex/Pattern;)V
14:38:09.283 0x6db300     mt.0     > FileScanner.scan()I
14:38:09.292 0x6db300     mt.0      > FileScanner.scanLine(Ljava/lang/String;)
............ ........     ....       .....
14:38:09.296 0x6db300     mt.6      < FileScanner.scanLine(Ljava/lang/String;)Z
14:38:09.296 0x6db300     mt.6     < FileScanner.scan()I
14:38:09.296 0x6db300     mt.0     > FileScanner.getMatchLines()Ljava/util/ArrayList;
14:38:09.296 0x6db300     mt.6     < FileScanner.getMatchLines()Ljava/util/ArrayList;
14:38:09.296 0x6db300     mt.0     > FileScanner.getMatchCount()I
14:38:09.296 0x6db300     mt.6     < FileScanner.getMatchCount()I
14:38:09.297 0x6db300     mt.0     > FileScanner.getMatchCount()I
14:38:09.297 0x6db300     mt.6     < FileScanner.getMatchCount()I
14:38:09.297 0x6db300     mt.0     > FileScanner.getLineCount()I
14:38:09.297 0x6db300     mt.6     < FileScanner.getLineCount()I
14:38:09.297 0x6db300     mt.9    < JavaGrep.main([Ljava/lang/String;)V

■    Order is:
             scan() -> getMatchedLines() -> getMatchCount() -> getMatchCount() -> getLineCount()




29                           Rediscovering Your Architecture: With Software Archaeology      © 2012 IBM Corporation
Generated Sequence Diagram: Runtime Analysis



■    Runtime Analysis:
      – Scope to cover all code

      – Ordering information included

      – Call count information included

      – Only covers executed code*




30                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Understanding the structure



■    Structure at code level is the object graph
       – Interaction between classes and objects
       – References between object on the Java heap

■    Best fit in UML is the class and/or objectdiagram




31                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Generating a Class or Object Diagram



■    Static Analysis
       – Provide tool with access to necessary source
       – Run analysis!



■    Runtime Analysis
      – Run the application
          • Code coverage testing
          • QA or Performance Testing
          • Production!
      – Generate a system or heap dump




32                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Generated Class Diagram: Static Analysis



■    Static Analysis Results:
       – Accurate diagram

      – Limited to available source




33                              Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Runtime Analysis: System Dump Information




■    JavaGrep:
       – Static attributes:
           • matchString           java.util.String                                        “for”
           • fileList              java.util.ArrayList                                     size is 1, one entry: “..srcJavaGrep”
           • _pattern              java.util.regex.Pattern                                 “sfors” compiled = true
34                            Rediscovering Your Architecture: With Software Archaeology                                 © 2012 IBM Corporation
Runtime Analysis: System Dump Information




■    FileList java.uti..ArrayList:
       – Instance attributes:
           • ElementData                        java.lang.Object[10]                          single entry of “..srcJavaGrep.java”
           • size                               int                                           1
           • modCount                           int                                           1
35                               Rediscovering Your Architecture: With Software Archaeology                                © 2012 IBM Corporation
Runtime Analysis: System Dump Information




■    FileScanner
       – Object instance attributes:
          • _fileName             java.lang.String                                        “..srcJavaGrep.java”
          • _fReader              java.io.LineNumberReader                                object @ 0x228165e0
          • _pattern              java.lang.String                                        “sfors” compiled = true
          • _matchLines           java.util.ArrayList                                     object @ 0x22864410
          • _matchCount           int                                                     4
          • _lineCount            int                                                     41
36                           Rediscovering Your Architecture: With Software Archaeology                               © 2012 IBM Corporation
Generated Class Diagram: Runtime Analysis



■    Runtime Analysis Results:
      – The same accurate diagram
      – Methods could be added from sequence diagram
      – Scope to add further classes/objects




37                         Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Digging into Something More Complex...



■    Apache Tomcat 7.0.27


■    org.apache.catalina.startup.Bootstrap.main()
       – init()
       – load()
       – start()

■    Uses reflection to call:
      – org.apache.catalina.startup.Catalina.*




38                           Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Digging into Something More Complex....




39                Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Digging into Something More Complex....



■    Digging into “server”:




40                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
Summary



■    Its possible to use static and/or runtime tooling to understand an application

■    Allows you to close the development lifecycle
       – even for legacy and 3rd party code


■    Allows you to migrate legacy systems where original requirements are lost
       – Definition of existing system as source of requirements for new implementation


■    Allows you to debug problems
       – difference between design and implementation may well be your issue




41                            Rediscovering Your Architecture: With Software Archaeology   © 2012 IBM Corporation
References



■    Get Products and Technologies:
      – IBM Monitoring and Diagnostic Tools for Java:
          • https://www.ibm.com/developerworks/java/jdk/tools/

■    Learn:
      – Health Center InfoCenter:
          • http://publib.boulder.ibm.com/infocenter/hctool/v1r0/index.jsp
■    Discuss:
      – IBM on Troubleshooting Java Applications Blog:
          • https://www.ibm.com/developerworks/mydeveloperworks/blogs/troubleshootingjava/
      – Health Center Forum:
          • http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1461
      – IBM Java Runtimes and SDKs Forum:
          • http://www.ibm.com/developerworks/forums/forum.jspa?forumID=367&start=0




42                            Rediscovering Your Architecture: With Software Archaeology     © 2012 IBM Corporation
Copyright and Trademarks



© IBM Corporation 2012. All Rights Reserved.


IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corp., and registered in many jurisdictions worldwide.


Other product and service names might be trademarks of IBM or other companies.


A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark
information” page at URL: www.ibm.com/legal/copytrade.shtml




43                        Rediscovering Your Architecture: With Software Archaeology        © 2012 IBM Corporation

Más contenido relacionado

La actualidad más candente

Oose unit 5 ppt
Oose unit 5 pptOose unit 5 ppt
Oose unit 5 pptDr VISU P
 
Rhapsody Software
Rhapsody SoftwareRhapsody Software
Rhapsody SoftwareBill Duncan
 
Model-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical SoftwareModel-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical Softwaregjuljo
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customizationgjuljo
 
Rhapsody Eclipse
Rhapsody EclipseRhapsody Eclipse
Rhapsody EclipseBill Duncan
 
Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)Chandan Thakur
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integrationgjuljo
 
Intro to Software Engineering - Module Design
Intro to Software Engineering - Module DesignIntro to Software Engineering - Module Design
Intro to Software Engineering - Module DesignRadu_Negulescu
 
Rhapsody Systems Software
Rhapsody Systems SoftwareRhapsody Systems Software
Rhapsody Systems SoftwareBill Duncan
 
An Analysis of Component-based Software Development -Maximize the reuse of ex...
An Analysis of Component-based Software Development -Maximize the reuse of ex...An Analysis of Component-based Software Development -Maximize the reuse of ex...
An Analysis of Component-based Software Development -Maximize the reuse of ex...Mohammad Salah uddin
 
Component Base Development
Component Base DevelopmentComponent Base Development
Component Base DevelopmentFrik khechoomian
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with GitIvano Malavolta
 
Aspect Oriented Development
Aspect Oriented DevelopmentAspect Oriented Development
Aspect Oriented Developmenttyrantbrian
 
IBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/SimulinkIBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/Simulinkgjuljo
 
Software Architecture Course - Part III Taxonomies - Definitions
Software Architecture Course - Part III Taxonomies - DefinitionsSoftware Architecture Course - Part III Taxonomies - Definitions
Software Architecture Course - Part III Taxonomies - DefinitionsJose Emilio Labra Gayo
 

La actualidad más candente (20)

Oose unit 5 ppt
Oose unit 5 pptOose unit 5 ppt
Oose unit 5 ppt
 
Rhapsody Software
Rhapsody SoftwareRhapsody Software
Rhapsody Software
 
Model-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical SoftwareModel-Driven Development for Safety-Critical Software
Model-Driven Development for Safety-Critical Software
 
IBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation CustomizationIBM Rhapsody Code Generation Customization
IBM Rhapsody Code Generation Customization
 
Rhapsody Eclipse
Rhapsody EclipseRhapsody Eclipse
Rhapsody Eclipse
 
L02 Architecture
L02 ArchitectureL02 Architecture
L02 Architecture
 
Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)Presentation on component based software engineering(cbse)
Presentation on component based software engineering(cbse)
 
IBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt IntegrationIBM Rational Rhapsody and Qt Integration
IBM Rational Rhapsody and Qt Integration
 
Application slides
Application slidesApplication slides
Application slides
 
Intro to Software Engineering - Module Design
Intro to Software Engineering - Module DesignIntro to Software Engineering - Module Design
Intro to Software Engineering - Module Design
 
Ch19
Ch19Ch19
Ch19
 
Rhapsody Systems Software
Rhapsody Systems SoftwareRhapsody Systems Software
Rhapsody Systems Software
 
An Analysis of Component-based Software Development -Maximize the reuse of ex...
An Analysis of Component-based Software Development -Maximize the reuse of ex...An Analysis of Component-based Software Development -Maximize the reuse of ex...
An Analysis of Component-based Software Development -Maximize the reuse of ex...
 
1
11
1
 
Component Base Development
Component Base DevelopmentComponent Base Development
Component Base Development
 
UCD components
UCD components UCD components
UCD components
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
Aspect Oriented Development
Aspect Oriented DevelopmentAspect Oriented Development
Aspect Oriented Development
 
IBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/SimulinkIBM Rhapsody and MATLAB/Simulink
IBM Rhapsody and MATLAB/Simulink
 
Software Architecture Course - Part III Taxonomies - Definitions
Software Architecture Course - Part III Taxonomies - DefinitionsSoftware Architecture Course - Part III Taxonomies - Definitions
Software Architecture Course - Part III Taxonomies - Definitions
 

Destacado

Archaeology & IA: The Adventures of Information Jones
Archaeology & IA: The Adventures of Information JonesArchaeology & IA: The Adventures of Information Jones
Archaeology & IA: The Adventures of Information JonesMargaret Alldredge
 
Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...Chris Bailey
 
Once upon a time: Why operations mythology matters
Once upon a time: Why operations mythology mattersOnce upon a time: Why operations mythology matters
Once upon a time: Why operations mythology mattersJames Turnbull
 
Monitoring As A Service - Modernity and Self-Service CraftConf 2016
Monitoring As A Service - Modernity and Self-Service CraftConf 2016Monitoring As A Service - Modernity and Self-Service CraftConf 2016
Monitoring As A Service - Modernity and Self-Service CraftConf 2016James Turnbull
 
Developing Good Operations Tools
Developing Good Operations ToolsDeveloping Good Operations Tools
Developing Good Operations ToolsJames Turnbull
 
Software archaeology for beginners: code, community and culture
Software archaeology for beginners: code, community and cultureSoftware archaeology for beginners: code, community and culture
Software archaeology for beginners: code, community and cultureJames Turnbull
 
Does Archaeology Disprove the Bible?
Does Archaeology Disprove the Bible? Does Archaeology Disprove the Bible?
Does Archaeology Disprove the Bible? godknt777
 
O'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud EconomicsO'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud EconomicsChris Bailey
 
Playgrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFFPlaygrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFFChris Bailey
 
Lidar and landscape archaeology
Lidar and landscape archaeologyLidar and landscape archaeology
Lidar and landscape archaeologyKeith Challis
 
Software Archaeology by Globant
Software Archaeology by GlobantSoftware Archaeology by Globant
Software Archaeology by GlobantGlobant
 
Globant Bootcamps - Latam
Globant Bootcamps   - LatamGlobant Bootcamps   - Latam
Globant Bootcamps - LatamGlobant
 

Destacado (13)

Archaeology & IA: The Adventures of Information Jones
Archaeology & IA: The Adventures of Information JonesArchaeology & IA: The Adventures of Information Jones
Archaeology & IA: The Adventures of Information Jones
 
Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...Practical Performance: Understand and improve the performance of your applica...
Practical Performance: Understand and improve the performance of your applica...
 
Once upon a time: Why operations mythology matters
Once upon a time: Why operations mythology mattersOnce upon a time: Why operations mythology matters
Once upon a time: Why operations mythology matters
 
Monitoring As A Service - Modernity and Self-Service CraftConf 2016
Monitoring As A Service - Modernity and Self-Service CraftConf 2016Monitoring As A Service - Modernity and Self-Service CraftConf 2016
Monitoring As A Service - Modernity and Self-Service CraftConf 2016
 
Developing Good Operations Tools
Developing Good Operations ToolsDeveloping Good Operations Tools
Developing Good Operations Tools
 
Software archaeology for beginners: code, community and culture
Software archaeology for beginners: code, community and cultureSoftware archaeology for beginners: code, community and culture
Software archaeology for beginners: code, community and culture
 
Does Archaeology Disprove the Bible?
Does Archaeology Disprove the Bible? Does Archaeology Disprove the Bible?
Does Archaeology Disprove the Bible?
 
O'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud EconomicsO'Reilly Software Architecture Conf: Cloud Economics
O'Reilly Software Architecture Conf: Cloud Economics
 
Playgrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFFPlaygrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFF
 
Lidar and landscape archaeology
Lidar and landscape archaeologyLidar and landscape archaeology
Lidar and landscape archaeology
 
GIS and Archaeology: Fort Vancouver
GIS and Archaeology: Fort VancouverGIS and Archaeology: Fort Vancouver
GIS and Archaeology: Fort Vancouver
 
Software Archaeology by Globant
Software Archaeology by GlobantSoftware Archaeology by Globant
Software Archaeology by Globant
 
Globant Bootcamps - Latam
Globant Bootcamps   - LatamGlobant Bootcamps   - Latam
Globant Bootcamps - Latam
 

Similar a Software Archaeology

Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...ghodgkinson
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCFunnelll
 
Learning UML with Enterprise Architect
Learning UML with Enterprise ArchitectLearning UML with Enterprise Architect
Learning UML with Enterprise ArchitectGerald R. Gray
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part iBisrat Girma
 
[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLES[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLESIvano Malavolta
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCUlrich Krause
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptxJAGADEESWARIS6
 
Arch06 1
Arch06 1Arch06 1
Arch06 1nazn
 
Chapter 5 Software Design of software engineering.pptx
Chapter 5 Software Design of software engineering.pptxChapter 5 Software Design of software engineering.pptx
Chapter 5 Software Design of software engineering.pptxgadisaAdamu
 
Chapter five software Software Design.pptx
Chapter five software  Software Design.pptxChapter five software  Software Design.pptx
Chapter five software Software Design.pptxgadisaAdamu
 
Object oriented software_engg
Object oriented software_enggObject oriented software_engg
Object oriented software_enggAnnie Thomas
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for ChangeEric Wyles
 
Software Engineering- Crisis and Process Models
Software Engineering- Crisis and Process ModelsSoftware Engineering- Crisis and Process Models
Software Engineering- Crisis and Process ModelsNishu Rastogi
 
Software engineering
Software engineeringSoftware engineering
Software engineeringnimmik4u
 
Introduction to Patterns in WebSphere Message Broker
Introduction to Patterns in WebSphere Message BrokerIntroduction to Patterns in WebSphere Message Broker
Introduction to Patterns in WebSphere Message BrokerAnt Phillips
 

Similar a Software Archaeology (20)

Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...Software Factories in the Real World: How an IBM WebSphere Integration Factor...
Software Factories in the Real World: How an IBM WebSphere Integration Factor...
 
Week 6
Week 6Week 6
Week 6
 
Software engg lect1
Software engg lect1Software engg lect1
Software engg lect1
 
Introduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoCIntroduction to Spring Framework and Spring IoC
Introduction to Spring Framework and Spring IoC
 
Learning UML with Enterprise Architect
Learning UML with Enterprise ArchitectLearning UML with Enterprise Architect
Learning UML with Enterprise Architect
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part i
 
[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLES[2015/2016] Software systems engineering PRINCIPLES
[2015/2016] Software systems engineering PRINCIPLES
 
Unit1
Unit1Unit1
Unit1
 
MWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVCMWLUG 2015 - An Introduction to MVC
MWLUG 2015 - An Introduction to MVC
 
Software engineering.pptx
Software engineering.pptxSoftware engineering.pptx
Software engineering.pptx
 
Arch06 1
Arch06 1Arch06 1
Arch06 1
 
Chapter 5 Software Design of software engineering.pptx
Chapter 5 Software Design of software engineering.pptxChapter 5 Software Design of software engineering.pptx
Chapter 5 Software Design of software engineering.pptx
 
Chapter five software Software Design.pptx
Chapter five software  Software Design.pptxChapter five software  Software Design.pptx
Chapter five software Software Design.pptx
 
Object oriented software_engg
Object oriented software_enggObject oriented software_engg
Object oriented software_engg
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Deployment module slides
Deployment module slidesDeployment module slides
Deployment module slides
 
Software Engineering- Crisis and Process Models
Software Engineering- Crisis and Process ModelsSoftware Engineering- Crisis and Process Models
Software Engineering- Crisis and Process Models
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Aspose pdf
Aspose pdfAspose pdf
Aspose pdf
 
Introduction to Patterns in WebSphere Message Broker
Introduction to Patterns in WebSphere Message BrokerIntroduction to Patterns in WebSphere Message Broker
Introduction to Patterns in WebSphere Message Broker
 

Más de Chris Bailey

NodeJS Interactive 2019: FaaS meets Frameworks
NodeJS Interactive 2019:  FaaS meets FrameworksNodeJS Interactive 2019:  FaaS meets Frameworks
NodeJS Interactive 2019: FaaS meets FrameworksChris Bailey
 
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSVoxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSChris Bailey
 
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldSilicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldChris Bailey
 
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedFaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedChris Bailey
 
AltConf 2019: Server-Side Swift State of the Union
AltConf 2019:  Server-Side Swift State of the UnionAltConf 2019:  Server-Side Swift State of the Union
AltConf 2019: Server-Side Swift State of the UnionChris Bailey
 
Server-side Swift with Swagger
Server-side Swift with SwaggerServer-side Swift with Swagger
Server-side Swift with SwaggerChris Bailey
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsChris Bailey
 
Index - BFFs vs GraphQL
Index - BFFs vs GraphQLIndex - BFFs vs GraphQL
Index - BFFs vs GraphQLChris Bailey
 
Swift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesSwift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesChris Bailey
 
Swift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack SwiftSwift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack SwiftChris Bailey
 
Try!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is SwiftTry!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is SwiftChris Bailey
 
Swift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the UnionSwift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the UnionChris Bailey
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesChris Bailey
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftChris Bailey
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesChris Bailey
 
FrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) SwiftFrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) SwiftChris Bailey
 
AltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 MinutesAltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 MinutesChris Bailey
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java DevelopersChris Bailey
 
InterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and WhenInterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and WhenChris Bailey
 
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the ServerSwift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the ServerChris Bailey
 

Más de Chris Bailey (20)

NodeJS Interactive 2019: FaaS meets Frameworks
NodeJS Interactive 2019:  FaaS meets FrameworksNodeJS Interactive 2019:  FaaS meets Frameworks
NodeJS Interactive 2019: FaaS meets Frameworks
 
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSVoxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
 
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldSilicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
 
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedFaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
 
AltConf 2019: Server-Side Swift State of the Union
AltConf 2019:  Server-Side Swift State of the UnionAltConf 2019:  Server-Side Swift State of the Union
AltConf 2019: Server-Side Swift State of the Union
 
Server-side Swift with Swagger
Server-side Swift with SwaggerServer-side Swift with Swagger
Server-side Swift with Swagger
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
Index - BFFs vs GraphQL
Index - BFFs vs GraphQLIndex - BFFs vs GraphQL
Index - BFFs vs GraphQL
 
Swift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesSwift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift Microservices
 
Swift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack SwiftSwift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack Swift
 
Try!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is SwiftTry!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is Swift
 
Swift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the UnionSwift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the Union
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and Swift
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
FrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) SwiftFrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) Swift
 
AltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 MinutesAltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 Minutes
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
 
InterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and WhenInterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and When
 
Swift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the ServerSwift Summit: Pushing the boundaries of Swift to the Server
Swift Summit: Pushing the boundaries of Swift to the Server
 

Software Archaeology

  • 1. Chris Bailey – IBM Java Service Architect 2nd October 2012 Software Archaeology Rediscovering Your Architecture 1 © 2012 IBM Corporation
  • 2. Important Disclaimers THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS 2 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 3. Introduction to the speaker ■ 12 years experience developing and deploying Java SDKs ■ Recent work focus: – Java applications in the cloud – Java usability and quality – Debugging tools and capabilities – Requirements gathering – Highly resilient and scalable deployments ■ My contact information: – baileyc@uk.ibm.com – http://www.linkedin.com/profile/view?id=3100666 3 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 4. Goals of the Talk ■ Introduce the concept of Software Archaeology and closing the software lifecycle ■ Discuss some of the available methodologies ■ Show how to rediscover your architecture with a sample application 4 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 5. Agenda ■ The Software Lifecycle ■ Software Archaeology ■ An Introduction to UML ■ Digging into applications 5 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 6. The Software Lifecycle “A software development process, also known as a software development life-cycle (SDLC), is a structure imposed on the development of a software product. Similar terms include software life cycle and software process. It is often considered a subset of systems development life cycle” - Wikipedia ■ Should be a closed loop, iterative process ■ Design should relate to Requirements ■ Implementation should relate to Design ■ Even as the application evolves 6 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 7. The Waterfall Model ■ Not uncommon for applications to be more like the waterfall model ■ Software lifecycle becomes linear... ■ Changes needed between: – Requirements and Design – Design and Implementation … and as a result of maintenance become lost ■ Result is that deployments do not reflect their original designs 7 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 8. Legacy Systems and Code ■ Old applications or code that have been inherited ■ Typically in maintenance, and providing a valuable function ■ However it often provides challenges: – Maintenance cost is usually high • Outside of normal vendor support – Little or no requirement and design documentation • Potentially even without source code for some parts! 8 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 9. Software Archaeology “..the study of poorly documented or undocumented legacy software implementations, as part of software maintenance. .. includes the reverse engineering of software modules, and the application of a variety of tools and processes for extracting and understanding program structure and recovering design information. .. may reveal dysfunctional team processes which have produced poorly designed or even unused software modules.” - Wikipedia ■ Software archaeology makes it possible to build designs from legacy systems and code 9 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 10. An Introduction to Unified Modelling Language (UML) “...a standardized general-purpose modeling language in the field of object-oriented software engineering. The standard is managed, and was created, by the Object Management Group. ...offers a standard way to visualize a system's architectural blueprints” - Wikipedia ■ A unified standard modelling notation ■ Allows the creation of structure and design plans ■ UML provides two categories of diagram: – Behaviour Diagrams: show the dynamic behaviour between the elements of the system – Structural Diagrams: show the static structure of the system being modelled 10 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 11. UML Behaviour Diagrams ■ Use-case diagram – used to visualize the functional requirements of a system – shows the relationship of "actors" to essential processes – often used to show the relationship between use cases 11 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 12. UML Behaviour Diagrams ■ Activity Diagram – Shows flow of control during an activity – Best used to model to model higher-level processes – “Less technical" than sequence diagrams 12 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 13. UML Behaviour Diagrams ■ Statechart Diagram – Shows the different states that a class can be in – Shows the transitions from state to state – Usually only covers "interesting" classes 13 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 14. UML Behaviour Diagrams ■ Sequence Diagram – Shows the interactions between objects in the sequential order that those interactions occur – Applied to code objects, but can be applied to business objects. – Can be used for communication between teams or organisations 14 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 15. UML Structural Diagrams ■ Deployment Diagram – Shows how a system will be physically deployed in the hardware environment – Shows where the different entities of the system will physically run – Shows how they will communicate with each other – Models the physical deployment 15 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 16. UML Structural Diagrams ■ Component Diagram – Shows the dependencies that the software has on the other software components – Usually shown at a high level with large-grain components – Or at the component package level 16 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 17. UML Structural Diagrams ■ Class diagrams – Shows the static structures of the system, generally implementation classes – Shows how the different entities relate to each other ■ Object Diagrams: – Show a complete or partial view of the structure at a specific time. – Focus on a set of object instances and attributes, and the links between the instances – More concrete than class diagrams – Often used to provide examples, or act as test cases for the class diagrams 17 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 18. Software Archaeology: Methodologies ■ Various methods exist for Software Archaeology, including: – Static analysis • Analysis of source code by tooling or by hand – Trace based analysis • Injecting trace into running application – Debugger based analysis • Stepping through code under a debugger 18 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 19. Digging into a Simple Application ■ A simple application: “JavaGrep” ■ Usage: JavaGrep <pattern> <list of files> ■ Where: – Pattern is a search term – List of files is one of more files to search 19 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 20. Digging into a Simple Application ■ JavaGrep.java: Compile regexp Add files to fileList Create FileScanner scan() Get matching lines Print matching lines For Each File Print summary 20 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 21. Digging into a Simple Application ■ FileScanner.java: Create LineNumberReader Get Line For Each Check for match Line Add to matchLines 21 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 22. Digging into a Simple Application Run regexp matcher against line Get ArrayList of matching lines Get scanned line count Get matched line count 22 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 23. Understanding the code behaviour ■ Dynamic behaviour at code level is the method call graph – Interaction between classes and objects – Sequence of methods called and returned ■ Best fit in UML is the sequence diagram 23 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 24. Generating a sequence diagram ■ Static Analysis – Limited tooling exists – Really needs to be done manually ■ Runtime Analysis – Activate tracing mechanism(s) – Run the application • Code coverage testing • QA or Performance Testing • Production! 24 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 25. Generated Sequence Diagram: Static Analysis ■ Static Analysis Results: – Requires reading of the code! – Accurate diagram – Limited to available source • JavaGrep • FileScanner – Possible to include other calls • Limited to single extra call 25 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 26. Runtime Analysis: Profiling Output ■ Profiling output: – Full graph of all running methods – Access to call frequency/cost information – Requires methods to be run... – No call ordering or count data 26 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 27. Runtime Analysis: Profiling Output ■ Digging into FileScanner.scan(): – FileScanner.scanLine() – LineNumberReader.readLine() – StringBuilder.append() – ArrayList.<init>() – StringBuilder.append() – ArrayList.add() 27 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 28. Generated Sequence Diagram: Runtime Analysis ■ Profiling Analysis: – Scope to cover all code – No ordering information – No call count information 28 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 29. Runtime Analysis: Limited tracing to add order and count information 14:38:09.260*0x6db300 mt.3 > JavaGrep.<clinit>()V Bytecode static method 14:38:09.260 0x6db300 mt.9 < JavaGrep.<clinit>()V 14:38:09.260 0x6db300 mt.3 > JavaGrep.main([Ljava/lang/String;)V 14:38:09.281 0x6db300 mt.0 > FileScanner.<init>(Ljava/lang/String;Ljava/util/regex/Pattern;)V 14:38:09.283 0x6db300 mt.6 < FileScanner.<init>(Ljava/lang/String;Ljava/util/regex/Pattern;)V 14:38:09.283 0x6db300 mt.0 > FileScanner.scan()I 14:38:09.292 0x6db300 mt.0 > FileScanner.scanLine(Ljava/lang/String;) ............ ........ .... ..... 14:38:09.296 0x6db300 mt.6 < FileScanner.scanLine(Ljava/lang/String;)Z 14:38:09.296 0x6db300 mt.6 < FileScanner.scan()I 14:38:09.296 0x6db300 mt.0 > FileScanner.getMatchLines()Ljava/util/ArrayList; 14:38:09.296 0x6db300 mt.6 < FileScanner.getMatchLines()Ljava/util/ArrayList; 14:38:09.296 0x6db300 mt.0 > FileScanner.getMatchCount()I 14:38:09.296 0x6db300 mt.6 < FileScanner.getMatchCount()I 14:38:09.297 0x6db300 mt.0 > FileScanner.getMatchCount()I 14:38:09.297 0x6db300 mt.6 < FileScanner.getMatchCount()I 14:38:09.297 0x6db300 mt.0 > FileScanner.getLineCount()I 14:38:09.297 0x6db300 mt.6 < FileScanner.getLineCount()I 14:38:09.297 0x6db300 mt.9 < JavaGrep.main([Ljava/lang/String;)V ■ Order is: scan() -> getMatchedLines() -> getMatchCount() -> getMatchCount() -> getLineCount() 29 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 30. Generated Sequence Diagram: Runtime Analysis ■ Runtime Analysis: – Scope to cover all code – Ordering information included – Call count information included – Only covers executed code* 30 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 31. Understanding the structure ■ Structure at code level is the object graph – Interaction between classes and objects – References between object on the Java heap ■ Best fit in UML is the class and/or objectdiagram 31 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 32. Generating a Class or Object Diagram ■ Static Analysis – Provide tool with access to necessary source – Run analysis! ■ Runtime Analysis – Run the application • Code coverage testing • QA or Performance Testing • Production! – Generate a system or heap dump 32 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 33. Generated Class Diagram: Static Analysis ■ Static Analysis Results: – Accurate diagram – Limited to available source 33 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 34. Runtime Analysis: System Dump Information ■ JavaGrep: – Static attributes: • matchString java.util.String “for” • fileList java.util.ArrayList size is 1, one entry: “..srcJavaGrep” • _pattern java.util.regex.Pattern “sfors” compiled = true 34 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 35. Runtime Analysis: System Dump Information ■ FileList java.uti..ArrayList: – Instance attributes: • ElementData java.lang.Object[10] single entry of “..srcJavaGrep.java” • size int 1 • modCount int 1 35 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 36. Runtime Analysis: System Dump Information ■ FileScanner – Object instance attributes: • _fileName java.lang.String “..srcJavaGrep.java” • _fReader java.io.LineNumberReader object @ 0x228165e0 • _pattern java.lang.String “sfors” compiled = true • _matchLines java.util.ArrayList object @ 0x22864410 • _matchCount int 4 • _lineCount int 41 36 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 37. Generated Class Diagram: Runtime Analysis ■ Runtime Analysis Results: – The same accurate diagram – Methods could be added from sequence diagram – Scope to add further classes/objects 37 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 38. Digging into Something More Complex... ■ Apache Tomcat 7.0.27 ■ org.apache.catalina.startup.Bootstrap.main() – init() – load() – start() ■ Uses reflection to call: – org.apache.catalina.startup.Catalina.* 38 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 39. Digging into Something More Complex.... 39 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 40. Digging into Something More Complex.... ■ Digging into “server”: 40 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 41. Summary ■ Its possible to use static and/or runtime tooling to understand an application ■ Allows you to close the development lifecycle – even for legacy and 3rd party code ■ Allows you to migrate legacy systems where original requirements are lost – Definition of existing system as source of requirements for new implementation ■ Allows you to debug problems – difference between design and implementation may well be your issue 41 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 42. References ■ Get Products and Technologies: – IBM Monitoring and Diagnostic Tools for Java: • https://www.ibm.com/developerworks/java/jdk/tools/ ■ Learn: – Health Center InfoCenter: • http://publib.boulder.ibm.com/infocenter/hctool/v1r0/index.jsp ■ Discuss: – IBM on Troubleshooting Java Applications Blog: • https://www.ibm.com/developerworks/mydeveloperworks/blogs/troubleshootingjava/ – Health Center Forum: • http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1461 – IBM Java Runtimes and SDKs Forum: • http://www.ibm.com/developerworks/forums/forum.jspa?forumID=367&start=0 42 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation
  • 43. Copyright and Trademarks © IBM Corporation 2012. All Rights Reserved. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., and registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark information” page at URL: www.ibm.com/legal/copytrade.shtml 43 Rediscovering Your Architecture: With Software Archaeology © 2012 IBM Corporation