January 2006 Archives

O'Reilly Schwag

| 8 Comments | No TrackBacks

I received a package via UPS the other day from O'Reilly. I wonder why...?

O'Reilly Schwag

The package included a T-Shirt with the tarsier logo on it (that I folded the cool way). It also contained a 3 CD Audio Book titled "On Writing Well", a copy of Strunk and White, some stickers, a folder with some official paperwork, and a pocket guide to the O'Reilly animals.

I can't say too much more about anything right now, but it looks like one of my goals for this year is coming true already. I'll post more information here when I can!

Preloading a NeoSwiff Application

| No Comments | No TrackBacks

If you've ever wondered how to preload a NeoSwiff WinForms application, this article is for you.

Unlike Flex, when you build an application in NeoSwiff there is no download progress indicator automatically inserted for you. Thus, if your application .swf file runs 150K in size, your users will see a blank screen until the download completes and the application can be interacted with. This could potentially be a long time waiting without feedback, especially on slower connections, and isn't good for usability.

The solution is to create a preloader. The preloader needs to be small in size so that it downloads quickly to present the user with feedback as fast as possible. The application .swf downloads in the background, and the preloader displays the download progress. Once the application is fully downloaded, the preloader hands over control to the application.

In the samples that ship with NeoSwiff, a basic preloader is one of them. I've extended the functionality of the sample in two ways. First, I've made the preloader dynamic, meaning you can load in any .swf without having to re-compile and hard-code the url (as in the sample). Second, I've made the preloader automatically adjust its layout so that any time the browser is resized the preloader adjusts itself accordingly (and thus there isn't a hard-coded width and height).

You can download my NeoSwiff Preloader here. Source code is included in the download, licensed under the MIT license. Portions of the code were contributed by GlobFX, used with permission.

To see the preloader in action, check out this page.

Instructions for use are included in the download, but essentially all you need to do is replace the FlashVars (in both the object and embed tags) in the preloader.html file. Replace the title variable with the title of your application, and replace the url variable with the path to your .swf file.

The preloader ended up being around 7k when all was said and done, so it will load quickly when the .html page is visited. Your application .swf will download in the background and the preloader reports the download progress, then transfers control to the application .swf once the download completes.

Enjoy!

Spanky Makes the Rounds

| 2 Comments | No TrackBacks

It looks like Microsoft finally unleashed Spanky into the wild. Don't know what I'm talking about? Check out this animation.

It's always good to have an eye on Redmond, and I'll probably download Spanky and play around with it a bit, but I'm not worried about Spanky trying to muscle it's way into the space the Flash Platform has already carved out. As much as Spanky is touted as a "Flash Killer", it's not. Spanky aims to get designers involved in building "rich" interfaces for Windows applications.

On the internet, platform-agnostic applications are key. By the time Spanky goes cross-platform, if ever, the Flash Player will be even further along than what is on labs today, and already installed on almost every computer connected to the internet. As the animation says, "Go home, Spanky, your penetration is not nearly big enough."

But hey, if you need "video on a sphere", then maybe Spanky is right for you. Remember the Avalon demo at FITC 2005, anyone? How about four videos playing simultaneously on spheres orbiting another video sphere? That's just what user's need in an application...

Anyway, just trying to clear up some FUD. Flex 2 p@wnz! I'm sure Spanky will be well received by some developers, but stop with the "Flash Killer" monicker, it ain't happenin' anytime soon.

I've been spoiled lately - all of the contract projects I've been involved with have used Trac and Subversion. I wanted the same killer set up for my hobby projects at home, so I put together a Linux server and documented the steps along the way to share with you.

First, it's always a good idea to use version control. I used to have Subversion installed locally on my Windows machine so I could keep track of changes, revert if I did something stupid, and have backups in the event I lost everything. Subversion has saved me a lot of time on multiple occasions, and to me it's a no-brain decision to use it.

The very first time I saw Trac, I loved it. Trac features an integrated wiki, bug base, and integrates tightly with Subversion. You can have a look at the Timeline to see what has changed across your project and when, look at the changes that were applied between revisions with the integrated diff view, link a bug to a particular revision (say, bug #9 was fixed in change set #104), use the wiki to describe a change set in more detail, etc. Trac is a very easy to use system that helps keeps projects organized, and gives you the ability to look inside of a project to see how it's progressing.

For my personal projects, I thought Trac would be overkill at first since I'm really a one-man team at home, but it's really been nice to have. The biggest change has been keeping my desk free of clutter. Instead of littering my desk with yellow post-it notes for ideas, bugs, features, etc., I just put all of that into the Trac project. Once you use it, you can't live without it.

Introductions aside, it's time to get down to business. First, I'm really not a Linux expert. All of what I know about Linux was gathered from using it in college to get my Comp. Sci. degree. I'd use it at home more, but I'm a Flash/Flex developer.. so there you go. Take this with a grain of salt - I believe these instructions will be useful, but there's no guarantee they'll actually work for you (I may have tinkered with something and forgot to make note of it). In any event, a standard disclaimer applies: The following information is to be used at your own risk. You agree not to hold me responsible if anything bad should happen as a result of following these instructions, including, but not limited to, an invasion of lemmings attacking a small army of ants that happen to crawl up your pants leg while trying to power off your newly configured Linux server due to a massive lightning strike off the coast of Kanagawa. Wow, I really need to cut down on the coffee in the afternoon.

Here goes...

Getting Friendly with Eclipse Workspaces

| 7 Comments | No TrackBacks

I've been using Eclipse for a long time, but it was only recently that I discovered the power of multiple workspaces. I feel like I should've learned this a long time ago.. but better late than never I guess!

I've never really explored the concept of the Eclipse workspace. To me, it was just the directory path that you had to specify at startup. The real meat-and-potatoes were the projects that were created in the workspace, so why care about the workspace itself?

If you're anything like me, you've always worked with a single workspace and a lot of projects. I would create a new Java project for each application I was working on. I would have CFEclipse projects along side of those. I would have ActionScript projects living right next door as well. All in all, at a single point in time I probably had 40 or 50 different projects in my workspace.

Now, this isn't really a bad thing. I was still able to be productive, though there was a lot of project opening and closing going on, and switching between projects was a bit of a task. It's no secret that when using Eclipse, you close the projects that you're not working with to save resources. I was accustomed to working like this, so it really wasn't a big deal.

Enter Flex / Java hybrid projects.

Following my typical workflow, I had a Flex / Java hybrid project that I was working on. I first created a Java project, and made a "flex" subdirectory where the .mxml and class files were held. This gave me code hinting for the back-end Java code, and with ASDT, the code hinting was "good enough" for the ActionScript code. Trying to build the project was a different story, and required a bit of ANT magic to compile everything and get all of the files where they needed to be. During the development cycle, when we switched from ASDT to FDT, it was clear there was a problem. Trying to have back-end code managed via the JDT coupled with front-end code edited via FDT, things just weren't working. They were mixing like oil and water.

The solution? Create 2 projects of course! One for the back end code, and one for the front end code. The problem? My project list continued to grow. Ideally I wanted a way to just focus on these 2 related projects at one time.

Enter the workspace.

I finally realized how powerful the workspace concept was. Each workspace houses a collection of projects, so it was determined that creating multiple workspaces was a good way to get organized. I created a new workspace, specific to the client the project was, and created two projects – one for the front end and one for the back. They each had their own build.xml files to manage building, and the new layout made FDT work extremely well (by giving it it's own project).

So now, whenever I wanted to work on this particular application, I just switched the workspace. Whenever I start a new application for a client, I automatically give them their own workspace. Whenever I start a new "for fun" application, I use my "Playground" workspace. Switching between different projects is no longer a hassle – instead of toggling open / close, and trying to find the right project to work with, I just switch workspaces entirely. I've been much more organized since I've been using multiple workspaces.

I can't believe I didn't know about this 2 years ago.

Anyway, to set up a new workspace (or switch between them), select File -> Select Workspace. Enter the path to a workspace. If the workspace already exists, it will be opened (and your project list will be updated). If no workspace exists at the location, a new workspace will be created (and the project list will be empty). Piece of cake! If you'd like to start Eclipse with a certain workspace, you can use the –data argument to pass the location of the workspace: eclipse.exe –data c:\development\workspaces\Client1Workspace

As an aside, this also makes sharing projects easier with a team. In my latest project, we put all of the eclipse project files under version control. All a new developer needs to do is check out the code from the repository, create a new workspace, and then "Import existing projects into workspace." Two or three clicks later, all of the projects are set up with correct project references and such, and the new developer is ready to dive in with the code instead of fumbling around trying to set up the projects.

Again, I can't believe this never occurred to me 2 years ago. Better late than never I guess… :-)

Speaking at FITC 2006

| 1 Comment | No TrackBacks

I wanted to mention this awhile ago, but it kept slipping off the radar. I'll be presenting an ActionScript 3 session at the FITC 2006 festival being held in Toronto from April 21st through 23rd. If you're thinking about going, be sure to purchase tickets soon to take advantage of earlybird discount offers. The biggest discount is set to expire January 15th, so get in on the action while you can.

The speaker list this year is incredible as always. I'm really looking forward to getting to connect with a few old friends and making some new ones along the way. While I enjoy attending conferences to learn tips and tricks from the speakers, I also enjoy the networking aspect just as much. Last year's conference was killer, and I expect this year's to be the same.

My presentation is titled ActionScript 3: How low can we go? It's definitely a technical session, but if you're up to some good old fashioned geek fun, I'd love to have you in the audience. I'll be showing some of the cooler super-nerd type features in Flash Player 8.5 that enable applications to be built that weren't possible before. I'm hoping the session will be both educational and inspirational.

Ticket information can be found here. I hope to see you at the end of April!

NeoSwiff Assembly Documentation

| 2 Comments | No TrackBacks

I've been trying to keep an eye on NeoSwiff (as you can probbaly tell from my blog history). Earlier in 2005 I reported on NeoSwiff's Inline Assembly, allowing you to mix C# and FLASM-like Assembly code. I was happy to see that the initial assembler reference documentation has been posted on the NeoSwiff website so we can finally make the most of this feature.

NeoSwiff Assembly Documentation.

Using assembly is low level, but will allow you to accomplish more with your NeoSwiff projects. I'm drawn to it for two reasons... Mostly, the geek factor...but in practical terms, assembly gives me access to some of the lower-level ActionScript functions that I'm used to, removing the boundaries that the C# SDK put in place. The latter is probably both good and bad.. staying within the SDK is safer, but after working in Flash for so long and knowing the built in classes so well, the assembly of NeoSwiff allows me to do pretty much anything I want. Most important would be using classes that aren't exposed in the NeoSwiff SDK just yet (like File Upload/Download via the flash.net.FileReference class).

Anyway, I just wanted to point out that the initial documentation is available. There's lots of cool stuff in there, like setting register values, calling native ActionScript methods, subscribing to events, etc. Definitely an advanced topic, but perfect for the geek in me.

New Year, New Goals

| 5 Comments | No TrackBacks

Today marks the end of my holiday vacation and the start of a new year. Rather than making resolutions that tend to get broken after a few weeks (you know, the classic "eat better, lose weight" etc), I prefer setting goals for myself. Before the page turns toward 2007 in 365ish days, here are some things I'd like to accomplish in 2006.

Professional Goals:

  • Build some killer Flex applications
  • Author a book
  • Continue to grow my consulting business, possibly bringing on employees
  • Write at least 2 articles for technical magazines
  • Contribute at least 50 examples to IFBIN
  • Keep a steady stream of useful posts / code snippets coming to this weblog (once a week?)

A Few Personal Goals:

  • Buy a house with my beautiful wife
  • Celebrate our 1 year anniversary in style
  • Get another dog to keep Yellowdog company
  • Learn some songs in a new genre on guitar. Metal is fun to play, but I'd like to expand my horizons a bit and be more versatile.

I'm really looking forward to 2006. Here's to a memorable year with good times, great friends, and lots of code. :-)



About this Archive

This page is an archive of entries from January 2006 listed from newest to oldest.

December 2005 is the previous archive.

February 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Archives

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02