2010-12-28

Studying Parsley Framework

I've been building this pretty big application at work, its the main application we use to manage all of our internal accounts. The application has been in construction for 2 years now, its all done in Flex and Java and on the Flex side of things, I've been using Cairngorm as my application framework. However as we've being adding different parts (some are not often used) the application has gotten bigger and I've been looking to break things up into modules to help manage everything. Both from a run-time perspective (memory consumption) and from a development perspective (maintenance).

Of course using modules got me to thinking about how everything would work with Cairngorm, so I started doing some research and came across the Parsley application framework. Parsley is an Inversion-of-control (IOC) framework much like Spring is in the Java programming world. Meaning you have a config file that describes all the objects you want framework to manage for you and then it injects the appropriate object(s) into other object(s) for you, so no one object knows about the other. This makes your code loosely coupled, easier to update and maintain and finally, easy to unit test.

The framework appears to be well designed and like I just mentioned, reminds me of Spring, so the concepts are easy to understand. Also, it seems that parts of the latest Cairngorm (version 3.0) can be used along with it, so this will help as well. And the biggest point is that it has build in support for working with Flex modules, so I am eager to use it.

I'll be writting some blog posts of my experiences with Parsley, so look for them soon!

2010-12-05

Installing Flash Builder Burrito as a plug-in

If you are like me and develop in Java and Flex all day long and Eclipse is your IDE, then most likely you will want to install Flash Builder as a plug-in within Eclipse. Well I just installed the beta version of Flash Builder codenamed "Burrito" and noticed it was installed as a standalone application. After a quick Google search I found the following article, which allowed me to install Burrito as a plug-in within Eclipse in a matter of seconds.

So here is what I did exactly (cause I upgraded my Eclipse version as well):
  1. Uninstall previous version of Flash Builder 4
  2. Deleted my eclipse installation (d:\opt\eclipse)
  3. Downloaded and installed latest version of Eclipse
  4. Installed Flash Player "Burrito" and then followed the instructions here

2010-12-02

Flash Player 10.2 beta is out

The beta version of the next iteration of the Flash Player, version 10.2 is now available for download on Adobe Labs. The biggest new feature is related to using hardware acceleration to improve performance. So if you do lots of video/animation using the Flash Player, what are you waiting for? go over to the labs website and get it!

Here is a another website with some pretty good info on this release.

Flash one of big selling points for Android

Just saw a commercial for a Videotron Nexus One (Videotron is a cell phone provider here in Montreal) and of the main points was the fact that it ran Flash. Love it. Well how else will I see ads, watch YouTube videos, view sport highlights on ESPN.com and TSN.ca and see news articles on CNN.com? Flash is a big part of the web experience.

2010-11-19

Flex, HTML/JS Pros and Cons from a developers point-of-view

Having worked these last couple of months on a pure HTML/JS project at work, I'd thought I'd share a few pros and cons and random notes of working in both Flex and HTML/JS programming languages.

I'm not here to bash one or the other, enough people do that, just some thoughts for you guys to draw your own conclusions. Also this is from a developer stand-point, building web applications, not a web site with simple text and images...but an app, where you load, create and update data.

Note: Was using jQuery 1.4.2 for the javascript portion.

Flex
Pros
  • AS3 is very similar to the Java programming language
  • Development, build and unit testing is almost exactly like in Java
  • Great IDE (Flash Builder) provides an easy and fast way to code in MXML/AS3
  • Online documentation is excellent and thus helps newbies learn the language
  • SDK is open source, so a developer can learn and extend the base classes himself if need be
  • In Flex, you manipulate the data directly and send it back to the server for processing, no need to worry about re-drawning the UI
  • No cross-browser, cross-OS issues
  • Object layout is flexible and easy to do
  • With its a default theme, the app can look good and professional
  • Can create re-usable controls/classes
Cons
  • Takes time for new developers to realize that the app is one entity that just sends data to/from the server and not a collection of pages
  • Compile times can be long
  • Developer can get into the bad habit of loading lots of static data (countries, provinces, etc..) up-front, that will never be used, thus causing an unnecessary long load time for the app
  • You application SWF can be de-compiled
  • If end user can to copy data from multiple controls (or from DataGrid) to paste into another app (say an email), you pretty much have to code this, where its a default functionality with an HTML page since 1975
  • Dealing with timezones can be a chore (Flex loves to deal with it on its own)

HTML/JS
Pros
  • Faster load times
  • The development cycle is quicker: update the page and reload in the browser
  • In some cases you can have a single page and use Ajax calls to get the data you need, no need for a page refresh
  • End users have been working with browsers for a long time now so the default copy'n'paste functionality is very useful to them and almost second nature
Cons
  • Cross-browser issues still exist!
  • IDE support not great for JS third-party frameworks like jQuery
  • In my case, no documentation existing for how to built a jQuery widget, had to find an online tutorial after searching. So no real API doc.
  • Object layout is a pain - tables still the way to go - and inconsistent across browsers sometimes
  • As a developer you need some design skills to make the app look good.
  • Handling the proper z-order of objects can be a chore
  • Reading someone's jQuery plugin/widget can be interesting (enough braces and commas for you?)
  • The browser BACK button can take your app out of proper state
A final thought...I like working in both technologies, I love to learn new things and working with jQuery has made working with data in JavaScript a heck of allot easier that it used to be 10 years ago. But I still look at it this way, if you want to build something people are going to read, you use HTML/CSS/JS. If you want to build an application, you use Flex.

2010-11-10

New Firefox 4 beta 7 is really fast

I just downloaded and installed the latest Firefox 4 beta 7 and man it is fast! The browser loads in an instant, not like beta 6 that took a minute to initialize and the pages come up in a flash! - couldn't avoid the pun :) There are also minor UI tweaks that are easy to notice.

You download it here.

2010-11-04

Great prez about the future of Flex (from MAX 2010)

Just saw Deepa Subramaniam's MAX 2010 presentation on the future of Flex and it is cool! If you are doing Flex development or are planning on doing so for the first time anytime soon, then I recommend you view her prez. She begins by talking about Hero, the latest Flex version currently being worked and then to talk about the future of Flex and the Flash platform and my favorite part was "Falcon"; the complete re-write of the Flex compiler. With "Falcon", we will be able to keep the "auto-compile" feature in Eclipse ON for good and not worry about slow downs while working on projects. But don't take my word for it...watch the prez for yourself!