Project 7.0: Space Armada

March 22, 2011

Objective

Learn how tools enable you to work efficiently as a team, about test-driven development, AJAX, RESTful Web services, N-Tier architectures and cloud-based deployments.

Prerequisites

You should have completed Project 6.

Requirements

Grading criteria

There are three due dates.

Final deadline: 11:59PM on Monday, April 25.

Introduction

This application actually consists of a pair of webapps. The first, is a "central command" application, which provides the ability to build a space armada. We'll call this app Space Armada here in this document, as this is the main application that users will work with to build their armada. Everyone, including myself, will contribute to this application in a massive code jam, and a brief specification is provided below.

The second application, which we'll call a "node," is what each respective team is responsible for. Each team will build a simple CRUD application to manage one piece of the armada, be it crew members, lasers, fighters, etc. This will be described in Project 7.3.

The main "central command" application does not store data for armada components (crews, fighters, etc). This will be the job of each "node" application. When "central command" needs to, say, display a list of missiles, it communicates with the "missile node" to retrieve the data, and then displays it. Here's a general picture describing the overall architecture:

As you can see, the end user will interact with the "central command" application to build an armada. If the user wishes to add a new laser or puppy (spaceships always have puppies on board) to the system, they have to log in to the "puppy node" and create the puppy there. Ideally, you would provide this facility in the "central command" application to remove the need for the user to work with multiple applications, but we're not going to focus on that functionality for this project.

Space Armada (Central Command) Application Specification

Here is a general overview of the Space Armada application. This will probably be unlike any project you've worked on before, as it consists of multiple Web application talking to one another in the cloud. Sounds romantic, doesn't it?

Space Armada Overview

"Space Armada" is a multi-user Web application that allows its users to design and build armadas of spacecraft, including small fighter ships, larger corvettes, carriers, frigates, crew members, lasers, projectiles and missiles. (All imaginary weapons are weapons of peace, of course.)

Scenarios

Billy Adama loves spaceships. Stranded here on Earth, keeping his true Martian origins a secret all his life, he yearns for the day he might rejoin his fellow extra-terrestrials. Since Billy Adama knows that space is a dangerous place, he plans ahead, dreaming up his own space armada that he may one day command.

"Let's see... I need some fighter ships to defend my fleet, some crew members, and a ton of Oreo cookies for the trip," he thinks to himself, "Gosh, there's so much to keep track of... there's gotta be 'an app for that.'" Sure enough, a search of the Google (a construct that also discretely arrived from Mars) leads him to the Space Armada application. He visits the URL and is presented with a list of armadas people have designed and he sees a link to register.

"Ooooooh I can hardly wait," he squeals, and fills out a registration form. He submits the form and is immediately logged into the application. He sees a screen that prompts him to create his first armada. Billy clicks a big button to start, and is then presented with multiple lists of armada components he can choose from such as fighters, corvettes, carriers, crew members, weapons and so on. His eyes grow wider and wider as he adds various components to his armada.

Finished with his design, he clicks a "deploy the armada!" button and then sees a screen that displays a graphical representation of his entire armada. For a moment, he becomes teary-eyed. "One day I'll cruise the galaxies with this puppy! Hey... wait, I need to remember to take some puppies too..."

Non-Goals

Unfortunately, the Space Armada application is not a game (but it certainly could evolve to support such features).

General Flow Chart

Here is a general overview of the user experience through the application.

Screen Specification

Space Armada provides only a few screens to the user, and most of them you've seen before, such as a typical login screen, registration screen, and so on. The most feature-rich screen of the application is the Armada creation / editing screen, which will ultimately deliver a dynamic interface to the user.

Public Home Screen

This is the screen that everyone sees when they first visit your application. It lists the armadas in the system and looks like this:

Anyone can click on an armada to view it in more detail via the View Armada screen. He or she may also click a 'login' or 'register' link.

View Armada

This screen displays the details of a particular armada and looks like this:

Log In, Register, Forgot Password, Reset Password

The Space Armada application provides interfaces for logging in, registering, and retrieving a forgotten password. Since these screens are already built for the developer (via the skeletal application) I'm not going to cover them here.

Administration Screens

Every Web application should have some kind of administrative area that provides access to full CRUD over all data in the system. Screens for User and Role objects are provided, so we won't cover them here. Admin screens for managing Armada objects are identical to those provided for users, described below.

Member Home

This screen is very similar to the Public Home Screen. It lists, via a paginated interface, all of the armadas in the system. Most importantly, this screen should display a large link or button to "create a new armada" that takes the user to the Create Armada screen.

Member View Armada

This screen is identical to the public View Armada screen, except if the user is viewing an armada he or she created, a link or button to "edit this armada" should be displayed. When clicked, the Edit Armada screen should be displayed.

Create Armada

This screen provides the user the ability to design and save an armada. It consists of twelve sub-areas: fighters, destroyers, corvettes, carriers, battleships, crew members, lasers, projectiles, missiles, shields, resource collectors, and puppies. When first seen, the main interface looks like this:

During the construction of the armada, the screen might look like this:

When any element in the sidebar box is clicked, the Component View screen is displayed. Clicking on "view current armada" results in the main Create Armada screen to be displayed, which would display all the components that have been added to the armada being built. When the "deploy the fleet!" button is clicked, the armada is saved and the user is taken to the respective Member View Armada screen.

Component View

These screens are unique to each armada component, but in general will provide the user the ability to select a component, the quantity desired (eg, twelve Martian black lab puppies), and add them to the armada being created. In general, a component screen will look like this:

Conclusion

That's it for the Space Armada (Central Command) application. Realize that we're going to build this last, but this app is described first, since it is our end goal. The component nodes will be described in Project 7.3.

Next Steps

Now that you have an idea of what it is we'll be building, be sure to start Project 7.1 as soon as possible, in case you need help getting up and running.