Unit GRAPHICAL USER INTERFACE AND MOBILE DEVICE PROGRAMMING

Course
Computer science and electronic engineering
Study-unit Code
70A00087
Curriculum
Ingegneria informatica
Teacher
Luca Grilli
Teachers
  • Luca Grilli
Hours
  • 54 ore - Luca Grilli
CFU
6
Course Regulation
Coorte 2021
Offered
2022/23
Learning activities
Caratterizzante
Area
Ingegneria informatica
Academic discipline
ING-INF/05
Type of study-unit
Obbligatorio (Required)
Type of learning activities
Attività formativa monodisciplinare
Language of instruction
ITALIAN
Contents
Basics of GUI application programming. Development of stand-alone desktop applications in JFC/Swing (Java). Mobile device programming, with focus on native Android apps. Analysis of some simple case studies related to the development of video games for desktop and for mobile.
Reference texts
The course addresses many recent topics on rapidly evolving technologies, which are not collected in a single textbook. For this reason, the majority of course topics are illustrated in a set of slides and lecture notes prepared by the teacher.

However, to deepen the understanding of the covered topics, there are several reference books, online tutorials and official documentation, among them:

Recommended books
Kathy Walrath, Mary Campione, Alison Huml, Sharon Zakhour. The JFC Swing Tutorial: A Guide to Constructing GUIs (2nd Edition), Addison-Wesley, 2004.

Dawn Griffiths, David Griffiths. Head First Android Development, O'Reilly, 2015.

Robert C. Martin. Clean Code: A Handbook of Agile Software Craftsmanship, Prentice Hall, 2008.

Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (the Gang Of Four). Design Patterns: Elements of Reusable Object-Oriented Software, Addison Wesley, 1994.

Online tutorials and official documentation
The Swing Tutorial - The Java™ Tutorials, Oracle Java.
JavaFX Documentation Project.
Android Developers - Developer Guides.
Android Developers - Training Courses.
Educational objectives
The main aim of this course is to provide students with the basic principles for the design and implementation of interactive graphics applications, both for desktop and mobile. The adopted reference technologies are the JFC/Swing framework, for the development of desktop applications, and the Android Studio environment, for the development of native apps.

The main knowledge acquired will be:
• advanced programming techniques for the Java language, including its API for 2D graphics;
• programming techniques for developing stand-alone GUI desktop application;
• programming techniques for developing (native) mobile device apps, with focus on the Android platform.
• basic principles of the object-oriented modeling of real-world entities;
• some fundamentals design patterns widely used in software engineering, such as the Singleton, the Model-View-Controller (MVC) and the Separable-Model-Architecture (SMA);
• common Integrated Development Environments (IDEs) for the Java language and for Android platform development, such as Eclipse, NetBeans, IntelliJ and Android Studio.

The main abilities that the students will acquire are:
• capability to analyze and model a real-world system according to the principles of the object-oriented modeling;
• capability to identify critical issues in the software developing process, both in the modeling and implementation phases, and ability to overcome, mitigate, or circumvent such issues with effective and efficient solutions;
• capability to design and implement a (simple) software system through an iterative and incremental development model;
• capability to draft a project document for a simple software;
• being able to use common Integrated Development Environments (IDEs);
• capability to consult software documentation of various types (tutorials, reference documentation) and being able to interact with libraries, frameworks, and generic software systems developed by third parties.
Prerequisites
Passing the "Computer Science Basis and Lab" exam is a prerequisite for this teaching. Indeed, a full comprehension of all course topics requires the knowledge of the object-oriented programming and, in particular, of the Java programming language. Furthermore, it is important to be familiar with some advanced topics such as: nested classes, generic types, collections, enum types, exception handling and input/output streams.
Teaching methods
Each lesson consists of one or more guided exercises on the computer, usually focused on simple case studies. Lessons are preceded by an important preparatory phase, aimed at providing theoretical, methodological and technological knowledge that students do not possess.
Other information
In addition to the weekly consultation hours, the teacher is available to receive students individually, or in group, on dates and times to be agreed with them.
Learning verification modality
The test involves (i) the development of a stand-alone GUI application or of a mobile device app; and (ii) the preparation of a report (i.e., the project document) that describes the different phases of the software development process, with particular focus on the design phase. Both the application/app and the report can be carried out individually or in groups of two people.

Exam steps
1. Project proposal [it can be done at any time before the exam date, typically 30 days before]
Teacher and student(s) agree on a specific project theme, typically a video game (e.g., Pac-Man), an emulation of a board game (e.g., Risk), a simplified reconstruction of an existing app or another software utility. The teacher is willing to accept any proposal from students provided that this proposal is relevant to the topics and objectives of the course.

2. Project assignment [after step 1.]
Students write down the first two chapters of the report, including the project purpose and a detailed list of the software functionality and requirements. After one or more consultations with the teacher (usually via email), the final list of software requirements specification is established, and the project is (formally) assigned to the students. Based on such requirements, the project is given a score in the following scale: very easy, easy, normal, difficult, very difficult.

3. Project submission [after step 2. and at least two days before the exam date]
Students send all project material to the teacher (by using the UniStudium e-learning platform), including the report, the software source code and every resource that is necessary for its execution. The project document must contain, among the others, a section with a high-level description of the software architecture, a section where each architectural module is described in detail, and a section listing the main encountered issues (of any nature). The two days before the exam date are needed for the teacher to carefully examine all the submitted projects.

4. Project discussion [it will take place on the scheduled final exam day; it takes from 15 to 30 minutes]
Students are required to answer specific questions concerning the adopted modeling strategy, the main motivations behind their design choices, the main encountered issues and how they addressed such issues.

Evaluation
The overall score is the sum of the report score and the software score, for details, please see the following.

Report score (12/30)
The score is computed by assessing the completeness and the clarity of the report, applying roughly the following scheme:
• accuracy (4/30);
• completeness (3/30);
• conciseness (3/30);
• readability (1/30);
• aesthetics (1/30).

Software system score (20/30)
The score is computed by tacking into account the difficult level of the project, the effectiveness of the developed software, its efficiency, and some other factors that affect the software quality. The evaluation roughly follows the following criteria:
• project difficult: up to a maximum of 8/30 according to the following scale: very easy, easy, normal, difficult, very difficult;
• effectiveness of the developed software: up to a maximum of 8/30 according to the percentage of agreed requirements that work properly;
• efficiency and quality of the developed software: up to a maximum of 4/30 according to a rapid evaluation of the efficiency of the developed software and of its quality expressed in terms of modularity, extensibility, and correct application of polymorphic techniques, including some design patterns explained in class.
Extended program
Teaching unit: Module 1 - Introduction to GUI programming
• Graphical User Interface (GUI) components.
• Event-driven programming.
• Main UI architectural and design patterns: Model-View-Controller (MVC), Model-View-Adapter (MVA), Model-View-Presenter (MVP) and Separable-Model-Architecture (SMA).
• Outline of concurrency handling and multithreaded programming.

Teaching unit: Module 2 - GUI desktop-application programming
• Introduction to the JFC/Swing framework.
• Layout management in JFC/Swing.
• Developing simple interactive GUI.
• The Java 2D graphic context.
• Geometric primitives.
• Rendering of raster images and of animations.
• Handling mouse events.
• Handling mouse interaction in fluid layout.

Teaching unit: Module 3 - Mobile Device Programming
• Brief introduction to Android OS.
• Methodologies and technologies for developing mobile apps.
• Development of a simple Android app.
• Guide lines for supporting different devices.
• Building dynamic UIs.
• Saving Data.
• Interacting with device sensors and with other apps.
• Animation and graphics.

Teaching unit: Module 4 - Analysis of some case studies
• Development of video-games for desktop and for mobile.
Condividi su