Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray authored Mar 26, 2023
2 parents cb8fae5 + 3e01a98 commit 2a1df67
Show file tree
Hide file tree
Showing 30 changed files with 1,646 additions and 4 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,28 @@ Following files are present in this directory. You may contribute to any of thes
Potential Topics--

- Tech stacks
1. [Nuxt3](https://github.com/learning-software-engineering/learning-software-engineering.github.io/blob/main/Topics/Tech_Stacks/Nuxt3.md)

Nuxt.js provides server-side rendering, automatic routing, code organization, and pre-configured plugins. It can be used to create applications quickly and easily.

2. Django
1. Django Rest Framework
3. Salesforce API

4. CSS (Cascading Style Sheets)

5. TypeScript

6. JavaScript

- Software Tools
1. Git
1. Git Workflows
- Software Engineering
1. Methodologies & Frameworks
1. Agile
1. Scrum
1. User Stories
2. Kanban
3. XP
2. Waterfall
Expand Down Expand Up @@ -46,11 +61,13 @@ Potential Topics--
3. Firebase
4. Digital Ocean
5. Software development best practices:
6. Vercel Frontend Deployment (Automated)
1. Designer Patterns
2. Clean Coding
1. Choose a coding style and stick to it
3. SOLID Principles
4. Code Smells
5. QA testing
- Professionalism
1. Customer engagement
1. Meeting best practices
Expand All @@ -65,6 +82,8 @@ Potential Topics--
1. Overview
2. Areas of User Experience
3. Helpful Courses
4. User Experience Orientated Games
- Product Management
1. Beginner's guide to product management and becoming a successful product manager
- Other useful resources
- Teamwork
40 changes: 40 additions & 0 deletions Topics/Development_Process.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
## Resources for Development Process

### [Django Project Deployment: AWS, Vercel, and Railway](./Development_Process/Django_Deployment_AWS_Railway_Vercel.md)
### [Automated Frontend Deployment with Vercel](./Development_Process/Frontend_Automated_Deployment_Vercel.md)
### [Quality Assurance Testing](./Development_Process/QA_testing.md)
- [Automated Testing](./Development_Process/Automated_Testing.md)

### [Getting Started With Docker](./Development_Process/Docker.md)


## Build requirements
### [Requirements.txt](./Development_Process/Build_Requirements/Requirements_txt.md)

## React Testing Library
### [React Testing Library](./Development_Process/React_Testing_Library.md)

## SOLID PRINCIPLES:

SOLID is a mnemonic acronym that represents a set of five very important software development principles which lead to code that is easier to read, maintain, and extend, leading to higher-quality software that is easier to evolve over time.
Expand All @@ -24,3 +33,34 @@ The SOLID principles are:

## Resource that gives examples of the uses cases of SOLID principles
LINK : https://www.youtube.com/watch?v=_jDNAf3CzeY

## Clean Architecture:

A system's design that divides it into logical parts and specifies how those parts may communicate with one another is referred to as clean architecture. The objective is to make the software system easier to design, deploy, operate, and maintain while still keeping as many options open  for as long as possible.

Clean Architecture works on the well-defined division of layers. It is important to understand what the different layers are and which layers are allowed to interact with each other. The independence that clean architecute introduced to the a software system is vital since it reduces dependancies within the system. In clean architecture, the elements of the inner most layers should not have any information about the outermost layers. Anything declared in an outer layer must not be used anywhere within the inner layer of the code.

![image](https://user-images.githubusercontent.com/75923742/227027780-b5fbf347-ff78-49fa-a122-8f9ac4ef53d4.png)


Some of the layers are (Simplified):
- Business Rules:
- Entity: A component of our computer system that represents a condensed set of critical business rules that are applied to crucial business data.
- Use Case: Gives specifics on the input the user must supply and the output the system must deliver to the user. Additionally, it includes the processing steps required to create the result.

- Entities: Contains functions, variables, and other structures that hold the main objectives of our application, they must be general and have the highest level of rules.
- Interface Adaptors: Responsible for communicating between the layers, takes data in and transforms it such that it can be sent to lower levels.
- Framworks and Drivers: This section contains frameworks and databases responsible for communicating with the interface adapters.


This is only a simplification of what "Clean Architecture" is; the topic is so vast that there have been texts that have been dedicated to this topic. Some resources that can be beneficial in understanding and clearing up any doubts about the topic have been linked below.

- Text that goes into greater depth about each layer:
- https://dev.to/rubemfsv/clean-architecture-the-concept-behind-the-code-52do#:~:text=The%20main%20rule%20for%20Clean,elements%20of%20an%20outermost%20layer.

- Article Summarizing Clean Architecture (Examples and Code)
- https://pusher.com/tutorials/clean-architecture-introduction/

- A very detailed explanation of Clean Architecture by Robert C. Martin or Uncle Bob and his book
- https://www.youtube.com/watch?v=2dKZ-dWaCiU
- https://github.com/ropalma/ICMC-USP/blob/master/Book%20-%20Clean%20Architecture%20-%20Robert%20Cecil%20Martin.pdf
67 changes: 67 additions & 0 deletions Topics/Development_Process/Automated_Testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
### Automated Testing

Automated testing is an important part of industry software engineering development, and is
virtually present at all major companies. While in certain companies, this role will be covered by a
dedicated QA team, in others, it will be the responsibility of the developers themselves, e.g., at
Amazon. Regardless, understanding and being able to write unit tests is important for a SWE to be
able to communicate and standby their code.

The automated testing process is part of the wider build/development process and is usually run as
part of the CI/CD pipeline. The ultimate goal of automated testing is to ensure that the code
functions as expected, and that any changes to the codebase do not break existing functionality.

As background, most companies to implement their CI/CD pipeline with their Git implementation (of
which are usually internal), and so we will be talking about unit testing and integration testing
from the point of you pushing your code to a Git repository. So imagine that all of these tests will
be executed from the moment that you push your code to your project repository.

Further, there are usually "pipelines" for each project (e.g.,
[AWS CodePipeline](https://docs.aws.amazon.com/codepipeline/latest/userguide/welcome-introducing.html)),
and each of your code commits "flows" through your project pipeline. Generally, pipelines are
usually composed of a series of "stages" that are executed sequentially. For example, after some
cloud machine builds your code, the first testing stage might be to run the unit tests, and the
second testing stage might be to run the integration tests. These setups vary from project to
project, and you may be able to override passing criteria, but testing can lead credence to your
implementation, and can support allow your code to promote (pass on to) production.

![AWS CodePipeline Diagram](https://docs.aws.amazon.com/images/codepipeline/latest/userguide/images/pipeline-elements-workflow-application.png)

#### Unit Testing

Unit tests are meant to test your code commit(s) specifically, rather than dependencies and other modules that
may be present in the code base. So unit tests go well with the
[microservices architecture](https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/microservices).
The industry will use various frameworks for unit testing, depending on the stack, e.g., language.
For example, Python uses [unittest](https://docs.python.org/3/library/unittest.html), Java uses
[JUnit](https://junit.org/junit5/) or [Mockito](https://site.mockito.org/), and
JavaScript/TypeScript uses [Jest](https://jestjs.io/). A good choice is one that supports mocking,
spies, and other features that allow you to avoid testing 3rd party function calls (don't run them).
Instead you should assume some expected behaviour from 3rd party function calls, and write tests
that cover every "branch" of your code (code coverage). With that stated, some resources for the
most important parts of unit testing are:

- **Test Coverage**:
- Atlassian: [What is Test Coverage?](https://www.atlassian.com/continuous-delivery/software-testing/code-coverage)
- Microsoft: [Code Coverage](https://learn.microsoft.com/en-us/visualstudio/test/using-code-coverage-to-determine-how-much-code-is-being-tested?view=vs-2022&tabs=csharp)
- **Unit Test Cases**:
- Guru99: [Unit Testing Tutorial](https://www.guru99.com/unit-testing-guide.html)
- AWS Unit Testing: [Getting started with testing serverless applications](https://aws.amazon.com/blogs/compute/getting-started-with-testing-serverless-applications/)
- Coursera: [How to Write Test Cases: A Step-by-Step QA Guide](https://www.coursera.org/articles/how-to-write-test-cases)
- **Mocking**:
- Mocking in Python: [Mocking in Python](https://realpython.com/python-mock-library/)
- Mocking in Java: [Mockito Tutorial](https://www.vogella.com/tutorials/Mockito/article.html)
- Mocking in JavaScript: [A guide to module mocking with Jest](https://www.emgoto.com/mocking-with-jest/)

#### Integration Testing

Integration testing, in contrast to unit testing, is meant to verify that your code works with other components/modules/services. We want to test that overall the entire system works as expected. They often execute after setting a production-like environment, and integration test frameworks can differ between projects, but while there aren't really any ubiquitous integration testing specific frameworks, services like CircleCI can help automate the process, and [Selenium](https://www.selenium.dev/) is a popular tool for testing web applications. Some resources for the most important parts of integration testing approaches are:

- **General**:
- Guru99: [Integration Testing Tutorial](https://www.guru99.com/integration-testing.html)
- Educative: [What are the different approaches to integration testing?](https://www.educative.io/edpresso/what-are-the-different-approaches-to-integration-testing)
- **Big Bang Approach**:
- Educative: [What is big bang testing?](https://www.educative.io/edpresso/what-is-big-bang-testing)
- **Incremental Approach**:
- Educative: [What is incremental testing?](https://www.educative.io/edpresso/what-is-incremental-testing)
- **Sandwich/Hybrid Approach**:
- Educative: [What is the hybrid testing approach?](https://www.educative.io/answers/what-is-hybrid-integration-testing)
57 changes: 57 additions & 0 deletions Topics/Development_Process/Docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Learning Docker

## Table of Contents
### [Introduction](#introduction-1)
### [Installation](#installation-1)
### [Getting Started](#getting-started-1)
### [Next Steps](#next-steps-1)
### [Docker Terminology](#docker-terminology-1)

----

## Introduction

This article will help readers understand what Docker is, why it is used and provide resources on how to start using it. Docker is used by developers for many reasons, however, the most common reasons are for building, deploying and sharing an application quickly. Docker packages your application into something that's called a [container](#docker-terminology-1). This [container](#docker-terminology-1) is OS-agnostic meaning that developers on Mac, Windows and Linux can share their code without any worry of conflicts. Here's [Amazon's Intro to Docker](https://aws.amazon.com/docker/#:~:text=Docker%20is%20a%20software%20platform,tools%2C%20code%2C%20and%20runtime.) if you want to learn more.

----

## Installation

To start using Docker you will have to download Docker Engine. This is automatically downloaded alongside Docker Desktop (A Graphical User Interface for Docker) which I **strongly** recommend for beginners.
[Download Docker Desktop here](https://www.docker.com/get-started/)


For detailed installation instructions based on specific operating systems click here: [Mac](https://docs.docker.com/desktop/install/mac-install/), [Windows](https://docs.docker.com/desktop/install/windows-install/), [Linux](https://docs.docker.com/desktop/install/linux-install/)

----

## Getting Started

Once you've installed Docker, to see it in action you can follow any one of these quick tutorials:

- [Dockerizing a React App](https://mherman.org/blog/dockerizing-a-react-app/) (Simple and quick tutorial for containerizing a React App, contains explanations when needed. I recommend this if you want to quickly get something running plus see what the next steps look like)
- [Dockerize a Flask App](https://www.freecodecamp.org/news/how-to-dockerize-a-flask-app/) (Super detailed step-by-step explanations tutorial for containerizing a flask app. I recommend this if you want to understand the process in detail)
- [Docker's official tutorial for containerizing an application](https://docs.docker.com/get-started/02_our_app/) (Can't go wrong with the official tutorial.)

----

## Next Steps

Congratulations! you have successfully learnt how to Dockerize an app. In the process, you have learnt what is a `Dockerfile`, how to create a `Dockerfile`, how to build a Docker Container Image and how to start a Docker Container. Now what's next?

Now you might want a React Container to communicate with a containerized Flask API. How do we do this? This is where [Docker Compose](https://docs.docker.com/compose/) comes in. It allows you to define, and control multiple containers at once. Your next goal should be defining a `docker-compose.yml` for your project and see if you can get multiple services/containers to successfully communicate.

----

## Other Resources

Here's a [cheat sheet](https://docs.docker.com/get-started/docker_cheatsheet.pdf) of all useful Docker CLI commands and here's a [cheat sheet](https://devhints.io/docker-compose) for docker compose which should help you in your future endeavors. All the best!

----

## Docker Terminology
- **Container**: A package of code bundled by Docker that runs as an isolated process from your machine. The package of code can be pretty much anything, a single python file, an API, a full stack web application etc. A container is also referred to as a **containerized application**.

- **Image**: template with a set of instructions for creating a container. *(most of the times these are pre-built so don't worry too much about making one)*

Explained in Docker's own words [here](https://docs.docker.com/get-started/)
Loading

0 comments on commit 2a1df67

Please sign in to comment.