Solved

Flex Architecture question - combing projects

Posted on 2011-03-18
7
256 Views
Last Modified: 2012-06-27
I have an application which is really a site which contains two frames - nav and body.

The body contains logic to display different files, each with it's own .swf file.

Each .swf file generally has a single .mxml file creating the presentation layer, with optional class/components, etc.

I'm considering consolidating, but not sure if I should/or the best way. Right now it's simple: show this .swf or that .swf, etc. If I convert to a single .swf...what's the easiest way to "show this .mxml source or that source, etc."
0
Comment
Question by:coldchillin
  • 4
  • 3
7 Comments
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
Comment Utility
Right now it's simple: show this .swf or that .swf, etc. If I convert to a single .swf...what's the easiest way to "show this .mxml source or that source, etc." ???

"View Source" available per Application.

If you want create two SWF files you can create one Application and attach two ModuleLoader (s)
Now change mx:Appliaction to mx:Module in both files, and you will able to share View Source for both.
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
dgofman,

If we understand each other correctly, my site is broken into about 20 projects. Upgrades to the IDE require that each project be imported and reconfigured, and changes require compilations to individual projects.

What I'd like to do is consolidate everything into a simple compilation, and single .swf file.

Does the module loader load a .mxml file, or a .swf?
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
Yes, that is nice style to use Module(s).
You will reduce downloading time for your client as well as caching SWF on the client side.
For example you have 20 projects if you will compile into 1 SWF you will get around 2-10 MB file.
If you will modify in project A MXML file your clients should download again 2-10 MB file. If you will use ModuleLoader you will compile 20 SWF and one SWF wrapper class. In this case if you will modify project A you just need to provide to your client URL to A.swf file.

To handle replacing old A,swf by new A.swf you mey need to implement a timestap or version id.

Example:

A.swf?v=1

you modify A.mxml update your HTML file by calling

A.swf?v=2
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 1

Author Comment

by:coldchillin
Comment Utility
Doesn't each project require 1 application file?

Let's say I have 4 Projects

Project Wrapper
Project Navigation
Project Home
Project About

Project Wrapper will be a single .mxml file with Application tags. Within those tags I will have a ModuleLoader. One will load Navigation.swf, and the other will load either Home.swf or About.swf

--Wrapper.mxml

<mx:Application...

<mx:ModuleLoader id="modLoader"  url="Navigation.swf?v=1.0"  
preinitialize="modLoader.applicationDomain=ApplicationDomain.currentDomain"/>

<mx:ModuleLoader id="modLoader"  url="Home.swf?v=1.01"
  preinitialize="modLoader.applicationDomain=ApplicationDomain.currentDomain"/>
</mx:Application>

For Projects Navigation, Home, and About, I will have a single .mxml file that opens with mx:Module tags, or mx:Application tags?
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
I cannot understand why you have any problems?

Ok here is example

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" viewSourceURL="srcview/index.html">
	<mx:ModuleLoader id="modLoader1"  url="Navigation.swf?v=1.0" />
	<mx:ModuleLoader id="modLoader2"  url="Home.swf?v=1.01"/>
</mx:Application>

Open in new window


Navigation.mxml and Home.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="400" height="300">
</mx:Module>

Open in new window



Now Click on menu Project->Export Release Build...
Click on check box "Enable view source"
And button Finish

Execute you project, right click and you will able to see Application and two modules in the same HTML file
0
 
LVL 1

Author Comment

by:coldchillin
Comment Utility
I have two projects here: Wrapper and Main.

The Wrapper.mxml looks like this:

<s:Application...>
        <mx:ModuleLoader id="modNav" url="apps/nav.swf?v=1" width="100%" height="80" />      
      <mx:Label id="out" text="Hey there" />
      <mx:ModuleLoader id="modMain" url="apps/nav.swf?v=1" width="100%" height="100%" />
</s:Application>

But the output stacks everything on top of each other instead of one after the other?!?!
0
 
LVL 29

Expert Comment

by:dgofman
Comment Utility
You have to check on line tutorials migration Flex 3 to Flex 4.
The big difference between 3 & 4 you have to add layout tags.

<s:layout>
    <s:VerticalLayout/>
</s:layout>
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now