Attending QCon, a Smart Conference

The last three days I spent participating in the QCon conference in New York City. This is one of the small group of conferences catering to software developers. Running a 100-speakers conference around the world is a hugely expensive project, and I hope the organizers broke even, which is very difficult in New York. Long story short – I like this conference. Speakers are well prepared, the crowd is eager to learn, the food is good, and the Wi-Fi works (I kid you not – 20Mbps up and down).

There were six parallel tracks  at the event, which were changing each day. This is unusual, but smart. Every morning would start in the main auditorium, where the track chairs would introduce every presentation from their track. This is also something I’ve never seen before at any conference, and I can confess that these short intros changed my personal selection of the talks.The third thing that impressed me were presentation evaluation sheets. This is how they looked like:

The KISS principle in action! Instead of forcing people to fill out these annoying questionnaires from traditional evaluation sheets, the attendees were asked to pick a sheet of the appropriate color and drop it in the bowl. Green, if you like the preso, yellow means the presentation deserved to be a part of the event, and red if it sucked. If you wanted to add some comments, pens were right there – just write whatever you want on this little piece of paper. Smart. Keep it simple stupid.

During these three days I’ve attended a bunch of quality presentations:

Security weaknesses in Java was very practical, and I can apply the new knowledge to one of the projects I’m involved with.

Learning how NASA uses cloud computing to process information from Mars rovers is another fact that may finally push me into the cloud space.

I was surprised to learn that Node.js, a server-side JavaScript framework, can process 695K transaction per second. It’s really impressive even though Java did 3.5M TPS in a similar setup.

I like presentations by Cameron Purdy. This time he was talking about HTML5, Mobile, and compared the roles of Java’s and C++ in today’s IT. He’s well spoken and always add lots of appropriate jokes to his talks.  Cameron listed a couple of reasons of why Java didn’t supplant C++. But IMO, didn’t mention the most importan ones:
1. Apple’s iOS has no Java
2. Microsoft didn’t upgrade JRE in Internet Explorer since ’98 (remember that infamous Sun-Microsoft las suite?)

Arun Gupta from Oracle is an excellent speaker, and it was interesting to see his first presentation showing how Java EE moves toward HTML5 clients (JavaScript – JSON-WebSockets-JavaEE).

I like FireFox’s add-on FireBug – the HTML/DOM/CSS/Network/JavaScript inspector/debugger. Now I know that it’s safe to install Firefox nightly builds to enjoy the latest greatness of this popular browser.

Peter Bell was showing how to use Spring Data with No SQL databases. While he was talking about a hierarchical databases, I felt like déjà vu. Seasoned (a.k.a. old) software developers knew about how great the hierarchical databases were since the last century. But working with them was not for the faint of hearts. SQL looked simpler, so programmers embraced relational DBMS. The years went by, and an average programmer became a little dumber, and SQL became a tough language to learn. This resulted in the flourishing of the Object-Relational Mapping frameworks. You know Java, but don’t know SQL? Not a problem. You’ll survive on our project – just write Java and XML. It’s going to be long, painful and non-performing, but ORM will allow us to bring juniors on board. Now, it seems that Spring Data can hide the complexities of dealing with hierarchical databases and even juniors will be able to work with them. Good luck, guys!

Charlie Hunt did a great job explaining the internals of Java garbage collector. Check out his recent book “Java Performance”.

Steve Souders is THE web performance guy. This time he was talking about performance of high performance in the mobile. Not sure if you are thinking about moving your application or a Web site to mobile, but you definitely should be.

Yesterday, I went to hear the presentation by Adobe’s evangelist Christophe Coenraets. I have a rule – if Christophe present at the conference I attend – it’s a must see. No matter what he’s talking about, his presentations are clear, well prepared and up to the point. In the past he was covering various Flex-related topics, but after Adobe decided to kill Flex, he’s working in the HTML5 field. Christophe’s presentation was about using JavaScript on mobile highlighting access to the native APIs via the PhoneGap library. IMO, this is a right way to go and I enjoyed this talk.

Adobe Flex framework remains a touchy-feely subject for me regardless of my own principle “Don’t fall in love with the Phillips screwdriver”. Any tool is just a tool, but I really enjoyed working with this framework. I understand that corporations exists to make profits. I understand that if a software product doesn’t bring money to the firm, one of the solutions is to nuke it. But it shouldn’t be done in such a cynical way. Last year, at Adobe MAX conference they said that the future of Flex is rosy, a month later they announced, “We donate Flex to Apache Foundation” explaining that Adobe’s changing the direction. That’s fine. A month later, they applied a hit man technique – an additional shot in the forehead – to make sure the body is dead for real. Adobe said that the Flash Player, the runtime required for Flex won’t go to Apache, and they won’t support new versions of Apache Flex. It’s as if Oracle would donate Java to open source, but the future version of JVM wouldn’t support future version of Java. I doubt Oracle would ever do something like this. Adobe won’t run the MAX conference in 2012 – are they ashamed of themselves?

I’ve attended two sessions on the agile methodologies, and have to admit that I’m still not sold. Sure enough, if a prospective client will ask if our company runs the project in agile mode, I’ll answer, “Sure thing!” And, most likely, what we do is agile. But we don’t do it as a religion with all paraphernalia that comes with agile methodologies. We work in a highly virtualized world. A bunch of VMs runs on our servers. But let alone VM’s – in some cases our developers are virtualized. They work from different countries and some of them never saw each other. Yeah, yeah, yeah…You put and shuffle the stickers on the board daily. Stand up meetings? I don’t care if our developers work in horizontal or vertical position, if they work in the morning, evening, or after midnights. As long as they get the work done, have good communication skills, speak English, and don’t behave as prima donnas, they are super agile. Please don’t show this blog to any of our customers or we can loose the project.

Finally, I’ve attended a great inspirational talk by Mike Lee, an American software developer living in Amsterdam (as he put it, the city that San Francisco wants to be). Now I’m also thinking of spending three-four weeks living and working from Amsterdam. I never been in this city, but plan to run  JavaScript training there.

My QCon participation was not just about attending sessions. QCon organizers were kind enough to offer a meeting room to the members of the Java NYSIG – a huge users group lead by Frank Greco. I delivered the presentation “JavaScript for Java Developers” on Tuesday evening. This presentation was videotaped by the QCon’s crew and should appear at InfoQ  soon.

You might have noticed that the most frequently used word in this post was JavaScript. Yes, as of today, this is my language of choice for developing the client portion of Web and mobile applications. If you want to hear more about it, attend our fifth annual symposium on software development  in New York City. Rephrasing the well known statement about the water, “You can’t stop JavaScript – you can only redirect it”.

Good luck QCon! Hope to see you next year.

Who Moved my Web to Mobile?

In our company it became a tradition to run an annual symposium on software development in New York City. This is a technical event with zero marketing, where our engineers are given an opportunity to share their experience gained while develping real-world applications. This year we’ll focus on the Web applications developed with HTML, JavaScript, CSS, and Java. I’ll be making two presentations there.

1. Advanced Introduction to JavaScript

“Advanced Introduction” means that we’ll start from scratch, but the complexity of the materials will rapidly increase, and by the end of the talk you’ll start respecting JavaScript a lot. The thing is that some software developers have an impression that JavaScript is a second-league interpreted language with the main purpose of making Web pages a little prettier. The reality is different though. JavaScript is a powerful, flexible, dynamically typed language that supports object-oriented programming. JavaScript functions are the first class citizen that can live their own lives as opposed to Java’s methods. HTML5 becomes a new buzzword, but 80% of development time on such projects is spent writing JavaScript code.

2. Who Moved My Web to Mobile

IMHO, this topic becomes important and practical for many software developers, team leads, and managers. Sooner or later the budget will be approved, and you won’t be able to postpone the migration of your Web site or application to mobile devices any further. How to start moving your tried and true JSP/Struts Web site to this wild new world of mobile devices? Is it possible to develop one Web site that looks good on desktops, tablets, on smartfones? Should you go with HTML5 or native mobile applications? What about Adobe AIR? In this presentation we’ll discuss pros and cons of various approaches. You’ll also see the comparison of two JavaScript mobile frameworks: JQuery Mobile and Sencha Touch.
Although it may sound immodest of me to say so (what’s new?), this presentation is the most efficient way of getting a hang of all these topicsin a short period of time.

Hope to see you there.

Yakov

User Experience Professional Is Needed Badly

What would you think if a person visited your training registration page shown below and asked you the following question, “Yakov, when the early bird price for your JavaScript training expires?”

A not so savvy Web person could’ve reacted like this, “Helloooo, can’t you read? Sales end on May 29, 2012 ”. But being in the Web business for a while, I’ve responded politely, “The sale end date should be listed on the registration page.” That person was polite too and he replied, “Thanks. It wasn’t on the iOS version of that page”. Sure enough, the iPhone version of this page doesn’t show when the sale ends. Apparently, the version of their CSS layout for iPhones didn’t allocate the room for the sale end dates.

Moral: Don’t think people are stupid. The might be using “a wrong” device.

If you’re running some Web development project yourself, try to allocate just a little bit of an extra cash for the usability expert who could have suggested a way to ensure that your Web site shows all important information no matter what the size of the user’s device is.

A Masterpiece From Mozilla’s Documentation

While preparing the courseware for my upcoming JavaScript workshop I ran into the following definition in the Mozilla’s online documentation:

“callee is a property of the arguments object. It can be used to refer to the currently executing function inside the function body of that function.”

Love it! I’ll never be out of work, as long as technical writers keep creating such gems. Thank you, guys for putting bread on my table!

Generating Ext JS and Java CRUD Applications with CDB. Part 1.

Clear Data Builder for Ext JS (CDBExt) is an open source tool that automatically builds Ext JS/Java EE CRUD applications given one or more annotated Java interfaces. The generated JavaScript and Java code enforce best Ext JS and Java EE practices and is deployed on the development version of the Tomcat ready to run. A tiny library of Ext JS components accompanying CDBExt – Clear components – enables transactional data sync with the application server, including deeply nested hierarchical data transaction, features not supported in native Ext JS 4.

This short video opens a series of demos that will describe various modes of generating CRUD applications with the JavaScript clients enriched by the Ext JS framework from Sencha. At the time of this writing, CDBExt is in public beta and your suggestions are welcome. Please post your suggestions and findings at the Clear Data Builder’s forum at Sourceforge. You can also send us your feedback by filling out this form at our company’s site.

We’ve just started documenting CDBExt at the Clear Toolkit’s Wiki.

To add the CDBExt pluging to Exlipse for Java EE IDE, please select the menu Help | Install New Software, then press the button Add and enter the CDBExt in the Name field and http://www.cleartoolkit.com/downloads/plugins/extjs/cleardatabuilder/4.0/site.xml as Location.

In the next video I’ll show you how to quickly create a Web application using the Ext JS framework as a client and MyBatis framework for the data persistence. If you are not familiar with the HTML5 framework Ext JS, consider attending our 2-day workshop on the subject.

The Java Courseware

If you are planning to do build a career as a software developer, you have to be prepared to get trained and re-trained every couple of years. But how? If you’re lucky, your employer will send you to classes, otherwise you have to spend substantial amount of time self-studying. Back in the nineties I was hungry for the courseware. Going through these thick manuals on hot technologies was the shortest way to master them.

Beside software developers, university professors and contract instructors are also looking for the courseware that would help them to teach the class without major surprises and failures in front of the students. No matter who you are, I’d like to offer you some extra materials that’ll help you in learning or teaching programming in Java and Java EE.

Last year, Wiley/Wrox has published my Java Tutorial. 24-hour trainer. It was already structured as lessons, had homeworks, came with video screencasts and included easily importable Eclipse projects for each lesson. Then, I created a supporting site where you can download solutions for the assignments. Some of my students offered interesting versions of the solutions and I let them upload their projects to the same site.

Then, I started eating my own dog food and taught a number of online Java training classes using this book as a textbook. While doing this I created presentation slides and used them in classes. These slides included new information and tons of links to additional studying materials. Today, I finished uploading the slides, and they are publicly available under the Wiki section on the site with solutions.

Enjoy your Java!

P.S. Currently I’m preparing the courseware for my upcoming one-day master class “JavaScript for Java Developers“. My colleague Victor is working on the materials for a fast track workshop on using the JavaScript-based framework called Ext JS. Any of these training classes can be delivered onsite at your organization.

Starting blogging on JavaScript and Ext JS

Our company, Farata Systems, started publishing a series of technical blogs on JavaScript and Ext JS framework at http://flexblog.faratasystems.com/. Since Farata Systems is not affiliated with Sencha, these materials will highlight both good and bad things (if any). Trust me on that.

I’ve started writing my blog on comparing JavaScript with more traditional (read O-O, strongly-typed, compiled, Java, ActionScript3) languages.

If you’re interested to jump start your Ext JS project, consider attending our hands-on 2-day workshop in New York City on April 19-20.

To get $100 off the enrollment fees, enter yakov as your promo code.

Enterprise Development: Flex or HTML5?

This article is a transcript from a recorded conversation I had with Anatole Tartakovsky and Victor Rasputnis – my business partners at Farata Systems. This conversation took place on the mountain after the day of skiing.

Yakov. There are many ways of creating Web applications and creating them for the enterprises is not the same as developing a Web site for a pizzeria in your neighborhood. During the last five years we’ve been using mainly Adobe Flex for development of the front end of Web applications. Flex applications work in a well known and predictable run-time environment called Flash Player. The code is compiled and you have convenient tools for development.

Flex is undergoing “Under New Management” transformations these days. Even though Flex remains the best framework for development of Web applications, you can feel the pressure of HTML5. But using just HTML5 is not enough for development of Web applications – you’ll need the same old Dynamic HTML – HTML, JavaScript, CSS, and XMLHttpRequest object.

Anatole, we did it in the past and it seems that we’re entering the same waters again. Is it still the same river 7-8 years after?

Anatole. DHTML has been introduced in the Internet Explorer 5, and several years later it was renamed to AJAX.

Y. Back in 1999 Microsoft created XMLHttpRequest object to allow their Web version of the mail client Outlook to update the browser’s window without the need to refresh the entire page. Is this right?

A. Partially. IE5 also had the XSL transformation tool for HTML generation and sopported development of custom plugins. The market share of IE5 was about 90%, but in enterprises it was literally the only approved browser.

Victor. At the same time, IE5 supported the model of HTML components called HTC. It allowed you to create htc files containing your own custom components with properties and methods, which were visible in the Web browser’s DOM with all these properties.

A. In fact, this was a more progressive model than what’s offered by today’s frameworks supporting HTML5, because you could use a markup language combined with JavaScript to support your components. This model was similar to what Flex offers. Today, we see some kind of a plugin environment (a lowest denominator between the Web browsers) that allows using various frameworks. The situation is this field didn’t get any better.

On the positive side, the Web browsers have changed and performance of JavaScript improved substantially. The browsers support 6-8-12 connections per domain (as opposed to 2 five years ago), which gave a performance boost to AJAX applications.

Y. But let’s get practical. Say, I’m an enterprise IT manager with a limited budget and a 5-men team that has to develop a Web application. If I’d be using a predictable VM-based environment like Flex or Java with good tooling (IDE, compilers, debuggers, profilers) my job would be easier. But with JavaScript, the situation is different. First, the development cycle with JavaScript is longer (read more costly).

Second, not only I need to find skilled AJAX developers, but they’d need to know a bunch of modern JavaScript frameworks. Third, compilers are not catching programmers errors so I’ll need to allocate more time for testing. Victor, what’s your take on this?

V. If you ask me what has changed the most – it’s perception. In the beginning of this century we worked in the DHTML environment. Only a small number of developers was involved with this “suspicious” development. Enterprise architects had hard time adopting this pre-AJAX model and often asked the same question, “This is not J2EE, right?” We’d answer, “No, it’s not”. Then it was clear to the architects that it’s some amateurish offering that could be ignored.

During the last six years, development with Flex slowly became an approved enterprise technology – it’s compiled and controlled environment with good performance, testing tools, and internationalization support. Then, Adobe turned its back on Flex.

Y. And the way they did it could be included in the Bad PR section in textbooks. Instead of starting Adobe MAX conference in October of 2011 with a proud announcement that Adobe is donating Flex to Apache Foundation, which would get a standing ovation, they waited a month and made the same announcement right after declaring that they wouldn’t support Flash Player (Flex runtime) on the mobile devices. This sounded as if they wanted to kill Flex. But we know that Flex is alive!

V. Yes, it’s alive. Technically it remains the best environment for development of Web application, but politically it became the product of the past.

Y. And now many enterprise architects will say, “We told you to stay with JavaScript 5 years ago…” But I’d like to get your opinion about the cost of development using Flex vs. JavaScript. What’s more expensive?

V. It depends on the type of the person who’ll be managing this project. Is it a corporate or a startup manager? A corporate manager is a temporary person. He works 6-12 months and the either gets transferred to another position or leaves the company. He’s not really interested in the end result. He can stay within the budget during specific period of time, but the project may fail in the long run.

The hourly rates of JavaScript developers are smaller than of those who know Flex. And development with Flex is easier, the results usually look better comparing to today’s JavaScript-based applications. Development with Flex may be more costly initially, producing better results, which is not that important to the corporate managers.

Y. Yes, the main goal of the corporate managers is to climb up the corporate ladder and earn good bonuses and pensions rather than creating advanced applications.

V. They don’t always climb up the ladder. Sometimes they move sideways to another firm, where the same position brings more money or other career opportunities. That’s why the success of a specific project may have a lower priority to these managers.

Y. So what’s more expensive – Flex or JavaScript projects?

V. As you know, we develop in Flex all internal projects at Farata Systems. But if the clients are ready to open their wallets for JavaScript development, we gladly help them.

A. If you want to develop two identical projects in Flex and HTML5, there is a high probability that the HTML5 project will be more expensive. But I doubt that anyone will even try to reach the Flex-level quality in an HTML5 project. Any HTML5 enterprise project will have lower requirements in the first place. From the very beginning parameters like reliability, ability to adapt to different the screen sizes and densities will be simplified. Instead of implementing these features, the functional specification will include testing under seven browsers, and developers will spend most of their time in the debugger.

You’ll save on the compilation time but will spend more time testing during the runtime. The final deliverable of an HTML5 project may have as low as half of the functionality comparing to the same project developed in Flex. But you’ll gain a little better Web adaptability, easier implementation of full text search and mashups. The integration with other technologies will also become easier with HTML/JavaScript. You have to decide if all these advantages are important to your application. If they are – choose HTML5.

But often the HTML part this is just a tip of the iceberg. The base functionality is usually developed in Java or .Net, and back-office applications should be using Flex for UI anyway.

Y. All these people marching undwr the HTML5 flags will gladly start new JavaScript projects because it’s available everywhere, it’s free, the frameworks are open sourced and don’t belong to these filthy rich corporations like Adobe. In the past, it was cool to hate Microsoft, and in early 2012 is cool to hate Adobe. Do anything you can, cut any corners, lose functionality but don’t start a new project using Flex. This way we’ll belong to the mainstream – we’ll develop in JavaScript.

A. Yes, but JavaScript will enforce its limitations on any serious and complex enterprise project. You can develop a number of fairly independent windows, but creating a well debugged application (not a site) in HTML won’t be easy.

Now let’s return to the premise that performance of the browsers is substantially improved. Since JavaScript frameworks have to support various browsers from the same code base the size of their code increases, which lowers the performance and overall user experience if you compare similar Flex and JavaScript applications. I recommend establishing well defined boundaries between front and back office applications. You don’t worry that much about the productivity of the external end users. But if we talk about the internal enterprise users (back office), each of them is a salaried employee and they’d better be productive.

We spent more than six years in DHTML. We wrote our own framework and implemented DHTML enterprise applications for the Fortune 100 companies. We know all the loopholes in these environments and which ones still remain unpatched. As of today, you can’t compare Flex and DHTML. But there are some narrow fields, where you must complement Flex applications with DHTML.
Most enterprise applications have front end, back end, and back office (support, error fixes, et al.). The front end tier can consist of DHTML and Flex parts because today it’s hard to develop front and back office application in the same environment.

Y. Let’s talk about the situation on the market of JavaScript frameworks. There were about 200 such frameworks five years ago. In 2012 the situation is a little bit different – we’re talking about dozens of JavaScript frameworks. But still, there is no one framework that could cover all the needs of your Web application. Victor, what’s your take on this?

V. After Adobe has shaken the Flex world, I was shocked for a while. But then I realized that any good tool or environment should be replaced with the newer one some day. After spending some time researching the modern market of JavaScript frameworks I noticed that there are two main categories of frameworks:

a) Those that allow you to take an existing Web site and, by a magic wand, add new attributes to all

or other tags so they would start shining, blinking, or do some other fun stuff. Such frameworks don’t promote component-based development. They may not include navigation components, grids, trees, which are pretty typical for any UI of the corporate tasks or back office as Anatole called them.

b) The frameworks that are similar to Flex in that they offer high-level components, which may be based on

tags, and even allow you to dig deep inside such components whenever you need to know the internals of Flash Player while coding in Flex. But overall, such components are meant to solve different problems – highlighting and CSS are less important here. Mainly these components process some events, offer support of the Model-View-Controller and so on.

After further analysis I’ve learned that the framework Ext JS by Sencha is close to what Flex offers, but without compilation, data binding, and with less control.
I often use an example of a cat running over the keyboard of my laptop while a JavaScript file was opened in a text editor. Even if I didn’t notice this, I could successfully check in this file into a code repository, but it may not work afterward. Un-compiled environment is a dangerous place to be.

Y. Would your example work the same way for developers who have dogs?

V. Yes, but the number of errors will increase.

Y. Currently, the legions of developers are moving in the direction of JQuery framework. But we are moving perpendicularly. As you stated earlier, JQuery is good for improving an existing JavaScript site. With Ext JS you start with designing your application’s UI as close as possible to object-oriented principles. Ext JS has rich set of UI components, loader, offers an event model – it’s a different and better approach, right Anatole?

A. Today I lead projects that use both frameworks. JQuery is a light framework (code wise) and it can be used to program about 80% of a Web site. You should use it for the look and feel support, which is what it’s meant for. But you can’t use it for building your application component model. The component model of Ext JS is applicable in about 20% of a Web site, which includes an application piece rather than just being a set of Web pages. Typically it’s a serious view navigator or a wizard to implement a serious business process or a workflow that includes a client’s part.

Y. Data grid, of course…

A. Yes, high-level components and a workflow because often the user needs to perform several steps to complete a business process. And these 20% of an application will require 80% of the project time of complex development. So you won’t need to choose between these two frameworks. My main problem with AJAX projects is not how to pick THE best framework for development, but finding the right software developers. It’s hard to find people who don’t have cats around and can concentrate.

V. Absolutely, an extreme concentration and attention is a must.

Y. Or you can use one more framework that will take care of testing.

V. Absolutely everything must be thoroughly tested over and over again. Refactoring in JavaScript is a nightmare.

A. A software developer has to remember everything – all unfinished pieces of code. Many things that we take for granted in a compiled language are simply not supported in JavaScript.
It’s worth mentioning another type of frameworks that use Java for development with further generation of JavaScript, which is a controversial idea, because after writing the code you’ll need to debug it. This is when you’ll meet JavaScript, which is a foreign language for you.

Y. I guess, you mean GWT. There is one more reason of why this is a stillborn idea. The ideology and psychology of programming in JavaScript and Java are different. Five years ago I’ve written an article demonstrating how Cobol, Java, and Lisp programmers solve the same task differently. I guess, it’s time to add a JavaScript version to this example.

A. A person who writes in Java/GWT has to know how to read and interpret the JavaScript code in the debugger. Besides, GWT hides a large portion of JavaScript functionality.

Y. Plus Java doesn’t support dynamic programming…

A. Not too many people use dynamic programming, but it would be nice to change the language. Twenty years ago there were mixed languages that would allow using the dot notation to request some code fragments to call dynamically and some statically. We had a choice to either compile an operator or interpret it during the runtime. It was up to the developer. I won’t have peace of mind until JavaScript will support this.

V. Anatole, how many years should pass till people will accept the notion of compiled language running inside the browser (JavaScript, ActionScript, et al) along with an interpreted language?
A. These questions were raised many years ago – remember the languages like curl? These languages were in R&D…

V. But they never became standardized for the use in Web browsers.

A. Exactly! Apple didn’t let Flash Player in their popular devices, and this became a huge obstacle for the evolution of Flex. The same thing may happen if some vendor decides to not allow any other language or environment in their devices killing these new ideas. For example, Google came up with a new language called Dart, but Microsoft says, “No, we’ll be improving JavaScript.

Y. JavaScript frameworks promise to hide from you all incompatibilities and take care of the cases when a vendor won’t let some features in their environment.

A. I don’t think anyone will be able to translate the world literature into the language of the tribe Tumba-Yumba with very limited expressiveness. There are reasons why some languages are better then other for different tasks or application sizes. JavaScript is a very basic language.

V. But if you take Ext JS, their documentation suggests to use ext.create instead of the operator new. Technically they are extending or replacing the constructs of the JavaScript itself extending the alphabet. Any framework architect who wants to create a controlled environment will run into a JavaScript wall.

A. Partially this is correct. If you want to create a real dynamic or static language with the error checking and runtime compilation, you’ll have to substitute their constructors with the strongly-type ones that can throw exceptions.

C++ supports operator overloading and people used this feature for some time. But it didn’t last long – they realized that it’s hard to read and understand their own code. If a language allows you to write a code fragment that’s hard to understand – it’s better to remove this code.

V. I’d like to add to the subject of comparison of the JavaScript and ActionScript… I feel uncomfortable thinking that someone else will read, support, and refactor my JavaScript code. Actually, I’m not comfortable refactoring my own JavaScript code a couple of months later. In a non-compiled environment it’s tough. I don’t remember what’s the type of the parameter that’s given to the particular function.

In the compiled environment I’d always known each type and if an object still had certain properties or they were removed. But there is nothing like this in interpreted environment.

A. You can research the code, open each base class and check the references and find out what the properties are – the language will help you with this. I liked dynamic languages when I was 26 years old. A development manager will also have to hire young and very enthusiastic but inexperienced developers.

V. Today’s labor market consists of such people – inexpensive, enthusiastic, and inexperienced.

A. On AJAX projects such a developer will spend the first two months studying, on the third month he’ll start working, and in six months he quits for a simple reason – development is hard and the project arrived to a dead end. When the code base of such project reaches critical mass, the development process gets stuck.

V. The developer will quit not necessarily because the project got stuck. This developer will get more rewarding offers on the job market.

A. In other words, the project stops in 5-6 months – it becomes unmanageable because of its size. That’s why I’d like to stress that there is big difference between AJAX projects and those that are being developed in a compiled environment like ActionScript.

Y. I’d like to return to the question of JavaScript frameworks and browser compatibility. I like the analogy with TV sets. Even if I have the latest and greatest 3D LCD HD TV set and you have a 30-year old black and white television, we both can watch the same movie even though the quality of the picture will be different. In modern terms, you can say “The user experience will be different.”

Now let’s talk about the browsers. You use the latest Google Chrome, but I’m a corporate user who must use IE 6. Is it possible to ensure that the same JavaScript application works in both browsers?

V. The core part of frameworks try to address browser compatibility. They try to ensure that the page works as good as possible in every browser within its limit. But the script will work.

A. I don’t agree. In my opinion you can achieve browser compatibility not on the framework level, but by testing and adjustment of your application in different browsers. The statement that it’ll work somehow is an exaggeration. The chances are that you’ll have to fix the framework.

V. True. I already started making some changes in the framework even without developing overly complicated code. Maintaining compatibility is a huge challenge for any vendor that supports a framework. I remember our XMLSP framework that we created in the beginning of this century. We had a client form Great Britain who said, “This product is bigger than your company”. If I’m not mistaken, there were five of us who worked on XMLSP.

I’m sure, Sencha has more developers who work on Ext JS, but the framework is a lot bigger than we had. Most likely the code base and the task they are trying to achieve are comparable to Adobe Flex. No wonder that any such framework will always need some fixes and improvements.

I have no hard feelings when I make fixes in someone’s framework. I understand that these guys simply didn’t have time to fix everything. You need to form an attitude that a JavaScript framework is similar to a good Legos set that will require your creativity too. Don’t get angry. Cure the framework. Spend some time working on the framework, and then work on your application code. At least this is how I see the current state.

A. To rephrase what Victor said, either work with the simplest framework components that don’t give you compatibility problems or get ready to roll up your sleeves, learn what’s under the framework’s hood and staff your project with not not only application developers, but with systems engineers too who will spend half of their time on customizing the framework.

V. At this point the framework becomes your product too. I wouldn’t agree that half of the time should be spent on customization of the framework. It all depends on the long term plans. If you bet on a particular framework and plan to use it for years, than invest into its improvements But if this framework just had to address the needs of one project, just apply some patches and move on. In most projects patching a framework will suffice.

Y. To summarize, JavaScript developers will need to solve the same task as Java, JavaFX, Silverlight, or Flex developers face:

– Reliability of communications. What if the data never arrive from/to the server? Is it possible to recover the lost data? Where they got lost? Can we re-send the lost data? What to do with duplicates?
– Modularization of your application. If a user never clicked on a certain menu item on the main screen, don’t even load the code that should process this menu.
– How quickly the main window of your application is loaded to the user’s computer? How heavy is the framework’s code base?
– Where to store the application state – on the server or on the client?
– Does the framework offer a rich library of components?
– Does the framework support creation of loosely coupled application components? Is the event model well designed?
– Does the framework of your choice cover most of the needs of your application or you’ll need to use several frameworks?
– Is well written documentation available?
– Is there an active community that can help you with technical questions?

I can keep adding items to this laundry list. So if the words HTML5 easily get you excited, calm down. It’s not just about adding a tag video to a Web page. It’s a hard work with JavaScript. It seems that our company will have a lot of interesting and challenging projects in the foreseeable future, and we don’t complain.

Immersing into JavaScript Frameworks

During the last month my colleagues and I were immersing into the world of modern JavaScript frameworks. We didn’t start from scratch though. My business partners spent the first 5 years of this century porting PowerBuilder, a used-to-be-popular client server tool, to a JavaScript framework. That product was called XMLSP and you can still find its 5-year old version online. The word AJAX was not even invented back then. In 2006, a killer UI framework Adobe Flex 2 was released and we started using it. It was clearly better than any AJAX offering, and I was not shy in publishing blogs and articles explaining its superiority to any AJAX solution available at the time.

Flex remains a great solution for developing UI for the enterprise Web applications, and our company,Farata Systems, is committed to support any client who decides to hire us for any Flex/AIR Web/Desktop/Mobile project. But the world of software and hardware is hugely different in 2012 comparing to 2006. And we are stepping into the same JavaScript river once again.

Well, it’s not exactly the same river. It was renamed. The authorities replaced the old road sign AJAX with HTML5, but let’s not get fooled. It was DHTML ten years ago, and it remains DHTML now: HTML, JavaScript, XMLHttpReuest object, and CSS. But the modern Web browsers employ faster JavaScript engines, CSS is a lot more flexible, smart phones come with dual core CPUs, the speed of WAN is faster too (ok, just a little bit).

More and more enterprises are adopting HTML5/JavaScript, but software architects and developers are still looking for the features available only in the VM-based clients. Will an XYZ JavaScript framework manage client state, support atomic transactions and provide server-side push? Will it offer declarative UI programming, flexible layouts, rich component library, good event model? How many extra kilobytes has to go over the wire to the client if you use this framework? Will the XYZ step up to MVC, modularity, and reliable communications? What are the requirements for the developers’ skills? Is the learning curve steep?

Sounds familiar, isn’t it? We had to solve these issues in the past, and we’ll do it again. Promise. After spending some time trying to pick THE JavaScript framework that can address all these demands of serious Web applications, I can report that you won’t be able to find THE framework. But the good news is that by combining more than one framework you’ll be able to create a well performing and reliable Web application.

Based on on the research conducted in the underground labs of Farata Systems, I can report that our JavaScript framework of choice is Ext JS by Sencha. This framework can serve as a solid foundation for any serious JavaScript development. We’ll also use a couple of more lighter frameworks on as needed basis.

I’m also happy to report that we’ve created an alpha version of our Clear Data Builder (CDB) tool that will offer automatic code generation for JavaScript/Java CRUD applications with transactional support and other goodies that will substantially increase the productivity of JavaScript developers. CDB won’t be an alternative, but rather a compliment to any JavaScript framework.

In a couple of months we’ll publish the first demo that will show an automated generation of a CRUD application using use Ext JS, CDB, MyBatis, and Java. Why MyBatis? Because we like writing SQL, but the demo that uses Hibernate will come shortly after. We already started a new consulting project to prove that we can eat our own dog food, and this food has a good taste.