Intellij 8 - alternative to FlexBuilder

If you've ever used IntelliJ for java development, are frustrated with eclipse, or you wish Flex Builder could do more (and you never use design view). This might interest you.

JetBrains has added Flex development support to IntelliJ 8. Which was just release (nov 6th). Note, they have only added code support with no plans for a UI designer.

http://www.jetbrains.com/idea/

Some of my favorite features

1. CODE FORMATTING!!
cntrl-shit-L and boom the as/mxml file is formatted to my liking.

2. Flaging common errors without running the compiler.

3. Navigating between classes and around a class.
you can jump from an interface to the as classes that implemented a given menu.

4. CNTRL-Q help
Put your cursor on a method or class and hit cntrl-q, intelliJ will dynamically pull the comments out of the code for that class/method and show it to you as help

5. Code generation
It's easy to auto generate get/set method for properties, constructors, implemented methods, override methods

6. Find Usages
A quick search of all the code that uses a given variable to method.

Congratulations ColdFusion (for topping the User Choice list.)

ColdFusion is among the top Applications servers in a "users choice" report created by Evans Data. http://www.evansdata.com/reports/viewRelease_download.php?reportID=20

http://www.cio.com/article/print/455845

Evans Data interviewed more than 700 developers asking them questions about the servers they have used. And ColdFusion is among the top!

But this is my favorite quote of the survey: "this survey felt that performance was one of the server's strongest points, along with scalability, security, and support"

So to the ColdFusion Team, keep up the good work!

RIA Debugging and ColdFusion (brainstorming)

I just posted about a post written about RIA Debugging by Simeon Simeonov, in this post: http://blog.mikenimer.com/index.cfm/2008/10/13/RIA-Debugging-and-ColdFusion-forgotten-feature

In Sim's post he talks about the need for a common place to see all of the debug data from the server and the client.

So my question to everyone. What would this look like?

Let's imagine that there was a way to send all of the client (flex, ajax, silverlight, etc.) logging data and all of the server logging data(ColdFusion debug data, etc..) to a common UI..

What features does that common UI need to have? What would it look like? What are some of the must do features?

RIA Debugging and ColdFusion (forgotten feature)

Some of you might remember Simeon Simeonov from the early days of ColdFusion. He was one of the original engineers and the architect of ColdFusion at Allaire. Needless to say, he is responsible for many of your favorite features in ColdFusion.

Sim, has recently posted a great blog post about the problems debugging RIA applications. And a possible solution. Definitely worth a read.

http://simeons.wordpress.com/2008/09/16/debugging-ria-ajax-flex-services/

However, there is one more way to do debugging missing from his post (unless it's been updated). One of the last things I added to ColdFusion 7.0.2 before I left Adobe was to make sure all of the ColdFusion debug data is sent with every Flash Remoting request.

This is one of the more common forgotten features in ColdFusion. If you are using ColdFusion with Flex, you can still get all of the information you are used to seeing at the bottom of a regualar .cfm. To turn this on, just turn on debugging in the cfadmin. And then in your result event, you can look at the result event header to see all of this information; sql, execution times, variables, etc..

Way back when, on mikenimer.com I posted a flex dump component that does know how to format this debug data. However, to be honest. I haven't opened the component in the latest versions of flex so the component might need to be tweak to work in flex 3.

But that's no excuse not to monitor this data. With RIA apps it's more important than ever to monitor your requests. It's too easy to write a bad query and not know it, since you can't easily see this debug data. But it's worth a little extra work.

dpHibernate - Hibernate lazy loading with Adobe BlazeDS

One of the biggest problems with working with data in a RIA/Flex application is that it's all or nothing. You either need to get all of the data or write a lot of code to return the data in multiple requests. The problem is that good design means that we want to design our data object to match the data, not the UI. For instance a User might have an array of Orders which each have an array of Items. Seems simple enough, right. The problem is that this is a large complex objects which could require a query that joins multiple tables when returning data to your application. No big deal if you want to display all of the data. But if you are just trying to output the users name and email in a search result screen then this is a huge performance hit.

Luckily there is a solution, It is called lazy loading. JSP developers, which use the java hibernate framework, have been able to use lazy loading for years. But until now this did not work with remote client applications like Flex. For those of you who have tried, I'm sure your familiar with the dreaded LazyLoadingException. Frustrating huh. Lazy loading let's your define a complete object model, such as a User with an array of Orders. But only return the data you are actually using in your presentation layer (Flex). Avoiding that all or nothing data problem that is so common.

I'm happy to announce a new Digital Primates open source project. dpHibernate, add support to BlazeDS for Hibernate lazy loading. You can find both the java and the ActionScript parts of the project here: http://code.google.com/p/dphibernate

If you're not familiar with hibernate, check out http://www.hibernate.org. At a real high level, Hibernate is a java ORM tool, which lets you map java beans to a relation database. Hibernate does all of the sql work for you.

So how do dpHibernate work? dpHibernate is actually a combination of two code bases. First, there is a custom java adapter for the BlazeDS server. This HibernateAdapter understands the hibernate proxy objects and knows how to convert them into a special dpHibernate proxy which the AMF serializer will ignore and not try to initialize. This is how the proxy objects are able to go back to the client without getting the LazyLoadingException.

The second part of dpHibernate is an ActionScript library which gives your application the code it needs to understand these dpHibernate proxy objects. This AS library has the code to manage your ActionScript beans and knows how to call back to the server to load a proxy once that object has been touched, usually with a binding expression.

In case your wondering, how does dpHibernate differ from the hibernate support in LiveCycle Data Services ES? For one dpHibernate doesn't require LCDS it works with the open source BlazeDS server. The other big difference is that hibernate support in LCDS requires you to duplicate the lazy associations in the services-config.xml and you need to use an Assembler class to get the hibernate objects. dpHibernate let's you call any java method and return any hibernate object.

So check it out, if you can use it I'd love to hear about it. If it doesn't work for you I want to know about that too. And as with all open source projects this one can use as many eyes as possible on it too. If you find any hibernate configurations that don't work let me know. Or better yet, send me a test case with the right hibernate mapping files to recreate the issue.

Thanks, ---mike nimer mikenimer at yahoo.com

Making air do crazy things

So technically Adobe Air doesn't have direct OS level integration, we can only hope the next version does. But that doesn't mean it's not possible. Louie Penaflor (a member of the Digital Primates team) has still been able to make AIR bend to his will, with some help from the Artemis project. He has written an application that let's AIR control his scanner. So from inside his application he can scan his travel receipts.

Read all about it here: http://www.restlessthinker.com/blog/?p=69

FlexCamp Chicago presentation and examples

First I just want to thank everyone who attended the FlexCamp in Chicago. As promised here is the presentation I did and the two examples I walked through.

Presentation
Examples
(these use the sample database that ship with ColdFusion)

Flex Camp Chicago! - limited space available, sign up now while you still can

Are you a flex developer? Are you still learning new things about flex? Are you planning on learning flex? Do you want to meet other flex developers in the area? Do you live near Chicago, IL?

Then you need to register and come to the next Flex Camp right here in Chicago, on Jan 18th, before it sells out. Plus you get a FREE COPY OF "Adobe Flex 2: Training from the Source" - thanks to PeachPit Press.

Flex Camp is a one day, all day, conference about Flex with something for everyone - Flex Component development, Air development, CF Integration, and Java Integration. Plus I'm a speaker!

And it's easy to get to, Flex Camp will be located at the Illinois Technology Association, 200 S. Wacker Drive, 15th Floor. Which is right by Union Station in downtown Chicago.

Click here to learn more and register:
http://www.flexcampchicago.com/

Tapper, Nimer & Assoc. + Digital Primates IT Consulting

I'm happy to finally be able to tell the world that Tapper, Nimer & Associates and Digital Primates have decided to join forces. Now that the lawyers are done the merger is complete.

The new company will be keeping the name Digital Primates. If you'd like to learn more about Digital Primates check out our web site at http://www.digitalprimates.net

It's an exciting time in the RIA world and for us it just got a lot more exciting!

P.S. We are looking for a few great flex developers and flash video experts. If you're interested send me your resume.

dpUnit = new flex unit testing framework

[Update] Correction: The name is dpUint, not dpUnit. I guess I'm so used to all of XUnit frameworks I didn't even notice the spelling difference at first.

In case you didn't see this earlier Mike Labriola from Digital Primates (http://www.digitalprimates.net) has released a new open source unit testing framework for flex this week ( dpUnit )

Why is this cool?:

  • 1. Support full testing of Asynchronous actions (correctly).
  • 2. Trigger and listen for any event in your application and validate it in the unit test.(UI, Validation, or server).
  • 3. hain a series of actions into a sequence.
    This means you can define a series of application actions in your test case and they will be executed in sequence during the test. But even better - you can also add waits between these steps so the test case will not perform the next step until some event has been fired from the current step or timed-out and failed. For instance until a property has been set (VALUE_COMMIT event).
  • 4.You can write UI Component unit tests!!!!
    This is unique to dpUnit - With dpUnit you can instantiate a new UI Component and trigger events and test that the UI Component actual does what it should. Instead of just testing individual functions or classes


    For instance if have a edit form component, you can create a new instance and set the values of the different form fields. Then you can trigger the validation and run asserts in your unit tests to check that the form validation happened correctly.

Let me say this again, you can write UI Component Unit tests!.

Download it here

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.9.001.