Patterns & Systems Flashcards

1
Q

What is the Java process?

A
  1. Developers write the source code.
  2. The code is save to a .java file.
  3. javac compiles the source code into Bytecode and saves into a .class file.
  4. JVM interprets the code and executes on a specific platform.
  5. The JVM creates machine code at runtime
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe the DAO pattern?

A
  1. It starts with a data object that acts as a datatype that represents a row of data returned by the queries.
  2. That data object is then used by the DAO interface which defines methods for the CRUD operations.
  3. JDBCDAO implementation class implements the methods in the DAO interface and takes a DataSource as a constructor argument and encapsulates the interactivity using the datasource.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is Web Service Request Process?

A
  1. User interacts with the frontend and sends information to the web server.
  2. The web service gets the information from the file system and database.
  3. The information is sent back to the frontend and displayed to the user.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the MVC pattern?

A

Model View Controller (MVC) is a pattern that divides the application based on responsibility.

  • Model
  • application state and business logic
  • part of the application that talks to the database
  • Model could be classes
  • View
  • presents data to user
  • accept input from user
  • Views might be a desktop display, a mobile display, a file output based on a model
  • The View is not the output HTML/UI that displays in the browser or device, it is the code that generates the response.
  • Controller
  • Takes input from the view and passes it to the appropriate model objects
  • Grabs all necessary building blocks and organizes them for the output
  • Takes results from the model and passes it to the appropriate view

The end result is that the Model and View are unaware that the other exists. This decouples the Model and View.

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

What is the DNS?

A

The Domain Name System (DNS) is a distributed directory that resolves human-readable hostnames, such as www.techelevator.com, into machine-readable IP addresses like 50.16.85.103.

  1. When a user enters a domain name into the browser it gets sent to the DNS.
  2. If the domain is not in the cache then it sends the domain to another server,
  3. Once the domain is found in the cache it gets the ip address.
  4. It saves the ip address to the cache.
  5. The DNS then establishes a connection and the website displays.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly