Saturday, November 25, 2017

Software Configuration Management Plan (SCMP)

Configuration Items


Configuration Items
Description
Phase - Initiation & Planning

Project Charter
Describes the scope, objectives, and participants in a project
Project Plan
Describes the project plan, initially defined scope of project and determined appropriate methods to complete the project.
Software Configuration Management Plan
SCM is a part of quality control of a project. Defines how source code & builds will be managed. Without this managers have little or no control over the products being produced. Ex. What there status is? Where they are in production life cycle? Whether they can change? What is the latest version?
Configuration Management Checklist
Checklist for SCMP, Checks for SCMP is followed in the project properly
Phase - Requirements

Requirements Specification (BRS)
Describes business requirement specification
Capacity, Infrastructure & Hosting Planning
Describes planning for system capacity, required infrastructure and hosting options
Change Request Log
A change log is a record of requests for change (RFCs) submitted for all changes in the product
Traceability Matrix
A traceability matrix is a document, usually in the form of a table that correlates any two base-lined documents that require a many-to-many relationship to determine the completeness of the relationship. Used to check & see whether system requirements met or not. In other words this matrix covers mapping of high level requirements with test cases to ensure that all test cases covered so that no functionality will be missed during testing.
Phase - Design

Functional & System Design (SRS)
Describes system requirement specifications
Test Plan
Describes planning for testing
Conversion/Migration Plan
Describes migration plan
Test Cases
List of test cases. A test case is a set of condition in which a tester determine whether a functionality of system is working as it was designed
Taxonomy Review Checklist
Checklist for taxonomy review
Code Review Checklist
Checklist for code review
Coding Standards
Documentation of coding standards
Test Plan Review Checklist
Checklist to verify test plan. Verify prepared test cases following standards like well-defined scope entry and exit points etc.
Module Dependency Matrix
Describes dependency of system modules on each other
Security Plan
Describe planning to implement system security. Define which security items has to be implement and how to implement them
Maintenance Plan
Describe maintenance plan
Phase - Development & Test

Coding (Ex. C#/JAVA)
Computer language coding
Database and database objects Creation
Database and objects like tables, functions, stored procedures creation
Unit Test Cases Preparation
Describe unit test cases preparation
Unit Test Cases Report
Describes unit test cases execution report
Installation Plan
System installation plan on deployment environment
Handover Training Plan
Describes plan for system handover to client
Change Request (CR)
Change request form
Software Readiness Checklist
Checklist to verify software readiness
Release Notes Internal
Release note for internal releases
Bug documentation
Describes analysis, cause and solution for specific bug
Deployment Checklist
Checklist to verify system installation / deployment
Phase 6 – Implementation

Software Release Audit Checklist
Establishes overall criteria for evaluating software quality, customer, deployment, compliance, operations, security, and support readiness
Release Notes External
Release note for external releases
Post Implementation Evaluation Report
Describes the successes and failures of the project. It provides a historical record of the planned and actual budget and schedules
User Manual
Guide for system users to describe how to use the system
Meetings Record (All stages)
Record of MOMs for all meetings in project lifecycle
Stage Exit Approvals (All stages)
Record of approvals from concerned authority on completion of every stage

Friday, July 15, 2016

Type of Contracts

There are two types of contracts
  1. Behavioral Contract
  2. Structural Contract
Behavioral Contract:
    1. Service Contract
    2. Operation Contract
    3. Fault Contract
Structural Contract:
    1. Data Contract
    2. Message Contract
Message Contract: Developer mostly uses DataContract but whenever we require more control over soap message MessageContract comes into picture.
Using MessageContract you can define header and body members of soap message that wcf inserts in soap message.

Note: When using message contract with a operationcontract
Either only messagecontract can be used as parameter and return value or nothing as parameter or return type.

[MessageContract]
    public class UserInfoRequestMessage
    {
        [MessageHeader()]
        public string UserAuthCode;

        [MessageBodyMember()]
        public int UserId;
    }

    [MessageContract]
    public class UserInfoResponseMessage
    {
        [MessageBodyMember()]
        public UserInfo MyUserInfo;
    }

    [ServiceContract]
    public interface IUserService
    {
        [OperationContract]
        UserInfoResponseMessage GetUserById(UserInfoRequestMessage usrInfoMessage);
    }

    public class UserService : IUserService
    {
        public UserInfoResponseMessage GetUserById(UserInfoRequestMessage usrInfoMessage)
        {
            //Method implementation
        }

    }

Friday, July 1, 2016

Virtual Vs Abstract

Differences between Abstract & Virtual functions -

Members
  • Abstract function doesn't contain any body but a virtual function contain body 
  • We must be implement the abstract function in derived class but it is not necessary for virtual function 
  • Abstract function can only use in abstract class but it is not necessary for virtual function 
  • Abstract function are called pure virtual function
  • It must be a function member. That is, fields and constants cannot be abstract members.

    Class
    • You cannot create instances of an abstract class.
    • An abstract class is declared using the abstract modifier
    • An abstract class can contain abstract members or regular, nonabstract members.
    • An abstract class can itself be derived from another abstract class
    • Any class derived from an abstract class must implement all the abstract members of the class by using the override keyword, unless the derived class is itself abstract.

    abstract class Helloworld
    {
        public int Int1 { get; set; } //Non Abstract property

        public abstract int Int2  //Abstract Property
        {
            get;
            set;
        }

        public  Helloworld()  //Constructor
        {
            Console.WriteLine("Helloworld Constructor");
        }

        public void Method1()   //Non Abstract Method
        {
            Console.WriteLine("Helloworld Method1");
        }

        public abstract void Method2();  //Abstract Method

         ~Helloworld()  //Destructor
        {
            Console.WriteLine("Helloworld Destructor");
        }
    }

    class Drived : Helloworld
    {
        public int Val;
        public override int Int2
        {
            get
            {
                return Val;
            }
            set
            {
                Val=value;
            }
        }

        public override void Method2()
        {
            Console.WriteLine("Drived Method2");
        }
    }
    class Program
    {
        static unsafe void Main(string[] args)
        {

            Drived Dr = new Drived();
            Dr.Int1 = 10;
            Dr.Int2 = 20;
            Dr.Method1();
            Dr.Method2();
            Console.ReadLine();
        }
    }

    Wednesday, June 29, 2016

    Procedure Optimization Techniques

    1. Set nocount on: Sql counts and returns number of records effected sql statement. Sql skip this if we set set nocount on.
    2. Use Schema name with objects: Use schema name with objects. Ex. Before execution sql will first try to find sp with this name in all schemas even a cached plan available then it pics the cached plan so it degared performance.
    3. Don't use sp_ prefix: sp_ format is used in master database for procedures. For sp_ pattern sql first searches sp in master database then in current session db, this degrade performance.
    4. Use 1 instead of column or * : When we need to check whether a record is exist or not.
      IF EXISTS (SELECT * FROM Emp where name like '%Ram%') --Avoid
      IF EXISTS (SELECT 1 FROM Emp where name like '%Ram%') --Recmmonded
    5. Use sp_executesql procedure for dynamic queries: This procedure supports parameter. A cached plan can be reused for sql queries also but if there is no change in query (single character) even of spaces. with sp_executesql you can pass parameters so query remain unchaged if you change parameter value
      Ex.
      --Avoid
      SET @Salary = 25000
      SET @Query = 'SELECT * FROM dbo.tblEmp WHERE salary > ' + @salary
      EXEC (@Query)
      --Recommended
      SET @Query = 'SELECT * FROM dbo.tblEmp WHERE salary = @salary'
      EXECUTE sp_executesql @Query, N'@salary int', @salary = 25
    6. Avoid Cursors: Use while loop wherever possible in place of cursor as cursor consumes more sql resources.
    7. Keep Transaction short as short as possible: Transaction uses locks that blocks other executions it degrades performance, so keep transaction shorter.

    Tuesday, May 3, 2016

    Difference b/w asmx web service and WCF service

    Difference b/w asmx web service and WCF service

    Term
    Web Service
    WCF service
    Protocol
    Http only
    Http, TCP, MSMQ, NamedPipe
    Security
    Limited (Protocol security only)
    Vast (Protocol, transactions, secure messaging)
    Hosting
    IIS only
    IIS, WAS, Self-hosting
    Serializer
    XML only
    Data contract serializer
    Duplex
    One way
    Two way request response (Duplex)

    WCF Bindings

    There are various binding supported by WCF -

              Old Client Support
    1. basicHttpBinding : Its designed to replace old ASMX web service. Supports Http and Https. Its specifically usefull to support SOAP 1.1. It doesn't support WS-* specifications like WS-Addressing, WS-Security, WS-ReliableMessaging

      Featured Internet Communication
    2. wsHttpBinding : This binding supports WS specifications, so its provide more security and reliable messaging. By default SOAP messages are encrypted. Support sessions. Supports Http and Https.
    3. wsDualHttpBinding : Its same like WSHttpBinding with support of duplex communication. It supports MEP (Message Exchange Pattern). Service as well can communicate to client via callback.
    4. wsFedratedHttpBinding : Its specialized form of WS binding with fedrated security.
    5. webHttpBinding : This binding is used to make Restful wcf service.

      Single Computer
    6. netNamedPipeBinding : It is usable when service resides in single computer only.

      Same Business Network (Intranet)
    7. netTcpBinding : It can be considered as enhancement over .Net Remoting. Uses Tcp binding. It provide security and reliable message transfering. Supports sessions. It provide best performance because both the ends have same .net technology. It uses Binary encoding of messages for transport.
    8. netPeerTcpBinding : Its same like NetTcp with peer to peer communication scenario.

      Disconnected Communication
    9. netMSMQBinding : When you required that your service can work in disconnected scenario (Without establishing communication channel).
      It creates queue for messages and pick messages to process from queue. It provide secure message queuing.
    WCF bindings
    Binding
    Protocol/
    Transport
    Message Encoding
    Security
    Default Session
    Transaction
    Duplex
    BasicHttpBinding
    Http, Https
    Text
    None
    No
    -
    -
    WSHttpBinding
    Http, Https
    Text
    Message
    Optional
    Yes
    -
    WSDualHttpBinding
    Http, Https
    Text
    Message
    Yes
    Yes
    Yes
    NetTcpBinding
    TCP
    Binary
    Transport
    Optional
    Yes
    Yes
    NetNamedPipeBinding
    Named Pipe
    Binary
    Transport
    Yes
    Yes
    Yes
    NetMsmqBinding
    MSMQ
    Binary
    Transport
    Yes
    Yes
    No
    WSFederationHttpBinding
    Http, Https
    Text
    Message
    Yes
    Yes
    No
    NetPeerTcpBinding
    P2P
    Binary
    Transport
    -
    -
    Yes


    Scenarios to choose Binding
    • If service to be consumed by clients compatible with SOAP 1.1, use basicHttpBinding for interoperability
    • If service to be consumed within the corporate network, use netTCPBinding for performance
    • If service to be consumed over the internet and the client is a WCF compatible, use wsHttpBinding to reap full benefits of WS* specifications
    • If service to be accessible only in the same machine, use netNamedPipeBinding
    • If service to be queue messages, use netMsmqBinding
    • If service to act as server as well as client in a peer to peer environment, utilise netPeerTcpBinding setting

    CI/CD - Safe DB Changes/Migrations

    Safe DB Migrations means updating your database schema without breaking the running application and without downtime . In real systems (A...