Archive for February, 2008
The more I have learned as a software engineer over my career, the more I have come to realize that it’s better to build systems that expect failure in dependent systems and to handle it gracefully than it is to try to build systems that eliminate the possibility of failure altogether.
This evolution in my personal thinking has come about as I have become more familiar with service architecture, asynchronous processes, and the like. It’s also come from seeing just about everything fail in various scenarios, regardless of how robust each part of the system appeared to be.
This article from Werner Vogel (CTO at Amazon.com) does a really nice job of explaining the concept of “eventual consistency” at a high level. Basically, once you have accepted the fact that you can only have two of the trio scalability, reliability, and consistency, you have to decide which attributes are most important for your use case and design your system architecture accordingly.
I hope you find the article as useful as I did.
I stumbled across Marc’s Musings on particle emitters for Flash a while back.
Totally useless eye candy, but I made the sexiest rectangulary-constrained particle emission that would be perfect for a weird-and-wonderful Flex progress bar using his software. I might throw it in to Pudding if Sica likes the idea.
When I started to get in to Flex several years ago, I bought the only Flex book available at the time and got cracking.
The guys who had written the book had also written a framework, so I started using it. It seemed a little complicated at times, but it worked. After we built a few apps with it at CFI, we decided it wasn’t for us; too much boilerplate for too little reward.
We started to discuss the fact that maybe we didn’t need a framework for Flex as much as some best practices to follow. Flex introduced some obstacles we weren’t familiar with, such as 100% asynchronous operation, so we winged it for a bit.
Then we came across Joe Berkovitz’s post on MVCS. I drew a lot of inspiration from Joe’s simple, framework-free approach to Flex development when I first came across this application. As many of you know, I have been blogging about this for a while, and will be discussing my findings in simplified framework-free Flex development at cf.objective() 2008 later this year.
Well, Joe has recently blogged to provide quick and easy reference links regarding his approach, plus some updated thoughts to best practices he has learned over time since his original article on Adobe’s Flex developer connection. I’m very interested in looking at these as I refine my personal approach to Flex apps, and the content of my presentation in May.
There must be some interest in doing Flex framework-free across the community, since I was recently asked permission to republish my most recent blog post on this topic by a an online Flex news source. The editors and I decided that I would finish my sample app and write a full article instead, to provide some more substance/examples of the information being presented.
Thanks go to Joe for sharing his experience, being my original inspiration in this area, and giving Flex developers some alternative best practices from the existing Flex frameworks.
I usually make a West Indian chicken curry in the slow cooker, but when choosing a recipe to make Jessica for dinner on Valentine’s day, I figured I would give good ol’ regular Indian curry a try. We eat Indian food pretty regularly, but I’ve never tried to make it before.
Unfortunately, most Indian dishes call for authentic spices, many of which you can’t find outside of specialty stores in the US. So, I slightly modified a recipe I found online and spun the wheel, and it turned out pretty darn good. Thought I’d share the final recipe for the world to enjoy.
Goes great with Basmati rice. Expect your house to smell like an Indian restaurant for at least two weeks. :)
1.5 tbsps curry powder OR 4-5 curry leaves if you can find them
Chicken (boneless, skinless cutlets work best) – 1 lb
Spring Onions – 4, chopped finely
Tomatoes – 2 or 3 depending on size (they disintegrate and make the sauce)
Ginger paste – 1 tbsp
Crushed Garlic – 1 tbsp
Green Chilies – 2 (fresh) OR 1 can (tinned)
Coriander powder – 1/2 tbsp
Red chilli powder – 2-3 tbsp
Turmeric powder – 1/2 tbsp
Coriander leaves – a few
Olive Oil – 5 tbsp
Cumin Seeds or Ground Cumin – 1/2 tbsp
Preparation Instructions (about 25 minutes)
1. Begin heating a pan to medium-high heat. Clean the chicken and cut in to small pieces.
2. Coat the chicken in the tumeric and set aside for 10 mins while you work on the other stuff.
3. Cut the onions, tomatoes, green chilies, and coriander leaves separately.
4. Add oil to the hot pan. Once the oil is heated, add the following ingredients one by one, mixing them in to the oil: cumin, curry, green chillis, onions. Reduce heat to medium. Cook until the onions start to soften. Add some salt as you go.
5. Once the onions are cooked, add the ginger paste and garlic. Simmer for 3 mins.
6. Add the tomatoes and chicken. Simmer for 5 mins over medium/high heat. Stir to cook the chicken and begin to reduce the tomatoes in to the sauce
7. Add the red chilli powder, coriander, and salt. Simmer on medium/low heat for 10 mins, or until the tomatoes and sauce have reduced to a consistency you agree with. Add and mix in very small quantities of water as necessary to thin the sauce during reduction. Add salt and additional quantities of the spices used so far to taste.
8. If you like, garnish with coriander leaves and crushed pepper before serving. Serve the curry in a bowl on a large plate, with the rice on the plate.
I don’t know if this is a good marketing message for Adobe. I read this as “we can only count thousands, not tens of thousands or hundreds of thousands.”
I also think it’s a little weird that they are marketing a technology by saying “really, people are doing this”… there is a hidden message I’m interpreting there (probably a wrong one, but this is my blog so I’ll say what I think). To compare, I’ve seen marketing messages about Flex that say “Flex does X, learn how” but not “really, there are a lot of people learning/using Flex.”
If you follow my blog, you know that I still like CF, but I think other technologies have begun to make HTML-based web development simpler and easier. That’s kind of what technologies do; they evolve over time and supersede each other. Otherwise, we’d be writing web sites with punch cards. This is the reason we’re using Flex for all new internal apps at CFI instead of Oracle Forms; Flex is just more capable for more reasons than I have time to list here.
I expect a flood of comments to this post about how “I’m working at X and I’m still productive in CF and I love it, it’s not going anywhere…” etc., etc.,. I’m not saying that you can’t use CF, or be productive in it, or that it’s “bad”, or dying imminently. I just think that for the most part, there are now technologies that supersede CF from a productivity perspective for most web development use cases.
*dons flame retardant underwear*
Yep – 10.5.2 is out.
And while people may bitch about Vista (I polled the sys admins today and they said that the best time to go to Vista would be after global warming destroys the Earth), look at some of the crazy crap they had to fix in this latest release of OS X.
“Resolves an issue in which the Eject command could write to a disc in the optical drive.”
WTF? I’d be pissed if I ejected a blank disk and it was written to and unusable.
“Addresses an issue in which Setup Assistant could unexpectedly appear each time Mac OS X 10.5 starts up.”
Oooo… that would piss me off.
“Addresses an issue in which Finder could unexpectedly quit when displaying folder contents in Column view.”
I’d be equally annoyed if Finder bounced itself while I was looking at files.
“Addresses a hanging issue that may occur when connecting to an AFP network volume.”
I get weird hanging issues in Finder very occasionally (like, once every two months) when sleeping my Mac at the office while connected to a network share, and then bringing it home (or vice versa). Not sure why a UNIX-based OS has so many issues with this.
There’s a few other doozies in there that I’m glad they fixed. So, I guess my point is, OS X ain’t perfect either in any new releases, so give the Windows team a break. Although, Apple is on their second point release since a November launch, so they are clearly caning Microsoft in the OS update speed department (although that’s nothing new).
On the plus side, here are a few things I’m glad to see added to Leopard.
“Adds a menu bar option for accessing Time Machine features (the menu extra can be enabled in Time Machine preferences).”
“Updates Stacks with a List view option, a Folder view option, and an updated background for Grid view.”
Thanks for listening, Apple (item #2). And you all thought Jobs doesn’t read my blog. First he rips off all my ideas, and now he tweaks the Dock like I said so. The least he could do in return is give me his GV. :)
I was waiting on 10.5.2 to upgrade my work laptop, so I guess it’s almost time. I wish CheckPoint would hurry up and release a final version of the VPN client so I didn’t have any remaining hurdles. For now, Tiger remains my friend.
After BlazeDS came out, it was only a matter of time before somebody implemented data push in a JRuby app.
I’ve been messing around with dynamic classes in Flex today, and I’ve found some pretty neat ways to do things.
I got in to this while writing some code for my session at cf.objective() this year. I wanted a non-trivial (yet simple) example of how to just use Flex’s built-ins to make a maintainable application, and so I started to roll some code.
A key part of my philosophy behind Flex apps is that they should be as easy to create and configure as I find Spring apps to be in Java. You should be able to combine a simple service/data/functionality “locator” object with regular old tried-and-trusted OO design patterns, and be able to end up with something simple that is exactly what you need. So, to start with, I created a basic “locator” object to enable any part of the application to find, bind to, and/or invoke other objects (usually Singletons) within the application. I got the basic app working and tested, and was ready to move on.
With this complete, an old desire within me was stirred up to be able to mix the XML syntax of MXML with the scriptability of ActionScript 3 to create a simple IoC-like object factory/locator for Flex apps. The ideal solution would allow you to do Spring IoC-like configuration in MXML, without having to use a bunch of special classes or write additional glue-code yourself. I always find I have to write two or three classes to abstract Spring when I use it in our Java services at work, which isn’t a huge chore, but is totally unnecessary in Flex due to how cool the concept of MXML is.
This isn’t the first time I’ve tried doing this, but I’ve always failed to find a good solution. I’ve failed mainly because I’ve relied on alpha frameworks from other people rather than just doing it myself. I downloaded something called Prana a while ago (couldn’t get it working at the time as I recall [probably my fault] and it didn’t leverage MXML like I want to), and while MG:Flex looked promising it was still going in a direction that looked more boilerplate-esque than I wanted. That being said, my stipulations were tight: I was looking for a zero-boilerplate solution.
Since Dan and I were looking at some cool stuff on the FlexOnRails site during the acts_as_conference, I had it fresh in my mind that the capabilities of dynamic classes and proxies in AS3 might be the key to what I wanted. After thinking about it a while, I did some Googling, and found an example of almost exactly what I had in mind. I modified the code slightly to add singleton-style behavior, did some experimenting, and voila – exactly what I wanted!
I’m going to share what I wrote with a few people I respect before I show it to the world, but I think I may have finally cobbled together the Flex framework I always wanted. At present, it consists of a whopping one class, which you don’t even extend.
It’s pretty hot. Since you configure everything in MXML, you can basically wire up your components to each other and declare event listeners and anything else you want to do all in one place. You can alternatively create multiple containers to isolate specific parts of app functionality/responsibility as you see fit, or bundle it all together in one file if you prefer – your choice. Adding access to the framework in your own files is as easy as writing a single tag.
Watch this space if you’re interested. I hope to have something out on the web in a week or two once I’ve got it all vetted with my peers.
Most Popular Yelling
- Scrolling Large Data Sets in Flex Charts (41)
- Configuring Tomcat SSL Client/Server Authentication (28)
- Fixing "Bluetooth audio failed" Error Message on Mac OS X with Sony DR-BT50 Headphones (16)
- How To Become A Software Engineer/Programmer (15)
- Using Axis's wsdl2java in a Maven Build (13)
- Speak and Spell Samples (13)
- An Objective-C Tutorial for Enterprise Java Programmers (12)
- On A Personal Note (10)
- Abandoning ColdFusion? (9)
- Adobe Says: "Thousands of Developers are using CF 8" (9)
Stuff I Like
- October 2011
- August 2011
- April 2011
- March 2011
- January 2011
- December 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- January 2007
- December 2006
- August 2006
- July 2006
- June 2006
- April 2006
- February 2006
- December 2005
- November 2005
- October 2005
- August 2005
- July 2005
- June 2005