2010-12-28
Studying Parsley Framework
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
- Uninstall previous version of Flash Builder 4
- Deleted my eclipse installation (d:\opt\eclipse)
- Downloaded and installed latest version of Eclipse
- Installed Flash Player "Burrito" and then followed the instructions here
2010-12-02
Flash Player 10.2 beta is out
Flash one of big selling points for Android
2010-11-19
Flex, HTML/JS Pros and Cons from a developers point-of-view
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
- 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
- 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
2010-11-10
New Firefox 4 beta 7 is really fast
You download it here.
2010-11-04
Great prez about the future of Flex (from MAX 2010)
So I guess Flash is popular afterall
Skyfire sells for $2.99 on the app store.
2010-10-10
Built my first AIR app for iPhone
- use XCode
- use HTML/JS/CSS
- use AS3/Flash
2010-08-31
Setting focus on a Flex app after its loaded
AIR using "Hero" beta running on Android video
2010-08-30
Ottawa Mobile Dev day recap
Windows Phone 7
It was the last prez of the day and for me it was by far the most interesting, so you could say they saved the best for last. The presenter actually demoed a beta version of the phone (due out in Nov of this year) with all of its features and then proceeded to use Visual Studio to create a couple of simple apps and run them in the simulator to demonstrate a simple development cycle. A couple of the sample apps he built used the Azure services (provinded by MS for a monthly fee of $12 - dont quote me on that) to push information to the phone. The development was done in C# so easy for existing Windows developers to pick up on (or even Java developers like me!).
Adobe AIR on Android
Unfortunately there was no demo, just a look at sample code and what extra APIs are provided to AIR for the Android OS. Again this is just a beta, so you can try it out yourself by downloading the add-on here. Although you can access things like the Geolocation API and the Accelerometer, you cannot unfortunately access the phone's contacts or any over local data. Maybe in the next version.
iPhone
Two words: Objective C. We had two presenters for the iPhone and although the apps looked great (like they always do), I can't say that programming in Objective C turns me on. It looks so archaic. Dealing with pointers? Remembering to free up memory? That's so 15 years ago! There is a glimmer of hope however, you can use PhoneGap to create HTML/JS/CSS apps and deploy them to the iPhone. But you have to have a Mac in either case to do iPhone development. Bah!
2010-08-22
HTML/CSS not as intuitive
Finally after some google I found this and it worked:
.rootContainer {
width: 1000px;
position: absolute;
left: 50%;
margin-left: -500px;
}
So in essence a hack as I see it. The above CSS basically says take your container, makes it 1000 pixels wide, position it as 50% from the left border and then goes back 500 pixels (always half of the container's width) in the left direction. Basically it is doing a mathematical calculation for you. In 2010, shouldn't things be easier for you than this?
The equivalent in Flex you ask? If your container is nested within a Canvas, just set the horizontalCenter like so:
horizontalCenter="0"
Simplicity. I love it. And in the case that the parent was a non-Canvas type container, then you could use:
horizontalAlign="center"
Again, simplicity. You know just but looking at either one of those lines what the positioning of child elements is going to be.
The conclusion here is not to say that I don't want to learn, or that I am being lazy. Neither that a simple math calculation is beyond my abilities. It's to say that it is not intuitive! We use the word intuitive when talking about a user using a UI for the first time, how easy it is to figure out how to perform some task; well same goes for developers. In Flex it is easy to figure out how to position elements within a container, in HTML it is not so easily apparent.
Another one is the CSS "float" property. Allows you to push elements to the right or left. But top and/or bottom? No idea, haven't discovered that one yet :)
P.S.: Don't ever use the HTML <center> tag to center elements...it doesn't just center its immediate children, but children of children as well. Don't ask me what algorithm it uses!
2010-08-01
Very nice UI design for Windows 7 tablet
2010-07-31
Adobe Ottawa Mobile Developer day
2010-07-04
Specify formatter on AdvancedDataGridColumn
Once feature I recently discovered is that you can specifier the formatter to be used on a particular AdvancedDataGridColumn. This allows you to quickly format, say monetary values, without the need for creating a label function or using a renderer.
Example is as follows:
[mx:NumberFormatter id="nf" precision="2" rounding="none"/]
...
[mx:AdvancedDataGrid id="dg2"]
[mx:columns]
[mx:AdvancedDataGridColumn headerText="Name" dataField="name"/]
[mx:AdvancedDataGridColumn headerText="Balance" dataField="balance" formatter="{nf}"/]
[/mx:columns]
[/mx:AdvancedDataGrid]
Flash Player 10.1 release notes
2010-06-29
Firefox 4 is the new Opera
Downloaded Opera 10.54 just now and playing around with it and couldn't notice that the upcoming Firefox 4 is going to look very much like it.
And the reason why I am toying with Opera? Well we are going to be doing some heavy re-work of of one website at work and it will be all done in HTML (using JQuery for coolness). So yes that means I need to test the site as I go along in the most popular browsers: IE, Firefox and Chrome. So then I thought why not Opera as well. Heck I should also try Safari I guess. The worse is IE, cause so many still use version 6.0 (27% of internet users as of 2009). What a pain!
Oh wait, with Flex you just have test once :)
2010-06-10
Adobe Flash Player 10.1 and AIR 2.0 released!
Today Adobe released the final versions of Flash Player 10.1 and AIR 2.0.2 for public consumption.
Both are long awaited releases, especially for the Flash Player since it can now be installed on mobile devices and contains several important features (most notably speed improvements) for running on this platform type.
For you developers out there, don’t forget to download the debug version of the latest Flash Player 10.1 from here
.
2010-05-23
Fixing File upload session issue with non IE browsers
2010-05-18
Flexcommon 1.2 released
- Compiled with Flex 3.2
- DataComboBox
- New StringUtils.isNumeric() method
- Comes with en_US and fr_CA language bundles
2010-05-11
Fixing the "unable to export SWC oem" error in Flash Builder
unable to export SWC oem.
I read on several sites how to fix the problem but here is my little piece of details with step-by-step instructions:
- Shutdown eclipse
- Using your favorite text editor, open the .flexLibProperties file in the root of your project
- Erase all lines between the <includeResources> tags and just replace with an empty version of that tag (e.x.: <includeResources/>)
- Save updated .flexLibProperties file
- Start eclipse
- Use the clean and build options under the "Project" menu
Enjoy!
2010-05-02
Open Source Week in Montreal (MonDev)
2010-04-27
Copy operation between List / DataGrid
2010-04-07
Flash Player 10.1 pre-release
You can view some demos on the page showing the Flash Player 10.1 running on various devices and at the bottom of the page there are some quick interviews with Adobe employees; each one talking about one of the new changes that are present in the upcoming release.
2010-04-03
Handling change - the YouTube way
Some people hate changes, even of the smallest kind (Napoleon would be outraged! - internal friendly joke). This is a good way I think of showing users that the changes are no big deal really and you can continue on using YouTube to enjoy your favorite videos as you always have and with a smile :)
Careful building hybrid Flex/HTML applications
PROS:
If your company will continue to use Flex going forward, for all the good reasons, then basically you are getting ahead of the game. The parts are being built as you want them and you can eventually convert the old parts later on. Eventually you will end up with a 100% Flex built web application.
CONS:
You hybrid design will cause confusion with end-users. If your web application (as an example) deals with managing user records, maybe the general page (the main page) and address page is in HTML and the contact page is done in Flex. Meaning, end-users will, in the course of administrating a user then be jumping from HTML to Flex and vice-versa. Here is a list of negative effects that this might cause:
- Users might use the browser's back-button and not get the intended result (in my example this might not seem like the case, but in a complex Flex app, you can imagine such a scenario)
- Every time the Flex UI loads, it might need to retrieve the same data over and over again (country list in this case)...so there will be a little wait time, although in seconds, some might perceive this as annoying.
Obviously if we had to do it all over again, we would have left the "root" page in HTML and built all the sub pages as Flex and then finally migrated the "root" page once all the sub pages were converted.
Also another way would have been to leave the old web application in HTML as is, build the new application using Flex, not given anyone access to it and then when it was 100% in Flex, release it to everyone. Not sure this would have worked well either because of the following reasons:
- You would have to maintain the HTML and Flex applications at the same time
- You would be getting no feedback at all on the new Flex app
- You would sell-shock users when the new Flex app would be released
So has anyone else ever have to deal with this type of issue? What did you do? How did you handle it?
2010-03-30
Flash Player crashes?
And then you have to wonder...if the Flash Player crashed so often, wouldn't nobody develop for this platform at all? Why would it still exist 15 years after it original release?
So wake-up people, Flash Player is here to stay for a little while longer, we can do more with it today than we ever could, and the web is more dynamic because of it. Will it cease exist some day? Perhaps, but not for another 10 years I hope :)
HTML has spoiled end-users
Change happens all the time. We change our shoes, our clothes, the car we drive, what we eat for breakfast, where we live and where we work. But change certain things on people and wow, you are in a world of hurt.
I've recently been re-writing/migrating/enhancing an application at work, which used to be in JSP pages to Flex 3 and things have been progressing well. Until of course people started using the application. Main complaint? "Why can't I highlight this page and copy it into an email?" Well what the end-user was referring to as a page is actually a TitleWindow that has some information on it and a DataGrid with the financial information in it. What he basically wants to do would be possible if it was an HTML page, cause you can highlight anything in an HTML page. But the real reason for having to do this? The person needing this information did not want to take the time to access the application to see this information for himself. (so is the main issue here lazyness?)
So the simplest thing has caused negative feedback for the new version application and not just from one person. And it is the most basic thing really, copy'n'paste functionality that is normally part of the OS/browser. Something people have been able to do since forever is now no longer possible. They could use screen capture applications, but they don't support the Flash Player and its DataGrid control. People don't see that the information is more presentable and easier to navigate, they are only taking about the simplest basic feature that is no longer working.
So what to do? I will have to do some research to see if anyone else has had this problem and basically make Flex more HTMLism I guess. But mostly, in the end, I will have to change.
Chrome 5 comes with Flash Player
2010-03-24
Loading CSS at runtime
2010-03-12
Data Visualization Components now part of SDK
2010-03-02
Things that inspire
2010-02-19
Change mouse cursor on a Label control
However there is no visual cue that tells you that the Label is click-able, like the mouse cursor changing to a hand. But there is a way, you can make it do this automatically when someone hovers over the Label control. Its not obvious, so here are the 3 properties you have to set:
<mx:Label buttonMode="true" useHandCursor="true" mouseChildren="false"/>
2010-02-16
Ottawa Flash User Group meeting
Full details and registration here.
2010-02-13
French accent characters in Flex
However we did notice that when running the Flex application, certain French characters that contain accents (ex.: é - ALT-130) were displaying as little empty boxes in the UI. Found the answer to this problem on this website. Basically the encoding for our french properties file was incorrect. It was using ISO-8859-1 instead of UTF-8.
To resolve this problem, in Eclipse, perform these steps:
- Right-click on your french properties file and select "Properties"
- Select "Resource" from the left side panel
- Change the "Text file encoding" from the default to "Other" and select "UTF-8"
2010-02-07
Flash Player truly brings web sites to life
On one website, I see an silent teaser playing for a upcoming movie. Turn on the sound for the teaser and you are transported to a fictional world, but only for a few seconds. Goto Youtube.com and the whole experience revolves around the Flash Player, enabling the user to view a music video he hasn't seen in years, watch a clip from a favorite movie or watch a short funny movie created by a friend.
For myself, I am big NFL fan and I love going to either nfl.com or espn.com and watching a pre-game show debate about my favorite team's upcoming game (Cowboys in case anyone in wondering) or watching a post-game review for that matter. Furthermore, because not all the Cowboy games are presented on a national cable channel, I have a way to watch those games on my computer via the web because of the Flash Player.
So next time you are browsing some website, look around the page, you won't see just static data like it used to be just 15 years ago, but a portion of it will be dynamic and that is thanks to the little plug-in that could.