Mosaic Browsers…Good Times, Good Memories

Filed under: Personal — Robert Taylor at 8:35 pm on Thursday, March 15, 2007

Yesterday, I found one of my first HTML books I purchased collecting dust in my garage. I opened it up out of curiosity to see what things were like 12 years ago. All the samples were done in the NCSA Mosaic Browser, which at the time was THE browser. I remember connecting to my service provider through a telnet connection. 14.4 k connections were fast. AOL and CompuServe were new and trying to establish a presence.

I had a good chuckle reviewing the book because all you could really do in HTML were some minor text styles, hyper links, images, tables (which were new to HTML) and if you were a serious programmer you could create forms with some CGI scripts in Python or Java. CyberSpace and the World Wide Web were still common lingo. And most companies didn’t have a domain address (or even knew what one was).

It is amazing how things have changed in such a short period of time. Most of us could not survive without an Internet connection, our blog or cell phones. You have to love technology!

Debugging Flex 2.0.1 Modules

Filed under: Articles — Robert Taylor at 7:59 pm on Thursday, March 15, 2007

Flex 2.0.1 was released with the ability to create modules...

"Modules are SWF files that can be loaded and unloaded by an application. They cannot be run independently of an application, but any number of applications can share the modules. Modules let you split your application into several pieces." - Adobe

This isn't a new concept. If you develop in Flash you do this all the time. So its nice that Flex now supports this as well. The nice thing about modules are they do not compile with classes that exist in the their SWF counterparts. So if SWFA is loading SWFB and SWFB has a class that is also in SWFA, then SWFB will not compile with that class (or component) -- resulting in smaller file size. Nice!

Now the bad news, there is a known issue with modules as mentioned here. Breakpoints are not supported in modules. If you work in Flex, you know how important the debugger is in finding problems in code. You can't live without it. Well, here is a nice solution for now for debugging your modules I came up with...

Create a class called Debug. Mine is located in a folder called utils.

Actionscript:
  1. package utils
  2. {
  3. public class Debug
  4. {
  5. public static function breakpoint(...rest:Array):void
  6. {
  7. // ...put a breakpoint on this line...
  8. }
  9. }
  10. }

Now in Flex put a break point on the line that says "// ...put a breakpoint on this line...".

In your Module you can now create psuedo breakpoints. Wherever you would like to monitor data, just call the Debug function:

Example:

Actionscript:
  1. public function test():void
  2. {
  3. Debug.breakpoint(this);
  4. }

You can pass any number of parameters in that you would like to evaluate. Hope this helps other that are using Modules in Flex 2.