Adam Flater » Inside RIA http://www.adamflater.net Tech, UX, Design Fri, 13 Dec 2013 05:00:11 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.1 LFFS – 12: Flex Builder Part 2 – Getting Acquainted With The Workbench http://www.adamflater.net/2008/06/24/lffs-12-flex-builder-part-2-getting-acquainted-with-the-workbench/ http://www.adamflater.net/2008/06/24/lffs-12-flex-builder-part-2-getting-acquainted-with-the-workbench/#comments Tue, 24 Jun 2008 20:23:00 +0000 adamflater http://www.adamflater.net/?p=58 box_flexbuilderstandard3_150x150The second post in our sub-series on Flex Builder is out!

Read here: LFFS – 12: Flex Builder Part 2 – Getting Acquainted With The Workbench

Also, we’ve registered www.learningflexfromscratch.com as a shortcut to our content on Inside RIA.

thanks for reading
-adam

]]>
http://www.adamflater.net/2008/06/24/lffs-12-flex-builder-part-2-getting-acquainted-with-the-workbench/feed/ 0
InsideRIA Post – More on Static Code http://www.adamflater.net/2008/05/16/insideria-post-more-on-static-code/ http://www.adamflater.net/2008/05/16/insideria-post-more-on-static-code/#comments Fri, 16 May 2008 15:57:00 +0000 adamflater http://www.adamflater.net/?p=53 shot_1

I have a new post up on InsideRIA called : More on Static Code. This is in response to the high demand that I saw in my blog analytics for a post I did sometime back on this blog called Static Code Blocks in ActionScript!.

I hope you find it helpful.
-adam

Original post from: http://www.developria.com/2008/05/more-on-static-code.html

static.jpg

One of the most popular posts on my blog adamflater.net has been Static Code Blocks!. Due to the amount of requests for that post I thought it made for a good topic to feature on InsideRIA regarding ActionScript and static code.

First off, what is static code? Static code is executable code that is said to belong to a Class. An instance method of an Object exists N times for the N instances of the Class type of Object, but static code exists only once no matter how many instances of the Object exist. The other difference between an instance method and static code is that static code has a static scope. In other words, the code executing in the static block may only access the other static members of the Class that it belongs to.

There are essentially three ways to create static code blocks in ActionScript: Using the Mixin Class meta tag, wrapping the code in an unnamed block, and using a static method initializer pattern. In reviewing each of these solutions it’s important to consider order of execution and scope.

So, let’s take a look at these three solutions in the order that they’re executed.

1. Using a static var as an initializer

This solution is executed by the Flash Player first out of the other two solutions. It involves using a static variable to call a static method.

Generally it looks like this:

1.private static var initialized : Boolean = initializer();
2.private static function initializer() : Boolean
3.{
4.trace"static method init'er" );
5.return true;
6.}

In this example initialized is a static variable that technically belongs to the Class (not the Object). Although this variable is accessible by the Object it “lives” at the Class level. When the class is being loaded by the Flash Player the variable initialized is created and assigned the value returned by the initializer method. Like the other examples, this code is executed once no matter how many times the Class it belongs to is instantiated.

2. Unnamed code block

If, for some reason, you’re using the static initializer pattern shown in the first example and you also have an unnamed code block in your class, the unnamed code block will be executed second. A simpler example is:

1.{
2.trace"this is a static block" );
3.}

Again, the scope of this block is the static scope (ie Class members are accessible).

3. The Mixin meta tag

The last to execute in this series of static code blocks is the Mixin meta tag. An example of this solution is:

1.[Mixin]
2.public class StaticBlocks
3.{
4.public static function init( systemManager : ISystemManager ) : void
5.{
6.trace"mix-in init method" );
7.}  
8....

In this solution the init method also has a static scope limited to the Class it belongs to, but in addition there is a reference passed into the method to the application’s SystemManager called systemManager. The system manager provides access to many interesting areas of your application. SystemManager is also available via the static reference:Application.application.systemManager however, in the previous two examples the classes needed to obtain a reference the SystemManager using Application.application.systemManager have not yet been created. By using the Mixin tag you’re guaranteed that the Flash Player / Flex Framework has initialized and created the Application and SystemManger classes.

It’s equally important to note that the other two solutions executed before the Application and SystemManager have finished initializing. This is important if you have some code that you need to have executed before these classes finish their instantiations.

Aside from initializing custom styles in components you may not find a lot of uses for static code blocks in a typical Flex application, but these techniques can come in handy if you’re building a service API or Framework in Flex.

I hope this was a valuable follow up post to my original effort outline static code blocks. I’d love to hear your questions and comments.

]]>
http://www.adamflater.net/2008/05/16/insideria-post-more-on-static-code/feed/ 0
LFFS – 9 – MXML Continued… And A Sample Application For You To Work With! http://www.adamflater.net/2008/05/02/lffs-9-mxml-continued-and-a-sample-application-for-you-to-work-with/ http://www.adamflater.net/2008/05/02/lffs-9-mxml-continued-and-a-sample-application-for-you-to-work-with/#comments Fri, 02 May 2008 19:42:00 +0000 adamflater http://www.adamflater.net/?p=50 The latest post in the Learning Flex from Scratch series is up. This post continues exploring the MXML language and leaves you with a uncompleted application to finish. The first “homework assignment” of LFFS, if you will. Check back next week for explanation of the solution Scott came up with.

thanks for reading
-adam
]]>
http://www.adamflater.net/2008/05/02/lffs-9-mxml-continued-and-a-sample-application-for-you-to-work-with/feed/ 0
LFFS – 7: Helpful Resources For Learning Flex (part one) http://www.adamflater.net/2008/04/10/lffs-7-helpful-resources-for-learning-flex-part-one/ http://www.adamflater.net/2008/04/10/lffs-7-helpful-resources-for-learning-flex-part-one/#comments Thu, 10 Apr 2008 16:51:00 +0000 adamflater http://www.adamflater.net/?p=48 The latest post in the Learning Flex from Scratch series is up. It focuses on the online resources Scott has found useful while learning Flex. We’ll be doing more of these posts as the series continues, but you can also check out the del.icio.us account that Scott setup for LFFS. Here you will find the URLs of the resources he finds valuable while learning Flex and writing Learning Flex from Scratch.

thanks for reading
-adam
]]>
http://www.adamflater.net/2008/04/10/lffs-7-helpful-resources-for-learning-flex-part-one/feed/ 0
More Inside RIA Blogging http://www.adamflater.net/2008/04/09/more-inside-ria-blogging/ http://www.adamflater.net/2008/04/09/more-inside-ria-blogging/#comments Wed, 09 Apr 2008 17:29:00 +0000 adamflater http://www.adamflater.net/?p=47 360flex-sjcApart from the Learning Flex From Scratch series I’ll be doing some guest blogging on my own from time-to-time. My first post is on 360|Flex San Jose.

Thanks to Rich for making me a two time Inside RIA guest blogger.

]]>
http://www.adamflater.net/2008/04/09/more-inside-ria-blogging/feed/ 2
LFFS – 5 & 6 are out http://www.adamflater.net/2008/04/04/lffs-5-6-are-out/ http://www.adamflater.net/2008/04/04/lffs-5-6-are-out/#comments Fri, 04 Apr 2008 14:27:00 +0000 adamflater http://www.adamflater.net/?p=46 Looks like I forgot to do a post announcing LFFS 5 and now 6 is out as well.

In LFFS 5 Scotty is taking us into the world of ActionScript loops and conditionals. Need a beginners look at a for, for in, for in each, while, or do while loop? Look no further than LFFS.

In LFFS 6 we’re jumping into Arrays. This post is an introductory look at using Arrays in ActionScript. It is by no means comprehensive, and doesn’t touch on collections yet, but it’s a good way to jump in to the concept.

Thanks for reading
-adam

]]>
http://www.adamflater.net/2008/04/04/lffs-5-6-are-out/feed/ 0
LFFS – 4: Actionscript 3.0 (Part 1) http://www.adamflater.net/2008/03/12/lffs-4-actionscript-3-0-part-1/ http://www.adamflater.net/2008/03/12/lffs-4-actionscript-3-0-part-1/#comments Wed, 12 Mar 2008 23:30:00 +0000 adamflater http://www.adamflater.net/?p=44

Our latest post in the Inside RIA series “Learning Flex from Scratch” is up. It’s called: LFFS – 4: Actionscript 3.0. In this post Scott begins his journey into the syntax of Actionscript 3.0. This first post is a look at how to write a basic class… posts will follow with examples on writing loops, if-then conditionals and more..

stay tuned
-adam

 

]]>
http://www.adamflater.net/2008/03/12/lffs-4-actionscript-3-0-part-1/feed/ 0
LFFS – 3: Object Oriented Language http://www.adamflater.net/2008/02/29/lffs-3-object-oriented-language/ http://www.adamflater.net/2008/02/29/lffs-3-object-oriented-language/#comments Fri, 29 Feb 2008 16:41:00 +0000 adamflater http://www.adamflater.net/?p=41 Our latest post in the Inside RIA series “Learning Flex from Scratch” is up. It’s called: LFFS – 3: Object Oriented Language. In this post we unpack the definition and need for an object oriented language and also define object oriented concepts that are relevant for our next post on ActionScript.

Stay tuned.. thanks for reading.

]]>
http://www.adamflater.net/2008/02/29/lffs-3-object-oriented-language/feed/ 1
LFFS – 1: Meet the Authors, Meet Flex http://www.adamflater.net/2008/02/12/lffs-1-meet-the-authors-meet-flex/ http://www.adamflater.net/2008/02/12/lffs-1-meet-the-authors-meet-flex/#comments Tue, 12 Feb 2008 17:54:00 +0000 adamflater http://www.adamflater.net/?p=34 Our first post is up on the O’Reilly Inside RIA Site.

LFFS – 1: Meet the Authors, Meet Flex

This first post is an introduction of Scott and myself and a way to set a base for what we’ll be up to in the coming posts. Our next post is called Flex Defined. In Flex Defined we’ll define the major topics of Flex that are important for a novice learning Flex to be aware of.

You’ll also be able to find the aggregation of all our posts at: InsideRIA: Adam Flater and Scott Sheridan Archives

]]>
http://www.adamflater.net/2008/02/12/lffs-1-meet-the-authors-meet-flex/feed/ 0
Blogging on O’Reilly’s Inside RIA http://www.adamflater.net/2008/02/12/blogging-on-oreillys-inside-ria/ http://www.adamflater.net/2008/02/12/blogging-on-oreillys-inside-ria/#comments Tue, 12 Feb 2008 08:13:00 +0000 adamflater http://www.adamflater.net/?p=33 I feel very fortunate to have been asked to be a part of the new O’Reilly Inside RIA blog site. Rich Tretola asked me if I would like to be involved a short time ago. I decided to take a stab at something that isn’t yet that prominent in the blogosphere: “Learning Flex from Scratch”. This is the title of the series that my friend Scott Sheridan and I are writing for Inside RIA. Scott is new to Flex and we’ll be covering all the stuff he’ll be learning to become a Flex developer.

Here’s our summary for the series:

This series of installments will chronicle the learning of a complete beginner as he attempts to become a Flex developer. The series will culminate with the production of a working application built in Flex and deployed on the web. Our hope is to create a reference that will serve as a guide to those new to programming and wishing to step into the world of Flex.

Check out our bios: Inside RIA Contributors
]]>
http://www.adamflater.net/2008/02/12/blogging-on-oreillys-inside-ria/feed/ 0