This is a Conference 2.0. Really

Even though I write for Sys-Con, I ‘ve never publicly complimented them. But this time they really deserve a credit. Sys-Con will run an AJAXWorld 2007 conference in March. Usually, attendees have very limited access to speakers during conferences, and Sys-Con came out with a simple but smart idea – yesterday they have created a forum , where anyone can post questions to the conference speakers. And you do not even have to attend the conference to participate in this forum. It ‘s a very nice idea, or rather Idea 2.0.

Speakers should visit the forum and answer the questions to promote their sessions, and software developers will have a chance to correspond with well known people in the industry.

Yours truly will run Adobe Flex hands-on workshop during this event, so feel free to post relevant questions – it does not matter if you are planning to be there or not.

I ‘m sure, other event organizers will start copycatting Sys-Con, which is a win-win situation for everyone.

75% of employees are looking for new jobs

As per today ‘s eWeek magazine, CareerJournal.com claims that 75% of employees are currently looking for new jobs. But it seems that eWeek does not know why. Let me give them a hand here…

This is a time of the year when experienced recruiters start their calls with a question, “Did you get your bonus yet? “. They correctly assume that the bonus will be smaller than expected/promised, and people will start looking for new jobs. Most of the C-level IT managers have kept their employees on a leash last year with the help of some mysterious bonus. You better behave, or else. But a miracle did not hapen this year either, and given a healthy situation on IT market, it ‘s time to move. It ‘s elementary, Watson!

So, did you get your bonus yet?

Forrester: Ajax Or Flex?: How To Select RIA Technologies

If you have extra $379, read the 7-page Forrester report on the subject. If you don ‘t, read my blogs for free – I came to the same conclusion – go with Flex. Or, you can read this blog of Ryan Stewart who read this report.

We ‘ve been writing about this before, and you should not miss an important statement highlighted in this report – if you use AJAX most likely you ‘ll go either with a commercial or a home-grown AJAX framework. In either case you should compare not AJAX vs. Flex, but a particular AJAX framework backed by a small group of developers of the company XYZ vs. Flex backed by Adobe. This makes a difference, doesn ‘t it?

One more reminder – regardless of what AJAX framework you use, you are going to deploy JavaScript. I have a question to those who argue that today ‘s JavaScript is a good language for development of enterprise applications, “Why every vendor of AJAX framework starts their infomercials with a statement ‘With our framework you will not need to write even a line of JavaScript? ‘ ”

But AJAX deserves a credit for turning people towards RIA development. Eventually, developers will realize that it ‘s not as rosy as promised and will look for a different RIA solution. But if you are already in a RIA state of mind, you ‘ll never go back to plain HTML Web pages. Remember Hotel California? You can checkout any time you like, But you can never leave!

Now, real quick $379/7=$54.14. Both Forrester and I write the same thing, but they charge $54 per page, while I write all my blogs and articles for free. Life is not fair. Should I just change my last name to Forrester?

What questions to ask during the job interview

Typically, at the end of job interview the interviewer asks you, “Do you have any questions for me? “. This is a very tricky situation – you may kill the deal by asking the wrong questions. I prefer asking something very neutral, like “How many people work on the project “, or “What would be my role if you ‘d hire me “. The job interview is not the right place for showing your attitude.

Bruce Eckel has published a blog where he lists a number of questions you may ask your perspective employer during a job interview. Even though Bruce tries to be careful in asking questions, you can still feel that he ‘s a senior guy who will eventually ask for some special arrangements like working from home or having flexible hours. My only advice to you is this – be careful during the interview. Get the offer first, and only after that ask your questions – you can always reject the offer if you don ‘t like the answers. Also, Bruce is a very respected person in the Java community, and his impeccable reputation allows him to ask more questions than a regular Java-Joe can.

I also enjoyed reading comments to Bruce ‘s blog. IMHO, most of these questions would kill the deal, and most likely none of these responders would actually ask these questions during the interview.

Some time ago I wrote an article on the interviewing process , which might be useful for people who are just starting dealing with job market.

Should Java developers learn Flex – mixed feelings

While majority of Java programmers are still in denial, once in a while I “m getting emails or comments on my blog like this one from yesterday: “Are there any deployments out there that use Flex for the RIA or this is still at the infancy level? rdquo;

Basically, this question could be re-phrased like this rdquo;Should I invest my time in learning this technology, are there any real (billable) projects going on in Flex? rdquo;, or like this: “I am a Java developer, and do not have too much time in my hands – do you recommend me learning Flex rdquo; hellip;

It “s not an easy question to answer ndash; I have mixed feelings. But first, let me define the term (I “m planning to submit this entry to Wikipedia): “Mixed feelings is when your mother-in-law gets into a car accident while driving your new Mercedes rdquo;.

I have mixed feelings because if you become a Flex programmer, you ‘ll start competing with me, and my rates will go down. On the other hand, if more people know Flex, more new projects will open up, and I ‘ll get more gigs. Last year I was working on two billable projects developing enterprise Flex applications, and on three Java projects.

If you look at Dice.com, there is not too many real jobs with Flex yet, but guess what, there is fewer people than jobs. Consulting rates for people with Flex/Java skills are about 20% higher than for people with just-Java skills. We at Farata Systems are constantly looking (do not confuse with hiring) for good Flex/Java developers. BTW, your Java skills remain valuable and relevant, and Java still remains the #1 language for developing enterprise applications. But knowing something else in addition to Java can ‘t hurt.

Actually, you know what, just keep sitting on the fence for another year or two, while I ‘ll take care of my retirement using Flex.

Sending data from Flex to a JavaServer Page

This is a part two of the prior blog where I described how to get data from JSP to Flex. This time we ‘ll send data from a Flex application played by Flash Player to a Java Server Page. In the next version of our Flex-JSP application I “ll show you how to post data from a Flex form to JSP. We “ll place a simple form under the data grid above to enter the data about the new employee as in Figure below. Pressing the button Add Employee will submit the entered data to the JSP, which will attach them to existing employees and return back so the data grid will be repopulated to include the newly inserted employee.

To design the form, we “ll be using Flex objects lt;mx:Form gt; container, which differs from the HTML tag lt;form gt;. The latter is an invisible container that holds some data, while lt;mx:Form gt; is used to arrange on the screen input controls with their labels. We “ll also use lt;mx:Model gt; to store the data bound to our lt;mx:Form gt;. Let “s also make the employee name a required field and add so called validator to prevent the user from submitting the form without entering the name. It will look as follows:

lt;mx:StringValidator id= “empNameVld ” source= “{empName} ” property= “text ” / gt;

lt;mx:Model id= “employeeModel ” gt;

lt;root gt;

lt;empName gt;{empName.text} lt;/empName gt;

lt;age gt;{age.text} lt;/age gt;

lt;skills gt;{skills.text} lt;/skills gt;

lt;/root gt;

lt;/mx:Model gt;

lt;mx:Form width= “100% ” height= “100% ” gt;

lt;mx:FormItem label= “Enter name: ” required= “true ” gt;

lt;mx:TextInput id= “empName ” / gt;

lt;/mx:FormItem gt;

lt;mx:FormItem label= “Enter age: ” gt;

lt;mx:TextInput id= “age ” / gt;

lt;/mx:FormItem gt;

lt;mx:FormItem label= “Enter skills ” gt;

lt;mx:TextInput id= “skills ” / gt;

lt;/mx:FormItem gt;

lt;mx:Button label= “Add Employee ” click= “submitForm() “/ gt;

lt;/mx:Form gt;

The attribute required=true displays a red asterisk by the required field but does not do any validation. The lt;mx:StringValidator gt; displays the prompt “This field is required rdquo; and makes the border of the required field red if you move the cursor out of the name field while it “s empty, and shows a prompt when you return to this field again as in Figure below. But we “d like to turn off this default validation by adding the property triggerEvent with a blank value:

lt;mx:StringValidator id= “empNameValidator ” source= “{empName} ”

property= “text ” triggerEvent= ” “/ gt;

We “ll also add our own AS3 function validateEmpName(). Now the click event of the Add Employee button will call validateName(), which in turn will either call the function submitForm() if the name was entered, or display a message box “Employee name can not be blank ” otherwise.

Validators are outside of the scope of this chapter, and we “ll just mention that Flex comes with a number of pre-defined classes that derived from the base class Validator. They ensure that the input data meet certain rules. The names of these classes are self explanatory: DateValidator, EmailValidator, PhoneNumberValidater, NumberValidator, RegExValidator, CreditCardValidator, ZipCodeValidator and StringValidator. These validators work on the client side, and round trips to the server are not required. A program initiates the validation process either as a response to an event or by direct call to the method validate() of the appropriate validator instance as shown below.

The final version of the Flex portion of our application is shown below.

lt;?xml version= “1.0 ” encoding= “utf-8 “? gt;

lt;mx:Application xmlns:mx= “http://www.adobe.com/2006/mxml

applicationComplete= “employees.send() ” gt;

lt;mx:HTTPService id= “employees ” useProxy= “false ” method= “POST ”

url= “http://localhost:8080/test/employees.jsp ” result= “onResult(event) ” / gt;

lt;mx:DataGrid dataProvider= “{employees.lastResult.people.person} ” width= “100% ” gt;

lt;mx:columns gt;

lt;mx:DataGridColumn dataField= “name ” headerText= “Name ” / gt;

lt;mx:DataGridColumn dataField= “age ” headerText= “Age “/ gt;

lt;mx:DataGridColumn dataField= “skills ” headerText= “Skills “/ gt;

lt;/mx:columns gt;

lt;/mx:DataGrid gt;

lt;mx:StringValidator id= “empNameValidator ” source= “{empName} ”

property= “text ” triggerEvent= ” “/ gt;

lt;mx:Model id= “employeeModel ” gt;

lt;root gt;

lt;empName gt;{empName.text} lt;/empName gt;

lt;age gt;{age.text} lt;/age gt;

lt;skills gt;{skills.text} lt;/skills gt;

lt;/root gt;

lt;/mx:Model gt;

lt;mx:Form width= “100% ” height= “100% ” gt;

lt;mx:FormItem label= “Enter name: ” required= “true ” gt;

lt;mx:TextInput id= “empName ” / gt;

lt;/mx:FormItem gt;

lt;mx:FormItem label= “Enter age: ” gt;

lt;mx:TextInput id= “age ” / gt;

lt;/mx:FormItem gt;

lt;mx:FormItem label= “Enter skills ” gt;

lt;mx:TextInput id= “skills ” / gt;

lt;/mx:FormItem gt;

lt;!–mx:Button label= “Add Employee ” click= “submitForm() “/– gt;

lt;mx:Button label= “Add Employee ” click= “validateEmpName() “/ gt;

lt;/mx:Form gt;

lt;mx:Script gt;

lt;![CDATA[

import mx.events.ValidationResultEvent;

import mx.controls.Alert;

private function validateEmpName():void{

if (empNameValidator.validate().type == ValidationResultEvent.VALID){

submitForm();

} else{

Alert.show( “Employee name can not be blank “);

}

}

private function submitForm():void {

employees.cancel();

employees.send(employeeModel);

}

private function onResult(event:Event):void{

trace( ‘Got the result ‘); // works only in the debug mode

return;

}

]] gt;

lt;/mx:Script gt;

lt;/mx:Application gt;

When the user hits the button Add Employee on the form, our HTTPService will submit the employeeModel to a modified employees.jsp, which now will get the parameters from the HTTPRequest object, prepare the new XML element newNode from the received data, concatenate it to the original three employees, and return it back to the client, which will display all employees in the datagrid. Here “s the new version of employee.jsp:

lt;%

String employees= ” lt;?xml version=\ “1.0\ ” encoding=\ “UTF-8\ “? gt; lt;people gt; lt;person gt; lt;name gt;Alex Olson lt;/name gt; lt;age gt;22 lt;/age gt; lt;skills gt;java, HTML, SQL lt;/skills gt; lt;/person gt; lt;person gt; lt;name gt;Brandon Smith lt;/name gt; lt;age gt;21 lt;/age gt; lt;skills gt;PowerScript, JavaScript, ActionScript lt;/skills gt; lt;/person gt; lt;person gt; lt;name gt;Jeremy Plant lt;/name gt; lt;age gt;20 lt;/age gt; lt;skills gt;SQL, C++, Java lt;/skills gt; lt;/person gt; “;

// Get the parameters entered in the GUI form

String name=request.getParameter( “empName “);

String age=request.getParameter( “age “);

String skills=request.getParameter( “skills “);

String newEmployee= ” lt;person gt; lt;name gt; ” + name+ ” lt;/name gt; lt;age gt; ” + age + ” lt;/age gt; lt;skills gt; ”

+ skills + ” lt;/skills gt; lt;/person gt; “;

if (name == null){

newEmployee= ” “;

}

// the xml goes back to the Web browser via HTTPResponse

out.println(employees + newEmployee + ” lt;/people gt; “);

% gt;

Figure. The employee form and default validator “s message

Note: There are other ways to pass the data from Flex to an existing Web application. For example, you can create an instance of the URLVariables object, create the data to be passed as its properties, attach URLVariables to URLRequest.data and call navigateToURL().

Memorable Posts

Memorable Posts

PowerBuilder

Fifteen years in America

Visiting an Offshore camp

Freedom?

Why Americans smile

What’s your salary?

Agile Development

Program in Style

Protected Variables

Your mother is ugly

Dead souls

WTFM

Interviewing techniques

Eclipse to Borland

Programming dies in US

Russian Programmers

I switched to AJAX and do not regret

I ‘ve been using so many different tools and techniques in the past, but nothing worked as reliable and fast as AJAX. In our family, I ‘m the one who cleans dishes that don ‘t fit in the dishwasher. No other cleanser works as good as AJAX.

I believe that popularity of AJAX chemicals contributes to popularity of AJAX as techniques for development of rich Internet applications. These techniques where known for more than six years, but only after the term AJAX was coined, it took off. Software developers are regular people and working with a tool at work that has the same name as something they use at home on a daily basis helps.

Microsoft came out with their tool for developing RIA called WPF. This acronym is not very familiar to people yet. Bill, if you read this blog, I “ve got an advice for you – purchase the rights for the WD-40 brand. This is a respected household name, and lots of IT managers grew up spraying everything that squeaks with this magic liquid.

Now it becomes clear why Java Swing is having hard times in RIA – people do not swing as often as they use Ajax.

Take Open Laszlo ndash; it sounds like something Hungarian. Guys, you have a nice tool but most of your customers are not from Budapest ndash; re-brand it.

On the same note, I have a suggestion to the newly appointed Adobe head of global sales: purchase a micro-brewery that produces good beer, change its label to Flex and start shipping gift-wrapped cases of this beer to enterprise IT development managers. This is a how you win minds of decision makers. Besides, it “s a lot cheaper than purchasing online banners or real estate in professional magazines for advertisement.

This is what came to my mind after the New Year celebration. No, I did not drink too much.

Joel on bribing bloggers

In his recent post Joel Spolsky writes about whether bloggers should accept gifts from vendors. Here ‘s my two cents on the subject.

Every blogger wants to have large readership of people who trust him or her. If a blogger writes that a product XYZ is good, readers believe that it “s an honest opinion of the blogger at the moment.

Up till today, I have not received and gifts from any vendors. You know why? Because, no one has offered me anything substantial yet. Actually, this is not exactly right. I do receive free books from publishers, and if I like the books, I publish reviews, if I do not – I keep my mouth shut. I ‘ve also received two free IDEs licenses: IntelliJIDEA and FlexBuilder. I really liked the first one (and praised it online), but the second one needs improvements, and I wrote about it without thinking twice.

If someone will send me free stuff in the future, most likely I will accept it. But I can promise that I won “t publish a good review unless I like the product.

So I do not think it “s either good or bad to accept free laptop samples, but if you decide to accept it, do not feel any obligations and write about them what you think.