Comments
bruce.armstrong wrote: Somebody just said it better than I did, and with more chops to say it: Open Letter to Mark Zuckerberg, Sheryl Sandberg & Facebook Mobile
Cloud Expo on Google News

SYS-CON.TV
Cloud Expo & Virtualization 2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts
BlazeDS and Its Dirty Little Secret
To develop a front end I use, at a minimum, HTML, MXML, ActionScript, and Flex

If you are developing a distributed 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” 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 – 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 – 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 – it just executes my SQL. I started to think of jdbc driver. When to Google – 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
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog

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”!  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…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?”

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

Read the original blog entry...

About Yakov Fain
Yakov Fain is a Managing Director of Farata Systems, consulting, training and product company. He has authored several Java books, dozens of technical articles. SYS-CON Books released his latest co-authored book , Rich Internet Applications with Adobe Flex and Java: Secrets of the Masters in Spring 2007. Sun Microsystems has nominated and awarded Yakov with the title Java Champion. He leads the Princeton Java Users Group. He is an Adobe Certified Flex Instructor. Yakov co-athored the O'Reilly book "Enterprise Application Development with Flex". He twits at twitter.com/yfain.

Latest Cloud Developer Stories
With BigDataExpo 2012 New York (www.BigDataExpo.net), co-located with 10th Cloud Expo, now just three weeks away, what better time to introduce you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the ...
With Cloud Expo 2012 New York (10th Cloud Expo) now just three weeks away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference...
If your organization already uses virtualized infrastructure, you are well on your way to providing IT as a Service. But as businesses demand faster results in today’s competitive market, organizations look to gain more benefits from cloud computing than just virtualized infrastr...
Facebook sold off again Tuesday scrapping the bottom at $30.98 after Reuters reported that Scott Devitt, a research analyst at the IPO’s lead underwriter Morgan Stanley, unexpectedly cut his revenue estimates on the company during the roadshow leading up to it going public last F...
In his session at the 10th International Cloud Expo, Marvin Wheeler, Open Data Center Alliance Chairman, will discuss the success the organization has had in charting the requirements for broad-scale enterprise adoption of the cloud and how 2012 is forecast to be the tipping poin...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers
ADS BY GOOGLE

Breaking Cloud Computing News
CAST, the world leader in software analysis and measurement, and Dr. Dobb's, the most respected deve...