Final Review - Everything Flashcards

These are all topics that we covered in class. Most of them are lifted directly from your resume! Focus on these first-- you should be able to talk confidently about all of these.

1
Q

What is ASP.NET?

A

ASP.NET is a framework that allows us to create applications for the web. We build API’s and MVC applications in ASP.NET. The only thing we built in the server-side half of the course that DIDN’T use ASP.NET was our command line applications that ran in the terminal.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is ADO.NET?

A

ADO.NET is a database interface tool that uses raw SQL to query the database. ADO.NET has very little magic/ abstraction. You have to write a lot of code, but it’s extremely fast.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Did you use .NET Core?

A

Technically no– .NET Core is the cross-platform framework for C#/.NET (cross platform just means you can build apps for OSX and Linux, not just Windows.) .NET Core was basically eliminated in .NET 5.0, which is what we used. Moving forward, all versions of .NET will be cross platform and we won’t need to distinguish .NET Core. https://docs.microsoft.com/en-us/dotnet/core/about

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is OOP? (See if you can name the four pillars)

A

Object Oriented Programming is a style of programming that uses objects to represent data in your code. The four pillars are inheritance, abstraction, encapsulation, and polymorphism`

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What version control system did you use?

A

We used the command line interface for git for version control, and we used GitHub for collaboration. (Git is what tracks changes on your local machine, GitHub is a hosting service for git repos and allows you to make Pull Requests and stuff)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is DRY code? Why is it best practice?

A

DRY stands for “Do Not Repeat Yourself”. This means that if you find yourself writing the same code more than once, you should refactor it into a function or method so that it’s reusable. This makes your code more efficient and much easier for other developers (and you!) to read and change.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is an ERD? Why are they helpful?

A

ERD stands for entity relationship diagram. ERDs map the relationships between your tables in a database. They help the whole team get on the same page with data structure and provide a point of reference throughout the project.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the MVC design pattern?

A

MVC stands for Model, View Controller. We build MVC applications in ASP.NET, but a lot of frameworks use MVC. Models represent the tables in your database, views present that data to the user, and controllers are in charge of controlling the signal flow through the application– in our case, they accept HTTP requests from a client, query the database, map the data to our models, and then send it to the views

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What experience do you have with SQL?

A

We used T-SQL (Microsoft’s specific flavor of SQL) with SQL Server. We primarily used SQL in tandem with ADO.NET, which is a database tool in .NET core and allowed us to write complex SQL queries to load data into our web applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is a RESTful API?

A

RESTful stands for Representational State Transfer. Generally, this means that the API is in charge of representing the current ‘state’ of the database to the client. (The state of the database just means what data is in there at the time of the request.) A RESTful API sends data back as JSON. (Some other API architectures, like SOAP, send data back as XML.)

There are some technical rules that an API is SUPPOSED to fulfill in order to be considered truly RESTful, but very few actually fulfill all of them. The rules are from a guy named Roy Fielding’s dissertation. Amaze your friends and control your enemies with this information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are hooks in React?

A

Hooks are functions that allow you to “hook into” React state and life cycle features. So for example, we used “useState()” to manage state in our components and “useEffect()” to load data into our components after the initial render

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you update the user interface in React?

A

In Vanilla JS, we might select the element with a document.querySelector() and then replace its contents. In React, we used useState() to set and change the state of the component. Changing state triggers a re-render, which updates the DOM to reflect the current state of the component.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the virtual DOM in React?

A

The virtual DOM is what makes React super fast! When you set state in a component, React constructs a virtual “copy” of the real DOM and compares it to the real DOM. It pinpoints what exactly needs to be changed in the real DOM, and then goes in and changes only those things.

(In Vanilla JS, we often had to clear the whole container and reprint everything, which caused the weird flash and slowed us down)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are some data types we used in JavaScript?

A

The primitive data types in JavaScript are string, number, boolean, null, undefined, symbol. We didn’t work with symbols at all. We did work with composite data types, such as objects. Objects can hold combos of other types of data types. Technically arrays and functions are also types of objects in JavaScript.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What’s the difference between == and === in JavaScript?

A

A double equals will compare a string of “1” and a number 1 and find them equal through a process called type coercion. (JS will try to ‘coerce’ the string of “1” into a number.) A triple equals will find them not equal because they’re different data types. Triple equals is also called “strict equals”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is abstraction?

A

Abstraction refers to a simple interface that does a complicated thing.

Example: in Entity Framework, we can write _context.Orders.ToList() and get a list of all our orders. Under the hood, Entity is writing a SQL query, reading the raw data, mapping it to our Order model, and adding it to a list. (We did all these things in ADO.NET!) We don’t have to see or think about all of that complexity, because Entity framework has abstracted it away.

17
Q

What is encapsulation?

A

Encapsulation refers to hiding data in private fields so that it’s harder to mess up.

Example: let’s imagine we had a class called Cohort that contained a list of students. We ONLY want to add a student to our list IF a) the cohort has less than 20 people and b) the student is approved for admission. If we make our list of students public, any developer in our code base can add any student, even if they don’t meet those conditions. If we make it private (i.e. if we ENCAPSULATE it in our Cohort class), we can write a public method that will add a student to a class only if our two conditions are met.

The private list of students is an example of encapsulation. The method that determines if they can be added or not is an example of abstraction.

18
Q

What is inheritance?

A

Inheritance refers to one class acquiring properties and methods of another class. For example, we might make a Person base class and have Student and Instructor inherit from it so that we don’t have to write out all the same properties twice. This cuts down on the code we have to write and makes our code more reusable.

19
Q

What is polymorphism?

A

Polymorphism means “many forms”. In OOP languages, classes and methods can occur in many forms. Example one: a Parrot class and a Toucan class can both implement a Bird interface in different ways, which means that the Bird interface occurs in many forms. A controller in ASP.NET can have two methods called Create, one that loads a create form and one that accepts data from a Create form. The create method occurs in many forms.

20
Q

How are namespaces used in C#?

A

Namespaces let us organize our code and divide it into distinct sections. A class name declared in one namespace wouldn’t conflict with a class named the same thing in another namespace. We can have nested namespaces (such as Bangazon.Models).

The using directive allows us to alias namespaces that are built into the .NET ecosystem. For example, every time we wanted to use a List we COULD type out the full name with its namespace:

System.Collections.Generic.List listOfStuff = new System.Collections.Generic.List();

But that’s a mouth full! Instead, we can add a using directive:
using System.Collections.Generic

And that allows us to “alias” everything in that namespace (it means we don’t have to type out the full thing and can can just start with the word List).

21
Q

What is JSON data?

A

JSON stands for JavaScript Object Notation. JSON data is laid out like a stringified JavaScript object and is used to communicate between different programming languages.

When a browser and a server exchange data, the data can only be sent as text. Sometimes the server sends back HTML (in the case of our MVC web apps). Sometimes the server sends back JSON (in the case of our API’s).

We used JSON to send and receive data from APIs. We also used JSON-Server, which is a mock RESTful API (but a separate tool, and not to be confused with regular old JSON).

22
Q

What is json-server?

A

JSON-Server is a mock RESTful API that’s mostly used for prototyping. For example, if you’re a front end developer and need to build a client-side application, and the server side developer are still working on the real API. You need a way to load data into the app before the real API is up and running. JSON-server lets you build a fake API quickly so that you can work with dummy data. We used it as a learning tool, but that’s generally what it’s used for in the real world.

23
Q

What are Razor Views?

A

Razor views use markup syntax to build HTML pages in C#/.NET. Razor views are an example of server-generated HTML, which means the C#/.NET code running on the server decides how the web page should look and what should be displayed and then sends a finished product to the server. In what we used, Razor Views were the “V” in MVC apps. (Model, View, Controller).