I am very excited to inform you guys that Adobe has released the BETA2 versions of Flash Builder, CF builder and Flash Catalyst.
You may take a look at these tools here 🙂
These tools have morphed themselves extremely well since the last release and they now include real cool stuffs which can make ones life much simpler.
eg: Flash Builder now supports Database introspector which can generate server side code in just a click(all you do is to point to the database via the wizards), FlexUnit integration now supports FlexUnit4 (metadata based unit testing) capabilities.
ColdFusion Builder can generate ORM and Non-ORM based code relative to your database, it also contain much tighter integration with Adobe AIR, AS proxy classes etc. FYI, Bolt integrates Hibernate to provide ORM support for CF users.
One cool stuff which really amazes me is the integration between Flash Builder(Gumbo) and ColdFusion Builder(Bolt). The reason being, one can leverage the capabilities of BOLT to generate sophisticated CF(ORM/Non-ORM) code and these can seemlessly be consumed by Flash Builder and be used in Flex applications.
The workflow of this mass is just driven by a bunch of wizards which let you generate sophisticated CF code, consume this code in Flash Builder and bind the retrieved values onto Flex controls/components.
Note: Bolt ships with a plugin named “Adobe CFC Generator” which is capable of generating ORM and Non-ORM code which can be understood by Flex. It includes a bunch of utility functions to read, update, delete data and pagination. Also the code thus generated are all data managed while importing in Flash Builder. As part of ORM support Bolt can generate precise code for relationships like one-one,one-many etc and this code can be consumed as it is by Gumbo.
Download and install BETA2 versions of Flash Builder 4 and ColdFusion Builder from here
Donwload and install released version of CF9 server from here
FYI, you can view the ‘Adobe CFC Generator’ from Windows->Preferences->Extensions in Bolt.
Here is a small attempt to walk through the workflow:
a) Create a new CF project in BOLT , File->New->ColdFusion Project. Enter the default location as a new folder in your server root.
b) Configure the CF server, click NEXT in the above wizard and pull down the drop-down besides ‘Servers’ and select ‘Add Server’.
c) Click NEXT and point the appropriate server home in the wizard.
d) Click FINISH.
e) In the New CF project wizard click FINISH. Create a new folder called “ORMCode” in the project created.
f) Open the RDS dataview panel from Windows->Show View -> RDS Dataview and select ‘Create ORM CFC’ as shown :
FYI, i am using fb_tutorial_db datasource which is a MySQL datasource configured in my ‘DataSource’ section of CF administrator.
Also note this workflow supports MySQL, MSSQL and Apache Derby databases.
g) Browse to “ORMCode”(folder created under the newly created project), leave the ‘Script CFC’ checkbox and click OK.
h) Click ‘Generate Code’ in the wizard which opens up.
Note: Relationships can also be mentioned in the dialog above.
Select ‘cfbookclub’ which is a MSSQL datasource and select both APPS.AUTHORS and APPS.BOOKS table as shown below and click ‘Create ORM CFC’.
Click on ‘Insert’ button in the ‘RelationShip’ section and enter ‘MyBooks’ -> Name, ‘BOOKS’ -> Target table and ‘Multiplicity’ -> 1-n and click ‘Save’.
Now click on ‘MyBOOKS’ (you should see the ‘Join Condition’ section loading). Click ‘Insert’ in the ‘Join COndition’ section , select ‘AUTHORS.AUTHORID’ as ‘Source Field’ and ‘BOOKS.AUTHORID’ as ‘Target Field’ and click ‘Save’.
The wizard should now look like this:
i ) Click on ‘Generate Code’ and hit Refresh on the created project. You should now see 3 new files being added(Application.cfc, employees.cfc and employeesService.cfc).
Similarly Non-ORM code can be generated by selecting ‘Create CFC’ from ‘Adobe CFC Generator’ and browse to a new folder within newly created project( create a new folder ‘NonORM’ inside the project) ,leave the default and click OK.
This should create 4 new files employees.cfc, employeesService.cfc, employeesDAO.cfc and employeesGateway.cfc on hitting REFRESH in the folder NonORM.
Flash Builder :
Using the DCRAD Import workflow import the employeesService.cfc (in both ORM and Non-ORM case) to view the services in the Data/Service panel in Gumbo. Perform data binding to your Flex compoments/controls using the data just retrieved from the service.
Also observe an icon created next to the entity ‘Employees’ indicating it being ‘Data Managed’ and also an icon besides getemployees_paged which indicates PAGINATION is enabled for the function.
Also here is a sample recording illustrating the workflow,
Note: In the video there is a mention to install ‘Adobe CFC Generator’ which is not necessary as the BETA2 build of Bolt has the updated code generator.
Isn’t this an AWESOME stuff?
Please download the builds, play-around and provide your valuable feedbacks.
Hope this HELPS 🙂