tutorials flex server_apache_iis
Flex Module for Apache and IIS
Article written the 05/05/2007 17:06.
By ekameleon ( ekameleon ).
Here is a quick article discussing the Flex module for the Apache and IIS server available recently on Adobe's labs. This module is a web-tier solution which allows you to compile swfs with the server side Flex2 SDK compiler.
Server Side? Another Solution?
Before talking about the Flex module for the Apache and IIS server, I want to make you aware of the opensource ServerSideSWF solution.
This JAVA solution uses MTASC and SWFMill to compile server side swfs and to avoid leaving them in the browser’s cache.
The only small problem with this use is that it limits the creation of the swf code in AS2. With a propagation level of more than 80% of FlahPlayer9 it is more interesting in my opinion to go straight to a AS3 solution.
Installation of the Flex module
Regarding its usage, the Flex module is easy to install on a Apache 1.x/2.x server on Windows, MacOS and Linux but also on a IIS server (although I haven’t tested the latter). I have tested it on my local WAMP server. The installation went very well, I just needed to relaunch Windows XP at the end of the installation (classic). During the installation you need to target the Flex2 SDK directory and that of the Apache server and then install the rest.
In the end at the root of directory www/ of the server we find a samples/ directory containing all the usage examples of the module. I have quickly done a small test by creating the file Test.mxml with the following code:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Panel title="Test"> <mx:Label text="Hello World !" fontSize="25" /> </mx:Panel> </mx:Application>
You just then need to open FireFox (or IE for those that still use it) and to type the address: http://localhost/Test.mxml and then incredibly the file compilation seems quick and the swf appears in the page.
I will have to look further into this to see if we can add options to the compilation (I think that we probably can).
Downloads and documentation
Remarks
Remark 1: I have quickly read the conditions of use of this module and I wonder if the module will remain free when it is no longer in beta version? I hope so, I haven’t seen anything about it on the labs. But I need to be careful because often my English lets me down! With this new orientation of Adobe they just need to make Flex SDK opensource -it would be really cool that the module follows the same route! At worst it will be very simple to put in place an SDK based solution once it is opensource… it will just take a bit of time to redo what Adobe have already put on place.
Remark 2: To return to ServerSideSWF it is very possible that the authors of this solution will adapt their work by using the Flex compiler. Even if for the moment I prefer the idea of installing the module on an Apache server instead of a JAVA server, I just produce more applications which work with an Apache server than a JAVA one. On the other hand I prefer an opensource module to a proprietary one… we will have to wait and see what happens. For the moment I haven’t really needed to generate server side swfs, the security of my applications are generally concentrated on the content which is in the database – but hey these things evolve quickly and one day or another I may have a client who wants me to use this type of solution. It’s just a case of making the correct choice.
Tutorial ALCARAZ Marc (eKameleon) 2007 - You can view this tutorial and its comments on my blog.
Mediabox Training Centre © 2000 - 2008 All rights reserved.
Adobe Authorized Training Centre. State convention under number 25 14 02167 14.
Mediabox : SARL au capital de 62.000€ - Activity number: 25 14 02167 14 - SIRET : 493 716 468 00027
MEDIABOX, 102 Avenue des Champs Elysées, 75008 PARIS - Tel. +33(0)2.31.91.96.89 - Fax. +33(0)2.72.68.56.42


