 |
 |
|
|
|
What are the Advantages of Localization with Flex Resource Bundles? |
|
Saturday, 09 August 2008 |
QUESTION:
I have a project that has to be localized. I've done some localization in Flash in the past, but not in Flex. I've been reading about resource bundles. Do you know what the advantages are to using them over simple XML data?
Rather than updating compiler directives and recompiling to add a new language, why not just have an XML file that you load in at runtime? As long as the embedded fonts support the characters in the new language, that should solve the problem right? That's how I've done it in the past in Flash. It seems like they've made it more complicated in Flex by forcing a recompile to add a new language.
ANSWER:The main benefit of Flex’s resource bundles is that the MXML components you make can all bind to a property on a framework-provided Singleton to get their labels. It's a very useful out-of-box feature for the Flex Framework to provide. Although you can use this approach if you’re building your Flex apps with PureMVC, you’ll find the method of loading XML at runtime (or using 'baked-in' XML) with a Proxy and distributing it to the view components by sending Notifications to the Medaitors a more natural thing to do for 2 reasons:
1.) It mirrors the process that is used to get any data into the view components from an external source. Things move from the Model tier to the View tier by Notification, not Flex binding. Inside the view component, sub-components may bind to the local reference to the data. This same process works the same for labels and tooltips. Fewer ways of doing the same thing makes the overall application easier to understand and maintain.
2.) It’s a platform-neutral way of doing it. That means it’ll be easier to migrate to/from (or integrate with) other platforms such as SilverLight or JavaFX. -=Cliff> |
|
|
PureMVC on the Web
|
João Pescada has produced a nice PureMVC / AS3 demo - a searchable image gallery. |
|
Jonathan Campos has put together a nice introductory PureMVC article with an example built around the Netflix API. • Netflix API with PureMVC - Article
|
The guys over at Pyjamas (a Python port of GWT) have made their compiler so efficient that it can take virtually any Python library and it will compile to Javascript. They loved the look of PureMVC Python, and decided to do a couple of demos that use it. • Pyjamas Project • EmployeeAdmin Demo: Original / Pyjamas • Pyjamas PureMVC Timesheet Demo |
|
Chandima Cumaranatunge, co-author of the O'Rielly book AS3 Design Patterns, and long-time PureMVC community member recently created a simple Flash/AS3 MultiCore demonstration application accompanied by an informative article that's an excellent introduction to the benefits of working with MultiCore. • Who Moved the Cheese? - Demo / Source / Article
• ActionScript 3 Design Patterns |
|
Ahmed Nuaman has published a well conceived and received AS3/PureMVC tutorial at FlashTuts.com. It's a good place for the learner to get their feet wet, and goes into the difference between using PureMVC with Flex as opposed to Flash or pure AS3. • Understanding the PureMVC Open Source Framework • FlashTuts Website • Ahmed's Website
|
|
Recent Project Activity
|
The PureMVC MultiCore framework for
Native JavaScript is now available. It has no dependency on other frameworks and provides its own optional namespace and class simulation. |
|
PureMVC Standard Version for Perl 1.0 has been released, complete with unit tests and online documentation. • PureMVC Standard Framework for Perl
|
|
Release 1.3 of the AIR DesktopCitizen Utility which allows applications to remember their window size, position and maximized/minimized state
each time it is launched. It also provides a facility for requiring
confirmation (or executing some shutdown process) before the application
window closes.
• AS3 / AIR Desktop Citizen Utility • CodePeek Demo |
|
The classic PureMVC EmployeeAdmin Demo has been ported to yet another language! Although PHP is usually thought of as a server language, using PHP-GTK, Sasa Tarbuk recreates th a desktop app. |
Version 1.0.8 of the PureMVC Java MultiCore port is now available. It supports JavaFX and handles threading properly.
|
|
|