Swiz Example Application Updated to Support Swiz 1.0 Beta

With the release of the 1.0 Beta of the Swiz framework, I've updated my Swiz example application to the latest version. You can also view the source code if you like. I'd like to point out a few things that I had to change from the example based on version 0.6.4:

  • The instantiation of the framework has changed in order to support multiple instances of Swiz, primarily for Flex module support:
    <swiz:SwizConfig id="mySwizConfig"
                     eventPackages="com.briankotek.swizdemo.event"
                     viewPackages="com.briankotek.swizdemo.view"
                     defaultFaultHandler="{genericFault}" />
    
    <swiz:Swiz id="mySwiz" beanProviders="{[Beans]}" config="{mySwizConfig}" />
    		
  • The static methods on the Swiz class have been removed, due to the fact that there can now be multiple instances of Swiz. This means that instead of doing something like Swiz.dispatchEvent( event ), you now want to inject a dispatcher object into your non-view objects and dispatch events through it instead. The two main ways to do this are to inject the dispatcher in your BeanLoader/BeanProvider, or by having your class implement the IDispatcherAware interface, which will instruct Swiz to inject the dispatcher automatically.
  • The [Autowire] metadata tag has been deprecated in favor of the more industry-standard [Inject]. [Autowire] will still work for now, but be aware that this may be removed in a future release.
  • The use of the earlier CommandChain has changed to support more robust and extensible chains, as well as supporting internal Flex event-based chains on top of the existing support for chains that make server calls. For example:
    var chain : CommandChain = new CommandChain();<br>
    chain.addMember( new AsyncChainStepCommand( delegate.deleteUser, [user], userDeleteHandler ) );<br>
    chain.addMember( new AsyncChainStepCommand( delegate.deleteUserProfileImage, [user], userProfileImageDeleteHandler ) );<br>
    chain.addEventListener( "chainComplete", userDeleteCompleteHandler, false, 0, true );<br>
    chain.start();
    		
Anyway, that's all for now, but I'll be posting more about the Swiz updates soon. If you're interested in seeing more about 1.0, have a look at Sam Ahn's demo of Swiz using AS3Signals. A very cool use of the brand new custom metadata support now available in Swiz!

Comments Comments (19) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 650 Views

Swiz 1.0 Beta is Live!

This morning, the Swiz team released the 1.0 Beta of the Swiz Framework. You can view the extensive list of updates at the Swiz web site. Have a look and try out the new features. We'll be doing a full update of the documentation as we prepare for the final release. I also have an updated version of my sample application about ready, and I will upload it and highlight the differences between 0.6.4 and 1.0. Stay tuned!

Comments Comments (0) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 279 Views

ColdFusion 9 Article at Techrepublic.com

Just a quick note that I've had an article on ColdFusion 9 published over at CNET TechRepublic.com. It probably won't tell anyone who reads my blog much that they don't already know, but I hope that it attracts the attention of those outside of the core CF community!

Comments Comments (2) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 438 Views

An Awesome Alternative to a Traditional Mouse

Like most of you, I sit in front of a computer for a large part of my day. Over time, sitting and working on the computer has caused me varying physical issues, like back, wrist, and elbow pain. To alleviate this, I bought a desk with an adjustable height, an ergonomic keyboard, and an Aeron chair. These have helped greatly. But the one issue that kept coming back was wrist pain. I tried several types of mice, with varying shapes, but none of them dealt completely with the issue. For me, a big part of the discomfort in my hand and elbow came from constantly reaching over for the mouse, as well as gripping it. It might sound silly to some, but when you do this thousands of times, it adds up!

Then, about six months ago, I found a blurb about the RollerMouse Free on some tech site. Having used it daily for a while, I can say that this mouse is an excellent option to a traditional mouse.

The RollerMouse sits directly under your keyboard, just past the space bar. To control the cursor, you roll a bar up, down, and side to side. It sounds bizarre, but it works very nicely and was easy to get used to. The bar moves very smoothly, and is very accurate. You can easily move it with your thumbs, and you barely have to move your hands off the keyboard, or you can use your fingertips. Either way, it's far better than reaching over for a normal mouse.

I still keep a regular mouse as well, but I use it pretty infrequently (except for gaming!). This odd new RollerMouse is the workhorse now. I just wanted to mention this device in case anyone else has similar problems and was frustrated trying to solve them. I was uncertain about how this thing would work out, but it really does work well. There's a video at the product web site which shows how it works in more detail, if you're interested to see it in action.

Comments Comments (3) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 454 Views

Speaking at CF.Objective() and CFUnited

Hi folks, I just wanted to drop a note that I'll be speaking at the cf.Objective() and CFUnited conferences again in 2010. Both of these are fantastic conferences, so if you can attend, I highly recommend going!

At cf.Objective(), my first session is "Don't Let OO Drag You Down: A Pragmatic Approach to OO Design and Development". My goal here will be to focus on some specific elements of OO development that I feel offer the most "bang for the buck". These are the ideas that I can't live without, even on a small project. The second session is "The Swiz Framework", where I'll talk about, what else, the Swiz framework for Flex and AS3. We'll look at how it works and what is being added for the 1.0 release.

Meanwhile, at CFUnited, my session is "Clean Code: Why It Matters and How It's Done". Here, I'd like to look at a range of concepts that affect code clarity, including layout, comments, method and class names, file organization, and more. I'll also touch on some "code smells", or indicators that something may be amiss. For now, that is my only confirmed topic, but I believe one more will be added as further topics are announced.

I hope to see you there! You'll find me speaking, listening in the sessions, and enjoying beers in the bar with my fellow code junkies. :-)

Comments Comments (0) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 291 Views

More Entries