Ax
Ax stands for Actionscript XML
Please note: This is a work in progress………
In XHTML there is a standard which is used by all coders which enables browsers to render the code into viewable content.
For example, this sentence in XHTML is within paragraph tags <p >exmaple</p >
XHTML (when done properly) is seperated into three conceptual layers.
- Content
- Presentation
- Behaviour
Flash however is generally quite different. In Flash its very common to see the content seperated out (in xml or via loadVars), however the presentation and behaviour are often grouped together. It could be argued that with Flash this makes more sense. There are obvious advantages to this but there are also disadvantages.
What is Ax?
Ax is an attempt at seperating Flash movies into three layers: Content, Presentation and Behaviour.
But more than that, Ax is attempting to develop a standard for Flash.
The most important feature of Ax is the way that content is stored (The Ax file). This is a XML file which has set standards (similar to XHTML) for storing content. Like XHTML this standard is simple and caters for all types of content.
With a content standard, it is then easy to develop a contentRenderer class. The contentRenderer class talks to the presentationClass to work out how to display the different content elements. There would also be a behaviourClass that would handle things like navigation etc.
This means that you could have a working application as soon as you have the content in a Ax standards based XML. You could then extend the base classes to make the content render and behave as you want.
Advantages
- Very fast to develop
- Very easy to change how an application looks or behaves.
- External tools would be available to make development easy: For example, it would be possible to create a PHP renderer that took a Ax file and turned it into XHTML. Or a basic CMS could easily be build to handle updating Flash movies.
- Users could switch style sheets while viewing the movie. This means you could create a vision impaired presentation stylesheet (eg. high contrast, big font size)
- Plugins could be coded and shared. For example if someone created a Ax compatible drop down navigation system, it could be shared and other coders could drop the class straight into their app and it should work.
- You could have different behaviour and presentation for different devices.
- Standards are really good
- Easier to develop.
Example
This is an example of how Ax may work in its simplest form
function Application(){
// load fancy stuff only for those who can handle/want it
if(user == "someone who needs content to be accessible"){
presentation.setStyleType("highContrastStyleSheet");
navigation.setNavigationType("simpleList");
behaviour.setBehaviourType("none");
}else{
presentation.setStyleType("fancyStyleSheet");
navigation.setNavigationType("dropdowns");
behaviour.setBehaviourType("fadeIn");
}
// load content
contentRenderer.loadAx("myContent.xml");
}
IS this MVC??
No. Not really.