SmartClient or SmartGWT?
Asked Answered
C

6

10

Besides the obvious differences between JavaScript and Java, what are the relevant differences in using either SmartClient or SmartGWT?

Came answered 21/4, 2010 at 17:16 Comment(0)
O
8

SmartGWT is the GWT wrapper for SmartClient, which, as you say, means that you're able to write your SmartGWT app using java.

From my experience the only difference that matters when you're programming is that the GWT wrapper is a bit more restrictive than using the js components directly. For example, programmatically scrolling a TreeGrid from java is hell, since the body of the underlying table (that you need to get at in order to scroll the blasted thing) is not exposed through SmartGWT, while it of course is easily reachable from js.

Overall I wouldn't base the choice between the js components and the gwt wrapper soley on these differences, but I would look at other factors in your project. Which techniques are you most comfortable with? How much custimization are you planning on doing?

Oftentimes answered 22/4, 2010 at 10:57 Comment(4)
Let me put it this way: if SmartGWT is just a wrapper, do you see any point in using it instead of using SmartClient directly? Besides the static typing nature of Java, what does SmartGWT bring to the table?Came
Besides the static advantages of using java, no, there is nothing I can think of. In the end I suppose it depends on what sort of project you're running, and what sorts of skills you have.Oftentimes
Note that the particular problem you're referring to (inability to get to the body) was solved a long time ago with this and other APIs: smartclient.com/smartgwtee/javadoc/com/smartgwt/client/widgets/…Milliard
One significant difference that wasn't mentioned here - is Deferred Binding. Isn't SmartGWT faster because it uses it as based on gwt? You get different html page versions for different browsers, which are optimized, faster for each one.Dementia
P
5

In my case, code maintainability.

We are a Python house. But for client-side code we opt for GWT, initially with GXT, but now with SmartGWT.

We don't like Java, but we don't like JS much more, Order, maintain libraries for several widgets, extends objects to give custom functionality, etc. between doing this in JS or Java, the option was obvious, Java side. We write reusable components here, and now we write very minimal code for client side, only reuse components and use REST to comunicate with ours Python backends.

We know that SmartGWT is more verbose than SmartClient, but, with Netbeans autocompletion (some coleagues here use Eclipse) we have direct access to every method, documented, instead to go to the showcase or google every time that we need to test and try new functionality.

Pose answered 28/1, 2011 at 15:37 Comment(0)
T
2

SmartGWT provides you the advantage that you may use powerful editors.

You can debug your own code easily (however it's not very helpful for diving into the smartclient code itself).

You have all the auto completion stuff of eclipse/netbeans at hand. When starting to work with SmartClient/Gwt it helps you find the things you are looking for because the editor can list you classes or the available methods and some basic documentation what the class/method actually does. Saves you a lot of time crawling through the docs

Thiamine answered 22/4, 2010 at 22:25 Comment(2)
dube, those are differences found in any Java vs JavaScript technology. They are not specific to SmartGWT and SmartClient.Came
Just wanted to mention it since I cannot know what background you have and for myself, it makes the big difference wheater to use smartclient/gwt in the first place. Also it's the first time you really can compare those two languages because they really give the same result. I do not intend to ever touch javascript directly again after working with gwt :)Thiamine
J
2

We chose to use Javascript (no SmartGWT) ... I prefer it that way, although some of our team members (newer to Javascript) would have preferred the SmartGWT way. Both have their pros and cons :

One of the advantages of using SmartGWT, is that you get to have compile time errors since everything gets compiled first by the Java compiler, before it gets rendered to Javascript.

One of the drawbacks of SmartGWT, is that it doesn't expose the full underlying Javascript Smartclient API. This means, if you want to do more advanced stuff, you might end up needing to do it in Javascript anyways.

Another drawback of SmartGWT, productivity wise, is that every single change you do and want to test, needs to go thru the painful Java EE compile/deploy process, whereas if you do it in Javascript, you can alter client side code faster by changing .js files directly without the need for the whole compile/deploy process.

Jungjungfrau answered 17/5, 2011 at 0:14 Comment(0)
C
1

Banang : API's to access ListGrid / TreeGrid body are now exposed in Smart GWT.

Cantonment answered 3/5, 2010 at 14:54 Comment(0)
O
0

SmartGWT is based on java code and when compiled it transforms it into java script, is a heavy since it transforms java code into js

SmartClient is a framework based on js, you can use its components in an xml page and you manipulate them in Js, and it’s light

le showcase de smartclient I recommend smartClient

Olivares answered 17/1, 2020 at 7:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.