Software Design - Introduction to Evolutionary Design


Image


With extreme programming and agile, the focus is being lean and doing just in time design. In this context, how do you ensure that your design remains good and evolves along with the application requirements?

What will you learn?

  • What is Evolutionary Design?
  • Why is it important?
  • How can you use Evolutionary Design in the best way possible?
  • What Are The Advantages Of Evolutionary Design?
  • How does Evolutionary Design fit in with agile?
  • What are the best practices with Evolutionary Design?

Free Courses - Learn in 10 Steps

Software Design

This is the last article in a series of articles on Software Design:

Waterfall Model In Perspective

One of the first software implementation model was the Waterfall Model. Before we start with Evolutionary Design, lets look at how design was done in a Waterfall Model.

The Waterfall Model typically involves the following project stages:

  • Architecture
  • Design
  • Programming/Coding
  • Testing

The duration of each of these phases could be a month, two months or even three months.

Before you can get to the programming step, you need to be involved for a long time in the architecture and design phases. The result of this is that you have the components of your program fully specified - the classes, methods among others - before you even start coding.

This model assumes that you can design software just like you design your buildings or bridges.

However, there were several problems with this approach and we quickly moved on to other design approaches as new sotware development models evolved.

Introducing Evolutionary Design

In the waterfall model, we architect and design the entire system before we even start coding.

Evolutionary Design adopts a radically different approach. It focuses on having a simple design that works to start with. Now, what is simple design?

A software application is said to have a simple design if it:

  • Runs all tests : There are good unit tests and all tests succeed all the time.
  • Contains no duplication : There is no duplication of code or intent.
  • Expresses intent of programmers : Code is clear, easy to read and simple.
  • Minimizes number of classes and methods : Architecture and Design are as simple as possible to get things dones. Classes and Methods are as small as possible without losing clarity or performance.

The thought process behind Evolution Design is that once the design is simple, you can enhance it easily to meet future needs.

Evolutionary Design and Agile

Evolution design fits very well with the agile way of working.

Agile focuses on getting things done in small cycles. You design a little. You code a little. You test a little. You move your code to production often. Focusing on 4 principles of Simple Design helps you in keeping the design simple and evolve design over a period of time instead of a one time design.

Architecture vs Design

While the focus of agile is on just in time design, it is important to distinguish between design decisions and architectural decisions.

Some decision are difficult to change, once you made the choice. For example:

  • What frameworks to use to build your application?
  • How do you integrate with other applications?
  • What is the boundary of the application you are building?

These decisions are what I call - architectural decisions. It is important to take time while making architectural decisions and involve your architecture team as well.

How Evolutionary Design Works

In Evolutionary design, we follow an iterative approach:

  1. Does your feature involve an architectural decision? If not, go to next step. Otherwise, get your architecture team involved and possibly do a prototype to test your architecural decision.
  2. Code the feature
  3. Refactor code to meet 4 Principles of Simple Design
  4. Repeat

What Are The Advantages Of Evolutionary Design?

The following are the stand-out advantages of Evolutionary Design:

  • Avoids over-design : When we follow older design methods, we tend to prepare our software to handle future requirements. This is a classic case of over-design.
  • Avoids wastage of effort: This could happen when we design for future requirements that never happen
  • Designs just-in-time: It follows an iterative cycle of development, where the focus is on current requirements, delivering current value, and incorporating relevant feedback.

What Challenges Arise With Evolutionary Design?

The following are the significant challenges posed by Evolutionary Design:

Needs a clear separation between Architecture and Design

All design cannot be done in the nick of time; architecture decisions are difficult to change and time must be devoted to those. You may want to create a separate category of user story, or even a separate process sprint to cover the architecture decisions. Also, everyone in the project needs to be clear about these two kinds of decisions for the project.

Need for skilled and experienced architects and developers

A group of inexperienced or less experienced developers cannot pull off a well-designed software application, using evolutionary design. You need guidance from experienced people.

Need for Continuous Integration

Continuous Integration is essential for Evolutionary Design is effective:

  • To be sure your tests are running regularly
  • To ensure that code quality is under check

Needs High Quality Tests

Your unit tests need to be really top-class. If these unit tests are not good, then refactoring the code is out of question. This leads to the design getting stagnated, as the developers are reluctant to refactor the code. Now, the design is no longer evolutionary!

Understanding The Best Practices

The two major points to stress on here are:

Use Test-Driven Development (TDD)

This is the best way to ensure that your low-level design is good. With TDD, your focus before you write any code is how you will go about testing it. For example, you start thinking about how someone will use your class and its methods, before you write the method. You thus have an outside-in perspective, and that’s always good to have as a developer. This results in the software having a good and robust API.

Another things that results from TDD is you have great unit tests!

When following TDD, you first write a unit test, make it fail, and then write the code to make it pass. So, you have more reliable tests.

Use Continuous Integration

As we saw a short while ago, we need to make sure we keep running the tests we write, regularly. This ensures you get immediate feedback if something has gone wrong.

How To Learn Evolutionary Design?

The best way to learn this is by using pair programming: pair with good, experienced programmers. This will give you insights into how to evolve your program’s design, over a period of time.

Summary

In this article, we gave you an insight into Evolutionary Design. Evolutionary Design helps us avoid over design and keeps our design simple.

Do check out our video on this:

image info

Best Selling Udemy Courses

Image
Image Image Image Image Image Image Image Image Image

Join 450,000 Learners and 30+ Amazing Courses

350,000 Learners are learning everyday with our Best Selling Courses : Spring Boot Microservices, Spring, Spring Boot, Web Services, Hibernate, Full Stack React, Full Stack Angular, Python, Spring Interview Guide, Java Interview, Java Functional Programming, AWS, Docker, Kubernetes, PCF, AWS Fargate and Azure


Do not know where to start your learning journey? Check out our amazing learning paths:
Learning Path 01 - Spring and Spring Boot Web Applications and API Developer,
Learning Path 02 - Full Stack Developer with Spring Boot, React & Angular,
Learning Path 03 - Cloud Microservices Developer with Docker and Kubernetes,
Learning Path 04 - Learn Cloud with Spring Boot, AWS, Azure and PCF and
Learning Path 05 - Learn AWS with Microservices, Docker and Kubernetes


Subscribe

FREE COURSES



Related Posts

Writing Integration Tests for Rest Services with Spring Boot

Setting up a basic REST Service with Spring Boot is a cake walk. We will go one step further and add great integration tests!

Integrating Spring Boot and Spring JDBC with H2 and Starter JDBC

Learn using Spring Boot Starter JDBC to connect Spring Boot to H2 (in memory database) using Spring JDBC. You will create a simple project with Spring Boot. You will add code to the project to connect to a database using Spring JDBC. You will learn to implement the basic CRUD methods.

JUnit Tutorial for Beginners in 5 Steps

JUnit Tutorial for Beginners in 5 Steps. Setting up a basic JUnit example and understanding the basics of junit.

JPA and Hibernate Tutorial For Beginners - 10 Steps with Spring Boot and H2

JPA and Hibernate in 10 Steps with H2 - Setting up a basic project example with Spring Boot and in memory database H2. Its a cake walk.

Spring Boot Tutorial For Beginners in 10 Steps

Introduction to Spring Boot in 10 Steps. Learn the basics of Spring Boot setting up a basic project example with Spring Boot.

Spring Framework Tutorial for Beginners - Your First 10 Steps

Learn the basics of Spring Framework setting up a very simple example.

JPA and Hibernate Tutorial using Spring Boot Data JPA

Complete journey starting from JDBC to JPA to Spring Data JPA using an example with Spring Boot Data JPA starter project. We use Hibernate as the JPA Implementation.

Creating a Web Application with Spring Boot with JSP

Setting up a basic web application with Spring Boot is a cake walk. We will create a simple web application using Spring Initializr and add JSP features to it.

What is Spring Boot Auto Configuration?

Auto Configuration is the most important feature in Spring Boot. In this tutorial, we will learn important concepts about Auto Configuration with a couple of examples.

Unit Testing Rest Services with Spring Boot and JUnit

Setting up a Basic REST Service with Spring Boot is a cake walk. We will go one step further and add great unit tests to our RESTful Service.


Search