Properly Thought Out Answers to questions on my GGX London Talk on Flex and Grails

I just re-watched my Flex and Grails presentation at the London Groovy Grails Exchange and felt that perhaps I didn’t quite answer some of the questions presented appropriately. I was pretty nervous and didn’t take enough time to really understand the questions. In this blog post, I will expand on some questions and hopefully provide better representation of Flex / Grails.

How is Flex and Grails for security?

The automatic tooling provides very little support for security. If you are using web services, you would normally invoke a secure channel and pass in your credentials, if this security passes, a token is returned via the web browser for subsequent calls.

BlazeDS provides a hook for container-level security, so you can bind into, say, Tomcat’s security infrastructure and provide access to roles / accounts for your channel security.

You can also use a framework like Spring Security. Overall, you would secure this the same way that you would secure an AJAX request.

Can you explain more on your Flex / Grails mechanism for SEO?

In my presentation, I showed a slide that might have been confusing when talking about Grails and SEO. I hope to clarify that a bit.

The problem is that when you embed a Flex file into your HTML pages, the content that it presents is not available to the search crawlers and applications that don’t support Flex. Grails allows us to gracefully degrade this by allowing us to wrap flex components in GSP templates and taglibs.

In most Flex / Flash embedding code, there is a section called <alternative content>. Alternative content renders out a HTML string that gets presented if Flash is not found. Grails tags will send the same content to alternative content as to our embedded flex component.

Let’s say I have a wine field called pinot noir.

I could write a tag library called <g:wineRender wine=”pinot noir”/>

This renders into

<swf wine=”pinot noir”/><alternative_content> pinot noir </alternative_content>

A crawler will see ‘pinot noir’. A person will see the flash component.

What formats does Flash Catalyst output in?

The format is FXP, a xml format so you can put it in Git. You can edit FXP files in Flash Catalyst, or pass individual fragments of it back to the parent editor, like Illustrator and Photoshop.

It contains both graphical information and component information. Flash Builder is then able to interpret this format and generate MXML and actionScript code for this. As of the last beta of Flash Builder, this process is only one way.

How is the BlazeDS support for offline content?

As of now, BlazeDS does not offer the same support for online/offline content syncing as Adobe LiveCycle services. You can write your own using the network connectivity detection of Adobe AIR, but it is not as robust as the one offered by the commercial offering.

What is the support for Functional Testing like in Flex?

Flex 4 is the first time in which the Flash Builder tool comes bundled with a testing framework, FlexUnit 4. Flex Unit contains a set of ant tasks that allows it to be added to a CI environment and offers a way to test grails applications in the same vein as JUnit.

There are a few tools out there for Flex 3 testing, including RIATest, Selenium, FlashSelenium, Flex Monkey, FunFX and HP QuickTest. So it is possible to do TDD in Flex, and there are a few alternatives offered.

I hope that clarifies things a little bit.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s