Why I don’t like SmartGWT.

I spent the day playing with SmartGWT, and came to the conclusion that I’m not particularly a fan.

Don’t get me wrong: the widgets that it produce are sexy as hell. And if the development work you’re doing fits into SmartGWT’s client/server model and you are willing to use SmartGWT’s server-side libraries to handle network communications, it’s probably the best way to go.

But ours doesn’t. And when our model of obtaining data from the SmartGWT server doesn’t fit in their model, it’s an uphill fight–much harder, for example, than me just building our own custom widget set. (I have the advantage over most that building custom widgets in GWT at this point is pretty straight forward for me, so your ‘cost/benefit’ ratio may vary.)

The fundamental problem I have with SmartGWT is that it is just a thin Java wrapper over the SmartClient system all written in JavaScript. While SmartClient is probably a great piece of software for JavaScript, wrapped for GWT it’s a royal pain in the ass to use. Rather than giving you a rich library of various controls (and perhaps a class hierarchy of grids, each which provides some specialized function or override from the basic component), it provides a very small number of highly customizable set of controls.

And there is where I have problems. If I want a dialog, I don’t open a DialogWindow. I open the Window and set three or four different settings to make the Window look like a dialog. If I want a dynamically updating table that takes its information from a remote server data source, I don’t create an instance of a dynamic table and provide the right interface; instead, I create a Grid and set about a half dozen settings which turn the Grid into a dynamic grid.

Now of course this complaint is stylistic: SmartGWT’s sample app makes it pretty clear how to create a dialog or a dynamic grid–and after a day I had a fairly complete screen with a tree navigation widget, a table, and a modal search window with a dynamically updating table.

But it’s beyond just being stylistic: because the DataSource for SmartGWT is not an interface implemented by a half-dozen different implementations, but a singular object which is configured (through some JavaScript mechanism I don’t grok because the whole point of this exercise is to insulate myself from JavaScript) to be a JSON or an XML/RPC or a whatever interface, creating a new DataSource to feed a dynamic table is not just a matter of creating an instance of the interface and filling in the blanks.

In fact, without diving into the underlying JavaScript, it seems impossible to create a new interface to speak the particular flavor of JSON we’re using. (And while SmartGWT does provide a mechanism to speak JSON, it also defines the specific JSON requests and responses, which doesn’t work for us.)

It is this inflexibility, created because they’ve simply wrapped an existing JavaScript framework with a thin layer of GWT Java stuff, which makes SmartGWT a pain in the ass for me to use–and it’s why I don’t like SmartGWT.

22 thoughts on “Why I don’t like SmartGWT.

  1. Ahem. This appears to be basically 100% misconceptions.

    There is a Dialog class for common cases of Dialogs.

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/widgets/Dialog.html

    There are even convenience methods that make common cases like asking the user for a value into a one-liner:

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/util/SC.html

    There is a pre-built JSON-based protocol called RestDataSource, however, there is an entire chapter dedicated to adapting to pre-existing JSON/XML formats, and in most cases it can be done purely declaratively:

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/docs/ClientDataIntegration.html

    DataSources are not configured via JavaScript. Not sure where you got that. When you’re using the SmartClient Server you create them as XML files and then they drive both client-side and server-side behavior (such as enforcing validation rules in both locations).

    As far as creating a few components rather than many, that’s by design and is a very very very good thing. It prevents you having, say, an EditableGrid, and a PagingGrid, but not having an EditablePagingGrid. SmartClient’s ListGrid can edit, page, filter, sort, group and many other things, and all the features are supported in tandem, which is extremely powerful and unique among RIA frameworks.

    Given that we actually have all these features working in tandem it seems to me that it would be absurd to matrix them out into classes. EditablePagingFilterGrid? PagingGroupedSortableGrid? I would submit that the example code shown is already much shorter and more concise than with any other framework.

    If you have a recurring need for a particular subset of features you can trivially encapsulate it in a subclass.

    This all said – we would have appreciated some closer reading of the docs and perhaps a few well-considered polite questions on the forums, rather than what you have done, which is to publicly express an opinion based on several, easily corrected, major misconceptions.

    Like

  2. This all said – we would have appreciated some closer reading of the docs and perhaps a few well-considered polite questions on the forums, rather than what you have done, which is to publicly express an opinion based on several, easily corrected, major misconceptions.

    First, welcome to my tiny and insignificant blog. I’m happy to have gotten a response from someone from your company within an hour of posting my little uninformed diatribe–quite remarkable customer service. And it makes me quite happy that someone from your organization would write a comment on my tiny little blog with perhaps 5 readers, three of whom are my mother, father, and brother. Strokes my ego to think that anyone else cares what I think.

    Though I would suggest decaf. And I will note honey is much better than vinegar at attracting flies.

    That said:

    “There is a Dialog class for common classes of Dialogs.”

    I didn’t notice it at first, so thanks for the pointer. Following the (plentiful) examples in the sample code that you provided it wasn’t very difficult to figure out the (as it turns out, 8) methods I needed to call to configure a Windows object to work. One of the things I needed to build was a modal window with complex interaction with the user, so even if I had noticed the Dialog class I probably would have skipped over it in my particular case.

    There are even convenience methods that make common cases like asking the user for a value into a one-liner:

    I saw that.

    Perhaps it’s a personal style thing, but while I appreciate the need for such a widget for trivial cases of applications, the end result of an application that heavily relies upon such things is a bit cumbersome–click here, fill out value 1, click there, fill out value 2, etc. I appreciate the fact that you have a form mechanism that is quite robust (and it is in fact the form mechanism that attracted me to investigate SmartGWT in the first place), so the fact that you have to provide a simplified mechanism to fill out a single value in a pop-up dialog box makes me wonder if the reason why it’s there is because of pushback from customers who thought your form mechanism was too cumbersome to understand.

    DataSources are not configured via JavaScript. Not sure where you got that.

    I got it from the opening comments in the documentation you just pointed to:

    Client-side Data Integration

    SmartGWT supports declarative, XPath-based binding of visual components to any server capable of returning XML or JSON responses over HTTP, without the need for the ‘SmartGWT server’.

    This approach is called Client-Side Data Integration, which means:

    * You ‘create DataSources’ in JavaScript which describe the data to be loaded and manipulated in the user interface.

    Sorry if I misread the sentence fragment “You ‘create DataSources’ in JavaScript”–the entire discussion under ClientDataIntegration was a little hard to follow and probably would be better served as an HTML page in a separate document with examples rather than a page buried in the JavaDocs.

    And it did run up against our JSON protocol, which involves a request record that contains multiple request commands–so there is not a real good one-to-one mapping for commands. Our requests are not essentially remote procedure calls, but a little more convoluted than that.

    And I’m sure if I were willing to poke around and try to gain a deeper understanding of the client data integration mechanism, I probably would be able to hammer our rather odd way of doing remote requests (designed to support mobile development, where request/response latency over cellular networks can be measured in seconds, thus requiring multiple requests to be sent at once)–but given the fact that I really only want the table view widgets (which, in SmartGWT, are quite pretty–as I noted originally) and would rather roll my own data access stack, it seems to me (as again, I originally noted) the cost of understanding your data access model and hammering our non-standard way of doing things is probably higher than the benefit we would gain from using your widget set.

    Like

  3. Oh, and as an aside:

    As far as creating a few components rather than many, that’s by design and is a very very very good thing. It prevents you having, say, an EditableGrid, and a PagingGrid, but not having an EditablePagingGrid.

    I originally didn’t intend to address this point because as I pointed out previously, this is a style thing and not a legitimate complaint. One can argue that providing a hierarchy of classes with increasing complexity (a Grid, an Editable Grid, and a Paging Editable Grid, for example) means that you can understand the hierarchy and create your own custom class that extends only the functionality you need, and it allows you to use only the functionality you need while permitting GWT to dead-code strip those components you don’t need.

    But again, this is a style thing–and your observation that it prevents a situation where you need the functionality of two child classes where a hybrid is not provided is spot-on in a world where we don’t get mix-in classes (like C++) because of a lack of multiple inheritance.

    (Though I’d also argue that if you did provide a framework that didn’t provide an EditablePagingGrid after providing an EditableGrid and a PagingGrid, that’s something that definitely needs to be added in the next release.)

    Like

  4. [One more try – please be mature enough to accept criticism and feedback if you yourself are going to post criticism and feedback publically]

    Traffic doesn’t really matter – your blog is likely to be hit by just the right combination of search terms. Publicly posted misconceptions can be damaging even when they appear to be marginalia.

    You keep mentioning having to set a lot of properties or call a lot of methods, but, we put a lot of examples up in the showcase where we know that equivalent code in other frameworks is 2x to 10x as long. Brevity and conciseness is something we get complimented on all the time. So if you think there’s something that can be improved in terms of brevity, you should get more specific.

    Interesting speculation as to why we would have helper methods, but the actual reason is the more obvious one: replacements for alert() et al with look and feel consistent with the application.

    Thanks for bringing that doc issue to our attention. The doc is accurate (GWT translates your Java code to JavaScript) but not as clear as it could be. We’ll switch it to say “you create DataSources programmatically in client-side Java” or similar.

    As far as your protocol:

    1. the ability to combine requests into a single compound request in supported in SmartGWT Pro and above

    http://www.smartclient.com/smartgwtee/showcase/#transactions_queuing

    2. we’ve set things up so that you can roll your own communications but still leverage our databinding layer. It’s dataProtocol:”clientCustom”:

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/types/DSProtocol.html

    People have used it to connect to GWT-RPC, used it for client-side storage, Flash-based comm etc. You could implement your own notion of combined request with it, if you don’t use Pro.

    Connecting at this level allows you to still leverage powerful data layer features like Adaptive Filtering:

    http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_featured_category

    .. and other powerful behaviors of ResultSet:

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/data/ResultSet.html

    3. you can also roll your comms and still leverage most of databinding via clientOnly DataSources

    http://www.smartclient.com/smartgwtee/javadoc/com/smartgwt/client/data/DataSource.html#getClientOnly%28%29

    So it’s not really a matter of whether you can still use our “widgets”. There’s an extremely sophisticated databinding layer between widgets-as-such and communications – something that only exists in fledgling form in other systems.

    About EditableGrids and PagingGrids – it’s not entirely stylistic. Editing and paging at the same time is much, much harder than either problem on it’s own. Many frameworks have spent years at the level of maturity where they have each feature on it’s own but not both together.

    Like

  5. Quick note: For whatever reason your response was in my spam filters. I don’t know why it landed there (perhaps all the links? dunno–that shouldn’t be a disqualifier all by itself), but I moved it frontmost as soon as I found it.

    Like

  6. [One more try – please be mature enough to accept criticism and feedback if you yourself are going to post criticism and feedback publically]

    I love the slight here: “please be mature enough”–because up until now I haven’t. It’s a great way to insult someone while taking the high road. (“Hey, I was just trying to raise the level of discourse on your blog, you immature jerk.”)

    So–clearly you’ve read the “Art of Verbal Self-Defense” in order to get ideas how to bully other folks. Congratulations: between being passive-aggressive and extremely defensive about your product, you are slowly winning me over.

    To what, I’m not really clear.

    Publicly posted misconceptions can be damaging even when they appear to be marginalia.

    I clearly stated in my original post what amounted to opinion: “The fundamental problem I have…”. I’ve stated my case for why I don’t like what was done. And your response:

    “You’re wrong, you immature jerk.”

    Great. Wonderful. Nice, knowing my opinion is wrong.

    Had I said “it is impossible using SmartGWT to bring up a table interface with a data source that can sort against a column using less than a thousand lines of code” and you said “no; here’s 20 lines of code that does what you want”–then I’d deserve to be told I’m wrong. Because factually, I am wrong.

    But style and opinion are that: my style and my opinion based on my experience. When you go to someone else’s blog and tell someone their opinion is wrong and their style is wrong–well, tell me why exactly I shouldn’t write you and your whole sodding company off as a bunch of jerks?

    Now it has been my experience that creating monolithic objects with more than a few dozen methods makes understanding how those objects are supposed to work is a hell of a lot harder than intelligently breaking down the functionality into smaller, more manageable units of expression. It’s why we have words, sentences and paragraphs: otherwiseifthereisnowaytodiscernexactlywhattheboundariesarewithacomplexthoughtthepossibilityofunderstandingiscompletelyfracked.

    Thanks for bringing that doc issue to our attention. The doc is accurate (GWT translates your Java code to JavaScript) but not as clear as it could be. We’ll switch it to say “you create DataSources programmatically in client-side Java” or similar.

    If you do decide to build something monolithic, and thus make understanding virtually impossible because the number of controlling methods to express a particular UI element far exceeds the magic number 7, give or take 2, then you need more than some JavaDocs. You need an introduction (about one or two pages), then perhaps two to twenty (depending on need) pages on each major component in your system, gradually introducing concepts from the simplest to the most complex–always remembering never to introduce more than 7 give or take 2 methods at a time.

    In other words, the burden of understanding your system is on–well, you guys, since you built the damned thing and are trying so hard to convince the world how great it is that you take time on my insignificant blog to complain about how much of a jerk I am for not dropping immediately to my knees in prayerful worship.

    In fact, I’d suggest if you spent more time organizing your documentation in the style (say) of the old Macintosh System 6 or System 7 “Inside Macintosh” documentation set (get a copy at the used bookstore; it is a marvel to behold–makes the current iPhone or Mac OS X docs look like decaying chicken-feed) than you did trolling other people’s blogs, I may not have had the complaints I did in the first place.

    Like

  7. I’m sorry if you believe you were insulted, however, you weren’t actually called a jerk or any other name. I only asked you to be mature in the context of you (apparently) refusing to post a reply – good to hear it was just spam filtering.

    Well aware of the magic number 7, but frankly, there’s no way that the reference API is going to be anything less than a blizzard for a product that supports enterprise use cases. Our customers have requirements like using filtering, sorting, grouping, data paging and editing simultaneously, so there is going to be a class, somewhere, that supports all the properties involved. Note that it’s not actually monolithic, most of the properties related to a given function are nicely factored into related objects (eg sort/filter -> ResultSet, grouping -> Tree).

    It is true that overviews can alleviate the “blizzard” effect, and that’s why we have so many overviews and are always building more.

    The SmartGWT FAQ links to the most useful overview information, including the QuickStart Guide, which introduces the key properties of most of the larger widgets.

    http://forums.smartclient.com/showthread.php?t=8159

    Like

  8. “’m sorry if you believe you were insulted, however, you weren’t actually called a jerk or any other name. I only asked you to be mature in the context of you (apparently) refusing to post a reply – good to hear it was just spam filtering.”

    You still don’t seem to get it. Asking someone to “be mature” presumes they haven’t been mature. You may have said “stop being childish.”

    Or “stop being a stubborn idiot.”

    Like

  9. Wow! I am a Flex user currently, tasked with investigating a company-wide switch to something like GWT. Was very interested in SmartGWT (still am) and came across this post. I felt compelled to comment briefly here:

    William, you really need to calm down dude. The man was only trying to help, mostly (and also to rightfully attempt to do some damage control caused by your original post).

    That said, I’m sure you will flame me to ashes, but then, I’ll probably not re-visit this site anyway. Have a nice day.

    Like

    • “I’m sure you will flame me to ashes, but then, I’ll probably not re-visit this site anyway.”

      Let me see if I understand the gist of your comment: (a) I’m a jerk who needs to calm down. (b) I’m clearly a jerk who will (undeservedly) flame you to ashes because I apparently can’t calm down. (c) I’m such a jerk that you’ll not bother to revisit my site anyway.

      Then, with all due respect–why did you feel compelled to feed the person you think is a jerk?

      Like

  10. When it comes to defending their product from “inaccurate” accusations, which I beleive are caused by inadequate documentation, and examples (Yea, I know the smartgwt showcase, I mean some real-usecase examples such as the gwt stockwatcher); there is always a smartgwt representative giving advice to accept criticism. But when more than a considerable amount of developers complain about how inadequate the documentation is, they never seem to accept criticism. 🙂

    just my humble opinion.

    Like

    • The sad thing here is that the SmartGWT library is a great library. The widgets are damned nice looking, and it appears that–if you’re using their design models–it should be easy to go from 0 to 60 pretty quick.

      But most developers fail to carry it across the finish line by creating good documentation. In the case of SmartGWT, I suspect part of the lack of documentation comes from the fact that there are just so many customization levers in each of their fundamental objects that it would be difficult to adequately document the N2 combinations of interactions between those levers. But even so it would be pretty easy to create old Apple-style documentation (from the original “Inside Macintosh” days) of perhaps a one page introduction, a six to twenty page (per class) document on “so you want to use Dialogs”, “so you want to use Tables” with examples that illustrate how to create certain common styles–and have all that refer to the JavaDocs.

      I’m sure it would take them less time to build that document set (and the advantage of such a cursory introduction is it wouldn’t have to change much) than it would going around criticizing people like me with tiny little insignificant blogs like mine.

      Like

  11. I’ve been working around the clock for the past month to figure out how to use gwt and smartgwt, and still haven’t been able to use smartgwt’s forms to authenticate username/password combinations from my simple database. I’m glad to know that I’m not the only one who’s been having difficulty.

    Like

  12. Hey William,

    Sorry to see that all the comments on this post are hostile. Unfortunately, hostility is a real easy place to find yourself when commenting on other people’s blogs. When we are actually face to face, we normally find ourselves to be more civil.

    I like your post. Thanks. Finding documentation on SmartGWT can be pretty difficult, and lots of the times, I end up finding what I need in random places like obscure blog posts. Which might explain in part why ckendrick found your post so fast. The best place for documentation is on the SmartGWT forums, but still, finding what you are looking for is often like finding a needle in a haystack.

    I too have also been bothered by the fact that some classes in the API have >100 methods. Half of which have no Javadoc documentation, or have documentation that says no more than the name of the method itself. I agree that a better organized API would not put so many methods in a single class. That being said, UI framework are notoriously difficult to make right: work according to spec; performant; relatively easy to use for basic users; and relatively easy to use for advanced users. This is nearly an impossible task.

    I’ve also found some “attitude” responses to posts on the forum, which makes me hesitate to post this here. I don’t want to get mistreated the next time I need to go to the forum to ask a question, just because I posted a critical comment on some obscure blog!

    Like

  13. Hi William,

    I’d like to just follow up on my previous comment, if you don’t mind. I recently had a great experience where I encountered a SmartGWT bug, boiled it down to a simple test case, and submitted it to the SmartGWT forums. Within a couple of days, they had identified and fixed the problem, and put out a new snapshot release with the fix that I could use. The SmartGWT team was very helpful and professional through the whole thing. It sort of contrasted to the following Hibernate FAQ item that some of my coworkers and I were joking about the other day:

    http://web.archive.org/web/20071021233649/http://www.hibernate.org/117.html#A12

    I’m not sure how an open source project can end up being so contemptuous of, and condescending to, their own users.

    Some of the responses to help requests on the SmartGWT forum are curt, but almost always, the poster of the help request failed to provide the basic information needed to understand the problem and provide help or a fix. I’ve had three or four experiences where I posted a problem on the SmartGWT forums, and I’ve always gotten prompt advice there to help me solve my problem.

    Best, John

    Like

  14. Wow. Just… yeah. Wow.

    We were about to move forward with SGWT for our vertical app, but things like this have caused us to second think it. Or third…fourth…fifth.

    Like

    • Like I said before, I think the SmartGWT toolkit is a great framework. The lack of documentation–and the fact that it didn’t fit me for the reasons I listed months ago for reasons that to some appeared to be completely invalid–score this project as a negative in my mind. But if you can make the tools work, then more power to you: they’ve done the hard work of building a nice toolkit which not many people can do well.

      Like

  15. Unfortunately, that type of response is quite typical for Isomorphic. Smartgwt is quite powerful and complex. Their documentation is very detailed at the lower level, but often fails to give you context. And when you ask questions on their support forum, the responses are often condescending, typically of the RTFM variety instead of simply providing a link to the appropriate section or a snippet of code.

    Like

  16. I started evaluating smartgwt about 1 month ago, for 2 new projects i must develop.
    I’ve a degree in computer science and develop in java since 2000 and write code in general since i was 12, (started with commodore 64), so i’m not a newbie.
    I agree with Bill opinion: the Showcase example looks great and when you look it for the first time.
    What i thought was: i have a lot of examples working, the sc structure is perfect for most private application (tree menu, tabs where you can put your application code…).
    The first problem came when i tried to “feed” the various sgwt controls with data from a real DB.
    All of the SC examples take data from a local xml file or hardcoded in java classes.
    In the real world this is never the case.
    I don’t use the professional version because we are very experienced with db and specially hibernate, and always we build custom data layer.
    I started with an example and tried to “extend” the datasource.
    Nothing worked, played with some options and nothing again.
    Until in the forum discovered a guy (thanks to him) who posted a very clear example of a GWTRPCDatasource and finally it worked.
    As Bill said,this guy had to set 3 properties to a prticular value that made the example work.
    If you change or miss just one of this props the application simply doesn’t work.
    solved this problem i started again my work to implement a simple CRUD of a user table.
    Next stop was on a foreign key.
    Try to use the various Dynamic form and so on with a table who as a FK to another table and have fun.
    Finally i tried with this solution: a Listgrid fed by a datasource, on a dblclick a popup with a dynamicform shows detail of a row for editing witha save and cancel button.
    Fiirst of all a ComboBoxItem.setValueMap(LinkedHashmap) works only if k and v are String.
    then adding a form and buttons in a popup modal window disrupts the windows layout (for now i’m still experimenting) i tried various layouts and stacks but none of them worked.
    I’m still experimenting

    Like

  17. As a person who has been doing web design work since 1996, I have to strongly agree with Bill and others who have posted comments here — SmartGWT looks nice at first glance, but it is too full of holes to be useful. I’ve been working with it for about a week now, and I have already run up against numerous examples where you have to code around their default design decisions (who decided it was a good idea to, by default, put empty cells next to checkboxes unless you call “setLabelAsTitle” to true, thus causing a new unwanted behavior of putting the checkbox label in its own cell, thus detached from the checkbox????). I won’t even get into the fact that “rowSpan” doesn’t seem to work anywhere for any of the FormItem components. It’s straight-up ignored and I seem to be the only person in the universe who cares.

    Put simply, a UI framework is useful if it means you can spend less time coding the UI that you want. So far SmartGWT has caused me to spend much more time bashing my head against a wall trying to figure out how to code around their decisions (not to mention the significant lack of useful documentation).

    If you’re considering SmartGWT for a project, I would advise you to do some research first…

    Like

  18. I purchased the production version of smartgwt this year and was blown away at how much value it contains. I’ve never been more productive. As a biologist I don’t have formal training in programming but I was able to deploy a large sample tracking LIMs by myself. Smartgwt did the job of several programmers had I gone the consultant route —which I’ve done before. I HIGHLY RECOMMEND smartgwt. I found this blog whilst looking for some further docs on datasources and just couldn’t resist participating.

    The blog by Mr Woody is unfortunate as it seems he didn’t do a very thorough job in reviewing this tool.

    Like

    • My comments were not intended to be a review but a complaint about a specific design model which I personally dislike and the documentation that I found at the time. Keep in mind my comments are nearly 5 years old at this point, and in 5 years the library could have been completely rewritten several times.

      My specific complaint–and to me SmartGWT (at that time) represented what I see as a trend in the software development community as a whole–are frameworks which make a specific assumption about the problem domain they are attempting to solve, which have specific design patterns which are recommended for the framework’s use, but which fail to document either, and more often than not portray themselves as a general purpose solution.

      It’s like claiming that a scalpel is a general purpose tool suitable for carving turkeys as well as opening cans and taking out stubborn stains from clothing. A specific type of scalpel has a specific purpose and a specific way it is intended to be used–and when those things are documented well, a scalpel is a great–and in the areas it is designed for, an essential and vital–tool.

      Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s