A Modern Vision for Enterprise Software Delivery
Delivering software is not new, nor are concepts like continuous integration, continuous delivery, or automated testing, but most software dev teams still are not taking advantage of these approaches. In this post, we want to present a vision for modern software development – what are the practices that teams should be using to develop modern software in an efficient way?
A Clean Architecture
Here is how we define a clean software architecture:
- Clear separation of frontend (mobile apps, web apps) from backend APIs
- Version APIs whenever backwards compatibility changes to avoid breaking existing mobile apps and/or integrations.
- Use Mainstream frontend frameworks like Angular, React, Vue, Ionic, React Native, Native Apps, or jQuery+Twitter Bootstrap.
- Use Mainstream Backend Frameworks like NestJS/Express, Java Spring Framework, DotNet Core, Ruby on Rails, Laravel, Django/Flask, etc.
By doing these things, you will find your software will be easy to hire for, easy to maintain, and the framework will be regularly updated with security fixes and bug fixes.
We always try to write clean code:
- Separation of Concerns: Well Architected, multi-tiered architecture with separation between data access layer, business logic layer, and protocol parsing (http/rest).
- Re-usable APIs: We can use the same APIs for multiple pages or apps. There is no reason to write custom APIs per-page.
- Restful APIs: Follow best practices around the use of HTTP Methods like GET, POST, PUT, and DELETE for their corresponding purposes
- Single Responsibility Principle and Don’t Repeat Yourself: By using a multi-tiered architecture with appropriate modularization of components, we end up with simple, easy to understand components and avoid repeating ourselves over and over.
Writing code that works is hard, but if you are willing to invest the time, there are established tools and practices to ensure code functions properly after every release. Where budget and time allows (and is justified), we invest in automated testing to ensure software works after every deployment.
- Use unit testing to clearly test complex areas of the code after every deployment.
- Use linting to enforce code quality and formatting standards, reducing typos and bugs and ensuring well formatted, easy to read code.
- Use automated functional tests to make sure the user experience works properly after every deployment.
- Use integration tests to test different components or software packages together to ensure updates to one do not break downstream integrations.
- Use automated performance testing with tools like JMeter to ensure the app performs fast after every deployment.
Continuous Integration means merging developer’s code changes using a code versioning tool like git on a very regular basis. Ideally, developers are integrating their code changes every day or two, or even multiple times a day.
Doing this offers several benefits:
- Avoids merge hell: Don’t have your team waste many hours or even days resolving conflicts between developer’s changes. By merging early and often, developers avoid stepping on one another’s feet allowing you to scale your team and move quicker.
- Code reviews: Use merge requests/code reviewing after every code change to ensure developers are learning and communicating about changes they are making.
Continuous delivery means deploying extremely regularly to a code environment, typically using automation to do the deployment. It increases developer productivity and, when combined with continuous integration, allows your application testers to get feedback far faster.
Continuous Delivery looks like this when done right:
- After every code change is made, it should deploy to an environment
- It should run automated tests
- It should notify dev team if it fails to deploy
- It should deploy automatically, and essentially the same way regardless of whether it is a production environment or a test environment. In effect, you are testing both the code as well as the way it is deployed.
In addition to CICD, we recommend using the following DevOps practices to ensure your software is always functioning properly:
- Monitor error rates, response time
- Should regularly check the app is healthy, such as writing a page that checks the connection with the database works
- Aggregate logs/metrics to allow you to dig into issues that arise.
We hope we have given you a vision for what modern, professional software development should look like. Modern software development uses continuous integration, continuous delivery, and DevOps to ensure code is delivered early and often and that issues are monitored and alerted before your customers have a chance to complain.