100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Frameworks voor serverapplicaties - Samenvatting $6.36   Add to cart

Summary

Frameworks voor serverapplicaties - Samenvatting

1 review
 59 views  3 purchases
  • Course
  • Institution

Een cursus met alle info uit de slides en extra notities. Gemakkelijk om in te zoeken voor het openboek deel.

Preview 4 out of 132  pages

  • January 13, 2022
  • 132
  • 2021/2022
  • Summary

1  review

review-writer-avatar

By: matteoholvoet • 1 year ago

avatar-seller
FRAMEWORKS VOOR
SERVERAPPLICATIES
FRAMEWORKS VOOR SERVERAPPLICATIES..................................................................................... 1


HOOFDSTUK 1: REST WEBSERVICES ................................................................................................ 6


1.1. HERHALING HTTP .................................................................................................................... 6
1.2. REST WEBSERVICES .................................................................................................................. 7
ARCHITECTURALE BEPERKINGEN .................................................................................................................... 7
VOORBEELD .............................................................................................................................................. 8
URI ......................................................................................................................................................... 9
GLORY OF REST ......................................................................................................................................... 9
1.3. REST WEBSERVICES IN JAVA ......................................................................................................10
ARCHITECTUUR REST API IN SPRING ........................................................................................................... 10
VOORBEELD ............................................................................................................................................ 11
HTTP-aanvragen afbeelden op methodes RestController ................................................................... 11
Parameters in pad................................................................................................................................ 13
Data uit body HTTP-bericht ophalen ................................................................................................... 13
ANTWOORDSTATUS BEPALEN ..................................................................................................................... 14
URI’S IN ANTWOORD ................................................................................................................................ 15
1.4. WEBSERVICES TESTEN...............................................................................................................15
MANUEEL (ALGEMEEN) ............................................................................................................................. 15
HERHALING JUNIT (JAVA) .......................................................................................................................... 16
WEBTESTCLIENT (JAVA – SPRING) .............................................................................................................. 18
1.5. BEVEILIGEN VAN WEBSERVICES ...................................................................................................19


HOOFDSTUK 2: ORM .....................................................................................................................22


2.1. ORM – OBJECT RELATIONAL MAPPING .......................................................................................22
VERSCHIL OO-CONCEPTEN EN RELATIONELE DATABANKEN: TYPES « TABELLEN .................................................. 22
IDENTITEIT .............................................................................................................................................. 22
ORM JAVA ............................................................................................................................................ 23
2.2. JPA IN SPRING........................................................................................................................24
2.3. OVERERVING ORM .................................................................................................................26
TABEL PER KLASSENHIËRARCHIE = DEFAULT ................................................................................................... 26
ELKE KLASSE NAAR EEN TABEL = VERTICALE MAPPING ...................................................................................... 26
ELKE CONCRETE KLASSE NAAR EIGEN TABEL: HORIZONTALE MAPPING ................................................................. 27
2.4. ASSOCIATIES – VALUEOBJECTEN ..................................................................................................27



1

,ENTITEITEN EN VALUE-OBJECTEN ................................................................................................................. 28
VALUE-OBJECTEN (EMBEDDED) ................................................................................................................... 28
2.5. ORM ASSOCIATIES: RELATIES (DEEL 2 EIGENLIJK ASSOCIATIES) ...........................................................30
1-VEEL ................................................................................................................................................... 31
Unidirectioneel .................................................................................................................................... 31
bidirectioneel ....................................................................................................................................... 31
VEEL-VEEL ............................................................................................................................................... 32
Unidirectioneel .................................................................................................................................... 32
1-1 ........................................................................................................................................................ 32
unidirectioneel ..................................................................................................................................... 32
Bidirectioneel ....................................................................................................................................... 33
2.6. WERKING ..............................................................................................................................34
WERKEN MET OBJECTEN ............................................................................................................................ 35
Toestanden van een object.................................................................................................................. 35
Objecten persistent maken.................................................................................................................. 35
Objecten opvragen .............................................................................................................................. 36
Objecten verwijderen .......................................................................................................................... 37
Objecten wijzigen ................................................................................................................................ 37
2.7. JPA – QUERY .........................................................................................................................39
Java Persistence Query Language à zoeken in objecten .................................................................... 39
SQL à zoeken in db ............................................................................................................................. 41


HOOFDSTUK 3: NODE.JS ................................................................................................................42


3.1. NODE.JS EN NPM.....................................................................................................................42
3.2. HTTP-SERVER ........................................................................................................................43
3.3. ROUTING ...............................................................................................................................45
VOORBEELD ............................................................................................................................................. 45
3.4. NODE.JS « THREADS...............................................................................................................46
3.5. EXPRESS ................................................................................................................................48
INLEIDING ............................................................................................................................................... 48
APP.JS .................................................................................................................................................... 49
ROUTING ................................................................................................................................................ 50
samenvatting routing........................................................................................................................... 53
VIEWS .................................................................................................................................................... 53


HOOFDSTUK 4 – WEBSOCKETS ......................................................................................................55


INLEIDING ........................................................................................................................................55
WAT ZIJN WEBSOCKETS? ........................................................................................................................... 55
ARCHITECTUUR ........................................................................................................................................ 55
PROTOCOL............................................................................................................................................... 55
API ................................................................................................................................................56
SERVER ...........................................................................................................................................57




2

,VOORDELEN WEBSOCKETS .......................................................................................................................... 57


HOOFDSTUK 5 – JDBC....................................................................................................................59


5.1. INLEIDING ..............................................................................................................................59
JDBC = JAVA DATABASE CONNECTIVITY API ................................................................................................. 59
JDBC DRIVERS – TYPES .............................................................................................................................. 59
5.2. BASISWERKING: STATEMENTS ....................................................................................................60
STAPPENPLAN .......................................................................................................................................... 60
CONFIGURATIEGEGEVENS INLEZEN............................................................................................................... 61
DRIVERKLASSE LADEN ................................................................................................................................ 62
VERBINDING MAKEN MET DB ...................................................................................................................... 62
STATEMENT MAKEN .................................................................................................................................. 63
STATEMENT UITVOEREN ............................................................................................................................ 63
5.3. BASISWERKING: PREPAREDSTATEMENTS ......................................................................................65
VOORBEELD ............................................................................................................................................. 65
WANNEER GEBRUIKEN?............................................................................................................................. 66
5.4. BASISWERKING: CALLABLESTATEMENTS .......................................................................................67
VOORBEELD ............................................................................................................................................. 68
5.5. BASISWERKING: TRANSACTIES ....................................................................................................68
VOORBEELD ............................................................................................................................................. 69
5.6. UITGEBREID: DATASOURCE ........................................................................................................69
5.7. UITGEBREID: SCROLLABLERESULTSETS .........................................................................................70
VOORBEELD ............................................................................................................................................. 70
VOORWAARDEN ZOEKOPDRACHT ................................................................................................................. 71
5.8. UITGEBREID: ROWSETS ............................................................................................................71
VOORBEELD ............................................................................................................................................. 72
CACHEDROWSET...................................................................................................................................... 72
JOINROWSET........................................................................................................................................... 73
FILTEREDROWSET .................................................................................................................................... 73
5.9. UITGEBREID: SQL3-GEGEVENSTYPES ...........................................................................................75
5.10. ORM « JDBC ....................................................................................................................75


HOOFDSTUK 6 – ADO.NET .............................................................................................................76


6.1. INLEIDING ..............................................................................................................................76
6.2. DATASET ...............................................................................................................................77
VOORBEELD ............................................................................................................................................. 77
6.3. DATAPROVIDER ......................................................................................................................78
6.4. BASISWERKING .......................................................................................................................79
VOORBEELD & JDBC « ADO.NET ............................................................................................................ 79
STAPPENPLAN .......................................................................................................................................... 79
SAMENGEVAT .......................................................................................................................................... 82




3

, HOOFDSTUK 7: REST-SERVICES IN .NET: WEB API ..........................................................................83


7.1. INLEIDING .................................................................................................................................83
WAT IS WEB API? .................................................................................................................................... 83
EEN NIEUW PROJECT ................................................................................................................................. 83
7.2. BASISWERKING...........................................................................................................................84
VOORBEELD ............................................................................................................................................ 84
Model: ToDoItems ............................................................................................................................... 84
Controller ............................................................................................................................................. 86


HOOFDSTUK 8: OPENAPI SPECIFICATIE ..........................................................................................90


8.1. WAT IS OPENAPI SPECIFICATIE? .................................................................................................90
GEGENEERDE JSON .................................................................................................................................. 91
OPENAPI SPECIFICATIE .............................................................................................................................. 93
SWAGGER UI ........................................................................................................................................... 93
8.2. OPENAPI SPECIFICATIE STRUCTUUR............................................. FOUT! BLADWIJZER NIET GEDEFINIEERD.
8.3. OPENAPI SPECIFICATIE STRUCTUUR IN .NET ................................. FOUT! BLADWIJZER NIET GEDEFINIEERD.


HOOFDSTUK 9: ASP.NET CORE MVC ..............................................................................................98


9.1. MVC IN WEBAPPLICATIES .............................................................................................................98
9.2. VOORBEELD...............................................................................................................................99
9.3. ROUTING ..................................................................................................................................99
9.4. MODEL EN CONTROLLER ............................................................................................................. 101
9.5. VIEW ..................................................................................................................................... 102
9.6. DATA VAN CONTROLLER NAAR VIEW ............................................................................................. 104
9.7. DATA VAN CLIENT NAAR DE SERVER............................................................................................... 105
PARAMETERS IN URL .............................................................................................................................. 106
FORMULIER ........................................................................................................................................... 107
9.8. DEPENCENCY INJECTION ............................................................................................................. 109
9.9. VALIDATIE ............................................................................................................................... 109
9.10. OVERPOSTING EN XSRF ........................................................................................................... 112
9.11. GLOBALISATION & LOCALISATION............................................................................................... 114
MAAK INHOUD AANPASBAAR ................................................................................................................... 114
VOORZIE INHOUDE PER TAAL EN CULTUUR ................................................................................................... 116
9.12. AUTHENTICATIE EN AUTHORISATIE .............................................................................................. 117
AUTHENTICATIE ...................................................................................................................................... 118
AUTHORISATIE ....................................................................................................................................... 119


HOOFDSTUK 10: BEVEILIGING ..................................................................................................... 121


10.1. WEBAPPLICATIE: AUTHENTICATIE ............................................................................................... 121
AUTHENTICATIE COOKIES EN TOKENS ......................................................................................................... 121


4

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller stephaniepicard. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $6.36. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

67866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$6.36  3x  sold
  • (1)
  Add to cart