Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Flex Architecture question - combing projects

Posted on 2011-03-18
7
Medium Priority
?
263 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 29

Accepted Solution

by:
dgofman earned 2000 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Files go missing when using DFS (Distributed File System) Replication and how to recover them and fix it.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Suggested Courses

670 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