Apptacular ColdFusion Builder Extension – Unit Tests

I just cannot get enough of making videos for Apptacular it seems. This latest one is about unit tests, specifically MXUnit tests. I need to test if Apptacular is creating applications properly. I wrote up some traditional unit tests for my code, but I really need to test the code that Apptacular makes. So I got it to generate unit tests that help me determine if the applications that Apptacular creates actually work. However, in the process I have to wire up a few things that make it really easy for you to get started writing unit tests in your applications. So it’s a win-win.

The generator does some smart things like wiring up ORM tests that test across many-to-one relationships. (I haven’t figured out how to do one-to-many or many-to-many yet.) Anyway, check out the video.

http://vimeo.com/moogaloop.swf?clip_id=8264930&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

Apptacular ColdFusion Builder Extension – Unit Test from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension – Working with Flash Catalyst and Flash Builder

For my next Extension trick, I want to show how to use Apptacular to jump start your Flex development. Apptacular by default creates remote services that are compatible with Flex. Flash Builder 4 has a new tool called “Data/Services” that makes working with ColdFusion remote services simplistic. Too simplistic. “Oh crap, what happens if my boss finds out I have all of this free time now” simplistic.

This demo will take you from a Flash Catalyst driven front-end to a Flex application back-ended by Apptacular created ColdFusion services.

http://vimeo.com/moogaloop.swf?clip_id=8227342&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

Apptacular ColdFusion Builder Extension – Flash Builder and Flash Catalyst from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension – Aesthetics

My last post and video dealt with how Apptacular could scaffold together your application. This post and video will talk about making that application look more like you want.

First off, everything has a display name. That display name is altered in the data model tools of Apptacular or in the XML directly. Then you might want to alter what column gets used when your table shows up in another table’s interface because of a relationship. This is called a foreign key label. This is also editable in the configuration. After you get all of your labels done right, you want to order all of your columns correctly. You guessed it; it’s done in the configuration tools. Finally, you might want to make up columns to use in your various labels. Apptacular has the concept of “virtual columns”, which will allow you create custom getters for things like concatenated or formatted columns.

Once you get past interface issues, you may want to change application structure, move code around, or fine tune choices. This is done through the Application configuration. You can also detect obsolete code and have it removed automatically. Finally, if you are so inclined, Apptacular includes a login piece that can add an easy authentication form to your application.

So still a work in progress, hopefully this creates a good starting place for applications. My next post will talk about integrating this back-end into a Flex front-end.

http://vimeo.com/moogaloop.swf?clip_id=8175252&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

Apptacular ColdFusion Builder Extension – Aesthetics from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension – Scaffolding

Scaffolding against a database has been done to death. But I wanted to take on some of the harder challenges. How do you act towards relationships? How do you handle one to many, many to one, and many to many relationships? How do you detect these relationships? This is especially important with the ORM features in ColdFusion 9. If we can detect these, and model our CFCs correctly we can save a lot of time by generating these CFCs with relationships included. Then if we scaffold on views that take these relationships into account, we can really turbo charge development.

I also wanted to take on a few key issues like paging and performance. Basically, I wanted paging to be easy. That meant wiring it up from the get go. I wanted performance to be usable. That meant writing common needs like column counts automatically in HQL for optimal performance.

So that’s some of what I’ve set out to do in Apptacular. I have a video below that shows off these features:

  • Scaffolding
  • One-to-many relationships
  • Many-to-one relationships
  • Many-to-many relationships
  • Paging
  • Counts

http://vimeo.com/moogaloop.swf?clip_id=8123992&server=vimeo.com&show_title=1&show_byline=1&show_portrait=0&color=00ADEF&fullscreen=1

ColdFusion Builder – Apptacular – Scaffolding from Terry Ryan on Vimeo.

Apptacular ColdFusion Builder Extension

I’ve been working on a code generation ColdFusion Builder Extension for awhile –

Hey wait, where are you going? Okay, I know, code generation is so passé, but stick with me here I have some cool stuff for you.

So. Code generation. Okay, I have a ColdFusion Builder Extension named Apptacular. It’s an application scaffolder that builds an application from a database. Pretty standard stuff. But I wanted to do something cool with it.

I started with how I handle overriding. Every scaffolder can create a default application, but where they start to fall down is when you want to override the defaults. A good example of this is form labels. The database field is “first_name” but you want the form label for that control to say “First Name.” Different scaffolders solve this in different ways. I went with the tried and true XML configuration file route. My previous experience with this type of development tells me that people NEVER edit the XML. It’s a pain. Okay, fair enough, but I’m using ColdFusion and ColdFusion Builder. I can create interfaces that allow you to edit your configs without looking at the XML. I’ve done that.

This feature allows me to do all sort of tweaks to the application. I can change label, sort order, and foreign key label fields. I can also change aspects of the application like where the CFCs are stored, how the services are created, etc. It uses XML, but you don’t. (Unless you want to.)

The next thing I tried to do is make the interface for the entire set of configuration tools look a little better than the default. I used the ColdFusion Builder Extension APIs ability to display a URL as an interface to handle this. So I sprinkled in a little HTML, CSS and images to make a pleasing, branded, interface for my extension.

Then I put a lot of work into data modeling correctly. I can detect relationships and build the proper ColdFusion ORM CFCs for it. I can get commonly used items like number of related items.

Finally, there are a lot of little features like virtual columns, authentication, and Flex services that I’ve added. I should have a few videos of this in action for you over the next week.

The code is not quite ready to share yet, but I wanted to get it out there for all to see, and if need be, comment.