TDDB84 Design Patterns
These instructions are valid from the fall of 2015.
You will do assignments related to extending, reading, explaining and improving software design. During the lab series, you will work with some smaller examples in lab 1, and a large one in labs 2 and 3. Labs 2 and 3 will use the open source game FreeCol, a multiplayer strategic computer game set in the Caribbean during the era of European colonization. You will analyze and modify the software, to emulate a normal progression for new developers in a project, and in the process try to understand how the software works in terms of design decisions taken.
The last two lab assignments in the lab series will be performed within a larger software project due to the nature of software design and design patterns: some design patterns will be necessary and visible only at a larger scale in software projects. Also, software design tends to matter only when several people work jointly on a project and need to communicate design, which is one of the reasons why you will be divided into groups and share your experiences as part of the course.
You register in teams in WebReg. Within your teams, you will need to divide yourselves into three pairs, each of which will be do similar tasks but with different code bases.
The "Missions and Resources" group (Lab 1: Task A. Labs 2 and 3:
The "Model" group (Lab 1: Task B. Labs 2 and 3: package
The "Communications and Stuff" group (Lab 1: Task C. Labs 2 and 3: package
The lab series is a big part of this course, so prepare to invest some time in it. The time for lab assignments include discussing with your team (see each individual lab assignment for more information), submitting your reports to your teaching assistant via email, and participating in seminar discussions on the outcome of each assignment.
For a more detailed view, please see the timetable.
The software will be developed within a lab environment that consists of the programming language Java, a Java development environment (Eclipse or other environment of your choice), and for labs 2 and 3 source-code management for distributed development (git/GitLab) and a real open source software project (FreeCol). In that order, we suggest that you do tutorials to understand the parts that you are not familiar with since before:
- Java: There are excellent tutorials or cheat sheets on Java for people who have abackground in C, C++ or C#.
- Eclipse: there are tutorial videos and excercises for beginners if you have no prior experience with working in an IDE such as Eclipse. If you have, chances are you will recognize much of the functionality from IntelliJ, Visual Studio or Netbeans. In our lab rooms, Eclipse will always be available, but we cannot guarantee that other IDE:s are available as well.
- Git is a distributed version control system for software, and there are great resources available to learn more about it on git-scm.org .
- Gitlab is used as the local web frontend to your projects that you will collaborate on.
In order to get started after have been assigned a group, it is necessary that you complete the following steps: Git & Gitlab guide.
We encourage you to try the game before starting with the second lab, maybe against your team.
You will have accounts generated for you in GitLab as soon as you log in. One person in each subgroup in WebReg (team) should make sure to create a project that can be shared among all members of the team at least before you write code in lab 3. You will need to ensure that you can collaborate on the project all of you, by making both students developers in the same project. Is is assumed that you work actively both by submitting to the project. Each pair should use their own branch, so as to not affect the other two pairs with their development until you decide to share, and merge, your work.
Also, you will have to invite your assistant to be a developer in your projects, so that he or she can review your progress. Your projects will not be visible to all other students.
Below are some suggested tools that could provide useful throughout the lab series.
- ObjectAid UML Explorer - Provides an UML overview over a selected set of classes, which could prove useful when locating design patterns or finding structural dependencies in the code.
- Metrics plugin - Provides information about potential design issues in the code base, through a set of software quality metrics.
Hints and help
- The Eclipse command to Open Call Hierarchy is a useful tool to help see dependencies and usage for methods and constructors. In order to use this command right click on a method or constructor and select Open Call Hierarchy from the drop down menu. For more help on Eclipse, please feel free to use online resources such as the Java Eclipse IDE Tutorial playlist on the luv2code Youtube channel.
- If you are new to Eclipse or just need help on how to setup, compile and run the FreeCol project, please see the compiling and running FreeCol tutorial
Page responsible: Ola Leifler
Last updated: 2015-09-01