> Hello again, I have read more Flex documentation, and found a lot of 
> good information regarding the remote objects and the environment, 
> but I have a thought about making a change in the structure of the 
> Flex application, have someone tried to take a module and put it into 
> a sql database as a bytearray, and bring it to the application as 
> remote object and connect module loader to the DTO, is possible to 
> connect the module loader to the byteArray?

In order to make the ModuleLoader use a bytearray, you have to do some
extending of ModuleLoader.  For NitroLM.com, I've created a class
called <nitrolm:EncryptedModuleLoader> that does load ByteArrays
internally.  It uses a public/private key encryption on the module swf
file with the decryption key stored on the server.  Because of this,
an attacker can't get at the key.  Only AFTER a valid NitroLM
licensing transaction happens are you allowed access to the decryption
key.

Basically, all you do is develop a modular application (either put
everything in one module (if you're lazy or have a small app), or do
several modules.  In the NitroLM admin tool, create a new product
code, and generate a library key for each module you have.  You can
then assign those library keys to the product.

Then, when you're ready to deploy, you modify your code to use the
<nitrolm:EncryptedModuleLoader> instead of <mx:ModuleLoader>.  In my
own code, I just comment/uncomment repeatedly during development.  For
a Flex app, you run the module swfs through our AIR app called
AssetEncrypter using the product keys and library keys generated
during setup.  Then you just deploy.  For AIR, you have to unzip the
AIR package, encrypt the modules using AssetEncrypter and then
re-package using the ADT tool in the Flex SDK.  It's not totally
streamlined yet, but I'm always working to improve it.  Here is some
of my demo code with a couple of encrypted modules.

        <mx:TabNavigator id="tabNav" width="100%" height="100%" >
                <mx:VBox label="VBox" backgroundColor="#0000ff"/>
                <!--<mx:ModuleLoader id="circleModule" label="Circle"/>-->
                <nitrolm:EncryptedModuleLoader id="circleModule" label="Circle"
productName="{product_name}" libraryName="{circle_library_name}"
licenseClient="{licenseClient}"/>
                <!--<mx:ModuleLoader id="techSupportModule" label="Tech 
Support"/>-->
                <nitrolm:EncryptedModuleLoader id="techSupportModule" 
label="Tech
Support" productName="{product_name}"
libraryName="{support_library_name}" licenseClient="{licenseClient}"/>
        </mx:TabNavigator>

That's the very high level overview anyway (the stuff I'm allowed to
share).  NitroLM does a lot more than just encryption, and you should
look into it if you're doing any type of enterprise application. 
E-mail notifications, Demo licensing, offline or checked-out license
and other features are some of the main reasons people use it.  For an
open-source or public audience/website type of thing, it's probably
overkill.

If you want to schedule an online demo sometime, just schedule a
meeting with our LM sales guy lmsales [at] simplifiedlogic.com.  He
schedules my time for demos of the encryption stuff.  We'll also have
a presentation at 360 Flex San Jose and a booth there.  The
presentation is by David Bigelow - Making Money with Flex, or
something like that.

-Andrew Westberg

Reply via email to