Really, there will be no specific techniques that we will use that are not used in developing any other type of software application. However, I will briefly mention the techniques that I will use in this book.
Test-driven development (TDD)
One of the huge benefits of SaaS is that the application can be updated very quickly and essentially rolled out to each and every user at the click of a button.
This is great assuming that everything works as expected, but it is much less good if there is a bug in the code. Of course, we could build an extensive set of manual regression tests and build business processes into the release pipeline… but in doing so, you are losing a lot of the supposed advantages of SaaS—the ability to release often and early.
The only way to facilitate rapid deployments with some level of confidence that they will work is to build automated tests. And really, the best way to build an automated test suite is to do it as you go along, by following a TDD approach.
I am aware that TDD has a somewhat mixed reputation in the industry at present. In my opinion, that is because TDD done wrong is a nightmare, and TDD is done wrong very often. I will present a variety of TDD that I feel is an excellent support structure when developing SaaS apps.
Domain-driven design (DDD)
DDD is defined as an approach to software development where the problem is specified by domain experts and not by middle management.
DDD is a software development approach that concentrates on understanding and modeling the business domain of an application in order to improve the design and implementation of the software. It emphasizes the importance of domain knowledge in software development and encourages the use of domain-specific language in the design and implementation of software systems.
In DDD, the business domain is understood as the core area of expertise or focus of an organization, and the software being developed is viewed as a tool to support and enhance the work being done in that domain. The goal of DDD is to create software that is aligned with the business needs and goals of an organization and that accurately reflects the complexity and nuance of the business domain.
SaaS products are often simply made available to anyone with a web connection, and there is no dedicated sales team individually approaching every customer and actively selling the product. Therefore, the product must sell itself, and so it must be useful. In order for this to be true, it is essential that the product is meeting a specific user need and addressing a particular problem domain.
Microservices
SaaS projects need to be flexible so that the product can evolve with the market and with customers’ demands. It is very important that the product is architected in such a way that allows the straightforward addition of new features, with a minimal impact on existing features. A microservice-based architecture fits this requirement.
Multi-tenancy
Because every user is a tenant in the same deployed version of the application, the users’ data must be kept separate in the data storage and retrieval systems. There are a number of ways to approach this, which are discussed in a subsequent chapter of this book.
Reactive design
A SaaS application lives online and is accessed through a browser. In the modern era of smartphones and tablets, there is no way to know what type of device will be used to access your application. The frontend really needs to work on any type of device, or at the very least “fail gracefully” if it cannot operate on any given device.
Accordingly, the design of the UI must be “reactive,” meaning that it can be rendered in a way that is befitting the device that it is being displayed on.
Progressive web apps (PWAs)
Something “nice to have,” but I feel it is worth considering. When we are building SaaS apps, we really want the user to feel that they are using a full-blown “application” and not a glorified website. However, by definition, a website cannot be shown if there is no available internet… PWA-based designs work around this by allowing limited functionality to work where there is little or no internet available.
Of course, with no access to the backend, many of the functions of the site will be unavailable. There is no way around that, but PWAs can be used to make that a little less painful for the user, and so it is an important technique that authors of SaaS applications should be aware of.
We will demonstrate a PWA using Blazor for the frontend technology.
Reasons for choosing SaaS as the go-to paradigm for all manner of businesses, large and small, old and new: as we have highlighted previously, much—if not most—of the population is using some form of SaaS application, from Gmail to Netflix. If SaaS is really eating the world, there must be a reason for that.
No installations needed
This is the biggest and most important thing that drives businesses toward a SaaS-based solution.
Using a traditional application model, a new customer will often have to contact a sales team and sometimes also a tech support team to get the software installed on-premises and appropriately licensed.
With SaaS, a new customer can discover the app and sign up for an account in seconds without needing any contact from the company that is providing the application. This is a significant saving for the company that has developed the application in that no additional sales or support teams are required to onboard the new customer. This also prevents a time lag from discovery to installation, during which the customer could change their mind or discover a competitor.
Browser-based delivery
The users of a SaaS application are not limited to accessing the application on a specific computer or in a specific network environment where the license server resides. The users can have access to the application from any internet-connected machine anywhere in the world. In the modern era of smartphones and tablets, the user of a SaaS application may not even need a computer to take full advantage of the provided service.
Scalability
In a traditional model, this is simply not possible. Convincing people to install any application on their computer is hard. Convincing companies to do so is doubly hard. Scaling up the user base of a desktop application requires a dedicated sales team and also a dedicated support team to first make the application, and then hand-hold people through the installation process. With a SaaS app, users simply sign up on an online form.
Because the SaaS application is hosted in the cloud (Azure, Google Cloud Platform (GCP), or AWS), near-instant scale-up of the infrastructure is possible should a sudden spike in demand occur. There is no other software delivery paradigm that could face an overnight 10 times increase in demand and not leave the vendor floundering!
Upgradability
Under the “legacy” methods of delivering applications, upgrading the apps tended to become nightmarishly complex and expensive for the vendors of the apps.
If you consider a traditional desktop application, the same application could be installed on hundreds of machines across hundreds of different businesses. No two businesses will be running the same hardware or OS versions, and so it is impossible to keep everyone on the same version of your software. It is similarly completely impossible to roll out an upgrade to a new version. At best, you can withdraw support for a particular version at a particular time and hope that everyone stops using it (note—they will not stop using it).
This is a similar problem for an on-premises web application. While there are fewer induvial installations, there will still be many different versions out there, servicing specific business requirements.
This problem completely melts away when you move to a SaaS paradigm. The vendor has full control of the upgrades and can roll them out to all customers all at once at the click of a button.
Only having one version of an app to support is a huge saving for the vendor and also a huge advantage for the development team.
Iterate quickly
An emergent property of the upgradability advantage of a SaaS app is the ability to iterate on the solution extremely rapidly. Feedback about new features can be incorporated and pushed out to all users in very quick cycles. This allows for a very fast turnaround from a developer writing a feature to that feature providing value to the users and revenue to the vendor.
Consider how long it takes for that value to be realized in a traditional app. The code may well sit in a Git repo for many months before it is even included in the “annual release,” and then, the users may choose not to upgrade immediately.
Analytics
Because the users are all funneled through a single web application, it is extremely easy to analyze how the application is being used. This can guide the business to make smart decisions to upgrade the most used parts of the application and defer working on less well-used parts. Couple this with the ease of upgrading and the fast iterations, and this can provide a huge boost in value to the users and should come with a boost in revenue to the vendor.
Global market
With SaaS, the ability to reach customers anywhere is a massive boost for the business supplying the product. There is no case where a sale is missed due to time-zone issues or a sales rep failing to reply to an email.
The ability to gain access to a truly global audience has allowed some companies to become the biggest companies in the world—bigger than banks and oil and gas majors. This access to a market also allows thousands of smaller companies to thrive in a truly global environment.
Flexible payment model
There are many different payment models available to a business offering SaaS. This allows it to capture customers large and small and derive the most value possible from each tier or size of the customer. Some types of payment models follow:
- Tiered pricing
- Freemium
- Free trial periods
- Per-user pricing
Security
Access to the SaaS application will be through a user login that protects sensitive data and files, which are securely stored in a cloud system. This is (in most cases) far more secure than storing data on a server on-premises—or on a local user machine, in the case of a desktop application. While it may seem that keeping all of the data locally or within a local network is more secure than sending the data to a server on the cloud over the internet, this is often not the case. A huge amount of effort goes into securing the cloud services that are typically used to host SaaS applications, and often that effort cannot be replicated on a site-by-site basis, whether that be securing an on-premises web app or individually securing the data on desktop-installed applications.