Semester review and exam preparation

Semester review and exam preparation

Link to the course

L. Delafontaine and H. Louis, with the help of GitHub Copilot.

This work is licensed under the CC BY-SA 4.0 license.

Semester review and exam preparation

Semester review

You made it! Congratulations! 🎉

Semester review and exam preparation

Retrospective

Let's have a look back on what you did during this semester.

Semester review and exam preparation

You will learn the following topics during this teaching unit:

  • Network programming (inputs/outputs, encodings, TCP and UDP).
  • Application-level protocols (SMTP, SSH, HTTP, and your own).
  • Web infrastructures (reverse proxy, load balancer, sticky sessions).
  • How to read and write technical documentation.

At the end of the course, you will be able to create applications that can communicate over the network (for example, business applications, APIs, games, etc.)!

Semester review and exam preparation

You will learn the following technologies during this course:

  • Git and GitHub.
  • Markdown.
  • Java for network programming.
  • Docker & Docker Compose.
  • Network utilities.
  • The terminal. ❤️
Semester review and exam preparation

Introduction to the teaching unit

Set up a Windows development environment
+
Considerations for a development environment

Find this course on GitHub

This course will not be in the exam!

Semester review and exam preparation

Key points to remember for this course

  • Setting up a professional development environment can really help you be more efficient.
  • You have gained valuable Linux experience using WSL.
  • For us, the usage of WSL was really positive:
    • Less bugs/edge-cases.
    • Easy access to UNIX tools.
  • While not always easy to setup, you did very well to use it efficiently.
Semester review and exam preparation

Elements to improve for next year

  • Nothing much to improve in our opinion. Do you agree?

We would like to push these recommandations/tools in the very first weeks of your studies so you can use these tools from the beginning and in all teaching units. We will see if it is possible.

Semester review and exam preparation

Part 1: Input/output processing

Semester review and exam preparation

Git, GitHub and Markdown

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  1. Set up your Git environment with SSH and signed commits.
  2. Open an issue to discuss the feature (written in Markdown).
  3. Clone or fork the project with SSH and checkout to a new branch.
  4. Make your changes, commit and push them as often as you want.
  5. Resolve conflicts if any.
  6. Create the pull request and add details if needed.
  7. Other members review and approve if everything is OK.
  8. The work is merged and you can delete the branch or the fork.
Semester review and exam preparation
Elements to improve for next year
  • Reorganize the course to have a better flow..? But then, we might not enough time for the practical work and Java IOs...
01 Git, GitHub and Markdown Practical work 1 (1/5)
02 Java, IntelliJ IDEA and Maven Practical work 1 (2/5)
03 Java IOs Practical work 1 (3/5)
04 Docker and Docker Compose Practical work 1 (4/5)
05 SMTP and ncat Practical work 1 (5/5) - Pres.
Semester review and exam preparation

Java, IntelliJ IDEA and Maven

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Java and the JVM.
  • Maven as a build tool:
    • pom.xml file.
    • Plugins vs. dependencies.
  • Sharing code with Git and GitHub:
    • .gitignore files.
    • IntelliJ IDEA (and IDEs in general) configuration files.
  • Managing multiple versions of Java/dependencies with SDKMAN!.
Semester review and exam preparation
Elements to improve for next year
  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Java IOs

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Java IOs classes and use cases (text files vs. binary files).
  • Those 🤬 charset encodings (Unicode vs. UTF-8 vs. other charsets).
  • Buffering and flushing.
  • End of line characters (\n, \r, \r\n, etc.).
  • Dealing with exceptions (try-with-resources, etc.).

You should always specify encodings and end of line characters explicitly as the defaults are dependent on the platform your code is running on. Marking them explicitly will make your code portable.

Semester review and exam preparation
Elements to improve for next year
  • It seems to us that the practical content for this course was hard to grasp for some people, mainly regarding picocli.
  • The practical content of the course Java, IntelliJ IDEA and Maven was supposed to give you all the elements needed to understand picocli.
  • From our point of view, everything was there but maybe not clear enough.
  • Do you have any feedback on how we could improve this point?
Semester review and exam preparation

Docker and Docker Compose

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Differences between bare-metal vs. virtualization vs. containerization.
  • Docker as a containerization tool:
    • Images.
    • Containers.
    • Registries.
    • Dockerfile files.
  • Docker Compose as a tool to manage multiple containers through Compose files.
Semester review and exam preparation
Elements to improve for next year

It is still a quite difficult and abstract course to teach. We did try our best to give you all the elements needed to understand this topic incrementally so you would not be overwhelmed.

Semester review and exam preparation

Practical work 1

Find this practical work on GitHub

Semester review and exam preparation
What you were ask to do
  • A CLI to process files.
  • Use Java, Maven and picocli.
  • You can choose what the CLI will do.
  • Practice a professional Git workflow and publish your CLI on GitHub for others to discover and use.

We have seen some very interesting projects! Caesar cipher, image processing, JSON-XML convertor, etc.

Do not hesitate to share your project and to continue to work on it!

Semester review and exam preparation
Elements to improve for next year
  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Part 2: Network programming with TCP and UDP

Semester review and exam preparation

SMTP and ncat

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Differences between SMTP, POP3 and IMAP.
  • SMTP security concerns.
  • How is an email sent and received from one client to another through multiple SMTP servers.
  • Using a SMTP mock server to test your email invoices without sending real emails.
Semester review and exam preparation
Elements to improve for next year
  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Define an application protocol

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course

Defining an application protocol is not an easy task. There are many ways to do it, and there is no "one size fits all" solution. You should always keep in mind the following points:

  1. Context - What the application protocol is used for?
  2. Transport - What protocol(s) is/are involved? On which port(s)? How are messages/actions encoded? How are messages/actions delimited? How are messages/actions treated? Who initiates/closes the communication? What happens on an unknown message/action/exception?
Semester review and exam preparation
  1. Messages/actions - What are the messages/actions? What are the parameters? What are the return values? What are the exceptions?

    Always try to describe these for a given context, not from each point of view (e.g. "making an order" with the input/outputs from the client to the server and the responses instead of "the client sends these messages and the server replies these messages with these outputs"). It makes it way easier to understand and to implement.

  2. Example diagrams - What are the examples of messages/actions? What are the examples of exceptions? Illustrate your application protocol with diagrams to make it easier to understand.

Semester review and exam preparation
Elements to improve for next year
  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Java TCP and UDP programming

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course (TCP)
  • TCP as a reliable protocol.
  • TCP is unicast only.
  • A client and a server communicate using Socket and ServerSocket classes on a given port for a given host.
  • Dealing with sockets' streams is the same as with files: buffering, flushing, charsets, end of line characters, exceptions handling, etc.
Semester review and exam preparation
Key points to remember for this course (UDP)
  • Differences between TCP and UDP.
  • Reliability of UDP.
  • Unicast, broadcast and multicast.
  • A client/server (unicast) and or emitter/receiver (multicast) communicate with the DatagramSocket, DatagramPacket and MulticastSocket classes.
  • Messaging patterns.
  • Service discovery protocols.
Semester review and exam preparation
Elements to improve for next year
  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Java network concurrency

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Concurrency allows to manage multiple task simultaneously.
  • Java offers classes and data structures to manage concurrency.
  • Multiple strategies exist to manage concurrency, with different trade-offs:
    • Unlimited threads can use all the available resources.
    • threadpools can set the maximum number of threads but need to calculate the right amount to use resources efficiently.
    • Recommended: Threadpools for Java < 19 and virtual threads for Java > 19.
Semester review and exam preparation
Elements to improve for next year
  • This course came a bit late in the teaching unit (mostly regarding the practical work). Maybe we could move it earlier by merging the Java TCP and UDP programming courses together?
Semester review and exam preparation

Practical work 2

Find this practical work on GitHub

Semester review and exam preparation
What you were ask to do
  • A network application using TCP and/or UDP with its own application protocol.
  • You can choose what the network application will do.
  • Your first experiments with Docker to publish your application to the GitHub Container Registry.

We have seen some very interesting projects! Chat applications, hanging man (poor boy...) games, naval battle games, etc.

Do not hesitate to share your project and to continue to work on it!

Semester review and exam preparation
Elements to improve for next year
  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Part 3: Network programming with HTTP

Semester review and exam preparation

SSH and SCP

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Obtain a real remote server on a cloud provider (Azure).
  • SSH keys and how to clone/sign commits using Git.
  • SSH keys and how to connect to a remote server.
  • SCP and how to copy files to a remote server.
Semester review and exam preparation
Elements to improve for next year
  • Azure seems to have some issues this year (mysterious validation errors that are hard to debug and understand).
  • However, you have free credits to use it.
  • We could consider using another cloud provider such as DigitalOcean as we have free credits with GitHub Education Program, but it requires a credit card...
  • We might switch to another provider next year.
  • Other than that, nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

HTTP and curl

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • HTTP request methods and their response status codes.
  • HTTP path parameters, query parameters and body.
  • HTTP headers.
  • HTTP content negotiation.
  • Structure of a HTTP request/response (raw HTTP).
  • HTTP sessions using a query parameter or a cookie.
  • API design.
Semester review and exam preparation
Elements to improve for next year
  • Add a bit of content regarding HTML, JavaScript and CSS (optional content?).
  • Refer to official documentation to generate full web applications (UI + API) using the official resources (optional content?):
  • We would love to go deeper on this topic but the time is limited. You will learn more about this topic in future teaching units.
Semester review and exam preparation

Web infrastructures

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • Functional and non-functional requirements.
  • How HTTP features can be used to build web infrastructures:
    • The Host header.
    • Reverse proxy.
    • System scaling:
      • Vertical: add more hardware (CPU, RAM, etc.).
      • Horizontal: add more instances.
    • Load balancing.
Semester review and exam preparation
Elements to improve for next year
  • DuckDNS seems to have some issues this year. We have updated the course material to use Dyno instead (see PR #976).
  • Move the instructions to obtain a domain name to the SSH and SCP course to allow to access the server using a domain name earlier.
  • Other than that, nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Caching and performance

Find this course on GitHub

Semester review and exam preparation
Key points to remember for this course
  • How HTTP features can be used to implement caching and improve performance of web applications:
    • Expiration model based on time.
    • Validation model based on content:
      • ETag
      • Last-Modified
  • Different types of cache.
  • Where to cache.
Semester review and exam preparation
Elements to improve for next year
  • Improve the diagrams for better comprehension.
  • Other than that, nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Practical work 3

Find this practical work on GitHub

Semester review and exam preparation
What you were ask to do
  • Obtain and configure a virtual machine on the cloud.
  • Install Docker and Docker Compose on the virtual machine.
  • Develop a simple CRUD API to manage resources.
  • Deploy the applications (reverse proxy + CRUD API).
  • Access the applications from a (free) domain name.

We have seen some very interesting projects! Pokédexes, GPG keys management, etc.

Do not hesitate to share your project and to continue to work on it!

Semester review and exam preparation
Elements to improve for next year
  • Improve some criteria in the evaluation grid to make them clearer.
  • Other than that, nothing else to improve in our opinion. We think it is the perfect practical work to close the loop of the teaching unit. Do you agree?
Semester review and exam preparation

Course materials

Semester review and exam preparation

Elements to improve for next year

  • Make usage of a quiz application to kickoff each course session with content from the previous session.
  • Use previous evaluation questions as discussion points during the teaching unit.
  • Improve Git repository structure to make it easier to navigate (see PR #886).
Semester review and exam preparation

Practical works

Semester review and exam preparation

Elements to improve for next year

  • Nothing much to improve in our opinion. Do you agree?
Semester review and exam preparation

Evaluations

Semester review and exam preparation

Elements to improve for next year

  • Move the first evaluation earlier in the semester.
Semester review and exam preparation

GAPS evaluation

Let's check these beautiful charts!

You can find all Framasoft and GAPS evaluations on the repository.

Semester review and exam preparation

Remaining questions

Here are some remaining questions we never take the time to discuss and I would like your opinion on them. There will be no judgement and no consequences. I just want to understand your point of view.

  • Did you find the course too difficult or having too much content?
  • Is there anything that you feel was not fair during the semester?
  • Do you have a remaining question you would like to ask?
Semester review and exam preparation

Exam preparation

What you need to know for the exam

Semester review and exam preparation

Exam preparation

Where and when?

  • Date: 03.02.2026 (Tuesday)
  • Time: 13:30
  • Duration: 60 minutes
  • Place(s): G01, G02 and G03

Find all examens on SACHEM.

Semester review and exam preparation

What to expect?

A paper exam that will test your knowledge on everything we have seen during the semester (theoretical content, practical content and practical works).

You will be asked to read/write/understand some code.

You must be ready as there will be no time to lose.

Semester review and exam preparation

Allowed resources?

Two (2) double-sided sheets (so four (4) single-sided sheets) of personal notes.

What to do during the exam?

Read the exam carefully.

Always try to write something.

You all have the skills to pass the exam.

Semester review and exam preparation

How to revise?

All typical questions are at the end of each course you studied.

All previous evaluations are available in the course repository:

You can find the archives as well in these directories.

Semester review and exam preparation

Questions

Do you have any questions?

Semester review and exam preparation

Conclusion

Semester review and exam preparation

This teaching course defines the basics of network communication and how all these communications are programmed.

At the end of the teaching unit, you will know how to define, program and deploy network applications, how to interact with them, and the different elements to pay attention to make robust applications.

Whether you are in software, security, data science, embedded or network, you will have to deal with network applications (APIs, devices, etc.). This teaching unit will give you a solid grounding in this world.

Semester review and exam preparation

You did it! Congrats!

You can be proud of yourself! You all did a great job! We had a blast following your progress during this semester.

This teaching unit is now over, but we hope you enjoyed it and learned a lot.

This teaching unit is part of a larger curriculum, and we hope you will be able to apply what you learned in the next teaching units.

This teaching unit is only the start of what you can learn about. We hope you will continue to learn about these topics in the future.

Semester review and exam preparation

How to stay up to date?

Staying up to date is a challenge in the IT world. Here are some resources to help you with content related to this teaching unit:

Semester review and exam preparation

Well, what now?

You have gained significant knowledge during this teaching unit. Use this knowledge wisely. With great power comes great responsibility. You can now:

  • Go deeper in the web development world.
  • Enter the game of self-hosting.
  • Interact with the open-source community.

Thrive to learn more, and do not hesitate to share your knowledge with others.

Semester review and exam preparation

Closing remarks

Some closing remarks :

  • Always ask yourself the right questions: Why? How? What? Am I doing the right thing for the right cause? Do I listen to myself?
  • Always do what is good for you: Health, relationships, friends are more important than work! You are more important than work!
  • Always trust yourself and your guts: Do what you think is right!
  • Help others, be kind: Cooperation is better than competition!
  • Stay critical: Your opinion matters and can make a difference.
Semester review and exam preparation

Acknowledgements

Thank you Olivier Tischhauser (2025-2026), Hadrien Louis (2023-2026), Gaétan Zwick (2025-2026), Ylli Fazlija (2025-2026), Géraud Silvestri (2024-2025) and Camille Koestli (2024-2025) for helping preparing this teaching unit.

Thank you Olivier Tischhauser (2025-2026) and Juergen Ehrensberger (2023-2025) for sharing the teaching with the other classe(s).

And of course, you, for your participation and your interest in this course! It was a pleasure to teach you and I hope to see you again!

Semester review and exam preparation

Thank you, good luck, and farewell!

Apéro time! 🎉

Semester review and exam preparation

Sources