Semester 3 · Compulsory · 6 ECTS
Web Programming
About the course
Development of a modern web application with separate server and client parts that communicate through an HTTP API, from the server part in Python and the FastAPI framework with a relational database to a single-page client application in the Vue framework. The course also covers authentication and authorisation, testing and deploying the application on a cloud platform.Outcomes and topics
- Architecture of a web application with separate server and client parts, and a development environment with Docker and Git
- Introduction to FastAPI: routes, dependency injection, Pydantic schemas and error handling
- Databases in FastAPI applications: data modelling, the SQLAlchemy ORM and migrations with Alembic
- Authentication: secure password storage and JWT access and refresh tokens
- Authorisation by user role and data ownership, and CORS settings
- REST API design and data validation: CRUD operations and HTTP status codes
- Business rules and organising a project into layers: routes, schemas, services, repositories and models
- Single-page applications (SPA) in the Vue framework: routing and page layout
- Communicating with the API and authentication in a Vue application, and role-based route protection
- Managing application state with the Pinia library, and web forms
- Tables, filtering and pagination of data
- Testing web applications: pytest, Vitest, Playwright and test code coverage
- Deploying an application on a cloud platform: logging, environment configuration and code checks in a CI pipeline
Teaching and assessment
Teaching is delivered through lectures and exercises in which students, through practical examples and independent assignments, develop their own complete web application. The server-side project and the project of the complete, running application each account for 40 per cent of the grade, and the oral exam for 20 per cent, with a threshold of 50 per cent in each component.
Course leader and instructors
Teaching plan
The official, detailed teaching plan for the current academic year is always available on the Merlin pages of the course, to students enrolled in it. The general schedule of lectures is on the page Documents and decisions.