Book Image

Software Architecture with C# 9 and .NET 5 - Second Edition

By : Gabriel Baptista, Francesco Abbruzzese
Book Image

Software Architecture with C# 9 and .NET 5 - Second Edition

By: Gabriel Baptista, Francesco Abbruzzese

Overview of this book

Software architecture is the practice of implementing structures and systems that streamline the software development process and improve the quality of an app. This fully revised and expanded second edition, featuring the latest features of .NET 5 and C# 9, enables you to acquire the key skills, knowledge, and best practices required to become an effective software architect. This second edition features additional explanation of the principles of Software architecture, including new chapters on Azure Service Fabric, Kubernetes, and Blazor. It also includes more discussion on security, microservices, and DevOps, including GitHub deployments for the software development cycle. You will begin by understanding how to transform user requirements into architectural needs and exploring the differences between functional and non-functional requirements. Next, you will explore how to carefully choose a cloud solution for your infrastructure, along with the factors that will help you manage your app in a cloud-based environment. Finally, you will discover software design patterns and various software approaches that will allow you to solve common problems faced during development. By the end of this book, you will be able to build and deliver highly scalable enterprise-ready apps that meet your organization’s business requirements.
Table of Contents (26 chapters)
24
Another Book You May Enjoy
25
Index

Case study – introducing World Wild Travel Club

As we mentioned at the beginning of this chapter, the case study of this book will take you on a journey of creating the software architecture for a travel agency called World Wild Travel Club (WWTravelClub).

WWTravelClub is a travel agency that was created to change the way people make decisions about their vacations and other trips around the world. To do so, they are developing an online service where every detail of a trip experience will be assisted by a club of experts specifically selected for each destination.

The concept of this platform is that you can be both a visitor and a destination expert at the same time. The more you participate as an expert in a destination, the higher the points you will score. These points can be exchanged for tickets that people buy online using the platform.

The customer came with the following requirements for the platform. It is important to know that, in general, customers do not bring the requirements ready for development. That is why the requirements gathering process is so important:

  • Common user view:
    • Promotional packages on the home page
    • Search for packages
    • Details for each package:
      • Buy a package
      • Buy a package with a club of experts included:
        • Comment on your experience
        • Ask an expert
        • Evaluate an expert
      • Register as a common user
  • Destination expert view:
    • The same view as the common user view
    • Answer the questions asking for your destination expertise
    • Manage the points you scored answering questions:
    • Exchange points for tickets
  • Administrator view:
    • Manage packages
    • Manage common users
    • Manage destination experts

To finish this, it is important to note that WWTravelClub intends to have more than 100 destination experts per package and will offer around 1,000 different packages all over the world.

Understanding user needs and system requirements

To summarize the user needs of WWTravelClub, you can read the following user stories:

  • US_001: As a common user, I want to view promotional packages on the home page, so that I can easily find my next vacation
  • US_002: As a common user, I want to search for packages I cannot find on the home page so that I can explore other trip opportunities
  • US_003: As a common user, I want to see the details of a package, so that I can decide which package to buy
  • US_004: As a common user, I want to register myself, so that I can start buying the package
  • US_005: As a registered user, I want to process the payment, so that I can buy a package
  • US_006: As a registered user, I want to buy a package with an expert recommendation included, so that I can have an exclusive trip experience
  • US_007: As a registered user, I want to ask for an expert, so that I find out the best things I can do on my trip
  • US_008: As a registered user, I want to comment on my experience, so that I can give feedback from my trip
  • US_009: As a registered user, I want to evaluate an expert who helps me, so that I can share with others how fantastic they were
  • US_010: As a registered user, I want to register as a destination expert view, so that I can help people who travel to my city
  • US_011: As an expert user, I want to answer questions about my city, so that I can score points to be exchanged in the future
  • US_012: As an expert user, I want to exchange points for tickets, so that I can travel around the world more
  • US_013: As an administrator user, I want to manage packages, so that users can have fantastic opportunities to travel
  • US_014: As an administrator user, I want to manage registered users, so that WWTravelClub can guarantee good service quality
  • US_015: As an administrator user, I want to manage expert users, so that all of the questions regarding our destinations are answered
  • US_016: As an administrator user, I want to offer more than 1,000 packages around the world, so that different countries can experience the WWTravelClub service
  • US_017: As the CEO, I want to have more than 1,000 users simultaneously accessing the website, so that the business can scale effectively
  • US_018: As a user, I want to access WWTravelClub in my native language, so that I can easily understand the package offered
  • US_019: As a user, I want to access WWTravelClub in the Chrome, Firefox, and Edge web browsers, so that I can use the web browser of my preference
  • US_020: As a user, I want to know my credit card information is stored securely, so I can buy packages safely

Notice that while you start writing the stories, information related to non-functional requirements such as security, environment, performance, and scalability can be included.

However, some system requirements may be omitted when you write user stories and need to be included in the software specification. These requirements can be related to legal aspects, hardware, and software prerequisites, or even points of attention for the correct system delivery. They need to be mapped and listed as well as user stories. The WWTravelClub system requirements are presented in the following list. Notice that requirements are written in the future because the system does not exist yet:

  • SR_001: The system shall use Microsoft Azure components to deliver the scalability required
  • SR_002: The system shall respect General Data Protection Regulation (GDPR) requirements
  • SR_003: The system shall run on the Windows, Linux, iOS, and Android platforms
  • SR_004: Any web page of this system shall respond in at least 2 seconds with a 1,000-user concurrently access

The idea of having this list of user stories and system requirements is to help you understand how complex the development of a platform might be if you think about it from an architectural perspective.