Sonar is a web service that allows you to perform code analysis on projects it has a plugin for flex projects that utilises FlexPMD, FlexCPD and FlexMetrics that can give you insight on the quality of the code in your project worth a look.
http://www.sonarsource.org/the-flex-plugin-for-sonar-a-further-step-toward-multi-language-support/
Monday, 13 December 2010
Wednesday, 6 October 2010
Get The Blueprint
Blueprint is a plugin for Adobe® Flex® Builder™ 3 and Flash® Builder™ 4 that allows users to query for Adobe Flex and Adobe Flash code examples found on the Web directly inside of the development environment.
Give it a try http://labs.adobe.com/technologies/blueprint/
Give it a try http://labs.adobe.com/technologies/blueprint/
Tuesday, 27 April 2010
ErrorTestUtils
package domain.utils
{
public class ErrorTestUtils
{
public function ErrorTestUtils()
{
}
public static function isErrorThrown(callMethodThatCausesError:Function,errorReport:String,args:Array):Boolean
{
var errorThrown:Boolean = false;
try
{
callMethodThatCausesError.apply(null,args);
}
catch(e:Error)
{
errorThrown = (e.message == errorReport)
}
return errorThrown;
}
}
}
Testing Thrown Error Handling
A quick way to test thrown errors are behaving as expected.[Test]
public function testErrorHandling():void
{
var errorThrown:Boolean = false;
try
{
callMethodThatCausesError();
}
catch (e:Error)
{
errorThrown = (e.message == 'SomeClass.ERROR_IN_DATA_MESSAGE');
}
assertTrue(errorThrown);
}
public function testErrorHandling():void
{
var errorThrown:Boolean = false;
try
{
callMethodThatCausesError();
}
catch (e:Error)
{
errorThrown = (e.message == 'SomeClass.ERROR_IN_DATA_MESSAGE');
}
assertTrue(errorThrown);
}
Doc File Import Folder So you can move asdocs from pc to pc.
C:\Documents and Settings\Lyndon Fasanya\Application Data\Doc.EE57A57224685151543546B0367A0BD876BF88FF.1\Local Store
Saturday, 24 April 2010
Improving application performance.
Ways to improve app performance!!!!
- Introduction
- Architecting Flex Applications That Perform Well
- A Note About Flash Players
- Using Layouts, Hierarchy, and Containment Properly
- Using Deferred Instantiation to Improve Perceived Performance
- Handling Large Data Sets
- Playing Complex Effects Smoothly
- Achieving Great Performance with Runtime Styles
- Using Dynamically Repeating Controls for Better Performance
Sent from my iPhone
Tuesday, 20 April 2010
Channels endpoints and destinations, AIR and Flex, courtesy of weborb and midnightcoders
Endpoint - this is the URL where AIR/Flex app sends remoting/messaging requests to Channel - a concept encapsulating the endpoint. Also identifies classes managing the channel on both client and server sides Destination - identifies a server-side class exposed by WebORB. Used by Flex/AIR client to target method invocations against the referenced class. Channels are configured in WEB-INF/flex/services-config.xml (and
weborb-services-config.xml if present in your system). Every channel has the "endpoint" element. For example, you have the following
channel definition: <channel-definition id="my-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint uri="weborb.php"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
</properties>
</channel-definition> Notice the following line: <endpoint uri="weborb.php" "weborb.php" here is actually a URL. The reason it does not look like a URL is because it is relative. If your Flex app is loaded from http://myhost/foo/AwesomeApp.html then your application will be sending remoting requests to the following URL: http://myhost/foo/weborb.php (This is the reason why WebORB for PHP requires that you put weborb.php into the same directory containing your SWF.) So how does the client know what channel to use. The answer lies in remoting-config.xml. This is where all the destinations are defined.
Most of the destinations do not explicitly reference the channels. For those, there's a special declaration at the top that establishes the default channel: <default-channels>
<channel ref="my-amf"/>
</default-channels> As a result, when you create a RemoteObject to talk to GenericDestination, remoting requests will be sent to the endpoint defined in the my-amf channel. Now, suppose you need to get AIR to talk to WebORB. Obviously the my-amf channel will not work for you since the endpoint is relative.
You can definitely change the endpoint to be an absolute URL and it will solve the problem. Alternatively, take a look at the channel with
the following ID: my-air-amf Notice the endpoint URL for that channel is absolute. Now take a look at the GenericAIRDestination destination in remoting-config.xml. You will see it references the my-air-amf channel. As a result, if your
AIR application uses "GenericAIRDestination", your AIR client will talk to WebORB and send remoting requests to the endpoint URL from the
my-air-amf channel. It is important to adjust the URL to reflect the location of your WebORB instance.
weborb-services-config.xml if present in your system). Every channel has the "endpoint" element. For example, you have the following
channel definition: <channel-definition id="my-amf"
class="mx.messaging.channels.AMFChannel">
<endpoint uri="weborb.php"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
</properties>
</channel-definition> Notice the following line: <endpoint uri="weborb.php" "weborb.php" here is actually a URL. The reason it does not look like a URL is because it is relative. If your Flex app is loaded from http://myhost/foo/AwesomeApp.html then your application will be sending remoting requests to the following URL: http://myhost/foo/weborb.php (This is the reason why WebORB for PHP requires that you put weborb.php into the same directory containing your SWF.) So how does the client know what channel to use. The answer lies in remoting-config.xml. This is where all the destinations are defined.
Most of the destinations do not explicitly reference the channels. For those, there's a special declaration at the top that establishes the default channel: <default-channels>
<channel ref="my-amf"/>
</default-channels> As a result, when you create a RemoteObject to talk to GenericDestination, remoting requests will be sent to the endpoint defined in the my-amf channel. Now, suppose you need to get AIR to talk to WebORB. Obviously the my-amf channel will not work for you since the endpoint is relative.
You can definitely change the endpoint to be an absolute URL and it will solve the problem. Alternatively, take a look at the channel with
the following ID: my-air-amf Notice the endpoint URL for that channel is absolute. Now take a look at the GenericAIRDestination destination in remoting-config.xml. You will see it references the my-air-amf channel. As a result, if your
AIR application uses "GenericAIRDestination", your AIR client will talk to WebORB and send remoting requests to the endpoint URL from the
my-air-amf channel. It is important to adjust the URL to reflect the location of your WebORB instance.
Subscribe to:
Posts (Atom)