Chapter 4. MVC

Table of Contents

Tutorial At A Glance
Running The Tutorial Example
MVC in the Tensegrity Graph API
Graph Controllers
ClientServerGraphController
ModelBasedGraphController
GraphController Creation
GraphController Association
Visual Element Creation
Summary

This tutorial provides Java Application Programmers exposure to some design concepts in the Tensegrity Graph Framework. Specifically, we now give you important information about the Model-View-Controller (MVC) Pattern and how this pattern implementation supports the relationship between a Graph and a VisualGraph.

Tutorial At A Glance

The table below gives you some important information about this tutorial.

Table 4.1. Tutorial Aspects

Tutorial AspectTutorial Description
Approximate Duration15 Minutes
Expected Outcome An understanding of the relationship between a Graph and a VisualGraph. This example gives the Java Application Programmer an initial exposure to a controller and how it coordinates and decouples the communication between the aforementioned classes.
Source FilesThe tutorial examples come with two source packages containing the java and configuration files needed to compile and run them. These are “com.tensegrity.firststeps.mvc” and “com.tensegrity.firststeps.swt.mvc” respectively for the AWT/Swing-based and SWT-based examples.
Creating FilesNot applicable in this tutorial
Modifying FilesNot applicable in this tutorial