Category: Architecture

PlantUML – N Tier architecture Diagram

1 Introduction

  • PlantUML is an open source tool that can create a variety of diagrams, including
    sequence diagrams.
  • Each diagram is created from a set of instructions contained in a text file.
  • Anyeditor that does not introduce formatting characters (e.g., notepad, wordpad) may be used to create or edit the files.
  • .NET programmers can use VS Code with PlantUML plugin.
  • PlantUML can be downloaded at

2. Quick reference

  • All frequently used symbols are documented in the page
  • PlantUML file contains processing instructions starting with @startuml on the first line and @enduml on the last line.
  • You can create a common theme file and include in your code files. !include Theme.txt
  • Indentations, white spaces, line continuation
    • PlantUML ignores blank lines and whitespace at the beginning of a line. Liberal use of whitespace to offset logical blocks in the text file can enhance readability.
    • Place backslash at the end of the line “\”. Preprocessor will concatenate subsequent line to the current line
  • Comments
    • Comments can be included in the file by starting the line with a single quote (‘).
    • To put a comment on several lines you can start with /’ and end the quote with ‘/
      • 'This is a short comment
        /' This is how you can
        span multiple lines
        of comments
  • Declarations
    • Although PlantUML does not require you to define elements / interfaces / participants (i.e., entities), it is recommended best practice to define all participants together and before they are used.
    • If the element name is long or needs spaces, declare the participant using a short name and the display name. The short name can be used in diagram specific processing instructions.
    • To control the layout of the diagram, you can add spaces in the display name to better
      position the participants.
    • participant POS as " POS "
      participant OPT as " OPT "
      participant LH as "Loyalty Host"
  • Notes
    • Text for notes can be split over multiple lines by inserting new lines (\n) into the note text. Alternatively, the keyword note may be used, followed by the note text on one or more lines, followed by keyword end note.
    • note right of OPT: right of OPT\non two lines
    • note over POS
      over POS
      on two lines
      end note
  • Splitting Diagrams
    • When a diagram is too long to fit on a page without losing readability, split it into one or more graphic files using the keyword newpage.
    • Each additional graphic file generated will have 00x appended (e.g., example.png, example_001.png, example_002.png).
    • Place a divider at the bottom of the first page and at the top of the second page to make it clear that the diagram is split.

3. N Tier architecture Diagram

  • I created as typical N Tier architecture using PlantUML’s diagram. Please find the code below.

@startuml MultiTierArchiteture

‘ Include section with id mail of PlantUMLTheme.pu
!include PlantUMLTheme.pu!theme

<u>Generic Multi Tier Architeture</u>
end title

caption Prepared by Sabarinathan A.

‘When a line ends with a backslash, the preprocessor will merge the two lines.
Try to keep 2 items together, so they are at the same level in the diagram.

Cloud "External Consumers <&people>" {
actor Clients
[Identity Providers] <> as IdentityProvider
[Single Sign On Services] <> as SSOServer

Cloud "Third Parties <&people>" {
[Third party application] <> as ThirdPartyApp

Folder N-TierArchitecture {
node "UI Tier in DMZ" {
[Front End Controllers] <> as UILayer
node "Application Tier" {
queue Messaging
[Core Business Logic] <> as BusinessServices
[UOW with Generic Repository] <> as DataAccessLayer

node "Data Tier" {
‘[Cache] <> as CacheServer
Database CacheServer
Database OLTPDatabase

[Mail server] <> as Mail
[Remote Services] <> as ThirdPartyServices

note as ArchitectureNote
**N-Tier architecture**
*A layer is a reusable portion of code that performs a specific function.
*Each layer has specific function and interacts with only the layer directly below.
end note

note as BLLNote
**Patterns in Services and Business Layer**
* Facade – single point of entry – unified interface to a set of interfaces in a subsystem
*Factory: Define an interface for creating an object,
but let subclasses decide which class to instantiate.
Factory Method lets a class defer instantiation to subclasses.
* Dependency Injection DI – allows removing hard-coded dependencies
making it possible to change them, whether at run-time or compile-time.
* Strategy: Allow algorithm selection at runtime.
Encapsulate related algorithms and let the algorithm vary and evolve from the class using it.
Separate the implementation from the delivery of its results.
end note

note as DALNote
**Patterns in Data Access Layer**
* Unit Of Work (UoW) with Generic Repository
* CRUD Methods for domain objects Used in Data layer
* Alternative storage implementations may be easily interchanged.
end note

Clients –> IdentityProvider
Clients –> SSOServer
Clients —> UILayer : HTTP

IdentityProvider –> UILayer
SSOServer –> UILayer

ThirdPartyApp —> UILayer : HTTP

UILayer –> Messaging : HTTP
Messaging -> BusinessServices

BusinessServices –> DataAccessLayer

DataAccessLayer <– CacheServer
CacheServer <– OLTPDatabase ‘ ‘\n \l \r for left and right alignments DataAccessLayer —> OLTPDatabase

BusinessServices —-> Mail
BusinessServices —-> ThirdPartyServices

ArchitectureNote . UILayer
BLLNote . BusinessServices
DALNote . DataAccessLayer


3. UML Diagram Output

Software Maintenance and Support


This article is a collection of notes and references from other web sites for the self study of Single Page Applications and Angular. The list of source web sites referred are mentioned in the “References” section of this article.


“Begin with the end in mind”

  • Maintenance and support will continue for the life of your software system. A significant portion of the system’s life-cycle budget will be consumed by these tasks. In fact, experts estimate that Maintenance can eventually account for 40 to 80% of the total project cost. 
  • Software does not “wear out” but it will become less useful as it gets older, plus there WILL always be issues within the software itself.
  • Software maintenance cost is derived from the changes made to software after it has been delivered to the end user.


What is Maintenance?


This phase of the software lifecycle consists of the tasks required to keep your system operational after it is delivered into Production.


The different types of maintenance tasks are described as:

  1. Corrective – Updates that are required to correct or fix problems. (generally 20% of software maintenance costs)
  2. Perfective – Modifications that enhance or improve the functionality or performance of the software. This includes new user requirements. – costs due to improving or enhancing a software solution to improve overall performance (generally 5% of software maintenance costs)
  3. Adaptive – Software modifications that are required due to environmental changes (eg. upgrade to operating system) – costs due to modifying a software solution to allow it to remain effective in a changing business environment (25% of software maintenance costs)
  4. Preventative – This corrects potential flaws or problems in the software before they become effective.
  5. Enhancements – costs due to continuing innovations (generally 50% or more of software maintenance costs) Same as Perfective ?

What is Support?

Support refers to the assistance given to users to address their problems and queries after system implementation.

Effort Estimation

Key parameters considered while estimating the efforts required are as below

  • The industry and application type
  • Size of the application
  • Platform Types.
  • Programming language used
  • Effort spent on different maintenance activities
  • Effort spent on different support activities
  • The number and types of defects found during the maintenance period
  • Average time is taken to repair defects
  • Calls to Help Desk
  • Team size

Approaches to take over projects in production

Requirement Elicitation

  • The term elicitation is used in books and research to raise the fact that good requirements cannot just be collected from the customer, as would be indicated by the name requirements gathering. Requirements elicitation is non-trivial because you can never be sure you get all requirements from the user and customer by just asking them what the system should do OR NOT do (for Safety and Reliability). Requirements elicitation practices include interviews, questionnaires, user observation, workshops, brainstorminguse cases, role playing and prototyping

Detect patterns and the general structure of an application at a high level

  • Reverse analysis the source code

    The architecture tools and Static Code Analysis in Visual Studio Ultimate help us to visualize the organization, relationships, design patterns and behavior of existing applications

  • Generate sequence diagrams from the existing code and get required interfaces for each component
  • Sequence diagrams help to asses the impact of changes

Improve productivity and quality through Automation

  • Automated Live Unit Testing with VS
  • Automatically runs the impacted unit tests in the background as you type and provides real-time feedback

Use Agile or Iterative Waterfall SDLC

  • Produces working software early during the lifecycle
  • The focus is on delivering a sprint of work
  • Deliver series of valuable/shippable features/projects
  • Lowrisk
    • Low risks factors as the risks can be identified and resolved during each iteration.
    • if one project goes wrong, it would not impact another project
  • Flexible
    • More flexible as scope and requirement changes can be implemented at low cost
Questions / Metrics to be clarified

  1. Size of each application or module
Application Number of Modules Number of



Number of  Scheduled Batches Number of  Integrations to External applications

The number and types of defects found in a year

Classification Priority No of issues found
Standard Critical (P1)
High (P2)
Medium (P3)
Low (P4)

List of different .NET languages, Databases used with the applications.

Technology / Languages Number of applications
SQL Server

List of different .NET frameworks used with the applications.

Technology / Languages Number of applications
ASP.NET – Web Forms
Entity Framework
Any other technologies

Third-party applications or packages integrated with the applications

Third Party integrations Number of applications
CRM (Siebel, Vantive, Remedy, SharePoint, Documentum etc.)
BI / OLAP / DW Tools

(ETL, Data Stage, Sagent, Informatica,

SAS, Ab Initio)

ERP Skills (Peoplesoft, SAP,

Oracle Applications etc.)

Software development life cycle models used

SDLC Number of applications Number of releases in a year
Iterative Waterfall
Any other SDLC methods

Type of Integration and deployment methods used (to estimate the efforts to deliver the build to different environments

Integration and Deployment Number of applications
Automated deployments only
Manual Integration and deployment

Availability of the documents in English

  • Architecture documents, HLD, LLD, User guides, deployment documents etc


  5. SDLC Models
  6. Visual Studio Architecture Tooling Guide Scenarios