|
|
Archive for August, 2011


On August 12, I participated Farata’s symposium for Enterprise developers for the second time. But unlike the first time, I was on the other side of the barricades. I presented my research in the field of functional testing of Flex-based RIAs. Since my previous preso at NJFlex user group, I figured out how to include automatic functional testing in enterprise application development life cycle.
In these presentations, I demonstrated what a Flex developer needs to know to prepare his or her application or even a single component to painless UAT or QA testing. Using the tool FlexMonkey form GorillaLogic I demonstrated the basic concepts of interaction with Flex Automation API and components instrumentation. And for dessert, I showed how to automatically run functional and unit tests on each code commit to the version control system. The screenshot above is an illustration of what I was talking about – instrumentation of components, introduction to FlexMonkey – an open source Flex-enabled testing tool, and Jenkins – one of the best open source continuous integration servers. The entire enterprise RIA development cycle was sampled.
Stop! Why am I trying to write the transcript of my preso?
If you missed the event, you still can download my presentation slides from here. Find the sample source code here. And ask your testing-related (or not) questions in the comments to this post.
Cheers,
Vik Gamov
Permalink

I don’t like most of the Flex MVC frameworks cause they force me to write more code. I do like frameworks and tools that let me write less code. But there is no free lunch and, at some point, even productive frameworks, tools, and libraries reach critical mass and the finger pointing game begins.
Today, I’ve been working on an application that was supposed to display a list of orders form a relational DBMS. Not a rocket science. But let’s go over the languages, libraries, tools, and frameworks I had to use for this.
First, I wrote a 20-lines SQL Union statement and tested it in Oracle’s SQL Developer. Then I generated 80% of the code and wrote the other 20% manually. Here’s what I was using:
1. Eclipse IDE for Java EE Developers (Eclipse Foundation), which comes with the WTP plugin
2. CRUD code generator Clear Data Builder (Farata Systems). It generated the initial application written in Java, ActionScript, MXML. It also generated ANT build script
3. Configured Apache Tomcat (Apache Foundation) to run from inside Eclipse – this is where my rich Internet application is deployed.
4. Added to the project the libraries of MyBatis (Clinton Begin and Apache Foundation). This is a light-weight data mapping framework. You map manually written SQL to a Java DTO, which eliminates the need to write JDBC.
5. Spring Framework (Spring Source) was used to simplify wiring of MyBatis into my Java applications.
6. BlazeDS framework (Adobe) is being used for efficient serialization of the server-side Java into client-side ActionScript objects and back via AMF protocol. This exchange happens between the peer ActionScript/Java DTOs.
7. The ActionScript DTOs where automatically generated based on their Java peers by the DTO2FX tool (Farata Systems)
8. Most of the Java code was generated, but I had to write small fragments to be called for data manipulations via SQL/MyBatis
9. The latter would engage the Oracle driver and DBMS (Oracle)
Everything’s ready. Start the server, run the Flex app, and…instead of data I’m getting this error “org.springframework.jdbc.UncategorizedSQLException : Error setting null parameter. Most JDBC drivers require that the JdbcType must be specified for all nullable parameters. Cause: java.sql.SQLException: Invalid column type“.
This error message is misleading. I do insert parameters to the SQL Select, but they are not nulls. I don’t insert anything into the database. The worst part is that there is nothing left to debug. Everything up to the last SQL-annotated Java method declaration works fine. But you can’t debug a method signature, can you? Who is to blame? Oracle driver? Or should I get the source code of MyBatis trying to find the line of the code that blows up?
Enough for today. Going home. I don’t know what’s causing this issue, but I I’ll find the solution. The only question is how much time I’m going to spend on it. Do all these productivity frameworks and tools really save time in the long run? Would I be better off writing JDBC code manually? AS a matter of fact I like MyBatis a lot better than Hibernate, but still…Where are the time savings?
Yakov Fain
Permalink

I received an email from an experienced Flex/Java developer stating that he likes some of our open source components, but questions the need of automated code generation. His main argument was that they already have a pretty large code base in Java with their own inheritance model and introducing code generators wouldn’t be an easy thing to do. I started typing the answer to that email, but then decided to make a blog out of it.
Those who don’t know our open source Clear Toolkit and its code generator Clear Data Builder (CDB) may refer to its Wiki page. To make it short, it generated CRUD application with fully functional communication between the Flex and Java layers.
Developers in a green field situation can generate the entire project with CDB and use it as a foundation for all development activities. But this time I want to make a statement, that even if you already have an existing Java persistence layer, you still can use the generated Assembler/DAO Java classes and Java/AS3 DTOs. We generate the code for Java service classes supporting automatic data synchronization between our Flex DataCollection and Java service classes.
The DataCollection automatically keeps track of all UI modifications made by the user via ChangeObjects. This piece alone is pretty valuable time saver.
We don’t dictate how you are going to implement the server-side business logic and persistence mechanism. You have EJBs extended from other classes? Fine. It’s none of our business. You want to use JPA based on Hibernate or EclipseLink? It’s up to you. Prefer Java Spring Framework? Select one checkbox in our Eclipse plugin. Want to code most of the Flex UI manually? No problem. But when the user will hit the button Save, call MyDataCollection.sync() and for retrieval – fill(). We are not intrusive.
I personally, don’t like Hibernate and prefer lighter MyBatis data mapping framework. Please go over the step 3 of our Flex/MyBatis tutorial at the Wiki site. On the Java side you write the following:
- Java DTO
- the Java Mapper, a MyBatis thingy that maps DTOs to SQL statements (we use Spring Dependency Injection)
- Java service class
Want to replace calls to the MyBatis layer in the step 3.4 with the calls to your pre-existing session EJBs? Easy. Want to write JDBC for persistence? It’s your call – instead of a Mapper class, invoke your manually written JDBC code in the step 3.4.
Now let’s take a look at the step 4 of the tutorial that deals with the Flex front end. CDB generates for you the entire under-the-hood communication between Flex and Java. No need to create RemoteObject, just call the method fill() that will find your service Java class and will get the data. For persistence, just call the method sync(). Keep in mind that we are talking about BlazeDS, not LCDS.
We also support nested data collections for master-detail scenarios (steps 7 and 8 of the tutorial) and data sync between multiple clients. We eat our own dog food. We’ve used this process in multiple real-world projects of various complexity. It works for us. It’ll work for you too.
Yakov Fain
Permalink
Yesterday I was giving a talk and the demo at Farata’s Fourth Annual Symposium on Software Development. The title of this presentation was “Using Mobile Technologies in the Brave New World of Computing”.

It was a mix of the presentation slides an a live demo of an enterprise application SureLC (an automation of insurance agents’ routines) running on a desktop, Motorola Xoom, and Apple’s iPad shown on the photo above. During the first part of this presentation I was giving a brief overview of today’s mobile landscape and highlighted some issues that any enterprise development shop moving to mobile should consider.
The quality of this audio (61Mb) recording is not perfect, but I hope you may find some of the content useful.
The slides of this presentation can be downloaded here.
Anatole Tartakovsky
Permalink

There is this long discussion on Google + stating that the Flash Community Needs a complete reboot. It’s not possible to read all the comments posted there, so I’ll just answer a couple of statements from the original post. I don’t believe that the statement “The Flash community needs a complete reboot” is the right prescription. I’d rather say “The Flash community needs to go out of the closet”. Five years ago it was a relatively small group of people who developed games and banners and knew each other. Over the last five years Adobe did a good job in expanding into the enterprise developers’ market. This turned Flash Player from a small player into an important part of many mission-critical applications.
Having said that, the Flash community should get used to the fact that the toolbox of the today’s Flash/Flex/AIR developer has to include a bunch of languages and tool other than ActionScript.
In our company (Farata Systems) we’ve been actively using Flex/Java during the last 5 years. Now we are shifting more to the AIR/Java/Mobile combination. I personally do a lot more Java during the last year than Flash. So does it mean that the world around me is changing? No, I just happened to have a client that’s heavily into Java.
Regarding Adobe and their MAX conference. I like this company and this conference – I have free passes to MAX and JavaOne that take place during the same week, and decided to go to MAX. But I realize that MAX – this is a commercial event where Adobe wants to share their plans with the world and show off their latest achievements. It seems that they have really small number of speaking slots for non-Adobe employees, and these slots mainly go to their sponsors.
I realized it some time ago, and don’t bother sending them speaking proposals – ain’t going to pay for the privilege to speak at MAX. But speaking of Adobe supporting the community… I’d assume that Adobe could invite someone from our company to speak at Adobe MAX after we published two advanced bestselling books on their technologies and actively promoting (for free) Flash Platform in the enterprise world? They do invite us to participate in the Flash Platform expert group, and we gladly share our thoughts wishing this platform to succeed, but, I guess, we should do it quietly, behind closed doors without getting any accidental PR.
From the business perspective, I don’t see Adobe helping our company. No biggies – they create good software and we use it to generate profit. It’s a fair game. We create our own conferences, and speak at the smaller technical events. Are we planning to move away from Adobe Platform and tools? Not in the foreseeable future. Till when are we going to stick to Adobe’s tool set? Till someone else offers more productive platform and tooling for development of the enterprise applications with the UI that works cross-platform under Window, MAC OS, iOS, and Android.
I’ve submitted a speaking proposal to the 360Flex unconference in LA, where I’m planning to talk about…Java in a fun and simple way. Does this mean that I’m going away from Flash platform? Not at all. But I do like Java and hope there are people in the Flash community willing to learn this super-powerful Java platform that works nicely together with Flash/Flex/AIR.
Yakov Fain
Permalink

This Friday I’m making presenting at Farata Symposium on mobile development. Initially I was planning on just extending the same presentation I was doing in Denver @ 360Flex – showing the mobile version of a sales automation application and then presenting guidelines the developers can follow to build new mobile applications.
Yesterday, I tested my presentation with a small audience of senior enterprise developers to see if I address the real needs of enterprises. After all, my demo was based on experience with startups and their perceptions on what is important might be slightly different.
It seems that the current IT thinking on migration path is heavily based on gradual replacement of the pieces of the puzzle (a complex enterprise application) on as needed basis. Running existing applications via remoting technologies like Citrix is also not feasible. This piece meal approach to technology shift would be difficult to implement and would lead to bad user experience on mobile and portables. It would cause multiple versions of UI being developed and maintained at significant extra cost by independent teams. Scope of applications would be reduced to accommodate only certain target audiences with very little reuse among platforms. In short, such approach will result in the same fiasco as with Java “run everywhere” approach multiplied by number of form factors and platforms.
After this test run I decided to drastically shift the focus of the presentation. We will start with the broad overview of the changes that are already happening or can be expected within the next 6-9 months. I will cover the challenges that different form factors and platforms introduce to a typical enterprise UI. I’ll will go through each artifact of the application design: Themes, Skins, Layouts, Controls to explain the role and options they present in solving the overall puzzle.
Next we will discuss the personal cloud that is being built with all the new always connected devices: from phones to TVs. Finally I will present out-of-the-box solutions that developers can use to address all the challenges.
In short, I will show how to avoid the painful process of migrating to the new platform by caring too much luggage, and how easy it is to build unified modern interface. I’m sure, this will save you, the mobile developer, much more then a day you’ll spend attending this event. If you are in New York City, consider attending this event and be a part of our informal technical discussion.
Sincerely
Anatole
Permalink

During the last two months I’ve interviewed a number of senior Java developers for a position at the financial firm. Vast majority of them have 10+years experience working with Java on real-world financial applications. They have lots of interesting projects on their resumes, know how to present themselves, are self-confident, and claim the expert level of Java knowledge.
But it seems that most of them assume that just spending years working on Java projects is enough for considering themselves Java experts. The fact that you’ve been using Hibernate, Spring, JMS, and some caching framework doesn’t make you a Java expert. Over the years you might have improved your understanding of the architecture of Java EE applications, but this doesn’t not make you a Java expert.
Back in 2004, Java 1.5 has been released. Besides generics and annotations it introduced the library of classes supporting concurrency. I don’t care if you know generics, but this library is golden, especially for Java developers who are applying for working on financial applications. Many of these Java veterans never bothered looking into the latest Java features for years. And if I’m asking any concurrency-related question, a typical answer is “Oh yes, I remember there were some new classes that can do this.” Some new classes? Come on, they were in Java since September of 2004!
If a job applicant believes that the only two ways to create a Java thread are extending a Thread or implementing Runnable, he’s not a senior Java developer regardless of how many years he spent working on Java projects. This tells me that this person doesn’t care about Java and is not interested in keeping his technical skills current.
This is one of these “less is more” situations. People who have learned Java after 2004 are more likely to know it better. My message to Java veterans is simple, “If you want to compete with young kids, spend some time learning Java programming. Become competitive as you were ten years ago. Otherwise your only option is to complain about the outsourcing that may take away your job any day.”
I’ll be giving a 2-hour crash course on Java next week during our Fourth Symposium on Software Development in New York City. Come over. Let’s enjoy Java programming together!
Yakov Fain
Permalink
|