Showing the “hand cursor” in controls

Showing the “hand cursor” in controls

This seemed like a challenge to us at first. We were trying to use the CursorManager, but then we hit upon a solution that made more sense and also was easy one.

Flash has an object called Sprite; if the buttonMode of the Sprite has been set to true, then the component acts as a button and displays the hand cursor. You can also use the useHandCursor property to turn that off if you want to.

Code:

<mx:Button label=”With cursor” buttonMode=”true” useHandCursor=”true” click=”click();” />
<mx:Button label=”Without cursor” useHandCursor=”true” click=”click();” />

Is Flex that easy?

It is easy to make things code up in Flex and get to work. We all have seen at many places the many examples that show that up in – 3 steps:

1. Get into Flex Builder;

2. Throw some components;

3. Add events
While I loved to work in Flex and be back in golden days of desktop kind application, an inner voice always said that this is too good to be true. As I started to get behind the curtains i saw the bigger picture – Prototypes are different that Enterprise applications which are 10/20 times bigger than a prototype. Try making changes to the User Interface with minimum effort. Try handling the changes when you find that your back-end is changing, try handling performance issues. And then it comes to us that what we do in Flex was just a prototype. The examples themselves use “Absolute” layouts that are not recommended.


The question: Can you start coding up an enterprise application using the 3 easy steps? I believe the answer is No.

What do you think?

Testing Flex applications

Borland has announced the latest version of its Silk testing tool.

Adobe RIA Summit 2008

April 3rd, Bangalore was the venue for the Adobe RIA Summit 2008 and I was one of the lucky ones to be there. Amongst others were some of the key spokespersons Ben Forta and James Ward.

Ben Forta presented a session on using Flex using their Flex Builder and how can one in matter of minutes build a web site. He also introduced Thermo the next generation designing tool by Adobe (tentative Early release available in 3 months and a stable Beta 1 release by end of the year). Meanwhile, he talked about how can we leverage the Adobe Fireworks for improve design + development integration.

The most enlightening session was by James Ward, where he demoed the Adobe Life Cycle Data Service (LCDS). It was all about how can they make your life simpler by managing Conflict Management and client push capabilities. While it all sounded very meaty, I got a chance to catch up with James during lunch and spoke about some of the detail design aspects of the LCDS with web services / LDAP and other technologies.

It was also an interesting session to talk about some of the best practices.

I really enjoyed the summit.

More at Flex Geek

Throw away Junk

There have been times when I have thrown away my code. Did you ever face this situation – I am very sure you did, as every developer does. Something that I have sweat over, written to deliver results, is ready to be discarded now thrown because I no longer need it or I find better ways of doing the same thing.

I never mind hitting the delete key on a code; actually when I reach that decision, I start to enjoy the experience as I realize that I am now evolving. I have faced this situation many times and it was only the first time that I was hurt. I still remember almost 3 years back when my Architect told me to scrap everything and start afresh, I was aghast, but now when I look back I realize how good a decision was that.

Today, as well, I am facing a similar situation, when I am looking at improving a code base which will bring in performance improvements to the application I am working upon. While the effort is a significant one, and I have many other things to take care of, the task itself is fun.

Do not get carried away with this and start doing it with your code, do it when it makes sense.

What is Flex?

Long time back Macromedia introduced Flash, the next generation Multimedia. Flash was all about timeline-based approach. Consider everything as an image put in a strip that you run through very very quickly to get some movie. People started to realize that Flash they can do some real cool stuff with and we started to see new way of web content coming up.

When people realized that Flash can be used to do much more than static web content. But, when developers open up the Flash player they froze to see the timeline view. We can just not see programming the timeline way – we are OO guys.

So, Adobe decided to provide a way that works for developers as well and up came out Flex. Flex framework is a code library of components that facilitate building applications which run on Flash Players. Adobe also wanted to make sure that the community can benefit from the framework so they open-sourced the framework. Adobe also provided with a tool the Flex Builder based on Eclipse framework that assists developers to make Flex applications. The Flex SDK (software development kit) has all i.e. Flex source code library, compiler which will let you develop applications in any IDE (even a Notepad) but requires more time and effort to setup. The trade-off for the costly Flex builder is productivity and I find that value for money. Adobe also offers free licenses for students.

Some thing about Flex applications… Flex applications are written in MXML which is a declarative language based on ActionScript 3. The MXML files are first compiled into an ActionScript3 file and then the same is compiled in a SWF file. the SWF file can then be executed in any Flash player.