ActionScript 3 Site Framework - Fosfr
There are many different approaches to develop RIA based web sites. Flash sites are particular appealing to businesses or individuals involving in rich media contents. Fosfr is an ActionScript 3 site framework that is developed to build full Flash site. InfoQ interviewed Fosfr creator, Jeff DePascale, to learn more about the insights.
Q. What made you start developing the Fosfr framework?
A. The vast majority of work that I do revolves around micro-site development. Fosfr grew initially out of a need for consistency in those builds. Originally a collection of classes in AS2 strictly designed for site builds, the ground up build of Fosfr as an AS3 framework was designed to expand upon that and provide a stable, consistent base for all of my Flash builds, whether micro-site, standalone SWF, or otherwise.
Q. Why do you think there are needs for AS3(or Flash) Site?
A. There are arguments in both directions for whether Flash is beneficial to the internet or is simply crowding it with unsearchable websites with poor UI. Personally, I think that there is a place for every technology, and to try and say one is more or less appropriate than another in a medium as disparate as the internet is misguided. Does Flash have its shortcomings? Yes, of course it does - SEO is very high on that list. Is flash used inappropriately in some instances? Yes, it definitely is. But, when used because of its strengths, Flash provides immersive, rich experiences that reach an immense previously installed audience.
Q. Could you describe the general architecture of Fosfr?
A. Fosfr, in its full implementation, is built around a three-tiered SWF structure. There is the core, or main SWF, which houses the preloader and acts as a holder for the project. On top of that is the shell SWF, which contains all of the constant site elements, such as navigation, footers, etc. Finally, changeable content is contained within sub SWF files.
The real benefit of Fosfr lies in its document classes. Fosfr provides custom doc classes that all .as files can extend (including external classes), providing access to document level custom methods for debugging, tracking, and navigation, as well as all of the other components of Fosfr, such as access to cookies, url info, and more. From anywhere within a project you can reference the fosfr object directly and gain quick access to any aspect of the framework, as well as any SWF currently loaded within the project.
An external XML configuration file that allows access to all the properties of the major components of Fosfr directly from the xml file drives the entirety of the project. The entire framework is instantiated in just a few lines of code per .as file thanks to the document classes doing all of the connection work in the background. You can be up and running in minutes with a fully functional site.
Fosfr also is integrated with Prequel, which is a preloading API I also developed, and SWFAddress, which is handled automatically by the framework, completely hands off. Custom functionality for sub SWF's with SWFAddress is easily implemented from the Fosfr document classes.
Additionally, Fosfr can be implemented with just a main and shell file without navigation/ SWFAddress functionality if you only require one SWF file and a preloader for it, or as a standalone SWF by using FosfrLite, which is included in the framework. FosfrLite also makes use of the configuration XML file optional.
A. Can I integrate Fosfr with existing CMS or even blogging platform such as Wordpress?
Q. Fosfr's configuration XML file contains a node specifically for custom site parameters. By interfacing with this portion of the xml file directly from a CMS or an XML editing plugin, any aspect of a custom SWF files built on Fosfr can be easily manipulated. Currently there are no plans to build custom plugins for Wordpress or the like for Fosfr integration, but I wouldn't rule it out for the future.
A. What development tools you are using to develop Fosfr? BTW, does Fosfr have anything to do with Flex or will it?
Q. I developed Fosfr using FlashDevelop, that's all I develop on these days. For debugging it's a combination of the custom debugger built into Fosfr itself and the standard flash player debugger versions. I currently don't have any plans for incorporating Fosfr into Flex.
A. What's your plan for Fosfr?
Q. I am currently at .8 release for Fosfr. Prior to the 1.0 release I plan on completing the custom event and notification handling system, adding a few more features to the debugger, and hopefully integrating the new, more robust version of Prequel I've been working on. I have more modules in development that have yet to be incorporated in public releases for tab management and sound management, as well as plans for additional doc classes for tying in closely to papervision3D site builds - these features and more will all come after the 1.0. Most important right now is finalizing what is currently in place, creating quick start guides, and hopefully creating an AIR app to turn the config XML file into a wizard. Ideally I'd like developers to be able to pick up Fosfr in under 30 minutes, and I think that the low ramp up time for Fosfr is one of its strengths. But without quick start guides and the wizard, that's not going to happen. Fosfr is exceptionally helpful and time saving, but only if you understand how to jump in! I have a real problem with API's that don't really tell you how to use them. Fosfr will never be like that after the 1.0. So that is job number one right now. From there I will have a confident 1.0 build and then will try and raise some public awareness of the project, which has been intentionally kept to a minimum thus far.
A. Where is the name "Fosfr" coming from?
Q. Technically…it was 'Flash Open Source Framework'. However, due to the trademark issues seen with SWFObject and SWFFit formerly using 'Flash' in their names, it is now strictly Fosfr. Besides, it sounds cool.
InfoQ will keep tracking and reporting the development of Fosfr.
Does it use spring AS?
Juergen Hoeller Jul 22, 2014