Search This Blog

Wednesday, 14 September 2022

Modern SDLC - A peek into practical Agile

 Phases of SDLC



Lets see how a enterprise project can be worked upon as per Software Development Lifecycle (SDLC)

1. Discuss with Client

- Analysis: Convert Client requirements through examples into technical requirements

- O/p: Requirements Document: SRS - System Requirement Specification


2. Planning: PM comes out with an Estimation Document

- In an estimation document

- Total number of releases for the product

- Total Days required to Deliver

- Team size required

- Delivery Date


3. Implementation: Development

- Designing the Product

- How many modules

- Which Technologies to Use

- Classes, Projects,DBs, APIs

- HTML Wireframes

- Proof of Concept Applications created

- Coding : S.E

4. Testing

- Write all possible cases for a given requirement.

- All cases means: What is expected: Happy Case

   Loopholes / Bugs: Sad Case

5. Deployment

- Instruction Manuals for Client / Support Team

- Installation of the Product

- Servers & Security Certificates

- Configurations



======================================================================

But in today's fast paced world, where several companies would bid for a project, it becomes important to deliver fast which means within a short timeline.

The above process of SDLC, takes a long time (several months) to produce the final product (release to client).

The above SDLC process is also linear, which means, when the UI, development teams are at work, the QA (Quality Assurance Team) is not assigned to work. Parallel work environment is not possible with the traditional SDLC process

=======================================================================

SOLUTION:

AGILE: In this model, a product is delivered in several usable stable parts.

Hence multiple small and stable releases will be given to the client

Eg: Amazon.com delivered in 4 parts

V1: All requirements wrt Product Mgmt, Orders Mgmt, Payment Gateway Integration

V2: Additional requirements for Tracking of Orders

V3: Additional Requirements for Dropshipping and engagement

V4: Additional Requirements for Frachising

- Each Version will follow the Construction phase: Requirements Analysis -> Planning -> Design UI -> Develop

   -> Test -> User Acceptance (Client Acceptance) -> Release

- The cycle is known as SPRINT. Hence, in the above example, we can say there are 4 sprints.

- Requirements or deliverables identified by client will become User Stories

- The Large team is divided into Scrum Teams (smaller teams) each handling a collection of user stories

- Each team member of a single Scrum team will do analysis of assigned user story, work on the elements (parts)

  of a single user story, document the details of the user story and implement it.

- Each user story will have sub-stories (parts/elements) which will get assigned to specific team member

Eg: Product Management

- Create Product Page UI -- UI / Frontend Team member

- BLL -- Backend Developer

- Expected Results, how your module should work, workflow and technical descriptions -- QA Team 

member

- Operations Team member - manage Checkin/checkout, integration & deployment of code, configure
























Thursday, 25 August 2022

Quick Tech Bits - N-Tier Architectecture Calls Vs Data

 

Here is a quick diagram of how the call hierarchy vs  data flow hierarchy in an n-tier architecture takes place.

  • The Face in the diagram is the end user who interacts with the Presentation Layer (PL) of your product.
  • The Services Layer (SL) is introduced if the Presentation Layer becomes polyglotic. If your product is a website (Using Java) like Gmail and is also available as Gmail Android App, IPhone App, then all these three applications will need to be synced with the same business logic, Database Servers right?
    • Hence we need a project that uses Rest Services (WebApis), SOAP Services so that all the Apps can access the Business Logic, Databases in a language and framework agnostic way over http.
  • The Business Logic (BL) consists of the product's core logic and is basically a collection of Class Library  projects (producing portable executables like Dlls)
  • The Data Access Layer (DAL) uses a set of technology adapters that can communicate with DBMS residing on different servers.


CALL Hierarchy (marked in red)

When the end-user clicks a button on the UI 

==> A call to ==> Services Layer takes place 

=>which=>calls the ==> Business Logic Layer Methods 

=>which=>calls the==> Data Access Layer 

==>finally calling ==> DBMS Queries / Stored Procedures / Functions / Views / Commands


DATA FLOW Hierarchy

The data is returned after the call in the reverse direction (marked in green)

Looking at the Data Flow Hierarchy, as a developer you can know which projects created in the respective layers need to be referenced and how.

The direction of adding project reference in the N-tier architecture is the same as the Data Flow Hierarchy direction.

Eg: Data flows from DAL to BL, hence DAL project will be added as a reference to BL project

Data Flow Hierarchy is used to seed your product architecture, create boiler-plate code for the product.

Hope this helps.





SQL Cursor Syntax - Quick Tech Bits

 Cursor: 

  • Is used to do a different processing row by row of the select query
  • The column names displayed need to be formatted or validated or processed before showing output. This process can give different results per row. 
  • Hence cursor is used

Eg: Showing culture specific / language specific outputs for the same data. Here cursor can be used

Eg: Creating a comma-separated string for a given table data


- TIP: Imagine you are working with a file when writing the cursor syntax. Makes it easier to visualize and understand the syntax

- File is created, then opened, then processed line-by-line, then closed and removed from memory.

- The same holds for a cursor


- SYNTAX

1.     DECLARE <cursorName> CURSOR FOR
2.               <select query>
3.     OPEN <cursorName>
4.     FETCH NEXT FROM <cursorName>
5.     INTO <variable names one each for selected  columns>
6.    
7.     <your logic for processing>
8.    
9.     CLOSE <cursorName>
10.   DEALLOCATE <cursorName>

*** CURSOR SHOULD ALWAYS BE USED AS THE LAST RESORT 

*** DUE TO PERFORMANCE CONCERNS

Check this repo for an example script of the MoviesDb and run the Cursor example.

The script files below should be run in Microsoft SQL Management Studio / Visual Studio in the same order.

MoviesDB Script: Creates a MoviesDB database with sample data

Cursor Script: Contains an example for cursor & how it can be replaced with a normal SQL query.

Hope this helps.

Wednesday, 3 August 2022

C# Change console Forecolor

 

While working on console applications in .net, its nice to display different colored fonts for different statuses.

For example: Warnings should show up in yellow, errors in red, success messages in fluorescent green.

This is particularly useful when you write Logger modules for your products.

#1 Change Foreground Color

1.  Console.ForegroundColor = ConsoleColor.Green;
2.  Console.WriteLine($"Update successful!");
3.   
4.  Console.ForegroundColor = ConsoleColor.Red;
5.  Console.WriteLine($"There was an error: Invalid input");
6.   
7.  Console.ForegroundColor = ConsoleColor.Yellow;
8.  Console.WriteLine($"Please use Pascal naming conventions"); 
9.    

# Output 



Friday, 3 June 2022

Shift from Manual to Automation - Unit Testing

 This post is about the shift from manually unit testing your code to enabling automated tests using Assertion Frameworks. This post is intended for audience who are completely new to the discipline of software unit testing.

Let's take a simple example of a Guest Entry system, where 

  1. When a valid guest enters, your system (here shown as the watchman) validates the guest pass (login credentials), and let's the guest enter as an authenticated user
  2. When an intruder (not a system user) enters, your system should be able to know that the user is invalid and NOT let him enter your system any further

If you are a manual tester or unit tester testing this module / functions of module, then you would want to record it in an excel file like this.


The above steps would keep repeating for each test case, right?
When you wear the hat of a tester, there are 3 things which you need to know
  • Example inputs. This is usually given by clients in a call.
  • Expected outputs. For each input, the expected output should be known
  • The function to call
Hence, in the case of Guest Entry, let's take the example inputs, expected outputs, function to call
  • Example inputs: [userId | password] = ["admin" | "nimda"]
  • Expected output : returns "Valid Guest"
  • Function to Call: GuestLogin(userId, password)
To automate this test case which is already represented in above diagram as excel sheet, we make use of Test Assertion Frameworks
  1. The Test Assertion Frameworks take Example Inputs, Expected Outputs, Function to call AND compare them with the actual output returned by the function call.
  2. If the comparison returns true, the test assertion framework declares that the test case has passed.
Irrespective of the assertion framework used, we use the AAA pattern which works with any assertion framework available today
A - Arrange
A - Act
A - Assert

Here is an example of a test case written for testing the function "Add()" using AAA pattern



The above testcase is written using NUnit in .Net. One could choose to use any framework to write the testcases. 
There are several Assertion Frameworks available today. Adding some of them for your perusal here.




To be able to be a unit tester, one needs to have the mindset to think like a tester. To think like a tester, one should know only the following things

  • Example inputs. This is usually given by clients in a call.
  • Expected outputs. For each input, the expected output should be known
  • The function to call


Now use the assertion framework of your choice and write testcases for your code.

Tuesday, 3 May 2022

Advanced Dot Net Core Stack (.net 6)

 Have delivered several programs on .net, .net core for several corporate and retail clients  in the past decade.

My association with technology goes back to 1996, and the association with .Net technologies since 2003 (.net 1.1 to current version)

Kind of programs delivered

  • C#
  • .Net full stack
  • .Net Web Stack
  • .Net Api Stack
  • .Net Test Stack
  • Test Driven Development with .Net
  • Custom integrations of .Net framework with open-source frameworks like Angular, React, Node
  • .Net Web Stack with Azure Cloud
  • Customized customer .net integrations for deployment
  • .Net Design Patterns
  • .Net Architecture Patterns
If you would like to enroll into any of my trainings, do send in an enquiry through the form (in the website sidebar). Provide the details of group, total participants and requirements as part of the enquiry message.

Thanks & Regards


Contact Form

Name

Email *

Message *

×

Saturday, 2 April 2022

Angular Technology Training

If you have attended my training individually or through your company, do consider leaving your testimonies as recommendation in comments.

Angular 12 hands-on training contained learning about

a. Node & NPM installer system

b. ES6 and Typescript language in depth

c. Angular 12

    i. Architecture & usecases in applications

   ii. Modifications required in project Architecture

  iii. First Flight with Angular

   iv. Angular Components

    v. Angular Services

   vi. Angular Pipes

  vii. Angular Directives

viii. HTTP with Angular

  ix. Integration with other frameworks

   x. Deployment

  xi. Unit Testing in Angular -- (if required by client)

1. Testimonies for corporate batch conducted in April '22 on Angular 12 for experienced professionals