Skip to content

Instantly share code, notes, and snippets.

@DorukUlucay
Last active December 27, 2022 19:21
Show Gist options
  • Save DorukUlucay/62983e9e39c9bf531b4a035f5c894c43 to your computer and use it in GitHub Desktop.
Save DorukUlucay/62983e9e39c9bf531b4a035f5c894c43 to your computer and use it in GitHub Desktop.
sw dictionary

Micro frontends

  • Source: InfoQ

Micro frontends are intended to bring the same benefits of microservices to the UI layer. By breaking up a complex system into smaller, more manageable pieces,teams can rapidly develop and release new features and functionality.

Continuos Integration & Delivery & Deployment

Developers practicing continuous integration merge their changes back to the main branch as often as possible. The developer's changes are validated by creating a build and running automated tests against the build. By doing so, you avoid integration challenges that can happen when waiting for release day to merge changes into the release branch.

in summary: changes always integrated. their integrity tested. ready to deploy.

Continuous delivery is an extension of continuous integration since it automatically deploys all code changes to a testing and/or production environment after the build stage.

This means that on top of automated testing, you have an automated release process and you can deploy your application any time by clicking a button.

in summary: extension of ci. auto deploy to lower environments. one click deploy to prod.

Continuous deployment goes one step further than continuous delivery. With this practice, every change that passes all stages of your production pipeline is released to your customers. There's no human intervention, and only a failed test will prevent a new change to be deployed to production.

in summary: fully automated, trusted process.

https://www.atlassian.com/continuous-delivery/principles/continuous-integration-vs-delivery-vs-deployment

Access Modifiers

public

The type or member can be accessed by any other code in the same assembly or another assembly that references it.

private

The type or member can only be accessed by code in the same class or struct.

protected

The type or member can only be accessed by code in the same class or struct, or in a derived class.

private protected (added in C# 7.2)

The type or member can only be accessed by code in the same class or struct, or in a derived class from the same assembly, but not from another assembly.

internal

The type or member can be accessed by any code in the same assembly, but not from another assembly.

protected internal

The type or member can be accessed by any code in the same assembly, or by any derived class in another assembly.

static

The static modifier on a class means that the class cannot be instantiated, and that all of its members are static. A static member has one version regardless of how many instances of its enclosing type are created.

source: https://stackoverflow.com/a/614844/1397858

Abstract, Sealed, Virtual, Partial

Abstract class

is a restricted class that cannot be used to create objects (to access it, it must be inherited from another class).

Abstract method

can only be used in an abstract class, and it does not have a body. The body is provided by the derived class (inherited from).

source: https://www.w3schools.com/

Partial Class

A class defined in two or more files is called a partial class. The keyword partial is used to define the class. When working on large projects, spreading a class over separate files allows multiple programmers to work on it simultaneously. During compile time all the partial class are compiled into one type only.

Sealed Class

A sealed class is a class that cannot be inherited. Sealed classes are used to restrict the inheritance feature of object oriented programming.

Virtual method

A class can have a virtual method. The virtual method has an implementation. When you inherit from a class that has a virtual method, you can override the virtual method and provide additional logic, or replace the logic with your own implementation.

source: https://www.c-sharpcorner.com/forums/virtual-sealed-override-and-abstract-keywords

Arraylist

In C#, the ArrayList is a non-generic collection of objects whose size increases dynamically. It is the same as Array except that its size increases dynamically.

An ArrayList can be used to add unknown data where you don't know the types and the size of the data.source: https://www.tutorialsteacher.com/csharp/csharp-arraylist

P2P
Node
Single Point Of Failure
Single Point Of Truth
Decentralized
Distributed
Simplex, Half-Duplex, Full-Duplex
Web Socket
Tcp http ip
OSI

Cohesion

Cohesion refers to what the class (or module) can do. Low cohesion would mean that the class does a great variety of actions - it is broad, unfocused on what it should do. High cohesion means that the class is focused on what it should be doing, i.e. only methods relating to the intention of the class.

Good software design has high cohesion and low coupling.

Example of Low Cohesion:

-------------------
| Staff           |
-------------------
| checkEmail()    |
| sendEmail()     |
| emailValidate() |
| PrintLetter()   |
-------------------

Example of High Cohesion:

----------------------------
| Staff                   |
----------------------------
| -salary                 |
| -emailAddr              |
----------------------------
| setSalary(newSalary)    |
| getSalary()             |
| setEmailAddr(newEmail)  |
| getEmailAddr()          |
----------------------------

Coupling

It refers to how related or dependent two classes/modules are toward each other. For low coupled classes, changing something major in one class should not affect the other. High coupling would make it difficult to change and maintain your code; since classes are closely knit together, making a change could require an entire system revamp.

Good software design has high cohesion and low coupling.

Abstract and Interface

  • Abstract

    • identity of class
    • a class extends(or inherits) and abstract class
    • inheritance
    • declaration and definition of members.
    • a class can only inherit one class, hence one abstract class
    • supports public, private, protected, etc.
  • Interface

    • ability(s) of class
    • a class implements interface
    • composition
    • only declaration of members.
    • a class can implement more than one interfaces allowing mutliple inheritcance through polymorphism
    • everything is public
  • https://www.geeksforgeeks.org/difference-between-abstract-class-and-interface-in-c-sharp/

Parameter and Argument

  • Parameter is the variable in the declaration of the function.

  • Argument is the actual value of this variable that gets passed to the function.

public void MyMethod(string myParam) { }

...

string myArg1 = "this is my argument";
myClass.MyMethod(myArg1);

https://stackoverflow.com/a/156787 https://stackoverflow.com/a/156778

Fields hold value. Properties expose them.

//field
private int _someField;

//property
public int SomeProperty {
    get {
        return _someField;
    }

    set {
        _someField = value;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment