Is "Lightweight" Always a Good Thing?
Is "Lightweight" Always a Good Thing?
Business applications are supposed to improve productivity. However, as developers, we sometimes get overzealous about adopting technology that actually degrades the final product.
Join the DZone community and get the full member experience.Join For Free
Bugsnag monitors application stability, so you can make data-driven decisions on whether you should be building new features, or fixing bugs. Learn more.
Business applications are supposed to improve productivity. That is why they exist. However, as developers, we sometimes get excited about a newly released technology and the benefits it claims. We can even end up adopting technology that actually degrades the final product, creating a less productive UI and possibly ruining performance despite promising performance claims.
At Isomorphic, we see this happening a lot with companies that get excited about new "lightweight" technologies, like Angular, Bootstrap, Backbone or Ember – or even JQuery, when new JQuery-based components are released.
So, What Drives Productivity in Today’s Web Applications?
End user productivity–from a platform perspective–is driven by:
- Advanced UI features (i.e. performing activities with fewer steps/clicks/screens/actions)
- Performance & scalability (i.e. getting the result of each activity faster)
Can We Build High-productivity Applications With "Lightweight" Technologies?
There are a number of areas where "lightweight" technologies consistently fall short, or fail to understand the true enterprise requirements:
1. Wrong Performance Focus
People are excited about “lightweight” grids, which claim to be able to render 10,000k or more rows in a reasonable time in the latest browser. Developers often think this means that they can skip implementing data paging, and can use client-side filtering and sorting to improve performance. The reality:
a. The Reason Not to Load 10,000 Rows is the Database, Not the Browser. It’s not important that a grid can render a lot of rows all at once. The purpose of loading rows incrementally was always to avoid unnecessary database and application server load, as well as avoid wasted bandwidth.
b. 10,000 Rows is Not a Reasonable Upper Bound–Nor is 100,000. Business data sets routinely get much larger, especially when you consider administrative interfaces that look at data from many users at once. If you ship an application that expects to load all data up front, it will break in production as data volumes go higher than you had assumed.
c. Client-side Filter and Sort is Achievable With Isomorphic Grids, but Not With Lightweight Grids. Our Adaptive Filtering technology automatically switches to client-side sort & filter when data sets are smaller, so you can handle extremely large data sets and reduce server load and bandwidth use. This capability is why Isomorphic grids dominate performance comparisons that simulate actual end-user behavior.
d. You Can Only Render Rows Faster by Removing Features. Isomorphic’s grid component uses a complex HTML structure because it supports a huge variety of productivity features like auto-sizing of both rows and columns, on-the-fly column freezing, row-spanning cells, components embedded in rows, on-the-fly grouping, as well as many developer override points that require particular HTML structures in order to work. We know exactly what simplifications would result in rendering more rows per second. We intentionally don’t apply those simplifications because they would remove productivity features, while not actually improving real-world scalability or performance.
2. Productivity Comes From Feature-rich Components, Not “Lightweight” Ones.
Consider grid components. End users need capabilities like edit inline, freeze columns, grouping and sorting, formula columns, adaptive filtering, hiliting, export, drag & drop, etc. Without these and other features, performing simple tasks requires end users to complete multi-step processes. For example:
- With edit inline: end users click a row or cell, edit the data, then move on.
- Without edit inline: end users select a record, click an edit button, are taken to another screen, perform the desired update, save the record, and return back to the starting point–hopefully without losing context.
Without feature-rich components, your application can become a frustrating time sink rather than a productivity tool.
3. Forgetting Something? Server Integration!
Some of the most powerful features in modern UI technologies span both the client and server. Examples from Isomorphic’s technology include:
a. Single Source Validation & Security Rules. Validation rules declared in one place are enforced on the server (for security) and the client (for immediate feedback)
b. Automatic UI generation. Grids, forms and other components can be automatically configured from server-side artifacts such as Java beans and database tables, greatly reducing redundant declarations and making applications easier to maintain
c. Exports. Isomorphic’s UI components know to coordinate with our server framework to export themselves and their data to Excel, PDF and other formats. Every application needs this; it can be a huge effort to build from scratch. And, this only scratches the surface of features that a modern client & server framework provides. Starting from a "lightweight", client-only framework puts you years behind the state of the art for UI technology, before you even consider which UI components to use.
4. Mixing Components Never Worked, and Still Doesn’t
Most of the new crop of "lightweight" frameworks emphasize the ability to plug in components from different sources, so you can get the best of each component type. This should all work since they share a common data-binding system, right? Wrong, unfortunately:
a. Accessibility Requires Intensive Coordination Between Components About Tab Order, Modality, and ARIA Markup. Really trivial cases where just a few rudimentary components are combined will appear to work, however, when you have a lot of instances of dynamically change tab order, multi-level modality and the like, there’s no way to get components from different sources to work together and actually pass accessibility tests
b. Skinning Conflicts. Each component has a slightly different look and feel, and it can take a lot of work to correct the mishmash of different fonts and styles so that an application looks reasonably consistent, especially since, when fonts are made consistent, the sizes of various controls and sub-controls used in the app may need to be adjusted to fit the adjusted fonts. Also, some frameworks make conflicting assumptions about CSS they can globally apply to the whole page, breaking other frameworks or components on the same page (e.g. Bootstrap)
c. Export and Print Support. It's a rare feature among "lightweight" components, yet most applications require it, and just one component lacking support can ruin the ability to print or export a particular screen or report.
d. Internalization and Localization. Pulling components from multiple sources typically means that localization work has to be repeated for each component, as every component needs the local word for “OK” or to be told what date format to use
e. Inconsistent Quality and Endless Evaluation. There is the practical consideration of whether it makes sense to constantly hunt for components. One grid has inline filtering but no frozen columns. Another has frozen columns, but no ARIA support for inline editing. A third has a nice date filtering interface, but it looks and operates completely differently from a date filtering interface you’re using outside of the grid, which will surely lead to user confusion.
f. Support. Even if you succeed in finding a workable set of components, you may find later on that your bug reports are ignored by one team or another. If support is even available for your chosen components, how many separate support agreements will you be purchasing? What about the many bugs that are not quite just one vendor’s fault? For the many single-component OSS projects, is there any reason to think the project will last as long as you need to maintain your application?
Note, it’s not… especially when you’re up against heavyweights. SmartClient has a rich set of UI components available, coupled with deep server integration to bring productivity and performance to your enterprise applications.
Published at DZone with permission of Jason Hardy-Smith , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.