Java – GWT: gotcha’s

My team is starting its first GWT project We are quite powerful for swing applications, and almost all our work involves a large number of swing GUIs

However, this is the first time that we are away from the desktop and network, and the project requires us to use GWT The project itself is very simple. The only thing we don't know is to replace swing UI with GWT UI

What pitfalls should we pay attention to?

Solution

I can think of several:

>Everything is asynchronous Well, any service orientation, anyway Although swing is sometimes synchronized through behaviors such as swing workers, swing is fundamentally synchronized through EDT (event scheduling thread) It may take a little habit; > You are in a world called CSS and cross - browser compatibility Although GWT does hide many differences between browsers, it will never hide them. You can spend hours looking for the source of pixel lines in GWT, just like in ordinary websites; > Swing has much less resources than GWT; > You can only use certain classes on the client What used to cause my problems was BigDecimal; > Your choice of widgets is more limited Whatever you do, avoid extgwt like plague Daryls is like General Jeffrey DAHMER; Ensure GWT 1.6 is used; > The compilation time of GWT is terrible; > If you only make client changes (that is, you do not change any service interfaces), you can view these changes without rebuilding Just refresh in the managed browser; > For server-side code changes that do not change the interface, please ensure that you have an ant or Maven task to rebuild and redeploy your classes without GWT reconstruction; > You can point the managed browser to a browser other than the managed server and use it for debugging; And > make sure your machine has a lot of ram My ide will lose memory errors in some applications. If less than a minute of ram is allocated to it, these are not huge applications I really recommend 2gig the absolute minimum of system RAM, preferably 3 or more

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>