Lessons Learned: SmartGWT 2.3 – Component Library for Google Web Toolkit
Join the DZone community and get the full member experience.Join For Free
I used SmartGWT 2.3 in my last project (duration: 6 months). I wanna share my experiences with that component library in the following.
IMPORTANT: All information is my personal opinion! I bought the SmartGWT Power license, but I used SmartGWT without commercial training or commercial support. Regard this, when you read my stated CONs!
What is SmartGWT?
SmartGWT is a component library for the Google Web Toolkit (GWT). Four different licences exists. The visual components are free (LGPL). Three further licences exist. These licences offer several additional features and components such as data binding, a “push”-implementation or Hibernate integration. We chose the Power Edition. SmartGWT is maintained by SmartClient. SmartClient also offers commercial support.
- Many good components (almost everything you can imagine). Look at the showcase. All components are displayed including source code examples.
- Verbose documentation and API. Every class has good documentation.
- Support for many technologies and frameworks (Hibernate, JMS, REST, WSDL, Microsoft Excel, and so on)
- Good performance. About 5000 data entries are inserted daily into one table. Thanks to “Live-Scrolling”! The initial loading of the web application takes some seconds, but that is no problem of SmartGWT, but a characteristic of every client-centric Rich Client / Rich Internet Application.
- You have to learn a totally new API. You know GWT, you know JPA, Hibernate or JDBC? Does not really matter! You just use the SmartGWT API. That is a problem especially for getting started and for maintenance, because other developers also first have to learn one more API.
- Almost no public information available (books, tutorials, blogs, articles, talks at conferences, best practices).
- No tutorials for realizing some (at least a little more complex) use cases. [UPDATE January 2011:] SmartGWT EE 2.4 released including much more extensive documentation and a good quick start guide!
- Commercial support is expensive. First we wanted to buy support (for some hundred dollars we thought), but it costs approximately as much as the SmartGWT Power license itself.
- Sometimes bad forum support. You get an answer to almost every posted question. But that answer often does not help. They ask you things such as “why do you want to do that”. Or they say: “use our tool and do XYZ with it” three times, although again and again I told them this suggestion does not work. After a few answers to a question the final answer is: “you need training, buy our support”. So you can either buy the support or try to find a workaround by yourself – and that can take a long time because you do not know the internals of SmartGWT and there is no public information such as a book, which you can “ask”.
- Promises to reduce boilerplate code because it automatically does the connection and integration to the database (create, read, update, delete) – that is true. But solely if you do not want to change anything and just use the basic behaviour. If I wanted to change just a small piece, I updated the automatically generated, huge XML mapping files or used setter-methods within the Java Code. If I just re-generated the mapping file, custom changes (e.g. specific WHERE-clauses) were overwritten, too. I could not find a better way. Thus, I do not see any benefit in using this server-side integration of SmartGWT instead of plain Hibernate or JDO and GWT RPC or REST communication. You just have one more abstraction layer to learn.
At first glance, SmartGWT is a gift for you. The
components are integrated in your web application easily. Your prototype
is realized very fast (with dummy data instead of a real datasource).
But the server-side integration is a lot of effort.
We had a lot of problems to solve and workarounds to find. Of course, you also have problems with other frameworks, but you have public information to look at for solutions.
Finally, SmartGWT did not save any development time (in my opinion! Some team members have another opinion and think it saved development time). Additionally, the project cannot be maintained by other developers, expect they also invest a lot of time in the SmartGWT API.
Would I use SmartGWT again?
Yes and no.
The components are great! They are easy to integrate and save a lot of development time. So we would use the client-side again.
The server-side integration is time-consuming and has no advantages for our team (again: my opinion, some team members have another opinion and think it saved development time). If we had used JDBC, MyBatis or Hibernate for persistence and GWT RPC or REST for client-server-communication, then we would have finished the project with the same expenditure of time. But with some advantages: We know what we do. SmartGWT is one more abstraction level, and that is not an advantage in my opinion. Also, other developers can maintain the web application in the future, because they already know Hibernate or EclipseLink or Toplink (if you know one OR-Mapper, you can use them all).
Finally, I (again: me, not other team members) would use the client-side again, but not the server-side. Paradoxically, SmartClient earns money solely with the server-side stuff or the (proportionally too expensive) support.
SmartGWT is a very nice component library, but maybe the guys at SmartClient should rethink about their business model, if they want to acquire more customers.
Do you have the same expericences? Or do you disagree? Please make a post and tell me…
Kai Wähner (Twitter: @KaiWaehner)
Opinions expressed by DZone contributors are their own.