Tuesday, August 28, 2007

Light up the web? Maybe.

I loved "The Karate Kid" when I was young. It was a classic movie that had everything - martial arts, a good story line, a main character everyone can relate to, and a wise mentor who was pushy at the right times, but not overbearing.

I attended a Microsoft DevCares event today on SilverLight (Microsoft's answer to Adobe's Flash player for "Rich Internet Applications"). User experiences on the web are becoming more and more important for software vendors to distinguish themselves and Microsoft is trying hard to "Light up the web", as they put it. And, as I put it, it seems they want to take Abobe out of every market they own (for example Microsoft's release of the XPS document format [XML paper specification] in response to Adobe's Mars project for XML PDF documents). NOTE: SilverLight runtime ≠ .NET Framework!!! It's a different runtime. They must have said this at least a dozen times.

Being at the presentation reminded me a lot of watching "The Karate Kid", only, I'm not sure who's Daniel and who's Johnny - and the guy with all the answers, Miyagi, is no where to be found. I think this is how the dialog might have gone in the movie that was playing in my head (I'm not sure if it was a flash movie player or a silverlight runtime though).

Daniel: Hey - you ever have to write user interfaces when you were a developer?
Miyagi: Huh - plenty.
Daniel: Yeah, but it wasn't like the problem I have, right?
Miyagi: Why? Coding coding. Same same.
Daniel: Yeah, but you knew about web development.
Miyagi: Someone always know more.
Daniel: You mean there were times when you were scared to code?
Miyagi: Always scare. Miyagi hate coding.
Daniel: Yeah, but you like developing user interfaces.
Miyagi: So?
Daniel: So, web development's coding. You train to write code.
Miyagi: That what you think?
Daniel: [pondering] No.
Miyagi: Then why train?
Daniel: [thinks] So I won't have to write code.
Miyagi: [laughs] Miyagi have hope for you.


How does SilverLight compare to Flex?
To the end user - there's just about no difference. To the developer - they have only a little in common. SilverLight, like the Flash player is cross-browser and cross-platform and both are great at media delivery (like movies on youTube). Both are based on a declarative XML language (MXML Vs. XAML) and have design tools to help build the mark-up. The reason I say they have only a small portion in common has more to do with each company's approach to the solution.

SilverLight was born from .NET's WPF (Windows Presentation Foundation). WPF was meant for easy development of Windows desktop applications, but as part of the .NET 3.0 runtime and IE7 releases, WPF applications could be downloaded and used as a web application in IE. There were problems with that approach. End users needed to have the .NET 3.0 framework installed and are forced to use Windows and even further IE7! Enter SilverLight. The XML that is used in WPF applications is nearly 100% forward compatible with SilverLight and all that is needed is the SilverLight runtime which runs in any of several popular browsers on Windows or Mac. Flash started out as a web development platform and Adobe is now going the other direction with products like AIR (the Adobe Integrated Runtime). Adobe = Web -> Desktop, Microsoft = Desktop -> Web.


Data and Security
Microsoft is great at hitting it's competitors where it hurts - and they did it again. Kudos Microsoft. Flex struggles with a few things - foremost in my mind are cost, data accessibility, and security. To do anything really really cool with Flex or databases, you pretty much need some type of back end server application (e.g. Live Cycle Data Services, or WebORB [if you do .NET development]) which have costs associated with them. SilverLight 1.1 (Alpha at time of writing) will have LINQ and WCF (Windows Communication Foundation) built into it. And since SilverLight binaries are dll's downloaded over the web (dll's can be securely obfuscated - it's only a matter of time before Flash 9 SWF's can be decompiled) I already feel more secure. Like Flash, SilverLight is also agnostic about how it's content is served - it could be served by an Apache web server, a java web server, or your hacked Nintendo with a web server running on it.


Conclusion
SilverLight isn't ready for business applications yet due to the fact the SilverLight doesn't have any user controls like TextBox or ComboBox yet (included in 1.1 final release). But, keep an eye on this!! If the data connectivity is as good as promised - you'll start to see numerous seriously data enabled SilverLight web apps.


Links
I can't talk about all this without giving some examples.
  • Tafiti is pretty neat. It's a "visual" search engine.
  • PopFly is a SilverLight tool that lets you make dynamic Mash-Up's with a graphical tool. You can connect to services like Flickr to get GeoTagged images and place them on a map by wiring "Blocks" together. This is by invitation only - it's worth to getting an invitation to.
  • This is an emulation of Windows Vista done in SilverLight. Pretty Neat.
  • DLR-Console is a application that demonstrates the use of the Dynamic Language Runtime. Developers can now write SilverLight in Ruby, Python, or managed JScript.

Resources
So which one do you choose? Flex or SilverLight? Microsoft is catching up very quickly.


Miyagi: Now, ready?
Daniel: Yeah, I guess so.
Miyagi: [sighs] Daniel-san, must talk.
[they both kneel]
Miyagi: Walk on road, hm? Walk left side, safe. Walk right side, safe. Walk middle, sooner or later
[makes squish gesture]
Miyagi: get squish just like grape. Here, writing code, same thing. Either you develop UI "yes" or develop UI "no." You develop UI "guess so,"
[makes squish gesture]
Miyagi: just like grape. Understand?
Daniel: Yeah, I understand.
Miyagi: Now, ready?
Daniel: Yeah, I'm ready.

Monday, August 13, 2007

You have to crawl before you can walk

Ants.
  • Ants on a log - delicious (I love the chewy raisins with the crunchy celery and peanut butter).
  • Ants are bugs and you can get bugs in your code - bad.
  • They can lift several times their body weight - awesome.
  • Ants are ferocious - `cause they're fast.
  • They work together as a team to accomplish large feats - I heart teamwork.
  • Each was made for a specialized task - you gotta be yourself, I like that.
Are these reasons why Apache's ANT was named as such? Sadly, no. But I think they should all be candidates. Ant stands for Another Neat Tool (which you can find on their wiki), although I wonder what Indians** have to do with anything. They do, however, describe some of the reasons why Ant turns out to be a fitting name after all - ummm, except the one about celery. I just really like peanut butter celery.

Ant (and it's .NET cousin NAnt) are described as a build tool like the infamous make utility for C, but without the wrinkles. If you managed to make it this far and you're a developer you're probably thinking - Forget the "wrinkles", I never liked make, I think build files are a waste of time, and even if it is "neat" I don't need anymore tools to deal with. If you're not a developer you're thinking - this doesn't affect me and our products are just fine without any of this. Both of you might be right, but you can write code in most languages without an Integrated Development Environment too. IDE's make it easier on everybody and adding a build file might be a good idea too...

The title of this post, while clever (at least I think so), has some meaning. Developer's often times overlook tools that can make their lives easier. If you've ever heard the term "it's the little things that kill", you can see why it's important to get the little things dealt with and build tools like Ant can help.

** I think there's a lot to how things are named. The wrong name can give the wrong impression about something or be misleading. I think Apache is a superb name for a software development group. Here's why.

Thursday, August 2, 2007

Night Fishing

A few weeks ago, some friends from work and I decided to go fishing. It was hot out when we started - not off to a good start. I had been to the store during lunch to pick up some night crawlers. While I was there I found a lure that I wanted - it was $20!! I asked a few of the sales guys about them and they swore up and down they were some of the best lures in the store. So I bought one anyway, they did look like good lures after all.

I had been to the body of water we were going to before. It's located across the street from my friend's house. He knew what was going to work and so did I - worms. Night crawlers on a bobber, yes, but mostly fake rubber worms in a natural or dark purple color with a bright red tail retrieved at a medium to slow speed. Out of all the times I've been there, and from the stories he's told me as well, this seems to be what works most consistently and with better results (more strikes by larger fish).

Well, I'm always up for a challenge, and since I knew worms were going to work it lost some of it's appeal. I had bought some lures a few weeks earlier that I hadn't had a chance to throw yet. So I started out with those.

I had been to my friend's place several times and I've fished with him on several occasions. But I was still trying to impress my other co-worker. He hadn't done any good bass fishing in a while, so I wanted to make sure he caught some good fish and had a nice time. If you're reading this and thinking that it's conflicting with the statements in the previous paragraph, you'd be correct. I didn't realize how stupid it was of me to experiment while trying to impress until later.

Good thing my buddy stuck to the tried and true. He was having a great night. He got our other friend all setup and he caught some very nice fish as well. I was catching jack-squat. So I finally tried the new $20 lure - nothing to lose at this point - and caught a decent fish. Satisfied with that I switched to worm too.

The sun went down and we could hardly see to get back. At this point we were all fishing with night crawlers on the brightest colored bobbers we could find. Things had been slow for a while and we were just about to call it a night. My friend ended up catching the largest bass he's ever pulled out of that pond! It was a very nice fish.





I've had a while to reflect:

  • When it counts - use what you know will work.
    There's a time and place to experiment - and it's not when it counts. It's behind closed doors, on the practice court, during the scrimmage match. It's definitely not when you have something riding on the line, during a tournament, or when it's go time. You're probably not going to end up impressing anyone and it will take longer to get results. Most likely you'll end up going back to what you know works anyway.

  • You get what you pay for.
    Well... this isn't **ALWAYS** true, but it holds true for a lot of things in this life. Out of all the artificial lures I tried, the expensive, ultra good looking, super lure (please humor me) came through for me. The better stuff usually costs more. Why? - because it's better. Cost is often directly proportional to an item's worth. If it wasn't any better than any other lure (nothing that set it apart ) it likely would have been priced accordingly. SUB-POINT: Listen to what other's say. If the community is giving it good feedback - it'll probably prove it's worth.

  • Be patient.
    As evidenced, the best results are often those that are not rushed. We knew worms would work - we just had to wait for the big one to bite.

  • Have fun!
    It was hot. I wasn't having good results at first (my own fault). When I started having success it was dark. Two super-sized mosquitoes tried to carry me away. Would I do it again? Absolutely. The thrill of reeling in a fish is fun! Hanging out with your friends and enjoying nature - awesome. If you're not having fun, **NOTHING** will make it worth the effort - period.