With the Flex SDK Gumbo alpha release almost ready, I wanted to blog about the new advanced CSS selector capabilities.
We’ve added support for descendant selectors, class conditions for type selectors (previously class conditions were only registerd by themselves at the top level, i.e. “globally” instead of on a type by type basis), and id conditions for both type selectors as well as globally. These selectors were chosen as they were seen as the most requested by the community.
A few known issues that will be fixed shortly after alpha include allowing combinations of conditions at the top level (e.g. a top level id and class selector together in a selector chain, “.specialButton#button12”);
When encoding ActionScript objects to XML using a schema, such as when using a SOAP based WebService, it is not uncommon to provide a subtype (say, an Employee class) to an API that merely specifies a base type (say, a Person class). An issue is that the encoder does not know the subtype that your value is targeting so you must provide a hint. For the decoding XML to ActionScript case, an xsi:type attribute provides the decoder with such a hint… so an equivalent is needed in ActionScript for the encoding XML case.
For strongly typed objects, you can implement the
mx.rpc.xml.IXMLSchemaInstance interface to provide a
QName for the xsiType property to target the subclass to be used during encoding. See: http://livedocs.adobe.com/flex/3/langref/mx/rpc/xml/IXMLSchemaInstance.html#xsiType
For anonymous ActionScript Objects, however, you may not know that you can wrap your object in an
mx.utils.ObjectProxy instance and set its
type property with a QName to achieve the same effect. See:
flash.net.NetConnection is a native Flash Player class that is the workhorse for AMF based communication. Flash and Flex applications make use of NetConnection to send AMF formatted requests over HTTP or HTTPS to servers such as Flash Remoting, ColdFusion, BlazeDS, etc. However, less HTTP features are exposed by NetConnection than those of flash.net.URLLoader.
This can be a pain when your network architecture has one or more firewalls between external Flash Player clients and your application server. If authentication or session management is performed at the firewall, session timeouts can introduce an annoying problem. If a client makes an AMF request after a session has timed out, the session management layer may challenge the client to re-authenticate. This challenge is unlikely to be an AMF formatted response and so NetConnection is unable to process the information. While the client knows the request failed, the exact cause of failure is not known.
So… I hacked together a prototype replacement for NetConnection based on flash.net.URLLoader. This new “AMFConnection” class creates binary flash.net.URLRequests and sends HTTP POST data as an AMF formatted request and processes the AMF formatted response returned to URLLoader. One could subclass AMFConnection and intercept the response data and try to detect that an HTML re-authentication page has been returned to the client.
I’m looking forward to catching up with the Boston Flex User Group on next Tuesday, 8th April at 7pm.
I’ll be speaking at this event, most of the demonstration will be hands on, but my slides as a PDF are here:
Check out Flex 3 SDK and BlazeDS releases on Adobe’s new Open Source site!
Flex Builder 3 is live too!
But wait, there’s more! AIR 1.0 is also live:
I’m at 360 Flex this week in Atlanta!
I’ll be presenting at 10am on Tuesday with an in-depth look at the open source Flex 3 SDK! Drop on by if you’re around at the conference!
If you’re in the Boston Area and are interested in catching up on advanced Flex 3 features and the LCDS release, sign up for the Flex Camp Boston 2007!
December 7, 2007
Bentley College, Waltham
See the website:
My session will be an advanced discussion covering LiveCycle Data Services configuration, a review of things to consider when deploying your application, and tips and tricks when debugging data driven Flex applications!
We are asking for all Flex 3 customers to help test out the latest approved nightly build on Adobe Labs with any WebServices that they consume.
See Matt’s blog entry for details:
Please help us out!!