Solved

Flex Architecture question - combing projects

Posted on 2011-03-18
7
260 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
ID: 35168902
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
ID: 35244571
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
ID: 35244625
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 1

Author Comment

by:coldchillin
ID: 35343361
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
ID: 35348580
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
ID: 35351683
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
ID: 35351718
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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Flex automation silktest 3 924
regular expression:- validate string of numbers 1 425
Erro in Out Memory FLEX 3 3 401
ComboBox ItemRenderer inside Datagrid 2 1,073
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 the steps required to use the default Photos screensaver to display branding/corporate images
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

856 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