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 experiental learning
    • Try to do stuff by yourself
    • 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 his/her team and their.
  • Does less programming
    • Organization takes time as well
  • Attends extra workshops
Course Information

Workshops

  • After the first milestone
    • Lead's responsibilities
    • Options & Decisions
    • Ways of leading
  • 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 shoudl be descriptive
  • Commits should deal with single change.
  • Comit should always pass 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 Pull/Merge request
  • Test every commit
Code Management

Merge Requests & Code Reviews

  • Nothing goes directly to master
  • Don't review more that ~500 LOC
  • Have at least 2 team member approve each MR
  • Have a discussion if something 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 metada about your project
  3. Provides dependency management
  4. There are reasonable defaults
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

Project structure

project
|- src
    |- main
        |- java
        |- ressources
    |- test
        |- java
        |- ressources
|- pom.xml
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 provides?
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!