Developing with Isomorphic’s SmartClient
SmartClient is a unified front end and middle tier solution that simplifies the paging of data, while providing a cross browser compatibility. It abstracts out the Ajax communication between the browser and the server and also provides a data layer that handles the CRUD (create, read, update, delete) operations to the database right out of the box. As you can see in the examples below, creating a simple grid on the form is easy.
Figure 1 – Code to display a simple ListGrid
Figure 2 – Simple ListGrid example
Of all the features of SmartClient, what really gave us the much needed performance boost was the built in paging that is worked into their grid display object. It loads only a small subset of the overall data initially and then loads the rest on demand as the user scrolls through the grid. This is implemented as a wrapper on each SQL call that filters the number of records returned to the middle tier to 75 rows no matter how many records are in the table. That is done by adding ROW_NUMBER() OVER in each Select and an additional Where clause that only returns rows with those ROW_NUMBER’s in a specific range. So if your users have a habit of hitting a page and only looking at the most recent data which is displayed by default, they may never go past the original 75 records. Now the developer doesn’t have to do a thing to make it happen, which makes loading those thousand record drop downs no longer a problem.
The Benefits and Drawbacks of Using SmartClient
As with every framework, there are pros and cons. Learning the “SmartClient way” of doing things may be a challenge and having a consultant onsite early in the process, as we did, was invaluable. Here are some of pros and cons that I’ve found:
- Documentation: There is lots and lots of documentation. If you download the SmartClient demonstration software from their website, it comes with full API documentation and hundreds of examples. The API is extensive and the documentation is well laid out and easily searched using SmartClient. You can view it here.
- Java: You can interject your own Java code at the middle tier. So you can intercept, manage, manipulate, validate, and enhance any call to the database.
- Documentation: Did I mention there’s a lot of it? If you’re fishing for something specific but don’t have a name for it, it may take a while to find that diamond in the rough. I admit I’m a slow learner, so mastery took a while for me.
- Community: While SmartClient does have its own forum and their staff does provide answers there, it’s not as widely supported as some other frameworks. So if you tend to Google for something and then follow the links to StackOverflow for your answer, you’re less likely to get that kind of support.
While we haven’t pushed this web application to production yet, in side by side tests in our development environment the page load times after using SmartClient are demonstrably lower. Additionally,our development is ahead of schedule, despite utilizing fewer developers than originally planned. As you can see, these early indicators show that choosing SmartClient is a win.