Re-Engineering Legacy Software
Summary

As a developer, you may inherit projects built on existing codebases with design patterns, usage assumptions, infrastructure, and tooling from another time and another team. Fortunately, there are ways to breathe new life into legacy projects so you can maintain, improve, and scale them without fighting their limitations.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Book

Re-Engineering Legacy Software is an experience-driven guide to revitalizing inherited projects. It covers refactoring, quality metrics, toolchain and workflow, continuous integration, infrastructure automation, and organizational culture. You'll learn techniques for introducing dependency injection for code modularity, quantitatively measuring quality, and automating infrastructure. You'll also develop practical processes for deciding whether to rewrite or refactor, organizing teams, and convincing management that quality matters. Core topics include deciphering and modularizing awkward code structures, integrating and automating tests, replacing outdated build systems, and using tools like Vagrant and Ansible for infrastructure automation.

What's Inside
  • Refactoring legacy codebases
  • Continuous inspection and integration
  • Automating legacy infrastructure
  • New tests for old code
  • Modularizing monolithic projects

About the Reader

This book is written for developers and team leads comfortable with an OO language like Java or C#.

About the Author

Chris Birchall is a senior developer at the Guardian in London, working on the back-end services that power the website.

Table of Contents
    PART 1 GETTING STARTED
  1. Understanding the challenges of legacy projects
  2. Finding your starting point
  3. PART 2 REFACTORING TO IMPROVE THE CODEBASE
  4. Preparing to refactor
  5. Refactoring
  6. Re-architecting
  7. The Big Rewrite
  8. PART 3 BEYOND REFACTORING—IMPROVING PROJECT WORKFLOWAND INFRASTRUCTURE
  9. Automating the development environment
  10. Extending automation to test, staging, and production environments
  11. Modernizing the development, building, and deployment of legacy software
  12. Stop writing legacy code!
1136530626
Re-Engineering Legacy Software
Summary

As a developer, you may inherit projects built on existing codebases with design patterns, usage assumptions, infrastructure, and tooling from another time and another team. Fortunately, there are ways to breathe new life into legacy projects so you can maintain, improve, and scale them without fighting their limitations.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Book

Re-Engineering Legacy Software is an experience-driven guide to revitalizing inherited projects. It covers refactoring, quality metrics, toolchain and workflow, continuous integration, infrastructure automation, and organizational culture. You'll learn techniques for introducing dependency injection for code modularity, quantitatively measuring quality, and automating infrastructure. You'll also develop practical processes for deciding whether to rewrite or refactor, organizing teams, and convincing management that quality matters. Core topics include deciphering and modularizing awkward code structures, integrating and automating tests, replacing outdated build systems, and using tools like Vagrant and Ansible for infrastructure automation.

What's Inside
  • Refactoring legacy codebases
  • Continuous inspection and integration
  • Automating legacy infrastructure
  • New tests for old code
  • Modularizing monolithic projects

About the Reader

This book is written for developers and team leads comfortable with an OO language like Java or C#.

About the Author

Chris Birchall is a senior developer at the Guardian in London, working on the back-end services that power the website.

Table of Contents
    PART 1 GETTING STARTED
  1. Understanding the challenges of legacy projects
  2. Finding your starting point
  3. PART 2 REFACTORING TO IMPROVE THE CODEBASE
  4. Preparing to refactor
  5. Refactoring
  6. Re-architecting
  7. The Big Rewrite
  8. PART 3 BEYOND REFACTORING—IMPROVING PROJECT WORKFLOWAND INFRASTRUCTURE
  9. Automating the development environment
  10. Extending automation to test, staging, and production environments
  11. Modernizing the development, building, and deployment of legacy software
  12. Stop writing legacy code!
64.99 In Stock
Re-Engineering Legacy Software

Re-Engineering Legacy Software

by Chris Birchall
Re-Engineering Legacy Software

Re-Engineering Legacy Software

by Chris Birchall

Paperback(1st Edition)

$64.99 
  • SHIP THIS ITEM
    In stock. Ships in 6-10 days.
  • PICK UP IN STORE

    Your local store may have stock of this item.

Related collections and offers


Overview

Summary

As a developer, you may inherit projects built on existing codebases with design patterns, usage assumptions, infrastructure, and tooling from another time and another team. Fortunately, there are ways to breathe new life into legacy projects so you can maintain, improve, and scale them without fighting their limitations.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Book

Re-Engineering Legacy Software is an experience-driven guide to revitalizing inherited projects. It covers refactoring, quality metrics, toolchain and workflow, continuous integration, infrastructure automation, and organizational culture. You'll learn techniques for introducing dependency injection for code modularity, quantitatively measuring quality, and automating infrastructure. You'll also develop practical processes for deciding whether to rewrite or refactor, organizing teams, and convincing management that quality matters. Core topics include deciphering and modularizing awkward code structures, integrating and automating tests, replacing outdated build systems, and using tools like Vagrant and Ansible for infrastructure automation.

What's Inside
  • Refactoring legacy codebases
  • Continuous inspection and integration
  • Automating legacy infrastructure
  • New tests for old code
  • Modularizing monolithic projects

About the Reader

This book is written for developers and team leads comfortable with an OO language like Java or C#.

About the Author

Chris Birchall is a senior developer at the Guardian in London, working on the back-end services that power the website.

Table of Contents
    PART 1 GETTING STARTED
  1. Understanding the challenges of legacy projects
  2. Finding your starting point
  3. PART 2 REFACTORING TO IMPROVE THE CODEBASE
  4. Preparing to refactor
  5. Refactoring
  6. Re-architecting
  7. The Big Rewrite
  8. PART 3 BEYOND REFACTORING—IMPROVING PROJECT WORKFLOWAND INFRASTRUCTURE
  9. Automating the development environment
  10. Extending automation to test, staging, and production environments
  11. Modernizing the development, building, and deployment of legacy software
  12. Stop writing legacy code!

Product Details

ISBN-13: 9781617292507
Publisher: Manning
Publication date: 05/09/2016
Edition description: 1st Edition
Pages: 232
Product dimensions: 7.40(w) x 9.10(h) x 0.80(d)

About the Author

Chris Birchall is a senior developer at the Guardian in London, working on the back-end services that power the website.

Table of Contents

Preface xiii

Acknowledgments xix

About this book xvi

Part 1 Getting Started 1

1 Understanding the challenging of legacy projects 3

1.1 Definition of a legacy project 4

Characteristics of legacy projects 4

Exceptions to the rule 5

1.2 Legacy code 6

Untested, untestable code 6

Inflexible code 8

Code encumbered by technical debt 9

1.3 Legacy infrastructure 10

Development environment 10

Outdated dependencies 11

Heterogeneous environments 12

1.4 Legacy culture 13

Fear of change 13

Knowledge silos 14

1.5 Summary 15

2 Finding your starting point 16

2.1 Overcoming feelings of fear and frustration 16

Fear 17

Frustration 20

2.2 Gathering useful data about your software 22

Bugs and coding standard violations 22

Performance 22

Error counts 26

Timing common tasks 26

Commonly used files 27

Measure everything you can 28

2.3 Inspecting your codebase using FindBugs, PMD, and Checkstyle 28

Running FindBugs in your IDE 29

Handling false positives 32

PMD and Checkstyle 35

2.4 Continuous inspection using Jenkins 37

Continuous integration and continuous inspection 37

Installing and setting up Jenkins 38

Using Jenkins to build and inspect code 39

What else can we use Jenkins for? 40

SonarQube 43

2.5 Summary 43

Part 2 Refactoring to Improve the Codebase 45

3 Preparing to refactor 47

3.1 Forming a team consensus 48

The Traditionalist 49

The Iconoclast 51

It's all about communication 53

3.2 Gaining approval from the organization 54

Make it official 54

Plan B: The Secret 20% Project 55

3.3 Pick your fights 56

3.4 Decision time: refactor or rewrite? 57

The case against a rewrite 58

Benefits of rewriting from scratch 62

Necessary conditions for a rewrite 63

The Third Way: incremental rewrite 64

3.5 Summary 66

4 Refactoring 67

4.1 Disciplined refactoring 67

Avoiding the Macbeth Syndrome 68

Separate refactoring from other work 68

Lean on the IDE 70

Lean on the VCS 74

The Mikado Method 75

4.2 Common legacy code traits and refactorings 75

Stale code 76

Toxic tests 79

A glut of nulls 81

Needlessly mutable state 83

Byzantine business-logic 85

Complexity in the view layer 90

4.3 Testing legacy code 94

Testing untestable code 94

Regression testing without unit tests 98

Make the users work for you 101

4.4 Summary 101

5 Re-architecting 103

5.1 What is re-architecting? 103

5.2 Breaking up a monolithic application into modules 105

Case study-a log management application 106

Defining modules and interfaces 108

Build scripts and dependency management 109

Spinning out the modules 110

Giving it some Guice 111

Along comes Cradle 113

Conclusions 113

5.3 Distributing a web application into services 114

Another look at Orinoco.com 114

Choosing an architecture 116

Sticking with a monolithic architecture 117

Separating front end and back end 119

Service-oriented architecture 122

Microservices 125

What should Orinoco.com do? 126

5.4 Summary 126

6 The Big Rewrite 128

6.1 Deciding the project scope 129

What is the project goal? 129

Documenting the project scope 130

6.2 Learning from the past 132

6.3 What to do with the DB 134

Sharing the existing DB 134

Creating a new DB 138

Inter-app communication 143

6.4 Summary 144

Part 3 Beyond Refactoring-Improving Project Workflow and Infrastructure 147

7 Automating the development environment 149

7.1 First day on the job 150

Setting up the UAD development environment 150

What went wrong? 153

7.2 The value of a good README 154

7.3 Automating the development environment with Vagrant and Ansible 156

Introducing Vagrant 156

Setting up Vagrant for the UAD project 157

Automatic provisioning using Ansible 158

Adding more roles 160

Removing the dependency on an external database 162

First day on the job-take two 163

7.4 Summary 164

8 Extending automation to test, staging, and production environments 165

8.1 Benefits of automated infrastructure 166

Ensures parity across environments 166

Easy to update software 167

Easy to spin up new environments 167

Enables tracking of configuration changes 167

8.2 Extending automation to other environments 168

Refactor Ansible scripts to handle multiple environments 168

Build a library of Ansible roles and playbooks 172

Put Jenkins in charge 174

Frequently asked questions 176

8.3 To the cloud! 177

Immutable infrastructure 178

DevOps 179

8.4 Summary 179

9 Modernizing the development, building, and deployment of legacy software 180

9.1 Difficulties in developing, building, and deploying legacy software 181

Lack of automation 181

Outdated tools 182

9.2 Updating the toolchain 183

9.3 Continuous integration and automation with Jenkins 186

9.4 Automated release and deployment 188

9.5 Summary 196

10 Stop writing legacy code! 197

10.1 The source code is not the whole story 198

10.2 Information doesn't want to be free 199

Documentation 199

Foster communication 200

10.3 Our work is never done 201

Periodic cods reviews 201

Fix one window 201

10.4 Automate everything 202

Write automated tests 202

10.5 Small is beautiful 203

Example: the Guardian Content API 204

10.6 Summary 205

Index 207

From the B&N Reads Blog

Customer Reviews