Object-oriented GUI design in Java
Although they may know enough Java syntax to write small programs, many beginning programmers don't feel ready to create more complicated GUI programs. The challenge is that object-oriented design often leads to a proliferation of classes with logic spread across multiple classes and interfaces. To successfully organize this effort, you need clear guidelines with a proven track record that delivers results.
In this three-hour training, George Heineman deconstructs the essential concepts of an object-oriented GUI application. You’ll learn how to build a complex GUI application from the ground up, using a rigorous, repeatable process based on the Model-View-Controller pattern. Join in to gain hands-on experience with the skills you need to work with large-scale GUI applications. You'll leave ready to implement medium-sized, nontrivial software systems.
Special note: This course is a precursor to Design patterns in Java GUI design: Applying object-oriented principles in context. We recommend taking that course after this one.
What you'll learn-and how you can apply it
By the end of this live, online course, you’ll understand:
- Why code is placed in designated classes and packages
- How the Entity-Boundary-Controller pattern enables high-quality JUnit testing of entity classes
- The relationships between the model and view elements
And you’ll be able to:
- Apply solid software engineering principles when designing software from scratch
- Create a working application, with new capabilities added with each iteration
- Use the Entity-Boundary-Controller pattern to separate responsibilities into separate classes, using a high-level division of Java packages to maintain clear separation and provide structure to easily navigate through code
- Test GUI-related applications
This training course is for you because...
- You're a beginner Java programmer who wants to implement your first nontrivial GUI application.
- You're an intermediate Java programmer with minimal GUI experience, and you want to learn how to design an entire application from scratch.
- You're an experienced Java programmer seeking to optimize your design and architecting skills for large programs.
- A basic understanding of Java syntax and experience writing Java programs
- A working knowledge of Java AWT or Java Swing
- Familiarity with JUnit unit testing
Assignments to be completed before the course:
- Retrieve and review the code for the tangram puzzle application from the GitHub repository (link: https://github.com/heineman/tangram) and check out branch tangram.0-branch.
- Review the standalone Swing example, which demonstrates minimal application (find as sample source folder). A collection of videos shows this sample application being built from scratch (link: https://heineman.github.io/TangramProject/sample/)
About your instructor
George T. Heineman is an associate professor of computer science at WPI. For 20 years, George has taught software engineering to undergraduate and graduate students as well as employees at a number of corporations. From this experience, he has crafted a design methodology based on the Entity-Boundary-Controller design paradigm that is optimized for stand-alone GUI applications. He is the coeditor of Component-Based Software Engineering: Putting the Pieces Together. Aside from his professional pursuits, George is an avid puzzler and is the inventor of Sujiken, a Sudoku variation played on a right-triangle arrangement of cells, in which numbers cannot repeat in a horizontal row, vertical column, or diagonal in any direction.
The timeframes are only estimates and may vary according to how the class is progressing
- Use case and storyboard for rudimentary GUI (15 minutes)
- The Entity-Boundary-Controller design paradigm (15 minutes)
- Test Design: Writing JUnit test cases to validate a model (10 minutes)
- Tangram application domain model (10 minutes)
- Break (10 minutes)
- Modeling application domain based on prioritized use cases (15 minutes)
- Task 1: The double buffering technique; executing final result (15 minutes)
- Task 2: Analysis—the concept of a puzzle and scrollable space (15 minutes)
- Task 3: GUI controllers that work with press, drag, and release events (15 minutes)
- Break (10 minutes)
- Task 4: "Rotate piece" use cases (15 minutes)
- Task 5, part 1: "Create puzzle" and "store puzzle" use cases (15 minutes)
- Testing strategies: Writing effective test cases (10 minutes)
- Task 5, part 2: "Select puzzle" and "reset puzzle" use cases (10 minutes)