Some thoughts on open sourcing Adobe Flex components

We earn our living at Farata Systems by selling Flex/Java consulting services and training. While doing this, , every now and then we create reusable components, and so far we are giving them away for free. Some pathetic bloggers call this ‘giving back to the community ‘. We look at it simple: if we do not have time to productionize a component, we donate it.

These days some people are trying to sell Flex item renderers: they create a list-based control with a custom renderer and immediately put a price tag on it. I wish them good luck in selling these toys.

But I ‘m talking about real stuff here. For example, we ‘ve created an open source component called DAOFlex. Just enter “Select * from customers “, provide parameters of the Java EE data source, and go and make yourself a cup of coffee… if you can do it in 20 seconds. Because this is how long it takes DAOFlex to create all artifacts in Java, MXML, ActionScript and XML required for deployment of a FLex DataGrid with complete CRUD functionality.

Very proud of ourselves, we ‘ve uploaded this DAOFlex to Flex components exchange, and it quickly became one of the most downloadable Flex open source components…and then we started receiving lots of emails asking for tech support. Yes, we ‘ve provided instructions on how to install it. Yes, we ‘ve written an article about this component. Our upcoming Flex book has a chapter explainin how to create such components. All this is not enough – people need tech support. Some of them do not bother reading instructions – for them it ‘s easier to send an email asking for help.

Then, we ‘ve given away our logger component for free.

Now we have another one – we call it a supergrid, or a reporting component FlexBI. If you want to see a real power of DataGrid, do us a favor and spend 30 minutes watching this WebCast based in our recent presentation at MAX 2006. If there are PowerBuilder developers in the audience, think DataWindow-like reporting.

Just watch the webcast now….I ‘ll wait. Is it cool or what?

You can create a complex report populated with the data from a database in less than a minute. Then an end user can manipulate the data using drag-an-drop interface, create grouping, filters, write formulas on the fly… Raise your hand if you know how to write a program in any language that allows an end-user write and execute dynamic formulas (I ‘m not talking about selecting from a predefined list of sum, min, max and the like). Want to export the data to MS Excel? No problem.

The funny thing is that we are afraid of giving away FlexBI for free. We do not have enough resources to answer tech support questions. We are still debating if we should charge for FlexBI, which saves A LOT of time to any developer who needs to create ad hoc reports for business users. Actually, power users can create their reports themselves with FlexBI.

Anyway, if you ‘ll see a price tag on FlexBI, it means that we ‘ve hired a tech support person, and someone has to pay his/her salary. We need to move on – Apollo is looming, and we have lots of new ideas.

PHP eats Rails for breakfast?

Ran into some stats trying to show that PHP is the king of the open source. I ‘m neither into Ruby nor into PHP, but something in these charts does not sound right to me.

The author states “The world is shifting away from rich client applications, and towards the web. PHP looks like the language of choice in this new world. ” Congrats on such a smart conclusion! I ‘m not moving in into his “new world ” and prefer to stay with RIA in the older world.

The author counts the number of new lines of code in PHP, and his blue PHP line shoots right up in the blue sky. I ‘d suggest including Cobol in this chart to see some really impressive numbers, if you judge a success of a programming language by the number of lines of code.

Ruby folks are proud of the fact that their code is very compact… at the price of readability, of course. There is no free lunch, is there?

Anyway, I do not think this research is serious. What ‘s your opinion?

How Ajax Works

While the term Ajax was introduced in 2005, the technique of using XMLHttpRequest object was known since 1999 (this object became available in Internet Explorer 5). But up till now XMLHttpRequest object was never standardized by World Wide Web Consortium. This technically means that each Web Browser vendor can implement it differently.

Such Internet giants as Google, Yahoo, Amazon started using Ajax in their applications, which brought interest of business application developers who always wanted to make their Web applications less static and minimize page refreshes. A discussion on usability of Ajax for business applications is out of the scope of this article.

When I was learning how to work with AJAX, I went through a number of 101-type articles. The biggest problem with these tutorials is that the authors are trying to explain several things at once, which is confusing. I “ll try to offer you a very simple example of an Ajax application that will illustrate the “refreshless rdquo; nature of Ajax. Here “s a simple HTML page:

Click on the link, and the text area will be populated with the content of the server side file, which in our example has the text “Hello from the server! rdquo;

What “s the big deal? There is no entire Web page refresh! The XMLHttpRequest object sends an asynchronous request to the server, gets the data back and changes the content of just one object on this HTML page ndash; the text area.

Here “s the code of the ajaxSample.html:

lt;html lang= “en ” dir= “ltr ” gt;

lt;head gt;

lt;title gt;Ajax sample application lt;/title gt;

lt;script type= “text/javascript ” gt;

var myXHR= new ActiveXObject( “Microsoft.XMLHTTP “);

function goGetIt(){

myXHR.open( “GET “, “/theriabook/hello.txt “,true);

myXHR.onreadystatechange=updateTheData;

myXHR.send();

}

function updateTheData(){

if (myXHR.readyState==4){

myForm.someText.value=myXHR.responseText;

}

}

lt;/script gt;

lt;/head gt;

lt;body gt;

lt;p gt;Click on lt;a href= “javascript:goGetIt() ” gt; this link lt;/a gt; to populate the text area

below from the server side text file without the entire page refresh

lt;form name= “myForm ” gt;

lt;textarea name= “someText ” rows= “5 ” cols= “30 ” gt;

lt;/textarea gt;

lt;/form gt;

lt;/body gt;

lt;/html gt;

I deployed this file under Apache Tomcat that ran locally on my PC. In this example both ajaxSample.html and the data file hello.txt are located in directory webapps\theriabook. To test this program, make sure that Tomcat is up and running and direct your Internet Explorer to the URL of this HTML file, which in my case is http://localhost:8080/theriabook/ajaxSample.html.

In this example, the JavaScript code creates an instance of the XMLHttpRequest object in a way that is specific to Microsoft Internet Explorer. This sample will not work in other than IE browsers, because instantiation of the XMLHttpRequest object should have been done a little differently there, which is out of the scope of this article.

The click on the link calls the JavaScript function goGetIt() that starts with creating an HTTP GET request for the file hello.txt.

myXHR.open( “GET “, “/theriabook/hello.txt “,true);

The third argument here is equal to true, which means that we want asynchronous communication with the server. The next line tells which function to call when the data arrive:

myXHR.onreadystatechange=updateTheData;

And finally, we send an asynchronous request to the server with no arguments:

myXHR.send();

When the request completes (the readystate is equal to 4) and the data arrive, the JavaScript function updateTheData() assigns the text received from the server to the text area called someText:

myForm.someText.value=myXHR.responseText;

For the sake of simplicity I did not include in this example multi-browser support or error processing, but this application illustrates the “refreshless rdquo; nature of Ajax Web applications.

And the last advice: always keep your fingers crossed when you start your Ajax application. Hey, you never know hellip;

Sun Microsystems offers a black box on Youtube

Two things to note:

1. Serious businesses started to use Youtube for promotion. It ‘s not anymore a video of a half naked teen sitting in his messy room playing guitar.

2. Sun ‘s Black box is a really cool idea of a mobile data center. Just watch this video explaining the Sun ‘s Black box.

Bravo Sun! Bravo Youtube!

P.S. After watching this video, you may want to get familiar with yet another Sun ‘s project called Orange box (my thanks to Roman Strobl for providing this link)

The difference between Rich Internet Applications and Fat Clients

Got this question in the email, and one day I will give a serious answer, but it ‘s Friday night…

1.A user presses a button… and in a minute he finds a 300-pound middle-aged woman sitting on his laps. This is a fat client application.

2. A user presses a button…and in a moment he finds a 100-pound beautiful young lady sitting on his laps.

-Wow, you are so pretty, but a little too small!

-No worries, I ‘ve got girlfriends!

And the next moment he finds two more pretty girls sitting on his laps. This is a Rich Internet Application.

Have a good weekend!

Jonathan Schwartz: Java goes open source by the end of this year

Yesterday, speaking at Oracle OpenWorld conference Sun Microsystem ‘s President/CEO Jonathan Schwartz said that Sun will announce the open-sourcing of the core Java platform in 30 to 60 days. This will be done under an Open Source Initiative license ndash; the same one as it was used for open-sourcing of the Solaris OS.

I do not know why people make such a big deal out of the open sourcing Java. I do not know who started this “Freedom to Java rdquo; movement, but Sun decided to respond. Fine. I like IT news and I never hesitate to express my opinion on any of them, but this one is just a boring subject to me. I “ll drag this blog for another couple of paragraphs, but honestly, I do not care. Sun Microsystems was reaching out to the Java community trying to ask their opinion on the subject. I was invited to participate in the conference calls on how to open source Java, but never accepted the invitation. I do not believe that open sourcing Java is good for the community as now we “ll face new issues such as how to deal with forked version of the language. Is your Java really Java or its Java++? Are you Sun Certified Java programmer? By the way, which Java are you certified in? Or, you are XYZ Certified Java Pprogrammer! What version of Java Swing do you use?

James Gosling kept saying, that Java was always free, the source code was available to anyone, and he was absolutely right. Having the source code of any language or tool available usually serves two goals:

1. Learn the tool from inside just by looking at the code. See how the creators of the language did it, try to extend their classes as good as them or better, if you can.This was always available with Java.

2. Fix the bugs in the language without waiting for years until the creators of the language will do so.

Speaking of the bugs hellip;Sun has so called bug parade where you can Java developers can vote for particular bugs so Sun would prioritize the fixes properly. This site has proven to be ineffective, because Sun was ignoring this list. The top voted bug here is five years old. Finding a workaround by yourself was your main option . If you can ‘t find a workaround yourself, Sun sells Developers Expert Assistance for $99 a case (not as in beer).

It remains to be seen if open sourcing Java will lead to quicker turnaround in bug fixes. I do not have anything else to say. I “ve read the news, expressed my absence of opinion on the news, and will move one with my morning routine. Another day, another dollar.

How Oracle kills open source

First, read this news by Reuters. Now let ‘s think real quick about what has happened.

Red Hat as well as many other open source vendors give you the software for free, but to pay the bills they sell professional support for their services. Usually open source vendors charge premium for support and training, to make up for the lack of the licensing cash flow.

Larry Ellison, as a role-model-capitalist does not care about the bills that Red Hat needs to pay. He decided to kill them by anouncing half-price technical support for Red Hat Linux.

Many companies that create open source software may fall into the same trap.

That ‘s all folks. That ‘s all Red Hat.

Yet another zero info blog about Adobe MAX conference

After attending half a dozen conferences this year I took a break and did not go to MAX. I check MXNA blog aggregator daily, but finding useful info is not easy. This is how a typical blog looks like. Yo man, it “s so cool! I “m going to MAX in three days! Two days till the conference hellip; One hellip;I “m in the airport. My flight is delayed. And again. And again. Finally I “m up in the air. What happen to the beer? Five bucks? You gotta be kidding me. That “s a bummer. The good news is that now they allow three ounce shampoo on the plain. I should not forget to take a dozen of these little shampoo and body lotions from my Venetian hotel room. By the way, anyone knows what the body lotion is for? Is it supposed to be used while in shower or after? There is no instructions on the bottle. Need to check Wikipedia hellip;

I “m in Vegas! They gave me this military bag with some promo junk. Let me throw it away real quick. This bag is going to be for my cousin Vinni. Need to pick up a couple of XXL T-shirts on the vendor “s floor for my ant and mom.

Almost forgot about the Flex/ActionScript posters! Here they are! Yep, they are free! Adobe wanted to sell them for ten bucks each, but the entire blogosphere said, “Ain “t gonna buy no stinking posters for ten bucks rdquo;. I like Adobe. They always listen to the community, and now these great posters are free. This poster discussion is the most popular subject of the week at mxna. Finally I can get rid of this old J-Lo poster in my cube. She “s not that hot anymore.

Let me check the mxna feed and see what other guys are blogging about. Lemme see hellip;Max is so cool hellip;Cool is Max hellip; Is Max Cool? hellip;Adobe has released Flex Builder 2 for Mac OS X. Is there such thing as Flex Builder 1?

Several guys are leaking. They are leaking this tomorrow “s opening keynote. Everyone “s saying that we should be there at least for the first ten minutes. Some Blue Guys are giving either a demo or a show. I need more T-shirts.

My schedule for tomorrow is finally shaping up:

8:30-8:40 ndash; keynote. Ben Forta – hit 3 millionth mile spreading the good word about ColdFusion. I hope he ‘s in American Express miles award program. Ben, Bloomingdales gives away gift certificates: $1 for each hundred Amex miles. Your wife deserves these thirty grand! I have great respect of this man, really!

100K Flex developers. I wonder how they count? Is this just a number of downloads? Since Flex framework is free, you can ‘t even count sold licenses now. This raises one more question. The MAX book store was carrying 60 copies of the Flex Training from the source book, which is the only Flex tutorial available today and you can ‘t but it in stores yet. Hello Adobe marketing! I guess you ‘ve never heard of 100K Flex developers. No worries. The store promises another 40 copies of the book for the day 2. Round of applause to the newly hired Adobe Senior VP of marketing…I guess she needs some more time.

8:45-9:30 ndash; hit some slot machines to warm up

9:30-10:30 ndash; Black Jack table

10:30-11:15 ndash; I “m presenting on Flex 2 tips and tricks

11:15-2PM ndash; Roulette table

Hmmm, if you use the random number generator from ActionScript and the PieChart component from Flex Charting, you can easily emulate a roulette table! I just need to learn how to spin it! Should I register a new startup Online Flex Gambling right here in Vegas or Delaware is still the best for incorporation? I “ll need to create a number of skins for the roulette, a couple of transitions effects for showing the winning number, add some audio, which is piece of cake in Flash Player.

2:15 ndash;4PM Hit the vendors floor. Do not get intimidated. Like the design of this T-shirt? Just stop by the booth, introduce yourself and spend five minutes listening to the brouhaha about how the product XYZ will revolutionize your life. Get the T-shirt and move to the next table. Look at these nice little glowing pens! Aren “t they something? Just give these vendors your business card and bring home a couple of pens for your kids. You ‘ll sure get this annoying phone call from their salesman in a month or so, but it ‘s in a month… while your kids will start enjoying these pens next week. Daddy came back from the business trip! What did you get for us? Look at this lady in red: she carries a huge bag of freebies and brochures. Trust me, she “s not going to read them. In the best case scenario, she ‘ll bring them to her office after MAX. But most likely she ‘ll leave them in the hotel room instead of tipping the maid.

4-5PM Attending a session on E4X. I need to learn how to write an RSS feed.

OK, Create XMLListCollection, declare a Filter object on it. Got it. The call to refresh functions will actually remove unwanted blog entries. How many mxna aggregates? More then 900? I “ll keep a couple of dozens in my feed. Where Celine Dion is singing? In Caesars? E4X rules! Flex 2 rules! Flex rules 2! Adobe is cool! Can “t wait till MAX 2007!

Yours truly,

Yakov

P.S. There are two bloggers that take good notes at MAX: Jen deHaan and Tariq Ahmed Thank you, guys!

Underpaid? Quit!

Is there such thing as underpaid people? The short answer is No. Each person is getting paid the salary or an hourly rate s/he deserves at this momemt.

You may think that you are working really hard and have to be paid a lot better. I have bad news for you: you are always getting the right compensation . You fill that you worth more? Just hit the job market and see if there is anyone else who also thinks so. Your manager is pretty sensitive to the current job market situation, and s/he tries to pay for your skills prevaling wage/rate.

If you believe that you can make more, tell this to your boss. Give him/her a chance to re-evaluate you compensation. If you won ‘t get any response from your boss, but someone makes you a better offer, quit without thinking twice. The chances are that when you give your two weeks notice (the industry standard), you current employer will offer you to match or even beat your new deal. Never ever accept the counter offer. You gave them a warning in advance, they ignored it, and now it ‘s too late. They just want to win some time to find your replacement. Sorry, guys. It ‘s a little too late.

Can ‘t find a better paid job in your town? Move to a different one. Can ‘t or do not want to? Do not complain – there is no such thing as underpaid people.