One of the new web client scaffolding options in MyEclipse for Spring 8.6 (ME4S) is Adobe Flex. If I had to summarize the capability in one sentence it would go something like: ME4S 8.6 generates ready-to-run Spring-Flex BlazeDS Hibernate applications using the RemoteObject to communicate with Spring Services that support create, read, update and delete operations for related objects in a matter of minutes.
Of course, there is so much more contained in any one scaffolding option, and I wanted to take this opportunity to share all of the techniques used in our Flex scaffolding along with a high level overview of what is generated. A lot of these were a compilation of best practices found within the Flex community and recommended to us by Flex experts.
First, a list describing certain keywords and techniques containing links to some of our favorite sites that helped us with more information on each topic:
- Developed in Flex 3.5, but compatible with Flex 4.0
- Backed by a Spring Service, Spring DAO, and JPA layer
- ME4S out of the box contains Adobe Flex open source SDK and ant script using the mxmlc compiler that generates the swf file into the webroot
- Contains a flex_src/assets folder with CSS and images. Uses Embed statements and common Flex styles like backgroundGradientAlphas, up-skin, over-skin, down-skin
- Generates a mxml Default Application with separate mxml Forms and Grids for CRUD operations and relationships
- Handling of navigation to the Context Root
- Uses the DataGrid with dataProvider to render results from the Server
- Implements a TabNavigator to show the CRUD operations and relationships
- Handling a RemoteObject in separate mxml applications by creating Operations
- Using Alert Form validation using StringValidator, NumberValidator, the Validator.validateAll method and ValidationResultEvent adhering to the General guidelines for validation
- Displaying asterisks on required fields with the required attribute on the FormItem
- Use of the Accordion control to show child relationships
- PopUpManager implementation when deleting objects or reporting errors
- Editable DataGrid control for the child in One-to-Many or Many-toMany relationships
- DateFormatter controls used to format Date and Time fields in forms and inside editable data grids
- Handles composite Primary Keys
- Use of the Dissolve alternative to fading text.
- Creates Bindable RemoteClass domain objects with relationships
- Follows spring-flex-testdrive conventions including, an Event driven action script architecture for created, updated, and deleted objects
Secondly, the following image points out an overview of what is generated. (Click on it to enlarge)
Finally, there are a couple items to note when scaffolding Flex in MyEclipse for Spring 8.6. These all point to forum threads with more information. Please take a look and contribute to the thread if you have any thoughts. We would love to get your feedback on these items AND your thoughts on our future direction with Flex.
- Using Spring 2.5 and Flex library conflict during deployment. http://www.myeclipseide.com/PNphpBB2-viewtopic-t-25763.html
- Hibernate Lazy Loading support in BlazeDS. http://www.myeclipseide.com/PNphpBB2-viewtopic-t-25768.html
- What should we change or add to our Spring Flex capability? http://www.myeclipseide.com/PNphpBB2-viewforum-f-62.html
Thanks all! I hope this blog post helps! Also, check out the 5 minute video of MyEclipse for Spring Flex Scaffolding to help you get started.
There are two ways to get your hands on M1. Existing Pro subscribers can use the add-on option in the Dashboard tab of the Software & Workspace Center, while new MyEclipse users can download a free, 30-day trial at http://bit.ly/asbbYo
Posted on Jun 15th 2010