Introduction to PV168

Course Information

Course Information

  1. Seminar groups
  2. Project
  3. Workshops for team leads
  4. Lectures (optional)
Course Information

Seminar Groups

  • Methods of experiential learning
    • Try to do stuff by yourself
    • Reflect on your experience
    • Then learn how to do it properly
  • Pair programming
Course Information

Project

  • Teams of four with one team lead
  • Assigned by project manager (PM)
  • Teacher in the role of a tech lead
    • Guarantees the quality
    • Solves unpleasant situations
  • Details at courses pages
Course Information

Project Schedule

  1. Initial GUI
  2. The basics of the business logic
  3. The persistence
    • Business logic completion
  4. Non-blocking GUI
    • Finish & retrospection
  5. Final presentation
Course Information

Team Lead

  • Communicates with both PM and Tech lead
  • Organizes the cooperation in the team
    • Does less programming
    • Organization takes time
  • Attends extra workshops
Course Information

Workshops

  1. After the first milestone
    • Lead's responsibilities
    • Options & Decisions
    • Ways of leading
  2. After the second milestone
    • Sharing with other team leads
Course Information

Lectures

  • Optional but recommended
    • Explanation of work at seminars
    • Place for discussions

Git Culture

Code Management

Git Commits

  • Commits should be descriptive
  • Commits should deal with single change
  • Every commit must always pass the tests
Code Management

Git Commits

auto

Code Management

Feature Branches

  • Work according to Gitlab Flow
  • Main branch is ready for release
  • Work in feature branches
    • Utilize Merge Requests
    • Test every commit
Code Management

Merge Requests & Code Reviews

  • Nothing goes directly to the main branch
  • Don't review more than a few hundred lines of code
  • Have at least 2 team members approve the MR
  • Have a discussion if anything is not crystal clear
Apache Maven

Apache Maven

Java Distribution

Distribution Intermezzo

What does it take to build,
distribute & run java application?

What are the distribution options?

Java Distribution

What is Maven

  • From Yiddish word meaning "Expert"
  • Originally developed to simplify build of Jakarta Turbine
  • A tool used to build and manage Java-based projects
  • Currently in version 3.9.x
  • Apache Maven
Java Distribution

Maven's Goals

  1. Making the build process eas(y/ier)
  2. Providing a uniform build system
  3. Providing quality project information
  4. Encouraging better development practices
Java Distribution

Maven What?

  1. Describes how to build your project via POM file descriptor
  2. Allows you to define useful metadata about your project
  3. Provides dependency management
  4. There are reasonable defaults
Java Distribution

Project structure

project_root
|- src
    |- main
        |- java
        |- resources
    |- test
        |- java
        |- resources
|- pom.xml
Java Distribution

Project Object Model

<project>
    <modelVersion>4.0.0</modelVersion>

    <groupId>cz.muni.fi.pv168</groupId>
    <artifactId>zinger</artifactId>
    <version>1.0-SNAPSHOT</version>
</project>
Java Distribution

Maven Dependencies

  • Maven projects can be published to repositories
  • Default remote repository is Maven Central
  • Ability to use multiple repositories
  • Local repository in ${M2_HOME}/repository typically ~/.m2/repository on Unix systems
Java Distribution

POM Example

Let's look at full pom.xml

  • What dependencies does this project have?
  • What is the build output?
  • What metadata does the project provide?
Java Distribution

Maven Alternatives

"I don't like it, what are the other options?"

  • Though luck, you need it!
  • There is one, Gradle
  • You still need to know Maven!