We Taught Adobe AIR Talk to Native Android API

Adobe AIR is the most productive tool for developing the UI for Android. But as of today, AIR can “t access native Android API. By the end of this year Adobe plans to offer some integration/bridge to the native Android applications, but it “s not clear how it “s going to be implemented.

Traditionally, Farata Systems is trying to get into emerging and promising technologies as soon as possible and the first results are already achieved. We taught AIR to talk to the native Android API. I mean it. You “ll see a demo, where a user talks to an AIR application, which communicate with the native Android voice API, which recognizes his commands and fills out the AIR UI form.

Without going into much details, we are using a different from Adobe approach ndash; we put their BlaseDS server right inside the Android device. This opens endless opportunities, and we are trying to find the best use for this solution that goes under the working name “Server in your pocket rdquo;.

My colleague Victor works full time on integrating AIR and Android. He has recorded a short video that features him talking to the AIR application on the Xoom tablet, which communicates to the native Android voice recognition API and fills out the AIR form. Everything is happening inside the Xoom tablet. This addition to our Clear Toolkit has a working name Clear APK. See it for yourself.

We “ll present this demo live in August during our fourth annual symposium on enterprise software.

BlazeDS And Its Dirty Little Secret

If you are developing a distribute application, you can “t get by with any single technology. You “re using at least one programming language and one or more frameworks. I work in the world that requires Adobe Flex and Java EE knowledge.

To develop a front end I use, at a minimum, HTML, MXML, ActionScript, and Flex framework (add Eclipse with WTP and Flash Builder). The server side “s consists of a Java Servlet Container with installed BlazeDS Web application (throw in some XML configuration files) that talks to the business tier of your application, which ideally, has just Plain Old Java Objects (yeah, right!) that embed SQL queries talking to a DBMS using some JDBC driver. Almost forgotten about the ANT build tool.

Have I mentioned that this dozen of different pieces of software is a bare minimum? The client-server technology of early 90th with its 3-piece set (e.g. VB-SQL-Oracle) sounds like a toy these days.

Each of these pieces of software (a.k.a. moving part) can, potentially, give you some problems. That “s why I “m and always was against bringing into the architecture any additional tools or framework that require developers writing more code and make this card house more shaky and the finger-pointing game more likely.

That “s why I don “t like any Flex MVC framework that requires you to write extra code. That “s why I don “t like Object-Relational Mapping frameworks like Hibernate.

That “s why I don “t like Java Persistence API with its 500-page spec that, supposed to “make your life easier rdquo; comparing to elegant SQL.

To make the long story short, whenever I can, I use our own open source code generator Clear Data Builder that generates the basic CRUD application from requiring very little of manual coding. As for the communication with the database, there is a light-weight (no, really!) SQL mapping framework called MyBatis (formerly iBatis). It “s not an 800-pound gorilla Hibernate, but requires you to supply your own SQL as Java annotations and map it to Java DTOs. It “s a nice and easy process (see this tutorial).

My yesterday “s morning started as usual ndash; CDB obediently generated CRUD, and started the program that was supposed to execute my SQL query and bring the data first the Java and then to Flex UI. MyBatis conveniently displays in Eclipse console the SQL it executes and the returned result set. Here “s my SQL, but there is no data ands no errors. Trying the same SQL in Oracle SQL Developer ndash; the data “s there. The cleaning of the project didn “t help. Log files show no errors. Who would you blame next? MyBatis doesn “t generate any code ndash; it just executes my SQL. I started to think of jdbc driver. When to Google ndash; no one blames this Oracle JDBC driver in no reporting errors.

Here comes the BlazeDS little dirty secret. Its folder WEB-INF/classes has a little used by the Apache Commons Logging configuration file commons-logging.properties :

Here it is:

# suppress logging for 3rd-party libraries using commons-logging

# Flex logging is not configured here. It is configured through in the logging section of flex-config.xml



This last option (NoOpLogs) means suppress errors! I was mad. I could understands if my fellow developer from the BlaseDS team wanted to minimize the output and temporarily change set this option. But the comment in the file explicitely states that the was done intentionally to “suppress logging for 3rd-party libraries rdquo;! Changing NoOpLog to Log4JLogger fixed the situation, and I started seeing a lot of output on the console. Sure enough, there was a run-time error returned by the Oracle driver that explain the problem hellip;two hours later.

Hopefully, revealing this BlazeDS little dirty secret will same someone a little grief. But I “m still wondering, “Why the NoOpLog proudly made it into BlazeDS? rdquo;

For more little secrets, attend our 4th Annual Symposium in New York City in August.

Waiting to see some comparison matrix for JavaFX 2.0

After reading the announcement of the Beta release of JavaFX 2.0 some people in the blogosphere started to blame Oracle for making it available only on Windows. I work on MAC computers too, but don ‘t want to get into the Windows vs. Mac vs. Linux flame war. I ‘m OK with JavaFX starting on Windows version first (about 90% of software developers use Windows). My concern is that JavaFX remains in a permanet “almost ready ” state. I was able to afford being an early adopter with JavaFX 1.0, but not this time.

I ‘m waiting to hear a clear message from Oracle explaining WHY a startup or an enterprise development shop should switch from whatever RIA solution they use to JavaFX 2.0.

I ‘d like to see a comparison chart of JavaFX 2.0 with Flex, Silverlight, HTML5 showing where the strength of JavaFX is. Being that rich UI component library, fast communication with the server side, or a set of tools that makes software development more productive. Why Oracle Marketing and PR keeps silence? The roadmap has a number of statements mentioning improvements here and there. Improvements of what? Of JavaFX 1.3 that has never seen the light of the day (I mean the real-world use)?

Today, the main target for any RIA platform should be consumer facing (smart phone/tablet-ready) applications, not the enterprise segment where most of the users are happy to see the data in any form (grey screens with rectangular grids and forms still rule over there). I want to see a seemlessly installable runtime for JavaFX applications.

Give a brand new computer to your grandma and ask her to visit a Web site that includes a JavaFX 2.0 applet. Will she be able to complete the process of installing the runtime? If you think I ‘m asking for too much, repeat this grandma test with any Web site that contains Flash or Silverlight content.

Sun Microsystems first announced JavaFX four years ago. Now it ‘s in Oracle ‘s hands, but they ‘ve yet to show any impressive commercial application developed with this tool.

Preparing The Fourth Symposium on Enterprise Software

The Summer of 2011 is almost here, and Farata Systems has started working on the agenda of our fourth (!) annual symposium. But if the first, second, and third events were covering various aspects of enterprise development with Adobe Flex, this time we “ll cater to the wider audience and will rename it to Fourth Annual Symposium on Enterprise Software. The reason being that we are using so many different technologies in our daily work, that it “s just wrong to present ourselves as a Flex development shop.

Every year we start with putting together a list of suggested topics that Farata “s engineers want to present on. Here “s what we have so far (it “s subject to change):

Yakov Fain wants to deliver the following two presentations:

1. Networking WebSockets – the most interesting offering of HTML5

2. Hands-on Java EE 6 – the no-slides demo of programming Java with the current server-side technologies

Victor Rasputnis is heavily into Android these days and may talk about:

1. Squeezing Adobe AIR, BlazeDS, and Java inside Android

2. Something introductory about productive way of development for Android

Anatole Tartakovsky is obsessed with tablet devices and might talk about this :

1. Case Study: A salesman with Adobe AIR and a Tablet

2. Maintaining a single code base for Android and iOS applications

Possibly, yet another Viktor from Farata will talk about the automation of the functional testing of UI in Flex applications.

Now comes a one million dollar question. Who is this seminar for? This is a one-track/one-day event. In the past three years this event was aimed at Enterprise Flex developers. But what “s the profile of \an attendee who would want to hear all of the above? I “d call such a person a Current Enterprise Software Professional. This can be an enterprise architect or a developer from a startup. These days no one can survive by committing to any single programming platform. To become current, a technology stack of a seasoned professional must include more and more tools each year.

As usual, we “ll keep the price for this event anywhere between $100 and $150 just to ensure that random people won “t be in the room, but those who care can afford it. This amount will cover our expenses on renting a meeting place, serving lunch, and paying for the beer after the formal part is over.

The registration page will be up next week, and the event will take place in early August at the same venue in New York City. Meanwhile, we “d appreciate your suggestions regarding the content/organization of this event.

Bangalore is the Best Source of Java Programmers

When your organization starts looking for offshore Java developers, one of the most important concerns is if the developer can stay focused on work. And this is when Google Trends can become handy. Here ‘s a simple logic. Vast majority of the Java programmers are young males. What young males care about the most? You got it: sex. Go to Google trends entering just these two words: java, sex. Or just click on this link. Got the picture?

Based on this diagram don ‘t even think of hiring Java programmers from Warsaw or Delhi. Bangalore is the place to go! I ‘ve yet to decide on how to interpret the data from Japan, China, and Russia. While the Java/Sex ratio looks good there, but the pool of resources seem very limited. Do you agree with my scientific approach?

Google trends can give you some interesting food for thoughts, really. For example, my colleague Valery entered the following three words there: Obama, Osama, iPhone. The results are amazing – see for yourself.

Google Trends rules!

How a Java Programmer Should Select the Right Lane in a Supermarket

Christophe Herreman, a Java developer from Belgium made the following twit today:

“At the supermarket, and I once again seem to have picked the wrong lane… I wonder if there is a strategy for this. rdquo;

Being a member of the Java community myself, I feel obligated to offer my approach to making this very important decision that every Java developer has to make on a weekly basis.

First, I need to make a statement: out of all APIs I like Java Message Service (JMS) the most. IMO, JMS is the right way of architecting loosely coupled and reliable distributed applications. I explained this five years ago in the fifth article of my dissertation titled “Yakov “s Gas Station “. BTW, last week, I joined a project at a financial company and was pleasantly surprised learning that the trading application was build using just JMS, JNDI, and JDBC without the use of any other frameworks.

Now let “s go back to the supermarket scenario, and I “ll show how the understanding of messaging concepts can help you in picking the right lane.

1. In message-oriented middleware (MOM), messages are being placed into queues (think food items placed on the moving belt at the cash register).

2. In MOM systems we create message listeners that have to drain the queues and process messages (have to pick the items from the belt and scan their bar codes).

3. Ideally, the message queue (the belt) has to be empty ndash; each object put in the queue is immediately picked up by the listener. But in a real world, the speed of adding messages to the queue (placing items on the belt) may be higher than the speed of draining the queue. In this case we can add another listening thread or increase the size of the pool of Message-driven beans if a Java EE sever is in use.

4. The number of people (message senders) waiting in lines to each cash register (a queue) in a crowded supermarket is about the same. The message load (the number of items in the baskets) is also similar.

5. So what become the most important in the entire process? You got it – the speed of draining the queue.

Here “s comes the answer: picking the lane with the faster message listener is the holly grail of the consumer “s decision at a supermarket.

Christophe, the next time you are going to do your food shopping, spend about 30 seconds watching the cash register workers, and then pick the lane with the fastest one. As simple as that.

Actually, you need to know about yet another important messaging term, so-called poison messages. Say, your JMS listener is expecting only text messages, but for some reason a message of a different type (or the corrupted one) got into this queue (e.g. an item without the bar code). Then the process will become dependent on how efficiently such exceptional situation is being processed. In messing systems you can attempt a certain number of the redelivery attempts, and if this won “t help, the message goes into a dead-letter queue. In the supermarket they call the manager. Unfortunately, even I can “t predict in which basket the item without the bar code is located or which customer is planning to engage into a fight proving to the cashier that her expired cereal coupon should be accepted anyway.

I hope this life hack will save time to millions of Java developers, most of whom work for food these days. If you are not familiar with the Java messaging, I highly recommend to purchase my latest book Java Programming. 24-Hour Trainer, where I explain MOM and JMS in the lesson 30. Sorry for the shameless plug.

Enjoy your next shopping!

Software Pricing Trends

Pricing software can be more difficult than creating one. There are companies who do just this ndash; pricing software for others. Setting the low price brings more customers but requires more investments into customers support. Higher prices simplify customers support, but require more investments into sales and marketing.

Pricing software was a science for many years. The ability to have a cake and eat it too makes software (and music, and videos) different comparing to tangible products. A finished program (a song, a video) can be sold many times, but the rightsholder still has it, and can keep selling the same thing over and over again. Isn “t it amazing?

Many years ago Apple started selling downloadable songs for $.99 a piece. It “s a lot easier to shell out ninety nine cents for just one song than $15 for the entire CD. Besides, the inventory is limitless ndash; you don “t depend any longer on the stock of the local music store. In no time a consumer spends the same $15 or more and production costs are close to zero.

But songs don “t need technical support. You won “t blame a musician for playing a wrong note. This is not the case with the software though. You want that bug to be fixed AFTER the sale is made.

During the last 15 years trillions of lines of open source and free software have been written. Most of these lines are a dead code that nobody uses. This code became useless because of the lack of funds for maintenance and customer support. And there is no one to blame for this. Software developers also need to buy food, houses, gasoline hellip; They can “t work for free.

The vendors of a popular open source software make a living by charging an arm and a leg for training and customization of their products. They charge for service.

Last week one person called me asking my opinion about a certain software for advertising and managing meeting, conferences, and trainings. I “ve been using the services of this vendor for several years. When I told the guy that they charge a fee for each person registering for to the event, he said, “Excellent! I was afraid they “d do it for free! If they charge money, they can provide support. rdquo; Think about it ndash; he didn “t want free service.

Then Apple did something else that changed people “s expectations about the cost of the software. There are thousands of applications on sale at iTunes store. Most of the products cost just a couple of bucks. Most of the products are useless. But it “s so easy to pay two dollars even for something that you won “t need. The last time I did it was yesterday. I had a program for iPad that had a certain issue. A quick search revealed that there is another great program of this kind, and people gave it great ratings. One minute later I paid $2.99 hellip;just to find out two minutes later that it suffers the same problem that the original one. So what? It “s only $2.99. I won “t even bother researching about their return policy.

I “m sure many people easily get parted with their dollars getting cheap software they “ll never use. And by doing so, they set a new pattern for pricing software. The vendors will be slowly forced to lower their prices way below what was considered reasonable just a couple of years ago. And this will affect not only the consumer “s market, but the enterprise software too. It “ll be more and more difficult to sell $100K+ software to managers who (after business hours) live in a world where software costs $2.99. OK, $9.99. Alright, $19.99.

Don “t you think that the quality of the software must go down the drain to be able to make it to the shelves of the one-dollar stores? Am I making things up?

Getting ready for a Java technical job interview with President Obama

Passing a technical job interview is a challenge to most of the Java developers. Some people simply fail because they are not well prepared and questions like “What “s the difference between abstract classes interfaces? rdquo; puts them into a comatose state. In such cases Mr. President won ‘t help. But there is a large group of people who know the difference between abstract classes and interfaces, but still feel stressed and intimidated and can “t properly explain it to give the interviewer the confidence he “s looking for. The interviewer has only one thing in mind, “Can I trust a developer “s role on our project to this job applicant? rdquo;

There are people who always pass any interview with flying colors regardless if they know the difference between abstract classes and interfaces or not. And this is where you have to learn from President Obama, who is one of these guys.

This is what you do. Go to Youtube and start watching President Obama “s Statement on Lybia , but turn the sound off. He couldn ‘t explain why we needed to bomb Lybia anyway. But watch how he speaks and presents himself. People trust him no matter what he “s talking about. Now imagine that President Obama explains the difference between abstract classes and interfaces. I “m dead serious. Look at his body language, the posture, the pace of his speech.

Try to repeat it in front of the mirror. No, not about Lybia. About the difference between abstract classes and interfaces. Ask your spouse/girlfried/boyfriend to compare you and HIM. The closer you get the better your chances are of passing the Java interview with flying colors.

To illustrate my technique, I “ve recorded a short soundrack on abstract classes and interfaces. This soundtrack must be used while watching President Obama talking about Lybia.

If my technique will help you passing your next technical interview, please donate $50 to the charity of your choice.

Really cool Skype feature

I need to admit that I didn ‘t like the latest version of Skype (5.0). The new UI was not overly intuitive and I wasn getting angry at times for not being able to easily add a person to the conference call or the likes. But today they are forgiven. I found one little feature that it ‘s really cool. Let me share it with you.

Typically, when I ‘d misspell a work in chat message, I ‘d re-type this word and sent it as a separate message. Today I was chatting with my colleague and sent his a sentence with the word coolnes. A second I noticed that this word is misspelled, but was too lazy to re-type it. It ‘s my colleague, he ‘ll forgive me for this. Then, something weird has happened.

By accident, I hit the up-arrow on my keyboard whole the cursor was in the text field of Skype. All of a sudden the Genie…oops…a little window materialized offering me to edit the last message. I fixed the word coolness and ask my colleague how many ss ‘s he saw in the word coolness. He responded – two.

Wow! Skype made my day! They allowed me to edit the last message and auto-synced it with the recipient ‘s window. These little details are making regular applications stand out. When I shared my joy with my colleague, he casually said – you pressed that little pencil icon on the right side of the message. I swear, I didn ‘t pay attention to that pencil! Then he shared with me this link with other little tricks. Oh well, I didn ‘t RTFM, and probably won ‘t.

But hey, isn ‘t my little discovery uber cool? My kudos to Skype architects!

Enterprise Development on Tablets. Thoughts Aloud.

I ‘ve recorded our chat with my colleague Anatole Tartakovsky who leads the mobile development at Farata Systems. We were discussing approach for migrating existing legacy enterprise RIA to these shiny iPads, Xooms and the likes. You can listen to this podcast on any MP3 player, or simply press the icon POD at lt;strong gt;my NO BS IT podcast terminal lt;/strong gt; to start playing on the device you ‘re using now.