The role of the middle layer in the web environment

The final thesis explains the purpose and importance of the middle layer in a web environment. It also shows the usage of session and headers to achieve better user experience. Generating templates is achieved by using the PHPOffice library. It shows the process of creating a template and the final...

Full description

Bibliographic Details
Main Author: Halupecki, Elvis
Other Authors: Adamović, Tomislav
Format: Bachelor Thesis
Language:English
Published: Veleučilište u Bjelovaru. Odjel računarstva. 2023
Subjects:
PDO
JWT
Online Access:https://zir.nsk.hr/islandora/object/vtsbj:906
https://urn.nsk.hr/urn:nbn:hr:144:551961
https://zir.nsk.hr/islandora/object/vtsbj:906/datastream/PDF
Description
Summary:The final thesis explains the purpose and importance of the middle layer in a web environment. It also shows the usage of session and headers to achieve better user experience. Generating templates is achieved by using the PHPOffice library. It shows the process of creating a template and the final result. It also shows the code code needed to send emails from the middle layer and ways to send data from frontend to the middle layer with the help of AJAX calls. The login process with a username and password are also shown, including code which validates data that comes from the user during logging in. There is also a comparison between PDO and MySQLi extensions which are used to communicate with the database. It is explained what PHP ORM library is, and the reasons why it's used. There is also a comparison between standard login and login with JWT, including the advantages of JWTs. cURL functions are used to call web services which generate barcodes that are used to pay HUB-3 payment slips. U radu se opisuje uloga i važnost srednjeg sloja u web okruženju. Prikazuje se korištenje sesija i zaglavlja kako bi se ostvarilo bolje korisničko iskustvo. Generiranje predložaka je objedinjeno u PHPOffice biblioteci te je prikazan proces koji je potreban za generiranje predložaka te finalni rezultat, odnosno generirana datoteka. Prikazan je programski kod potreban za slanje e-mailova s srednjeg sloja, te način na koji se podaci šalju sa sučelja na srednji sloj uz pomoć AJAX poziva. Uz sami prikaz slanja podataka, prikazan je proces prijave s korisničkim imenom i zaporkom te programski kod pomoću kojeg se provjerava točnost podataka koje korisnik upisuje prilikom prijave. Prikazana je usporedba PDO i MySQLi ekstenzija koje služe za korištenje baza podataka. Prikazana je namjena PHP ORM biblioteka te razlozi zbog kojih bi mogle biti poželjne za korištenje. Navedeni su razlozi zbog kojih bi prijava pomoću JWT-a bila bolja od uobičajene prijave. Uz pomoć cURL funkcija se poziva web servis koji prima parametre pomoću kojih se ...