JumpShip
JumpShip Framework An MVC Based ActionScript with the following features:
- A Ruby on Rails like Model
- A Command Pattern Based Controller (similar to ARP)
- A standardized View With asset loading tools.
- Model Data Binding
- A Model that implements the DataProvider API for compatablility with Flash Components.
- Controller Before / After filtering
- Controller Command Cascading (the ability for commands to call other commands).
JumpShip Framework Blog: jumpshipframework.blogspot.com.
Specification
- Category: ActionScript Framework
- Audience: Developers
- Platform: Cross-platform
- Maturity: Final 1.2
- License: MIT
Download
You can download the latest release version here:
For the JumpShip Framework’s core class files:
For the JumpShip Framework’s AMFPHP Pizza Service Example:
For the JumpShip Framework’s non-essential (but useful) class files including examples:
Latest News
- 04/29/07: JumpShip FINAL RELEASE! Major Update JumpShip version 1.2 Released. See Downloads.
- 02/18/07: Major Update JumpShip version 1.1 Released. See Downloads.
- 12/19/06: Documentation (Alpha v1.0) Released. JumpShip Docs.
- 12/16/06: Pizza Service Example Released. version 1.0 released.
- 12/11/06: Extras Beta version 1.0 released.
- 12/11/06: Core Beta version 1.0 released.
Usage instructions
Visit the JumpShip Docs page for the basics.
See “documentation” folder within the package for the class specifications.
Mailing list
There is a community of users and developers for this project who share their experiences on the mailing list. Please search through the archives to see if your question has been answered before submitting it to the mailing list.
JumpShip: Subscribe and manage your subscription
Subversion repository
This project has a Subversion (SVN) repository at: svn1.cvsdude.com/osflash/jumpship
About
What Is JumpShip?
JumpShip is a Flash Framework, yes another one.
The difference between JumpShip and other frameworks, and the reason I decided to release this as it’s own project, is that it makes an effort not to assume that you are using Flash Remoting (or one of it’s OS incarnations) or Flex. But it also makes an effort not to limit those of you who are. JumpShip also encourages an MVC approach to development. And more specifically a Ruby on Rails approach which assumes a standard development practice rather than trying to accommodate every possible design style. Ruby on Rails calls it “convention over configuration”. It assumes that once we all settle on the best way to accomplish a task, we can assume that we will use that convention for 95% of what we write in the future, and we can thereby gloss over 95% of the inane grunt work that is required to get any application off the ground.
Why?
And this is the point where you moan an say, “Oh Man, not another Ruby on Rails bandwagon jumper.” But Wait! I used to be just like you. And to be fair, JumpShip actually only implements the spirit of the Ruby on Rails philosophy. Obviously we are not Ruby developers, but ActionScript, as an object oriented language, shares the basic principals of Ruby, another object oriented language. So actually a lot of the core concepts behind Rails can be applied equally to ActionScript. But what it borrows most from it is the approach to the Model.
Those of you familiar with MVC know that the Model is the data. The meat and bones. The problem is that in an effort to be flexible, the Model usually ends up being loosely defined and therefore very specific to each application.
Let’s face the facts, about 90% of the time the data is coming from a database, or at least might be at some point. So JumpShip just goes ahead and defines a structure based on an abstracted database.
How?
So basically the Model represents a database table which is essentially a collection of records, all having the same fields. It’s not hard to abstract this in Flash as a collection of Objects all having the same properties. Add the ability to search and sort, manipulate the columns and rows (properties and objects) and you have the the JumpShip Data Model.
As an added benefit, the Model also implements the DataProvider API for “out of the box” compatablility with some Flash components like List, Datagrid, and others.
But that’s just the “M”, what about the “V” and “C”?
Let’s start with the “C”, the Controller. JumpShip started out as a variation of the ARP framework and the Controller is where you can see the most evidence of that. The Controller implements the Command Design Pattern (the same that the ARP framework uses). The JumpShip framework adds a couple of key features though.
JumpShip adds the ability for commands to cascade (in other words, Commands can call other commands). The benefit is that in order to separate functionality you have to break down Commands into their most basic elements. But in many cases, a Command can build on another. If Command B always follows Command A ( → A → B), but you still want the ability to call Command B independently ( → B), JumpShip lets you just call Command A within your Controller (without calling Command B). Command A takes care of calling Command B itself.
Another feature that the JumpShip framework adds is before and after filters. These are hook functions that are automatically called before and after every Command. This provides an easy way to implement validation within your Controller and to independently monitor Controller logic. For instance you would be able to monitor every Command the Controller calls to make sure it makes sense (bug reporting and security protection comes to mind).
View?
The JumpShip framework provides a formal structure for defining the View. Along with the ability to abstract the physical objects on the stage from the Controller and Model, the View also has built in loading control.
If you are dealing with a large application, you definitely do NOT want everything loading at once on the first frame. The view provides basic functionality to have these elements load when you want them to and make sure that nothing else tries to access them before they are loaded.
The View Also provides the ability to link with one or more Model and provide basic data binding. Once the Model is registered with the View, any change in the Model will cause the View to call an update hook function.
What else you got?
The JumpShip Framework also has basic Application State manager , Application Environment manager, and Service Locator classes. The Application State manager tracks the state of the Application as well as records state history. Application State can be used for basic common sense error checking and possibly an “undo” capability or user statistics tracking. The Application Environment tracks whether the current build is a development version ( which may sacrifice performance and reliability at the cost of more bug reporting ) or a production environment ( which probably is most concerned with performance and graceful application errors ). The Service Locator provides basic abstraction between your Flash Application and your data gateway be it Flash Remoting, Flash Media Server or Ruby on Rails.
Not enough, what else?
Although not considered part of the core framework, JumpShip provides a number of useful lightweight tools for basic tasks including a load manager, mouse click manager, object depth manager, and a drag / drop manager, with more to come...
Project Schedule
- Status - In Progress. 07/01/07: Port a version of the JumpShip Framework over to ActionScript 3.0.
- Status - Complete. 04/29/07: Target Final version release date with a Ruby on Rails Gateway, improved Model sort options, improved DataProvider API support and improved documentation.
- Status - Complete. 12/31/06: Add JumpShip Framework Core code examples.
- Status - Complete. 12/10/06: Release first public beta of JumpShip Framework Core and JumpShip Framework Extras
Credits
Jamie Scanlon, owner of JSJStudios.com
License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
projects/jumpship.txt · Last modified: 2007/05/16 21:29 by jsjphoto