SE - Implementation

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 66

SE - Implementation

Sessions 1-4
Introduction

● Dealing with:
○ Code
○ Data Storage
○ Infrastructure
○ Testing
○ Delivery
● Integration (CICD) and Management (DevOps, Configuration Management) of
the above
Topics to be covered

● Software Types
● Source/Version Control
● Tech stack analysis and selection; Database Design (ERD) and Selection
● Software Architecture (Types, Data Communication, Architectural Patterns,
ORM)
● Design Patterns
● DevOps and Deployment
● Collaboration (Maybe?)
Software Types
Basic Differentiation

Types:

● System (OS, Utility, Firmware, Driver, etc)


● Application
● Programming (PHP, Python, C++, etc)

--

Applications:

Generic Products vs Custom Applications


Generic Products vs Custom Applications

Generic Products: Custom Applications:

● Usually enterprise software ● For needs not addressed by generic


● Directed towards business process softwares
optimization ● Mostly mobile apps and for implementing
● Off-the-shelf implementation but can be non-conventional business processes
customized to an extent ● Or for development of products like
● IBM, Oracle, SAP, Sales Force, WordPress, MetaVerse, IoT, Blockchain, Game
etc Development, etc
● Architecture can NOT be modified
● Data communication usually happens via
APIs
Custom Applications

● Business/Corporate Websites
● Admin Portals/Dashboards
● eCommerce Websites
● Mobile/Tablet Applications (Native/Cross Platform)
● IoT interfaces
● Monitoring Tools
● Games
● AI/ML applications
● Product driven applications
● ERP/CRM - the difference?
Some widely used business processes
Development Activities

1. Design and set up the code architecture


2. Set up repositories and infrastructure access
3. Set up development, staging and production environments
4. Set up code structure (may use boilerplate)
5. Identify and configure data storage mechanisms and connections
6. Re-estimate activities based on the backlog
7. Start development of prioritized user stories/bugs/tasks
8. Implement unit tests
9. Refactor code if necessary
10. Merge code and test
11. Repeat the cycle from point 6-10 until closure
Development Roadmap - Sample
Source/Version Control
Commonly used terms

● GIT - a version control system


● GitHub/BitBucket - cloud based GIT applications
● Source Code
● Repository (MonoRepo/MultiRepo)
● Branch
● Commit - delta of code/new code
● Push/Pull
● Uncommitted changes - new code that has not been pushed
● Merge
● Conflict
● Pull Request
Mostly used practices/commands

https://www.geeksforgeeks.org/top-12-most-used-git-commands-for-developers/
Second Term - Assignment 1

Assignment: Using any code that you have done in the past or from the internet,
setup a repository on BitBucket. This will be your Master branch. Fork a new
Master 2.0 branch from the main Master branch and clone a development branch
from the main Master branch. Commit some changes to development branch and
create a pull request to the main Master branch.

Email me a screenshot of all the tracked changes using any tool. (SourceTree is
suggested)
Software Development
Types of Languages

https://www.geeksforgeeks.org/difference-between-programming-scripting-and-m
arkup-languages/

● Programming (Executable; needs to be compiled to machine code; for overall


tasks) - Java, C#, C/C++
● Scripting (does not need to be compiled; for specific tasks) - PHP, Python, Perl,
JS
● Markup (presentation) - HTML, CSS, XML
● Domain specific languages - SQL, DML, noSQL
Language Processors: Compiler, Assembler, Interpreter

Compiler: The language processor that reads the complete source program written in
high-level language as a whole in one go and translates it into an equivalent program in
machine language is called a Compiler. Example: C, C++, C#, Java.

Assembler: The Assembler is used to translate the program written in Assembly language
into machine code. The output generated by the assembler is the object code or machine
code understandable by the computer. Example: MIPS, x86, x86_64, (V8 Engine?).

Interpreter: The translation of a single statement of the source program into machine code
is done by a language processor and executes immediately before moving on to the next
line is called an interpreter. Example: PHP, Perl, Python and Matlab.
Some popular language stacks

● MEAN, MERN, MEVN


● LAMP/LEMP/LAPP (Linux, Apache, PostgreSQL, PHP)
● Dot Net (C#, Blazer)
Frameworks

Frameworks are large bodies of pre-written code to which you add your own code in order
to solve a problem. You make use of a framework by calling its methods, inheritance, and
supplying callbacks, listeners, or other implementations of the patterns.
● Frameworks vs Libraries
● Commonly used JS frameworks and libraries:
○ NodeJS
○ ExpressJS
○ VueJS
○ AngularJS
○ ReactJS
○ ReactNative
● Frameworks in Python: Django, Flask, Dash
● Frameworks in PHP: Yii, Ci, Laravel, Symphony
● Frameworks in Dot Net: SPA, Web Forms, MVC
Next Step: Choosing a framework, or not?

● What needs to be built?


● Requirements GAP analysis with what the framework has to offer
● Time allowed for the project
● Security concerns and Testing
● Resource availability
Technology selection is based on requirements

● Front End Development: JavaScript, HTML, CSS, ReactJS, AngularJS, Blade, Swift
● Backend Development: Python, C#, NodeJS, Golang, Java
● 2D Game Development: JavaScript or C#
● 3D Game Development: C# (Unity Engine) or C++
● Data Science/Machine Learning/Analytics: Python, R, Clojure, Julia
● Math & Scientific Computing: Matlab, FORTRAN, ALGOL, APL, Julia, R, C++
● Big Data: Java, Python, R, Go, Scala, Clojure
● Operating Systems: C, C++
● Distributed System: C, Go, Rust
https://www.geeksforgeeks.org/how-to-choose-a-programming-language-for-a-project/
https://medium.com/@coderacademy/how-to-choose-the-right-programming-language-fo
r-your-project-b84b8304dffe
Questions to Ask When Choosing a Programming Language

● Does the language have proper ecosystem support? Is it going to work for the long haul? Is
vendor support available for the language?
● What is the environment for the project (web, mobile, etc)?
● Do we need to consider some infrastructure such as new hardware? What kind of deployment
do we need?
● What’s the preference of the client?
● Any specific requirements for libraries, features, and tools for the programming language?
● Is the developer available to code in this language or do we need to hire new developers? Are
they experienced and comfortable in working with this language, or do they need to learn the
language quickly?
● What are some important constraints of this project? Time, budget, resources?
● What’s the performance consideration and is the languages suitable to accommodate this
performance?
● What’s the security consideration and do we need to use any third-party tool?
Term Project - Assignment 1:

Part 1: Create a SRS or a FSD for any project


idea that you may have. (You may think of
your FYP).
Part 2: Create a UML diagram for the
project. (If the project is big, you can make this for a
few features only)

Link to sample/template for the above:


https://drive.google.com/drive/folders/140
pZ3XqhPovkxx41JIB5cIOw6nPwMcCc?usp
=share_link
Data Source Selection and Design
Commonly used DS Types

● File store (Use: IoT)


● RDBMS
● NoSQL (non-RDB)
● Warehouse
● Caches
● Spatial Databases
● Graph DB (Neo4j)
● Blockchain
DB Design

Techniques:

● Normalization
● ERD

ERD:

https://www.smartdraw.com/entity-relationship-diagram/
Steps for DB Design - (Less redundancy, greater accuracy)

1. Define Objective
2. Locate and consolidate necessary data
3. Convert data items into columns
4. Identify primary keys
5. Identify relationships
6. Dry run scenarios to optimize the design
7. Apply normalization to further optimize the design

https://www.astera.com/type/blog/all-you-need-to-know-about-database-design/
Term Project - Assignment 2

Part 1: Set up your project on confluence and upload your documents there. Add me
as your teammate to confluence. (rayyan.182@gmail.com)

Part 2: Prepare a project roadmap (around 10-15 weeks) on Jira.


Software Architecture
A software architecture is the structure or
structures of a system, which comprise
elements, their externally-visible properties,
and the relationships among them
Commonly used

● Standalone Arch
● Client-Server Arch - Centralization (one server, multiple clients)
● Microservices Arch (small functions for each service)
● Monolithic Arch (All functions within one service)
● Service Oriented Arch (Combines repeatable business activities but can contain
further services)
● Layered Arch (modular; structured; request goes top-down, response is bottom-up)
● Event Driven (Observer) Arch - (Activity based on response)
● Microkernel Arch (Core System and Plug-in modules) - Eg: IDE (Eclipse)
● Serverless Arch
● Distributed Arch
Data Communication
Need to communicate data

● Within a software application - variables, queries, classes, data models, etc


● Between software applications - direct queries, APIs (REST vs SOAP), RPA

Other topics to cover:

● How do APIs work?


○ Routes (api/{controller}/{id}), Endpoints (https://api.twitter.com/2/tweets/{id})
○ Methods: GET, POST/PUT (Used to make sure data is not updated/altered again), DELETE, etc.
● On-Demand vs Real Time (Sockets)
● Content Delivery Networks
Design Patterns
https://cs.lmu.edu/~ray/notes/designpatterns/
Definition

Design patterns are programming language independent strategies for solving a common
problem. That means a design pattern represents an idea, not a particular implementation.
By using design patterns, you can make your code more flexible, reusable, and
maintainable.
Singleton Pattern:
In many real-world situations, we want to create only one instance of a class. For example,
there can be only one active president of a country at any given time. This pattern is called a
Singleton pattern. Other software examples could be a single DB connection shared by
multiple objects as creating a separate DB connection for every object is costly. Similarly,
there can be a single configuration manager or error manager in an application that handles
all problems instead of creating multiple managers.
Types

https://www.geeksforgeeks.org/introduction-to-pattern-designing/

https://sourcemaking.com/design_patterns

--

● Creational - Class or Object creation


● Structural - Organizing classes or objects to achieve new functionality eg: two
interfaces conflict, a pattern will be used to convert one of these to what is
expected by establishing a connection via an ‘adapter’ (Adapter Pattern)
● Behavioural - Communication between objects
Types explained
● Singleton
● Abstract Factory - Create abstract class to combine related classes (Different classes to convert html pages
different in different formats (PDF, Word, etc), create an abstract class to combine these)
● Factory - Lets subclasses decide which classes to instantiate (Mold is a subclass for Cars, the Molds class will
decide which ‘type of car’ object will be instantiated during execution
--

● Adapter
● Decorator - Flexible alternative to subclasses for adding optional functionality (auto aim functionality in
shooting games, goal was to enable shooting, including an interface to include aim functionality is a decoration)
● Facade - A high level interface to subsystems (Querying into articles for different departments (Sales,
Marketing, SCM, etc)
--

● Observer - Establishes one-to-many relationship between objects. When one changes, all dependants are
notified. (A new order is placed, related departments get automatically notified of the update)
● State - Vending Machine (Input money, either get change or no change)
Principle approaches to Design

● DRY - Don't Repeat Yourself - Remove redundancies, use only the ‘required’
design patterns. Don’t create ‘technical debt’
● KISS - Keep It Simple, Stupid - Minimilaism (Do not overcomplicate)
● YAGNI - You Aren’t Going To Need It - Develop something only when it's
needed, don't foresee something that ‘might be’ useful in the future
Architectural Patterns
Architectural Patterns (part of Design Patterns)

Software design patterns are based on building reusable arrangements of modules and
their interconnections. These modules are typically classes or objects represented in a
UML design diagram. However, when you look at modern architectural patterns, the
modules are larger, self-executing processes spread across distributed systems.
Some Links:
https://www.redhat.com/architect/14-software-architecture-patterns
https://towardsdatascience.com/10-common-software-architectural-patterns-in-a-nutshe
ll-a0b47a1e9013
https://ably.com/topic/pub-sub
Commonly used

● MVC - No conflict b/w M, V & C


(https://www.redhat.com/architect/5-essential-patterns-software-architecture#MVC)
● MVVM
○ Controller vs ViewModel - MVC has one-to-many relationship between Controller and View
while MVVM has one-to-many relationship between View and ViewModel
● Pub-Sub (For async communication, eg: distributed caching - Kafka, RabbitMQ)
- Airline ticketing (seat booking in a distributed system)
● Sharding - Data Source Specific
(https://www.redhat.com/architect/pros-and-cons-sharding)
Sharding:
Object Relationship Mapping (ORM)
Definition

Object Relational Mapping is a technique that lets you query and manipulate data
from a database using an object-oriented paradigm. An ORM library is a completely
ordinary library written in your language of choice that encapsulates the code
needed to manipulate the data, so you don't use SQL anymore; you interact directly
with an object in the same language you're using.
Types and Uses

https://stackoverflow.com/questions/1279613/what-is-an-orm-how-does-it-work-
and-how-should-i-use-one

https://www.educba.com/what-is-orm/

https://en.wikipedia.org/wiki/List_of_object%E2%80%93relational_mapping_softw
are
Term Project - Updates

Now since you all should have completed your individual assignments, form groups
of 2 or 3 and complete assignment 4 and onwards in your group.

Discuss your ideas within your group and pick one based on group discussion.

Final submission by Dec 10th midnight


Term Project - Final Assignments

Technical Summary: Which architecture would you use for your project and why?
Would you use any design pattern? Why is your architectural diagram the way it is?

Final Project deliverables:

1. FSD or a BRD
2. UML
3. Project Roadmap on Jira and project documents submission on Confluence
4. Technical Summary of the project
5. Architectural Diagram
6. Test Case Document
Deployment
Application vs Infrastructure

Basic Intro:

https://shehackspurple.ca/2021/12/30/the-difference-between-applications-and-i
nfrastructure/
Deployment Pipeline

https://www.bmc.com/blogs/deployment-pipeline/
Roles and differences (DevOps vs SRE vs Platform Eng.)

https://humanitec.com/blog/sre-vs-devops-vs-platform-engineering
What is a DevOps Pipeline

https://www.atlassian.com/devops/devops-tools/devops-pipeline

https://www.bmc.com/blogs/deployment-pipeline/
Dockers/Container

What is a container:

https://www.bmc.com/blogs/what-is-a-container-containerization-explained/

Containerization vs Virtualization:

https://www.tutorialspoint.com/difference-between-virtualization-and-containeriz
ation
Configuration Management

User a platform to automate, monitor, design and manage otherwise manual


configuration processes:

https://www.bmc.com/blogs/devops-configuration-management/

Steps:

● Identification
● Control
● Audit
Bonus Assignment

Set up your project on any CICD tool and share screenshots/video via email.
---
Software Eng. best practices

https://www.thinkful.com/blog/software-engineering-best-practices/
Glossary of important terms
Infrastructure - a set of fundamental facilities and systems that support the sustainable functionality of your applications.

Container - an isolated environment where an application can run based on all the necessary components and dependencies packed inside,
thus, containerization - the process of packing an app into containers and filling them with all necessary stuff in order to work flawlessly.

Microservices - is a design approach to complex programs or services in breaking the system into independent small services and
components.

Kubernetes (k8s) - is a tool for management and launching of containerized apps in the frameworks of declared configuration of
containers.

Serverless - is a concept of computing resources management where you buy only computing time for your functions on the cloud and
everything else is a headache of a cloud provider.

fPaaS (Function Platform as a Service) - providing a set of interconnected functions for computing, data processing, and storage on the
platform (in particular, a cloud one), was popularized by AWS Lambda.

IaaS (Infrastructure as a Service) - providing virtualized cloud computing resources connected and managed by cloud providers to run your
virtual machines.

You might also like