IBM i Developers Sound Off On JavaScript Frameworks
November 18, 2013 Alex Woodie
If you’re an IBM i developer, you’ve undoubtedly heard about the amazing stuff that people are doing on the Web with JavaScript. However, as an IBM i professional, JavaScript may seem like a foreign language to you. Luckily, you’re not the first IBM i developer to venture down the JavaScript path. In fact, many IBM i developers have used JavaScript long enough to develop strong opinions about them, especially as it relates to Ext JS versus jQuery. As you might expect, there are dozens of JavaScript libraries out there to choose from. Evaluating all of them is best left to the programmer lists and hacker forums out on the Internet. IBM i developers are rarely on the bleeding edge of technology adoption, and as far as JavaScript goes, most in the midrange seem to have congregated around the well-worn gloves that are Ext JS (Sencha) and jQuery, with a little bit of Dojo thrown in for good measure. The Ext JS versus jQuery battle is not an even one. In fact, as several veteran IBM i developers pointed out, it’s a little bit like comparing apples and oranges. While both libraries are designed to streamline the development of JavaScript in Web applications, Ext JS is a heavier tool designed for soup-to-nuts application development, while jQuery is a lighter weight tool that’s easier to pick up and use. With those key differences in mind, we set out to find out what developers at IBM i application modernization shops think about the great JavaScript divide. Ext JS Supporters Count John Rhodes of CM First Group, a provider of IBM i application modernization tools, as a firm member of the Ext JS camp. For the last three years, Rhodes and his colleagues have been using the Sencha products to help IBM i shops modernize and mobile-enable their applications. “We looked at JQuery and Dojo. And we looked at doing native development as well,” Rhodes says. “Our feeling at the time, and it still is, is that HTML5 and JavaScript is the way to go for mobile development. So we made that choice early on. And it’s just a matter of picking the product that had the best quality interface and the most native-looking experience.” Rhodes says the performance of mobile interfaces generated by Sencha and Ext JS were better than what other frameworks could develop. “The apps have to be very responsive,” he says. “The performance was not as good [with the other frameworks]. We also really like the architecture of the framework. The Sencha architecture covers mobile and desktop applications, and it has code generation capacities that give you a head start. We also found it to be easier to develop with and faster to get products to market.” Robert Swanson of CNX Corp. is another Ext JS supporter. CNX has been using the Sencha products, including Ext JS and Sencha Touch, in Valence, its IBM i Web application development tool. “We gravitated to Sencha back in 2007 because their flagship products–Ext JS and, later, Sencha Touch–are backed by a strong corporate entity in Silicon Valley, include a huge number of highly configurable user interface widgets, have comprehensive, well-structured API documentation, offer robust support options, and enjoy a huge, emphatic developer community,” Swanson says via email. But most importantly, Sencha is designed explicitly for end-to-end application development, he continues. “That’s a key point for us in the IBM i world, where business apps are king. Ext JS is not intended to augment or enhance Web pages, which would be a task more suited to a library like jQuery. Rather, Ext JS is a complete framework designed for building highly interactive Web apps from scratch, using AJAX to communicate with the server (IBM i). The framework allows developers to quickly create what would otherwise be rather complicated front-end HTML5 elements without requiring them to get into the intricacies of the code.” CNX’s Valence is not used for modernizing existing IBM i apps, but for creating brand new apps from scratch, so the selection of Sencha was a good fit. “If we were merely looking to supplement existing Web pages with some business data, then we might consider other approaches,” Swanson says. “But for fully functional, single-page applications talking to IBM i we think Ext JS is tough to beat.” JQuery Backers For others, however, jQuery’s lightness and ease of use are far more important factors, and outweigh the large feature set that Ext JS can bring to bear. You can count Marcel Sarrasin of Business Computer Design as a firm member of the jQuery camp. “We have been doing jQuery for five or six years, and we absolutely love it,” Sarrasin tells IT Jungle. “We did one project with Sencha years ago when deciding what JavaScript library to use, and what we found was Sencha, or Ext JS as it was called at that time, just to be a lot more complicated, and a lot harder to actually do things with it.” In the end, what JavaScript library a developer chooses is largely a matter of personal preference. All JavaScript runs on the Web browser and interacts with the HTML, so from the IBM i server’s perspective, it doesn’t really matter what JavaScript library is being used. You could even roll your own JavaScript, if you don’t mind not being able to take advantage of all the widgets and UI components that have already been built and are offered for free with JavaScript libraries like jQuery. “Having said that,” Sarrasin says, “one of the big features of jQuery is it makes it easy to do AJAX calls. So you are interacting with the server side, but through JavaScript. So when we’re using AJAX and we want to refresh a certain part of the page, we use JQuery to make that call to the server side, and pull in the data. But there’s nothing coded at the server side level of jQuery. It’s all coded on the client side.” There are a number of other prominent IBM i developers who are in the jQuery camp, including Aaron Bartell and Craig Pelkie. Paul Tuohy, one of the co-founders of System i Developer, has written about his preference for jQuery on these pages as well. Other JS Libraries Dojo doesn’t seem to have much backing in the IBM i community outside of one prominent member: IBM. In 2010, IBM added Dojo support to its Rational Business Developer, the IDE used for writing apps in Enterprise Generation Language (EGL). It followed that up in 2011 by adding it to Host Access Transformation Services (HATS). You won’t find Profound Logic and its rival BCD agreeing on much. But they both agree that Ext JS can be overkill for the typical IBM i developer. “We found that at traditional RPG shops, the developers just have a very difficult time understanding and getting their mind around something like Ext JS,” says Profound CEO Alex Roytman. “It wasn’t a simple thing to learn. IBM i developers think of screens and display files, and this a different way of thinking. It’s a steep learning curve to get into something like that for an IBM i shop.” Because of this gap, Profound took it a step further, and took it upon itself to develop its own JavaScript library. “The reason we decided to build one from the ground up was because it needed to operate around the way the IBM i works,” Roytman says. “There’s a concept when it comes to creating listings or grids of information. IBM i developers are used to thinking of it as a subfile. That’s an IBM i concept. And so we kind of encapsulated that and built our JavaScript framework around this concept of a subfile.” The Profound UI Framework is open source and available as a free download. The project and source code is hosted at GitHub at github.com/ProfoundLogic/profoundui-framework.
|