Midterm Review Flashcards

1
Q

What part of the Spring family of software products will we be using for server-side development?

A

Spring Boot

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

T/F The Spring Framework contains Java EE APIs

A

True

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

T/F The Spring Framework can replace the need for Java EE

A

True

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

What framework will be installed next class to look after the client-side programming?

A

Angular

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

What is different about the architecture this course will use than what was used in a traditional Java EE app?

A

Traditional was server-side rendering using JSF or equivalent, SPA for the view in this course

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

What is Spring Initialzr?

A

A web application that can generate a Spring Boot project structure for you

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

What 5 templates did we choose for Spring Initialzr?

A

Spring Web, Lombok, Spring Data JPA, H2 Database, Rest Repositories

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

What extension was added to make our Employee class code more concise?

A

Lombok

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

What annotations were found in the Employee domain class?

A

@Entity, @Data, @RequiredArgsConstructor, @Id, @GeneratedValue

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

What annotations were found in the EmployeeRepository class?

A

@Repository, @RepositoryRestResource

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

What relational database are we using in this course?

A

H2

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

What are some characteristics of this database?

A

In memory, fast, doesn’t retain changes

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

What intrinsic file did we use to house the populating of the employee data into the database?

A

data.sql

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

What file was populated to provide the datasource meta-data (e.g., username, password…) for the H2 database?

A

application.properties

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

What is Maven?

A

Java Build Tool

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

What is the file pom.xml used for?

A

Houses dependencies for build

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

What Maven step created the executable .jar file that can be run outside of the IDE?

A

package

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

What was the name of the .jar file it created, and where did the name come from?

A

exercises-0.0.1-SNAPSHOT.jar, pom.xml

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

T/F: We can run a Spring Boot application without VSCode?

A

True

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

What framework will you be using client side?

A

Angular

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

What language will you be coding the client-side project in?

A

TypeScript

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

What does the language from q2 get compiled to?

A

JavaScript

23
Q

What command did you use to create the initial project?

A

ng new clientexercises –no-standalone

24
Q

How do you tell what version of the CLI you are using?

A

ng version

25
Q

What is the root “module” for an angular application typically called?

A

app.module.ts

26
Q

The notes describe a property called “selector” in the app.component.ts file, what other file is used in conjunction with this property?

A

index.html

27
Q

What styling framework will we be using?

A

Material-UI

28
Q

What command was used to install the needed Material-UI packages

A

ng add @angular/material

29
Q

How do I know I am using a material design component in my app’s html?

A

tag starts with <mat-

30
Q

What was added to the project so that app.module.ts didn’t get cluttered with material-ui modules?

A

a separate module to house just the material components

31
Q

What 3 colour names are found in a typical “Theme”?

A

primary, accent, warn

32
Q

What styling syntax is used to work with Themes?

A

scss

33
Q

Explain the difference between a module and a component in Angular

A

modules are made up from components tell what components can be used and how, components control the View

34
Q

Explain this line of code in employee.service.ts:
providedIn: ‘root’,

A

allows a service to be injected with the root application injector, allowing global usage

35
Q

What part of the application returns an Observable?

A

HttpClient call in Service

36
Q

What is also required along with the constant BASE_URL to make a complete REST call?

A

endpoint e.g. employees

37
Q

What did the EmployeeService expect to get back from the url:
${BASE_URL}/employees when doing an HTTP GET?

A

an observable

38
Q

What syntax can we use to iterate through an array in the template (html) code?

A

*ngFor =”let employee of employees”

39
Q

What syntax is used to dump an Angular expression to the browser?

A

{{ .. }}

40
Q

What is the syntax from q7 commonly known as?

A

interpolation

41
Q

What is the @Input annotation in Angular used for?

A

receive data in a child component from a parent

42
Q

Where and what did we use the @Input annotation for?

A

place the employee array in the employee list component

43
Q

What syntax did we use to load the data for the @Input (in the parent component)?

A

this.employees = payload._embedded.employees;

44
Q

What sub method did we run on EmployeeService.get in the EmployeeHomeComponent to obtain the actual data from the service?

A

.subscribe()

45
Q

What file did we edit to allow Cypress to utilize a mobile footprint?

A

cypress.config.ts

46
Q

What element did we alter as the loading point for our SPA?

A

<app-root became <app-exercises

47
Q

What error did we get when we first made the REST call from the client project to the server project?

A

CORS

48
Q

How did we solve it?

A

Added @CrossOrigin annotation on server repository

49
Q

What type does the routes constant (array that contains all of the applications routing info) have in app-routing.module.ts?

A

Routes

50
Q

What 2 properties are defined in each route in the routes array?

A

path, component

51
Q

What routing properties were bound with one way binding ([]) to the anchors in the menu (app.component.html)?

A

routerLink and state

52
Q

What is the purpose of this tag: <router-outlet></router-outlet>

A

Where routes get rendered

53
Q

Explain how the title is set in the toolbar

A

using setTitle (new in Angular 14), that we set in app.component.ts

54
Q

Explain how all the employee parts of the application are related

A

Employee service retrieves data from server, employee home component calls get method on service to obtain employee data with subscribe.
Employee home html loads list data via @Input annotation. List component displays all items.
EmployeeHome and EmployeeList are declared in the employee module.