cards Flashcards
What is spring?
the most used JEE framework for building java applications
What are the benefits of spring?
- dependency resolution
- minimal configuration
- embedded server for testing
- bean auto scan
- health metrics
Whit what starts an anotation in spring?
@
Give the types of errors
- opening and installation errors
- compelation errors
- testing errors
- start-up errors
- runtime errors
- logical errors
What are opening ans installation errors?
Errors that are already vissible during opening of the project.
What are compelation errors?
errors that are vissible during programming (rood onderlijnd).
What are testing errors?
errors when a test doesn’t run or succeed.
What are start-up errors?
error when a programm doesn’t start when you want to run it.
What are runtime errors?
error when a programme runs and chrashes at the start or during execution.
What are logical errors?
when a programme doesn’t give the excpected result
With wich kind of errors can the debugger help?
runtime errors and logical errors
Welke http statussen komen er voor bij runtime errors en wat houden deze in?
404 -> foute HTTP request
500 -> In de controller wordt er verwezen naar een html pagina die niet bestaat.
Welke http statussen komen er voor bij thymeleaf errors en wat houden deze in?
500 -> $ of @ vergeten voor de {}
Wat zijn lambda expressions?
Lambda expressions are functions that can be passed around as arguments.
Geef de syntax van een lambda expressie
(a,b) -> {}
wat is (a,b) in een lambda expressie?
argument list
-> de haakjes zijn niet nodig bij 1 argument
wat is -> in een lambda expressie?
arrow teken
-> passes parameters to the body
wat is {} in een lambda expressie?
body
-> implementatie
Geef de eigenschappen van een list.
- collection
- store/holds data
- several iterations
- modifiable
- iterated externally using loops
- set, list, map, …
Geef de eigenschappen van een stream.
- no collection
- not store data -> operates on collection
- 1 iteration
- not modifiable
- iterated internally by mentioning the operation
- filter, map, collect, …
Schrijf REST voluit.
Representational state transfer
Wat is REST?
somthing that allows one piece of software to talk to another piece of software over the http protocol.
Geef de eigenschappen van een REST API
- platform-independent
- laguage-independent
- uses http for calls
Geef de syntax van een REST request
‘http verb’ ‘header’ ‘path’
Wat is een http verb?
get, post, put, delete
Wat doet de header in een REST request?
passes along information about a request
Wat is stateless?
server & client don’t need to known eachother state
Schrijf JSON voluit.
Javascript object notation
Wat is swagger?
Swagger allows you to describe the structure of your API’s so that machines can read them. it automaticly builds beautiful and interactive API documentation
Wat is precistence
het bewaren van data voor later gebruik
What is impedance?
difference in approach between object-oriented and relational data structure
Schrijf JPQL voluit.
JPA query language
Geef de inheritance strategiën.
- single_table
- joined
- table per class
Wat zijn de voor- en nadelen aan de inheritance strategie single table
+ no joins
+ 1 insert or update
- wide table with many null
- problems when expanding
Wat zijn de voor- en nadelen aan de inheritance strategie joined
\+ no reduntdant data in tables \+ extra child had no affect on existing tables - join needed - worse performance - multiple insert or update
Wat zijn de voor- en nadelen aan de inheritance strategie table per class
\+ better performance \+ no joins \+ 1 insert or update - many table - sql 'union all' needed
Wat is een unindiractional association en hoe ziet deze eruit?
->
1 entitiy kent de andere entitiy maar de andere kent de ene niet
vb.
person -> date of birt
Wat is een bidirectional entity en hoe ziet deze eruit?
bijde entitys kennen elkaar
Waar staat mapped by bij deze bidirectionele entity?
1 1
eigen keuze
Waar staat mapped by bij deze bidirectionele entity?
* *
eigen keuze
1 *
bij de 1
Geef een andere naam voor checked exceptions
compile time exceptions
wat zijn checked exeptions?
exceptions that require us to specify at compile time how the application will bahave
Geef een voorbeeld van een checked exception
file not found
Geef een ander woord voor unchecked exception
runtime exception
wat zijn unchecked exceptions?
exceptions that occur at time of excecution
Geef een voorbeeld van een unchecked exception
null pointer exception
Geef de voordelen van design patterns
+ better mainainability
+ faster development time
+ reusability
+ language-independent
Wat zijn de properties van een design pattern?
name
problem
solution
consequences
Waarvoor staat GOF
gang of four
Wie zijn de autheurs van het boek: design patterns: elements of reusable object-oriented software
GOF
Wij zijn de 4 mensen van GOF
Erich Gamma
Richard Helm
Ralph Johnson
John Vlissides
Wat zijn de eigenschappen van unit testing
- automated test
- runs in memory
- fast
- readable
wat zijn de eigenschappen van integration test
- automated test
- no mocking
- slower than unit test
- more complex than unit test
- harder to maintain
Wat test een integrationt test?
de interactie tussen componenten
Geef de stappen in de TDD cycle
- add a tets
- run all tests: new tests might fail
- fixed the failes test
- run all the tests: all tests should succeed
- optional: refactor and run all tests