CDL Section 1 - Modern SW Dev Flashcards
What is the center point for all comms in modern SW applications?
API’s. They allow for communications between the different, siloed parts of the application.
What is an API’s main purpose?
To expose the functionality of an Application.
Therefore, documentation on the specific API that developers are looking to use is very critical, so that it can be set up correctly.
What is an API GW?
Communication from the different parts of the App communicate via API’s through the centralized API Gateway.
It acts like a traffic Hub for communications.
What are the 3 main types of languages/data formats that are used when communicating with APIs?
XML - verbose, hard to read. tags and triangle brackets
JSON - smaller, easier to read. curly/square braces and quotes
YAML - most minimalist, easiest to read. Great for Python. colons and spaces
What is the “Data Format” of an API?
What does the Data Format define?
Data formats are the foundation of API. They define the syntax and semantics, including constraints of working with the API.
A syntax is a way to represent a specific data format in textual form.
In YAML, XML and JSON - which data format has significance with the way it is spaced i.e spaces in the syntax?
YAML.
- JSON is irrelevant (except for spaces within quotes) i.e space versus “s p a c e”
- XML is both significant and insignificant.
What is an “Object” when talking about syntax in a Data Format?
An Object is a packet of information that has one or more attributes attached to it.
What is Serialization and Deserialization of code?
Code in a programming language, saved as a file, so that it can be transported over a network, and then de-coded on the other side.
Ex - You want to save an object constructed in your code written in Python to a file, giving it permanent storage. This way, you preserve the state of an object. You then transport this file to a device and have it translated to XML.
Most programming languages, like Python, have existing tools for working with various data formats; that’s how you can write code in Python and then use Serialization to convert the code into valid YAML/JSON/XML format for the machine you want to push the code to and also back the other way, from machine to script.
What is another name for taking code written in Python and converting it to XML/YAML/JSON?
DATA PARSING or FILE PARSING.
YAML and JSON parse exclusively to Python dictionaries. It’s called “YAML to Python dictionary” or “XML to dict”
REVIEW: Git and Github
→ While a central repository can still be used, every team member has their own copy of the project files. This copy is a complete copy of the full project, not just the files being worked on.
→ Git helps track every individual change by each contributor to prevent work from conflicting.
→ Typical Git workflow:
○ Directory initialization for Git
○ Adding a file
○ Committing a file to a local repository
○ Pushing a file to a remote repo
○ Updating a local repo by pulling changes from a remote repo
→ Git Terms:
○ Remote Repository - A remote repository is where the files of the project reside, and it is also from where all other local copies are pulled. It can be stored on an internal private server or hosted on a public repository such as GitHub, GitLab, or BitBucket.
○ Local Repository - A local repository is where snapshots, or commits, are stored on the local machine of each individual i.e your laptop.
○ Staging Area - The staging area is where all the changes you actually want to perform are placed. You, as a project member, decide which files Git should track.
○ Working Directory - A working directory is a directory that is controlled by Git. Git will track differences between your working directory and local repository, and between your local repository and the remote repository.
What is Git Branching? Why is it used?
A different instance of your repo that you can spin off from the main branch, work on, and the merge with the main branch again.
Creating separate branches for new features and bug fixes i.e an isolated environment away from the main code.