Introduction

Created

Software Engineering

Software Engineering is "the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software."

Object-Oriented Software Engineering is about developing software that others can understand, maintain, and grow.

Product Discovery

Product Discovery is understanding what a sofwtare project's requirements are. It results in "software requirement specification"

A functional requirement is a single thing that a software has to do

  • A books app allows adding new book entries and keeps a record of them.

A non-functional requirement defines how a system is supposed to be.

  • A books app should be highly available.
  • A books app should be user friendly and easy to use.

Stakeholders involve person with a specific interest in and knowledge of the software product to be specified.

  • During product discovery, speak with all steakholders and involve them in defining the software requirements.

Client-Server Architecture

Client-server is a software design architecture which breaks down software into two parts:

  • client-side: the application that runs on the end-user computer. It provides a user-interface that handles what the application feels and looks like and how it interacts with the end-user. It may employ and consume resources on the user's machine (computing device).
  • server-side is the application that receieves requests from the clients, and contains the logic to send the appropriate data back to the client. Instead of a UI, it has an application programming interface (API). It often includes a database that persistently stores all of the data for the application.

The benefit is that you are free to build what ever UI on whatever platform you want.

In a client-server model, the software (system) that sends a request is the client, and the one that responds to the request is the server.

API

An application programming interface allows one software application to "talk" to another. It's a set of rules (protocol) that allows two software systems to be linkd regardless of differences in internal processes, structure, or design.

A common protocol is HTTP, or Hypertext Transfer Protocol. It is the foundation of any adta exchange on the Web. It functions as a request-response protocol in the client-server computing model.

  • When you enter a URL in a browser application (client), it sends a request to fetch the HTML document that represents the website. The request travels through the internet until it reaches a server, which processes the request, retrieves the requested resource, performs necessary actions, and sends the respones back to your browser in HTTP.
  • The four basic HTTP verbs (operations) are GET, which retrieves a specific or group of resource by ID; POST, which creates a new resource; PUT, which updates a specific resource (by id), and DELETE, which removes a specifc resource by ID
  • In addition to an HTTP verb, an HTTP request consists of a header that allows the cliet to pass along information about the request, a path to a resource, or a message
  • An HTTP API is any API that uses HTTP as their transfer protocol.

CRUD

CRUD stands for the four basic operation we perform on data stored in a dataase.

  • Create
  • Read
  • Update
  • Delete

It corresponds to the HTTP methods.

REST

Representational State Transfer (REST) architecure style is a common practice to separate the Client and Server.

  • The implementation of the client and server are done indepedently without each knowing about the others.

REST-compliant systems are called RESTful systems, and RESTful APIs are APIs that conform to REST style. These are stateless because the server doesn't need to know about what state the client is in.

HTTP fits well with the REST style since the client and server communicate through sending messages, and they can understand the messages without seeing previous messages.

  • RESTful APIs using HTTP is common, which is why people think they are the same thing.

Postman

Postman is an API Development Environment (ADE) for desigining, documenting, testing, and interacting with web APIs.

Software Stack

A software stack refers to the components used to build an application, like programming language, frameworks, database systems, runtime environment.

The MERN stack (MongoDB, Express.js, React.js, Node.js) is a popular, free and open-source JavaScript software stack for bulding dynamic websites and web applications.

If you are uncertain about the end product, go for web application or cross-platform technology stacks, like Facebook's React Native (JS), Googles Flutter (Dart), Microsoft's Xamarin (C#).

See what stacks companies use here

JSON

JavaScript Object Notation is a lightweight data representation format used for APIs and configs.

Types:

  • String "dog"
  • Numbers 10, -30, 1.2e10
  • Boolean true, false
  • null null
  • Arrays [1,2,3]
  • Objects {"key": "value"}

Examples

Create a file with .json extension.

{
	"name": "Kyle",
	"favoriteNumber": 3,
	"isProgrammer": true,
	"hobbies": ["weight lifting", "bowling"]
}
[
	{
		"name": "Big Corp",
		"numberEmployees": 10000,
		"rating": 2.6
	},
	{
		"name": "Small Startup",
		"numberEmployees": 3,
		"rating": null
	},
	
]

In JavaScript, access the JSON object:

let jsonObject = JSON.parse(jsonString) // converts json string to a javascript object
console.log(jsonObject[1].name) // prints Small Startup