Untitled Document

Order Today!

Order Now & Save $49!
Table of Contents
Subject of the Book
Sample Chapter
Blitz Interview

Chapter 11 Samples

Errata/Updates

ISBN 0-9777622-2-X
Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters Perfect AC (USA)

"I think that Flex for rich Internet client applications can become a major player. Its easy cross-platform support removes many programmer headaches, the component model offers powerful library reuse, and the result produces a very comfortable and appealing interface for the client to use. Because this book teaches you how to use Flex along with the dominant server-side development tool (Java), it?s an ideal introduction if you want to learn how to leverage these technologies."

- Bruce Eckel, author, Thinking in Java

 

RIA With Adobe Flex and Java Book Errata
Digg This!

Please submit your findings to the book authors by sending an email at info at faratasystems dot com

page 113. Replace the namespace riabook with mafia

package com.theriabook.tax{
import com.theriabook.namespaces.*;
public class Tax
{
regular static function calcTax():Number{
return 3500;
}
riabook static function calcTax():Number{
return 1750;
}
}
}

page 114. Use mafia namespace to match the changes above

use namespace riabook;
and the amount of the tax to be paid will be substantially lower. Besides the directive use that affects
the entire block of code, AS3 permits finer-grained notation to refer to a specific namespace
with a name qualifier (a double colon). In our example, this may look like:
tax = Tax.riabook::calcTax();


 Page 131,
The instructions I would add to page 131 (Gas Station example) after you instruct the reader to add the code snippet so that filtering by message

type (the combo box) will occur.  I believe you should also add an instruction to the user to add
  change="msgList.refresh()"

to the mx:ComboBox control.  Otherwise the user can change the combo box  selection, but the filter will not be applied to the datagrid.

 Pages 147-148, listing 4.41 and 4.42 - the following code in listing 4.42:

<ctrl:LargeGreenButton    greenClickEvent="greenButtonHandler(event)"/>

should be changed to

<ctrl:LargeGreenButton    addItemEvent="greenButtonHandler(event)"/>

In listing 4.41, the name given to the Event is addItemEvent and that is the event that is dispatched in the greenClickEventHandler function (may
want to also change that function's name).  So the custom LargeGreenButton component (listing 4.41)  does not have a greenClickEvent property but does have an addItemEvent property.

Therefore in listing 4.42, where the reader is shown an example of using the LargeGreenButton component, the propery name should be addItemEvent
not greenClickEvent.

Page 168.  After we wrote the portfolio example, Adobe changed the API and explode radius has to be under 1, for example exploderadius=".2".  Change it to make the pie slice to work properly on the click event. See the source of this application deployed at : http://samples.faratasystems.com/portfolio/PortfolioRpcDemo.html

Page 185,  Listing 5.20 (financialnews2.mxml)  this line:

<mx:XMLListCollection id="newsList" source="{newsFeed.result.channel.item}" />

 
should read

 
<mx:XMLListCollection id="newsList" source="{newsFeed.lastResult.channel.item}" />

 Page 185,

FinancailNews2.mxml exposes a property named security and in PortfolioRPCDemo.mxml  binds the security property to the PortfioloView5’s selectedSecurity property. When the program first runs, no item is selected in the datagrid, so the selectedSecurity property is null and thus the value of security is also null.  Thus this function in FinancialNews2.mxml may not receive a correct value when the application first starts. 

                                                 public function set security(value:String):void {

                                                                this.title = "News: " + value;

                                                                newsFeed.send({s:value});

                                                }

 Thus the call to newsfeed.send will not have a correct value and the HTTPService will fail and the fault event handler will run.  I modified the above function to:

 
public function set security(value:String):void {

                                                                this.title = "News: " + value;

                                                                if ( value.length > 1 )

                                                                  newsFeed.send({s:value});

                                                }

So that the HTTPService send method is only called if value has  a length.  After making this modification the code ran fine from the start.

Page 449. Missing comma between the arguments in the signature of the setFormat function. It has two arguments: dgc and formatString.


Page 548, listing 13.5 – The loadShow method needs to assign a LoaderContext object when calling photo.load so that it checks crossdomain policy files. The following line

photo.load(new URLRequest(photoNode.@source));

should be changed to

var context:LoaderContext = new LoaderContext(true);
photo.load(new URLRequest(photoNode.@source), context );


Page 552, The call to show.playShow is not required in the service result event code.


Page 558, listing 13.11 – The following code

if(sound!=null) { sound.play(gotoTime); }

should be changed to

if(sound!=null) { sound.play(gotoTime * 1000); }


Page 562, listing 13.16 – The bindings in the source attribute of the image component should be updated to reference e4x attributes as follows:

source=" http://static.flickr.com/{data.@server}/{data.@id}_{data.@secret}_s.jpg"


Page 564, listing 13.18 – The bindings in the dataProvider attribute and code in the change attribute of the gallery TileList component should be updated as follows:

dataProvider="{service.lastResult.photos.photo}"

change="selectSlide('http://static.flickr.com/' + event.currentTarget.selectedIte
m.@server + '/' + event.currentTarget.selectedItem.@id + '_' + event.currentTarget.selectedItem.@secret + '_m.jpg', 10);"

Page 615. The first call in the function  xlResend() has extra parentheses and should read  fxMetadata();
Untitled Document

Book Authors

Yakov Fain is a Principal Consultant of Farata Systems. He's responsible for the Enterprise Architecture and emerging technologies. Yakov authored several Java books, dozens of technical articles, and his blog is hugely popular. Sun Microsystems has nominated and awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. Yakov holds BS and MS in Applied Math. You can reach him at yfain@faratasystems.com. He is Adobe Certified Flex Instructor.


Dr. Victor Rasputnis is a Managing Principal of Farata Systems. He's responsible for providing architectural design, implementation management and mentoring to companies migrating to XML Internet technologies. He holds a PhD in computer science from the Moscow Institute of Robotics. You can reach him at vrasputnis@faratasystems.com


Anatole Tartakovsky is a Managing Principal of Farata Systems. He's responsible for creation of frameworks and reusable components. Anatole authored number of books and articles on AJAX, XML, Internet and client-server technologies. He holds an MS in mathematics. You can reach him at atartakovsky@faratasystems.com


From the Blogosphere

"Let me tell you why this book is worth the money. At 700+ pages, this book is no lightweight. As you can see, this book covers a lot of Flex development scenarios. As the man on T.V. says "But wait! There is more! In addition to the book, you also get a DVD with all the sample code on it as well as 10 video sessions on Real World Flex.

P.S. - I was not compensated in any way to write this article. I paid $69.99 all by myself." read more...



"Yesterday, I received my copy of RIA with Adobe and Flex from SYS-CON editorial, and I admit that for first sentence the book gave me a good idea on how to work better with FDS and Java for serialization and Ascyncmenssage , other topics I took a little while and got extra work and points on how to extend default components.

The book's also send you the sessions at the Last Flex Seminars in NY where people like ( David Mendels, Jesse Warden and the guys at Farata System are in)." read more...




"Before I start talking about this book which inspired me to blog about it, let me bring up the topic of books for advanced level programmers in general..

It may be best to begin with a bunch of questions. We know of a lot of real good books that introduce various programming and software development topics but are there many books that deal with advanced topics? Is it that real experienced developers rather try it out and learn, or read up the manual, or talk to friends and strangers (on the discussion groups) and get their insight or read articles that discuss the advanced topics? Is it that the market for such books is limited and hence it’s not worth a good business idea? Is it that the thrill of gleaning from the heaps of data (good, bad and junk) on the internet is far more exciting? I certainly don’t know the answers but I do know that books on advanced topics are not that many." read more...

Sample Code


Download The RIA Book Sample code.

Brought To You By

Web Developer’s
& Designer’s Journal

For professional web developers and designers who use the award-winning products from Adobe to develop and design rich internet applications and content that engage people anywhere at anytime.
Download archives