Skip to content

1. Lab 1: Basics

In this lab you will apply the basics of C# and develop an Avalonia app using the simple code behind approach.

1.1 Preparation

You need to come to this lab well-prepared, i.e. read and understand everything the basics and XAML. Do the exercises.

  • Install Rider and .Net, see IDE.
  • Clone the gitlab repository. An invitation will come per email 2 days before your lab.
  • Create a simple application based on the template Avalonia .NET App that uses simple code behind and
    • has a button to add random numbers to a list
    • shows the sum of all numbers of the list
    • has a ComboBox with different filtering criteria for your list resulting in LINQ queries
    • adds a random number asynchronously to the list

1.2 During the lab

In a random team of four students you will develop a small application using git and events, LINQ, extension methods and other C# language features within an Avalonia UI using code behind (no MVVM). I will specify the application at the start of the lab, i.e. you may not prepare the specific app.

  • I present the application to be build, and you ask questions to clarify the requirements (10 min).
  • Make yourself familiar with the infrastructure, i.e. everyone must be able to use the bis team screen (10 min).
  • Create the initial project together, use the template Avalonia .NET App (10 min).
  • Plan your first sprint (10 min).
  • Start pair programming (35 min).
  • Merge your code (15 min).
  • Sprint Review with all teams (10 min).
  • Short retrospective, how can you work better in the next sprint (15 min)?
  • Short break (15 min).
  • Plan your second sprint (10 min).
  • The other one is now using the keyboard and hence needs to pull the project first. Start pair programming (35 min).
  • Merge your code (10 min).
  • Sprint Review with all teams (10 min).

1.2.1 Student Management System

Create a Student Management System with the following requirements

  • Implement a list of students where each student has attributes like Name, List of Modules (List of Strings)
  • Allow users to add new students to the list.
  • Implement various filter options using comboboxes to filter students by predefined attributes.
  • Serialize the list of students to a file and deserialize it back into the application.
  • Display the list of students as a string in a label.
  • Implement a button that, when clicked, randomly deletes a student from the list and triggers an event to notify the user of the deletion.

1.2.2 Book Management System

Create a Book Management System with the following requirements:

  • Implement a list of books where each book has attributes like Author, Title, Keywords (List of Strings).
  • Allow users to add new books to the list.
  • Implement various filter options using comboboxes to filter books by given attributes.
  • Serialize the list of books to a file and deserialize it back into the application.
  • Display the list of books as a string in a label.
  • Implement a button that, when clicked, randomly deletes a book from the list and triggers an event to notify the user of the deletion.

1.2.3 General Requirements

Use appropriate data structures and algorithms to ensure efficient filtering and serialization. Ensure the user interface is intuitive and user-friendly. Handle edge cases and provide appropriate error messages. Document your code thoroughly with dev comments.