SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Using RSL’s - Runtime Shared Libraries
                         Chase Brammer
ABOUT ME




CURRENTLY Developer at Rain Interactive.


Developing for Flex since 2006
Developing for Flash since 2000

Working towards a masters in Information Systems Management at Brigham Young University (BYU)

Website: http://chasebrammer.com
Email: cbrammer@gmail.com
Twitter: chaseb

All of my contact information is listed on my business card, come get one
(I have a big box I will never go through unless you do)
ABOUT ME
RIA DEVELOPMENT
ABOUT RAIN
mediarain.com




   FranklinCovey, NuSkin, Novell, NextPage, HP, MyFamily.com, DataMark, MusicRain, Omniture
RAIN
What started it all
WHAT YOU WILL SEE IN THE NEXT HOUR
If you decide to walk out now, it’s OK. Really.

THE GOOD AND BAD OF RSLs

TERMS

USE CASES
Using the Flex Framework as an RSL to speed up load time
Creating your own RSL
Using an unsigned (non-Adobe) RSL
Using an cross-domain unsigned RSL
Optimizing your RSL
Collaborative work with RSL’s
Implementing RSL with a build process (ANT)

WHAT YOU WILL NOT SEE IN THE NEXT HOUR Specific details are of the actual Flex Framework itself, stump
the presenter with the most outlandish use case you can come up with, or super in depth details of the RSL
(This is a 200 level course after all)
THE GOOD AND THE BAD AND THE UGLY
BUT REALLY WHY USING RSLs ROCK

ADVANTAGES
Reduce file size (faster download)
Library Caching
Code reuse
Faster compile time
Single Point of Distribution/Update
Collaborative and Community Work

DISADVANTAGES
Cross domain issues (crossdomain.xml)
Can't create signed RSL's
Debugging
Quick editing
Must download the whole RSL, doesn’t trim unused classes
THE GOOD AND THE BAD AND THE UGLY
BECAUSE SIZE MATTERS


                                                   Flex with All Framework Components
                     Flex with Button, ComboBox,
                           and TabNavigator


  Flex with Button




Example taken from Ted Patrick’s announcement on RSL’s
THE GOOD AND THE BAD AND THE UGLY
BECAUSE SIZE MATTERS



                                 Flex with Button




                   Flex with Button, ComboBox, and TabNavigator




                       Flex with All Framework Components




Example taken from Ted Patrick’s announcement on RSL’s
TERMS
Because jargon is confusing

RSL Runtime Shared Library

SIGNED RSL Adobe published RSLs (framework, datavis, rpc)

UNSIGNED RSL The RSL for the rest of us

SWZ An Adobe Signed RSL only for RSLs such as data visualization, Remoting, and the Flex Framework

SWC A zip that contains compiled Flash or Flex project that is not a standalone project. Typically a Flex
Library project or a collection of assets exported from Flash

LIBRARY.SWF One of two files that are included in a SWC that hold the assets of the export (classes, modules,
etc...)

CATALOGUE.XML The second file in a SWC that holds the structure and relationships of all the assets

COMPC The Component Compiler, a command line build utility used to create RSLs

BROWSER CACHE Your browsers of choice cache, not to be confused with the Flash Player Cache

FLASH CACHE The Flash Player’s internal cache that is used to store signed RSLs

ANT Automated command line build utility used to compile flex projects
WHAT IS AN RSL
No, it isn’t the soccer team Real Salt Lake


PURPOSE Why spent time using an RSL

To quickly reduce your application’s file size.

Code once, use in many places


HOW DOES IT DO THAT? Kung Fu. As in Neo type of Kung Fu.

Separates the large core of flex and lets your app go faster (like on Star Trek when they launch their core)

If possible loads the RSL from the Flash Cache (signed RSLs only)

If possible loads the RSL from the browser cache (unsigned RSLs only)


DEVELOPMENT Loads into your project just as if it were a local file, only you can’t edit it
FLEX CORE RSLS
Use case #1: How to speed up your application’s load time


Use case Your app is big. Too big. You need it smaller and faster.


Solution Separate your Flex Framework (or Data Visualization/Remoting) from your compiled swf so that
your project loads like greased lightning.
FLEX CORE RSLS
How to do it


Let me show you.... but just for later reference


Right click your project
Select Project Properties
Select ‘Flex Build Path’
Select the ‘Library Path’ tab
Change the Framework linkage to RSL


Be sure to add “use-network=false” in your compiler
settings to avoid the nasty Error #2148 (Sandbox error)
FLEX CORE RSLS
Look at what we did!



Wow We just reduced our file size by 500k with 8 clicks (or so)

What are those extra files?

You will see two extra files in your release directory after you enable the RSL

framework_3.3.0.XXXX.swf
framework_3.3.0.XXXX.swz


These two files are important. In case the end user doesn’t have the framework version you are using
cached, then they will download it from you! If these two files aren’t there... you will have some headache.
FLEX CORE RSLS
Testing our deployment paths

 Clear our cache - IMPORTANT

 The framework RSLs are not stored in the browser cache. They are in fact stored is a secret little place that
 rarely ever gets seen. The Flash Cache. Only signed RSLs can be included in the flash cache, and if you
 don’t know about it existence, it will make debugging a living hell for you.




                   http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html
FLEX CORE RSLS
Testing and changing our RSL deployment path

Testing

The best way to test if your RSL’s are loading in right (and not just loading in from your cache) is to clear
your flash cache, and then move your local framework files (framework_x.x.xxxx.swf/swz) and see if you get
an error.

If you get an error great! That means you have something to work with. Move your files back and make sure
that everything works now.

Changed deployment path

Edit the RSL path, via selecting the RSL url and clicking edit
CREATING YOUR OWN RSL
Use Case #2



Use Case

You have a project that has a core set of components, libraries, or utilities that are pretty much stable and
you don’t want to force the users to re-download all of that every time you release a new build.

Solution

Create a Runtime Shared Library.
CREATING YOUR OWN RSL
Creating a Flex Library
We could do all that we are going to do by using command line compilers (mxmlc/compc), but lets use the
Flex Builder IDE for simplicity

Create a project
Select files you want to include
Thats it!

Now, lets look and see how to use your own, unsigned RSL
USING A CUSTOM RSL
Use Case #3



Use Case

You, a friend, a co-worker, or some dude in India just gave you a SWC, and you want to use it as an RSL

Solution

Import it it into your project, and make it an RSL
USING A CUSTOM RSL
Using your own RSL



Add the SWC to your project

Copy over your compiled SWC in to your libs folder

Right click your project and edit your Library Paths in your
project preferences to add your SWC
USING A CUSTOM RSL
Making your SWC into an RSL

A picture says a thousand words, editing your RSL path
CROSS-DOMAIN RSL
Use case #4: Using a Cross-Domain RSL


Use case Your company has a common set of components, libraries, or assets that you want to share across
multiple projects


Solution Create a Cross-Domain RSL
CROSS-DOMAIN RSL
Too fast, lets digest some of this

TO USE A CROSS-DOMAIN RSL you must have digest enabled

DIGEST A SHA-256 hash that acts as a checksum for your RSL.

WHAT DOES IT LOOK LIKE?

<digests>
   <digest type=quot;SHA-256quot; signed=quot;falsequot;
   value=quot;839c300d3805a839f4731a23169b8551d16ec167ad184eb6dad4b9cc58597d79quot; />
</digests>

HOW TO ENABLE IT

-compute-digest=false

<compute-digest>true</compute-digest>
CROSS-DOMAIN RSL
Use case #4: Using a Cross-Domain RSL


HOW TO INCLUDE A CROSS-DOMAIN RSL

1)   Open project properties
2)   Select Flex Build Path
3)   Select the Library Tab
4)   Click “Add a SWC”
5)   Add your SWC
6)   Open your SWC node
5)   Double click on Link Type
6)   Change the link type to RSL
7)   Change Verification to Digests
8)   Make sure your SWF and SWC are uploaded
9)   Enter your RSL URL, and Policy File URL
OPTIMIZING YOUR RSL
Use case #5: Cutting your RSL in half


Use case You just made an RSL and feel pretty good about yourself. But the client wants the app to load
even faster.


Solution Optimize your RSL by using Optimus Prime! ... er.. the optimizer
OPTIMIZING YOUR RSL
Half the size? Why don’t they make RSL’s for people?


WHAT IS THE OPTIMIZER It is a tool provided by Adobe to cut out the fat of any file, which is debug
information, markup data, and other suspicious characters.


WHAT IS THE RESULT In most cases it will reduce the file of your RSL by more than 50%


WHERE IS THE OPTIMIZER In your Flex SDK bin directory


HOW DO I USE IT like this!

optimizer
-keep-as3-metadata=quot;Bindable,Managed,ChangeEvent,NonComittingChagneEvent,Transientquot;
-input MyRsl.swf
-output optimized.swf
COLLABORATING VIA RSLS
Use case #6: Collaborative Work
WHY WOULD YOU WANT TO DO THAT To be used as a base for work to be expanded upon and shared
throughout a community that has a large base, such as:

Libraries (SVG)
Components (Flex.org libraries)
Frameworks (Nimbus, Cairngorm, Mate, PureMVC)
API’s (Facebook, Twitter)
Utilities (AS3 Core Lib, Internal Company Libraries)


HOW WOULD IT HELP The more people who it, the more likely it will be that it has already been cached


BASE Although RSLs are not the solution for a many user collaborative development of its “self”, it can act as
a very powerful, easy, and maintainable base to build on.
AUTOMATED BUILDS AND RSLS
Use case #7: Deploying RSLs


Use case You need to develop on your Flex Libraries, but what to deploy them as RSLs


Solution Use and automated build process (ANT, RAKE, etc) to create your RSLs
AUTOMATED BUILDS AND RSLS
Use case #7: Deploying RSLs
COMPILE Compile your SWC


EXTRACT Extract your SWF for your SWC


OPTIMIZE Optimize your SWF


MOVE Move your SWF to where you want it (maybe upload it)


COMPILE Compile your application



http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:Flex_3_RSLs
http://www.oreillynet.com/pub/a/oreilly/digitalmedia/helpcenter/programmingflex3/chapter20.html?
page=9
SUMMARY
What was all that again?
Runtime Shared Library

Separates your base (framework, library, components, etc) from your application. The seperated files are
then cached for faster loading.


When should you use the Framework RSLs?

Pretty much always.


When should you use your own RSLs

When you have a big chunk of code that you don’t want to have to load in every time you make a change to
your application


All code samples can be downloaded at
http://www.chasebrammer.com/files/360flex.zip
CONTACT
Get a hold of that one guy

WEBSITE http://chasebrammer.com


EMAIL cbrammer@gmail.com


TWITTER chaseb


Seriously, come get my Business card, I have a whole case of em’

Contenu connexe

Plus de 360|Conferences

Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager360|Conferences
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps360|Conferences
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish360|Conferences
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck360|Conferences
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...360|Conferences
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight360|Conferences
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus360|Conferences
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!360|Conferences
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo360|Conferences
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing360|Conferences
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework360|Conferences
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up360|Conferences
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1360|Conferences
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications360|Conferences
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2360|Conferences
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers360|Conferences
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4360|Conferences
 

Plus de 360|Conferences (20)

Mobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the ManagerMobile Apps- Business Toolkit for the Manager
Mobile Apps- Business Toolkit for the Manager
 
Making Real Money with Mobile Apps
Making Real Money with Mobile AppsMaking Real Money with Mobile Apps
Making Real Money with Mobile Apps
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Inside Mobile Widgets Publish
Inside Mobile Widgets PublishInside Mobile Widgets Publish
Inside Mobile Widgets Publish
 
You Know WebOS
You Know WebOSYou Know WebOS
You Know WebOS
 
Ignite Denver 4 Master Deck
Ignite Denver 4 Master DeckIgnite Denver 4 Master Deck
Ignite Denver 4 Master Deck
 
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...Oğuz	Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
Oğuz Demirkapı - Hands On Training: Creating Our First i18N Flex Application ...
 
Tyler Wright - Undo History with Flight
Tyler Wright - Undo History with FlightTyler Wright - Undo History with Flight
Tyler Wright - Undo History with Flight
 
Chad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from VenusChad Udell - Developers are from Mars, Designers are from Venus
Chad Udell - Developers are from Mars, Designers are from Venus
 
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
Mansour Raad & Anthony Jayaprakash - Yet Another Mapping Framework, NOT!
 
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex GumboErik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
Erik Loehfelm - Experience Design with Flash Catalyst and Flex Gumbo
 
Ryan Phelan - Bending and Flexing
Ryan Phelan - Bending and FlexingRyan Phelan - Bending and Flexing
Ryan Phelan - Bending and Flexing
 
Giorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity FrameworkGiorgio Natilli - Blaze DS Connectivity Framework
Giorgio Natilli - Blaze DS Connectivity Framework
 
Douglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash UpDouglas Knudsen - Great Mash Up
Douglas Knudsen - Great Mash Up
 
Wes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your ApplicationWes Leonardo - Putting AIR into your Application
Wes Leonardo - Putting AIR into your Application
 
Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1Samuel Asher Rivello - PureMVC Hands On Part 1
Samuel Asher Rivello - PureMVC Hands On Part 1
 
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy ApplicationsAdrian Pomilio - Flex Ajax Bridge and Legacy Applications
Adrian Pomilio - Flex Ajax Bridge and Legacy Applications
 
Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2Samuel Asher Rivello - PureMVC Hands On Part 2
Samuel Asher Rivello - PureMVC Hands On Part 2
 
Ryan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderersRyan Fishberg and Joan Lafferty - ItemsRenderers
Ryan Fishberg and Joan Lafferty - ItemsRenderers
 
Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4Ryan Campbell - OpenFlux and Flex 4
Ryan Campbell - OpenFlux and Flex 4
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Chase Brammer - Using RSL's (Runtime Shared Libraries)

  • 1. Using RSL’s - Runtime Shared Libraries Chase Brammer
  • 2. ABOUT ME CURRENTLY Developer at Rain Interactive. Developing for Flex since 2006 Developing for Flash since 2000 Working towards a masters in Information Systems Management at Brigham Young University (BYU) Website: http://chasebrammer.com Email: cbrammer@gmail.com Twitter: chaseb All of my contact information is listed on my business card, come get one (I have a big box I will never go through unless you do)
  • 5. ABOUT RAIN mediarain.com FranklinCovey, NuSkin, Novell, NextPage, HP, MyFamily.com, DataMark, MusicRain, Omniture
  • 7. WHAT YOU WILL SEE IN THE NEXT HOUR If you decide to walk out now, it’s OK. Really. THE GOOD AND BAD OF RSLs TERMS USE CASES Using the Flex Framework as an RSL to speed up load time Creating your own RSL Using an unsigned (non-Adobe) RSL Using an cross-domain unsigned RSL Optimizing your RSL Collaborative work with RSL’s Implementing RSL with a build process (ANT) WHAT YOU WILL NOT SEE IN THE NEXT HOUR Specific details are of the actual Flex Framework itself, stump the presenter with the most outlandish use case you can come up with, or super in depth details of the RSL (This is a 200 level course after all)
  • 8. THE GOOD AND THE BAD AND THE UGLY BUT REALLY WHY USING RSLs ROCK ADVANTAGES Reduce file size (faster download) Library Caching Code reuse Faster compile time Single Point of Distribution/Update Collaborative and Community Work DISADVANTAGES Cross domain issues (crossdomain.xml) Can't create signed RSL's Debugging Quick editing Must download the whole RSL, doesn’t trim unused classes
  • 9. THE GOOD AND THE BAD AND THE UGLY BECAUSE SIZE MATTERS Flex with All Framework Components Flex with Button, ComboBox, and TabNavigator Flex with Button Example taken from Ted Patrick’s announcement on RSL’s
  • 10. THE GOOD AND THE BAD AND THE UGLY BECAUSE SIZE MATTERS Flex with Button Flex with Button, ComboBox, and TabNavigator Flex with All Framework Components Example taken from Ted Patrick’s announcement on RSL’s
  • 11. TERMS Because jargon is confusing RSL Runtime Shared Library SIGNED RSL Adobe published RSLs (framework, datavis, rpc) UNSIGNED RSL The RSL for the rest of us SWZ An Adobe Signed RSL only for RSLs such as data visualization, Remoting, and the Flex Framework SWC A zip that contains compiled Flash or Flex project that is not a standalone project. Typically a Flex Library project or a collection of assets exported from Flash LIBRARY.SWF One of two files that are included in a SWC that hold the assets of the export (classes, modules, etc...) CATALOGUE.XML The second file in a SWC that holds the structure and relationships of all the assets COMPC The Component Compiler, a command line build utility used to create RSLs BROWSER CACHE Your browsers of choice cache, not to be confused with the Flash Player Cache FLASH CACHE The Flash Player’s internal cache that is used to store signed RSLs ANT Automated command line build utility used to compile flex projects
  • 12. WHAT IS AN RSL No, it isn’t the soccer team Real Salt Lake PURPOSE Why spent time using an RSL To quickly reduce your application’s file size. Code once, use in many places HOW DOES IT DO THAT? Kung Fu. As in Neo type of Kung Fu. Separates the large core of flex and lets your app go faster (like on Star Trek when they launch their core) If possible loads the RSL from the Flash Cache (signed RSLs only) If possible loads the RSL from the browser cache (unsigned RSLs only) DEVELOPMENT Loads into your project just as if it were a local file, only you can’t edit it
  • 13. FLEX CORE RSLS Use case #1: How to speed up your application’s load time Use case Your app is big. Too big. You need it smaller and faster. Solution Separate your Flex Framework (or Data Visualization/Remoting) from your compiled swf so that your project loads like greased lightning.
  • 14. FLEX CORE RSLS How to do it Let me show you.... but just for later reference Right click your project Select Project Properties Select ‘Flex Build Path’ Select the ‘Library Path’ tab Change the Framework linkage to RSL Be sure to add “use-network=false” in your compiler settings to avoid the nasty Error #2148 (Sandbox error)
  • 15. FLEX CORE RSLS Look at what we did! Wow We just reduced our file size by 500k with 8 clicks (or so) What are those extra files? You will see two extra files in your release directory after you enable the RSL framework_3.3.0.XXXX.swf framework_3.3.0.XXXX.swz These two files are important. In case the end user doesn’t have the framework version you are using cached, then they will download it from you! If these two files aren’t there... you will have some headache.
  • 16. FLEX CORE RSLS Testing our deployment paths Clear our cache - IMPORTANT The framework RSLs are not stored in the browser cache. They are in fact stored is a secret little place that rarely ever gets seen. The Flash Cache. Only signed RSLs can be included in the flash cache, and if you don’t know about it existence, it will make debugging a living hell for you. http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html
  • 17. FLEX CORE RSLS Testing and changing our RSL deployment path Testing The best way to test if your RSL’s are loading in right (and not just loading in from your cache) is to clear your flash cache, and then move your local framework files (framework_x.x.xxxx.swf/swz) and see if you get an error. If you get an error great! That means you have something to work with. Move your files back and make sure that everything works now. Changed deployment path Edit the RSL path, via selecting the RSL url and clicking edit
  • 18. CREATING YOUR OWN RSL Use Case #2 Use Case You have a project that has a core set of components, libraries, or utilities that are pretty much stable and you don’t want to force the users to re-download all of that every time you release a new build. Solution Create a Runtime Shared Library.
  • 19. CREATING YOUR OWN RSL Creating a Flex Library We could do all that we are going to do by using command line compilers (mxmlc/compc), but lets use the Flex Builder IDE for simplicity Create a project Select files you want to include Thats it! Now, lets look and see how to use your own, unsigned RSL
  • 20. USING A CUSTOM RSL Use Case #3 Use Case You, a friend, a co-worker, or some dude in India just gave you a SWC, and you want to use it as an RSL Solution Import it it into your project, and make it an RSL
  • 21. USING A CUSTOM RSL Using your own RSL Add the SWC to your project Copy over your compiled SWC in to your libs folder Right click your project and edit your Library Paths in your project preferences to add your SWC
  • 22. USING A CUSTOM RSL Making your SWC into an RSL A picture says a thousand words, editing your RSL path
  • 23. CROSS-DOMAIN RSL Use case #4: Using a Cross-Domain RSL Use case Your company has a common set of components, libraries, or assets that you want to share across multiple projects Solution Create a Cross-Domain RSL
  • 24. CROSS-DOMAIN RSL Too fast, lets digest some of this TO USE A CROSS-DOMAIN RSL you must have digest enabled DIGEST A SHA-256 hash that acts as a checksum for your RSL. WHAT DOES IT LOOK LIKE? <digests> <digest type=quot;SHA-256quot; signed=quot;falsequot; value=quot;839c300d3805a839f4731a23169b8551d16ec167ad184eb6dad4b9cc58597d79quot; /> </digests> HOW TO ENABLE IT -compute-digest=false <compute-digest>true</compute-digest>
  • 25. CROSS-DOMAIN RSL Use case #4: Using a Cross-Domain RSL HOW TO INCLUDE A CROSS-DOMAIN RSL 1) Open project properties 2) Select Flex Build Path 3) Select the Library Tab 4) Click “Add a SWC” 5) Add your SWC 6) Open your SWC node 5) Double click on Link Type 6) Change the link type to RSL 7) Change Verification to Digests 8) Make sure your SWF and SWC are uploaded 9) Enter your RSL URL, and Policy File URL
  • 26. OPTIMIZING YOUR RSL Use case #5: Cutting your RSL in half Use case You just made an RSL and feel pretty good about yourself. But the client wants the app to load even faster. Solution Optimize your RSL by using Optimus Prime! ... er.. the optimizer
  • 27. OPTIMIZING YOUR RSL Half the size? Why don’t they make RSL’s for people? WHAT IS THE OPTIMIZER It is a tool provided by Adobe to cut out the fat of any file, which is debug information, markup data, and other suspicious characters. WHAT IS THE RESULT In most cases it will reduce the file of your RSL by more than 50% WHERE IS THE OPTIMIZER In your Flex SDK bin directory HOW DO I USE IT like this! optimizer -keep-as3-metadata=quot;Bindable,Managed,ChangeEvent,NonComittingChagneEvent,Transientquot; -input MyRsl.swf -output optimized.swf
  • 28. COLLABORATING VIA RSLS Use case #6: Collaborative Work WHY WOULD YOU WANT TO DO THAT To be used as a base for work to be expanded upon and shared throughout a community that has a large base, such as: Libraries (SVG) Components (Flex.org libraries) Frameworks (Nimbus, Cairngorm, Mate, PureMVC) API’s (Facebook, Twitter) Utilities (AS3 Core Lib, Internal Company Libraries) HOW WOULD IT HELP The more people who it, the more likely it will be that it has already been cached BASE Although RSLs are not the solution for a many user collaborative development of its “self”, it can act as a very powerful, easy, and maintainable base to build on.
  • 29. AUTOMATED BUILDS AND RSLS Use case #7: Deploying RSLs Use case You need to develop on your Flex Libraries, but what to deploy them as RSLs Solution Use and automated build process (ANT, RAKE, etc) to create your RSLs
  • 30. AUTOMATED BUILDS AND RSLS Use case #7: Deploying RSLs COMPILE Compile your SWC EXTRACT Extract your SWF for your SWC OPTIMIZE Optimize your SWF MOVE Move your SWF to where you want it (maybe upload it) COMPILE Compile your application http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:Flex_3_RSLs http://www.oreillynet.com/pub/a/oreilly/digitalmedia/helpcenter/programmingflex3/chapter20.html? page=9
  • 31. SUMMARY What was all that again? Runtime Shared Library Separates your base (framework, library, components, etc) from your application. The seperated files are then cached for faster loading. When should you use the Framework RSLs? Pretty much always. When should you use your own RSLs When you have a big chunk of code that you don’t want to have to load in every time you make a change to your application All code samples can be downloaded at http://www.chasebrammer.com/files/360flex.zip
  • 32. CONTACT Get a hold of that one guy WEBSITE http://chasebrammer.com EMAIL cbrammer@gmail.com TWITTER chaseb Seriously, come get my Business card, I have a whole case of em’