<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;CkQGRH0zfSp7ImA9WhdREEs.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756</id><updated>2011-07-30T14:12:05.385-07:00</updated><title>GWT Tutorials</title><subtitle type='html'>This blog isn't about me. Who cares about me - no one. It's about stuff I find interesting and useful. Now it is about GWT.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default?redirect=false&amp;v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry gd:etag='W/&quot;CkQGRH0ycCp7ImA9WhdREEs.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756.post-609623675849087906</id><published>2011-07-30T13:58:00.000-07:00</published><updated>2011-07-30T14:12:05.398-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-07-30T14:12:05.398-07:00</app:edited><title>GWT - communicating with PHP via JSON</title><content type='html'>&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt; Finally something useful :) I'll show you my implementations of JSON communication. Of course it took some time before I found out how to do everything myself.&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; Note that this works only if your application is on the same domain and port with the server you are talking with. See my previous post&amp;nbsp;&lt;a href="http://chocis.blogspot.com/2011/07/thinking-ahead-gwt-server-side-java-or.html"&gt;http://chocis.blogspot.com/2011/07/thinking-ahead-gwt-server-side-java-or.html&lt;/a&gt;&amp;nbsp;. Otherwise you have to use JSONP.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;b&gt;Creating POST parameters&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; When you want to post parameters, a String according to&amp;nbsp;standard&amp;nbsp;has to be created. I implemented a class that does it for me:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;public class PostParameters {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;public String parameters = ""; &lt;span class="Apple-style-span" style="color: #38761d;"&gt;&amp;nbsp;//String with all parameters&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="background-color: #fff2cc; white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;public PostParameters() {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="background-color: #fff2cc; white-space: pre;"&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-tab-span" style="background-color: #fff2cc; white-space: pre;"&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;public void addParameter(String name, String value){&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;parameters+=URL.encode(name);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;parameters+="=";&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;parameters+=URL.encode(value);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;parameters+="&amp;amp;";&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;}&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: white;"&gt;All parameters have to be URL encoded. Usage can be seen in&lt;i&gt; Making request&lt;/i&gt; topic.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;b&gt;Making request&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;public void login(){&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  PostParameters params = new PostParameters();  &lt;span class="Apple-style-span" style="color: #38761d;"&gt;//the class containing post parameters&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  params.addParameter(&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;"name"&lt;/span&gt;, nameTxtBox.getText());&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, &lt;span class="Apple-style-span" style="color: #0b5394;"&gt;"php/login.php"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;builder.setHeader(&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;"Content-Type"&lt;/span&gt;,&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;"application/x-www-form-urlencoded"&lt;/span&gt;);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;builder.setTimeoutMillis(20000);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;try {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;Request request = builder.sendRequest(params.parameters, new RequestCallback() {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void onError(Request request, Throwable exception) {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Window.alert(exception.getMessage());&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;public void onResponseReceived(Request request, Response response) {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (200 == response.getStatusCode()) {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;handleLogin(response.getText()); &lt;span class="Apple-style-span" style="color: #38761d;"&gt;&amp;nbsp;//this function is called when everything ok&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} else {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp;Window.alert(response.getStatusText());&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;});&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;} catch (RequestException e) {&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;Window.alert(e.getMessage());&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;}&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
In handleLogin() function is response parsing process, which is explained further.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &lt;b&gt;My JSON syntax&lt;/b&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-p0q8T--symQ/TjReMf-7dgI/AAAAAAAAACk/sRGCBq54koM/s1600/detail_iheartjson_bg.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-p0q8T--symQ/TjReMf-7dgI/AAAAAAAAACk/sRGCBq54koM/s200/detail_iheartjson_bg.jpg" width="128" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; All my responses have text "results:"...you can do without it...I don't know why I started using it, but that's how my server does :)&lt;br /&gt;
&amp;nbsp; For simple info you can send something like this (this comes from server):&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;{'results': {'successfulLogin': 'true'}}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="white-space: pre;"&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt; Or something like this:&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="font-family: monospace; white-space: pre;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;div class="netInfoResponseText netInfoText " role="tabpanel" selected="true"&gt;&lt;pre role="list"&gt;"results": {
        "receivedSentData": [
            {
                "uuid": "10f6a663-2840-41b9-b726-91359ec7cf95",
                "regNr": "11-XXX",
                "regDate": "2011-07-11",
                "correspondent": "Mr John",
                "howReceieved": "e-document"
            },
            
        ],
        "files": [
            
        ],
        "folders": [
            {
                "author": "okmAdmin",
                "created": "2011-07-29T08:53:42.845+03:00",
                "hasChilds": false,
                "path": "\/okm:root\/LIETVDS_VDC\/2011\/IEN\/11-XXX",
                "permissions": 15,
                "subscribed": false,
                "uuid": "10f6a663-2840-41b9-b726-91359ec7cf95"
            },
            
        ],
        "totalRows": 1,
        "startRow": 0,
        "endRow": 1
    }
}&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;This is an example of data which I receive when populating a table. In receivedSentData I have info from database, in files and folders I have info about documents from document system. Doesn't matter...now I'll show how to parse them in GWT.&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;How it works&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;GWT has some great classes for JSON parsing, but firstly you have to use JavaScript's native function eval() which just executes received JSON data and that way you can get data object.&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Personally I created a static class which parses all server responses.&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="background-color: #fff2cc; font-family: Times, 'Times New Roman', serif;"&gt;public class MyParser {
 public static native JavaScriptObject parseJson(String responseString) /*-{
   return eval('('+responseString+')');
 }-*/;
}&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;And then it's very easy to use this parser for every response:&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="background-color: #fff2cc; font-family: Times, 'Times New Roman', serif;"&gt;JSONObject json = new JSONObject(MyParser.parseJson(responseString));&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Now JSONObject has the received data and can be easily parsed out. For example this is how I get all the "results" data.&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;&lt;span class="Apple-style-span" style="background-color: #fff2cc;"&gt;JSONObject ary = json.get("results").isObject()&lt;/span&gt;; &lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;Then I can get receivedSentData array or any other object with just providing keyword:&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="background-color: #fff2cc; font-family: Times, 'Times New Roman', serif;"&gt;JSONArray dataArray = ary.get("receivedSentData").isArray();&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;And then from array:&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="background-color: #fff2cc; font-family: Times, 'Times New Roman', serif;"&gt;dataArray.get(i).isObject().get("regNr").isString().stringValue();&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="background-color: #fff2cc; font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Times, 'Times New Roman', serif;"&gt;You can add all this parsing code in try catch blocks, so when server responds with an invalid JSON that can't be parsed, an exception occurs and you can show it.&lt;/span&gt;&lt;/pre&gt;&lt;pre role="list"&gt;&lt;span class="Apple-style-span" style="font-family: Times, 'Times New Roman', serif;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8850940645657481756-609623675849087906?l=chocis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/609623675849087906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chocis.blogspot.com/2011/07/gwt-communicating-with-php-via-json.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/609623675849087906?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/609623675849087906?v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/2011/07/gwt-communicating-with-php-via-json.html' title='GWT - communicating with PHP via JSON'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='07474109698985959527'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-p0q8T--symQ/TjReMf-7dgI/AAAAAAAAACk/sRGCBq54koM/s72-c/detail_iheartjson_bg.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CEcCRHs_eyp7ImA9WhdREEg.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756.post-1293286482108860197</id><published>2011-07-30T11:54:00.000-07:00</published><updated>2011-07-30T11:54:25.543-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-07-30T11:54:25.543-07:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='new project'/><title>GWT - Creating new project and removing unnecessary stuff</title><content type='html'>&amp;nbsp; This is an easy step, but as always there are some secrets - what to do better...at least what was better for me.&lt;br /&gt;
&amp;nbsp; 1. Create new web application&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-bqE-Xu_oDGo/TjRGQ7bGHvI/AAAAAAAAACM/r2OQ3BfmVJU/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="310" src="http://2.bp.blogspot.com/-bqE-Xu_oDGo/TjRGQ7bGHvI/AAAAAAAAACM/r2OQ3BfmVJU/s400/Untitled.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;2. Insert project name, package name. As you can see I am putting my projects in Apache's public folder (read my last post for reasons). &amp;nbsp;&lt;span class="Apple-style-span" style="color: red;"&gt;Uncheck &lt;/span&gt;Google App Engine, because when I started using GWT, didn't understand why my project doesn't work when there is no Internet connection...this was the reason...GWT was communicating with some kind App Engine's API online. And leave sample code checkbox enabled.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Wal2eUK01pY/TjRIH1NHagI/AAAAAAAAACQ/ApB5Mq_6dFo/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-Wal2eUK01pY/TjRIH1NHagI/AAAAAAAAACQ/ApB5Mq_6dFo/s400/Capture.PNG" width="315" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp; 3. Then you can delete&amp;nbsp;unnecessary&amp;nbsp;files ...&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-MlYNd2PPnVw/TjRNF1tPJyI/AAAAAAAAACU/EsUUqQRV67o/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-MlYNd2PPnVw/TjRNF1tPJyI/AAAAAAAAACU/EsUUqQRV67o/s400/Untitled.png" width="296" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp; 4. You can delete everything in&lt;span class="Apple-style-span" style="color: #0b5394;"&gt; projectName.css. &lt;/span&gt;Have to delete heading and table tags in &lt;span class="Apple-style-span" style="color: #0b5394;"&gt;projectName.html&lt;/span&gt;. And &lt;span class="Apple-style-span" style="color: #0b5394;"&gt;web.xml&lt;/span&gt; has descriptions of servlets. Hopefully servlets were deleted, when you deleted files, but if they still are there just remove them, or else it won't be possible to compile project.&lt;br /&gt;
&amp;nbsp; 5.You could have left projectName.java file undeleted and just removed unnecessary code, but it's easier to delete and just create a new one like this....&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-KpPBnSsLX3I/TjRPA4D7gPI/AAAAAAAAACY/ne6Y2d8uxNU/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="361" src="http://4.bp.blogspot.com/-KpPBnSsLX3I/TjRPA4D7gPI/AAAAAAAAACY/ne6Y2d8uxNU/s400/Untitled.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;6. Now you can choose design mode, add a button and add click event to it....easy. At first I was confused when didn't see the Design tab. When it happens you just have to right click your file and choose&lt;br /&gt;
&amp;nbsp;Open With -&amp;gt; GWT Designer.&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-RwBWtUwntOE/TjRQYFwWOPI/AAAAAAAAACc/Xnofk2qMSOI/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="312" src="http://4.bp.blogspot.com/-RwBWtUwntOE/TjRQYFwWOPI/AAAAAAAAACc/Xnofk2qMSOI/s400/Untitled.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&amp;nbsp; When everything is ready right click project, choose Debug As -&amp;gt; Web Application (running on external server)... choose this option if your project is in Apache directory as I told in previous post. Otherwise choose just Web Application. Click the link, install browsers plugin, and &amp;nbsp;there you have...your project is running. :)&lt;br /&gt;
&amp;nbsp; After that if changes are made to source code, only browser has to be reloaded. No need of restarting applications debug mode. And when application is ready, choose Compile Project. Then everything in war folder can be put on server and your web application is ready.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8850940645657481756-1293286482108860197?l=chocis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/1293286482108860197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chocis.blogspot.com/2011/07/gwt-creating-new-project-and-removing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/1293286482108860197?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/1293286482108860197?v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/2011/07/gwt-creating-new-project-and-removing.html' title='GWT - Creating new project and removing unnecessary stuff'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='07474109698985959527'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-bqE-Xu_oDGo/TjRGQ7bGHvI/AAAAAAAAACM/r2OQ3BfmVJU/s72-c/Untitled.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CUMGRno8eSp7ImA9WhdREEk.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756.post-3270490988781067411</id><published>2011-07-30T09:30:00.000-07:00</published><updated>2011-07-30T09:30:27.471-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-07-30T09:30:27.471-07:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='JSONP'/><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='JSON'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Server side'/><title>Thinking ahead - GWT server side : Java or PHP</title><content type='html'>&amp;nbsp; &amp;nbsp;I think this is very important topic, because I struggled many times with server&amp;nbsp;communication, because it wasn't well explained in&amp;nbsp;documentation.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Working with my project, I had to decide what will be used on server side. As it was recommended on GWT web page to use Java, I thought to give it a try (but changed later to PHP). GWT has great interface for using Java on server side.&amp;nbsp;&lt;a href="http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html"&gt;http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html&lt;/a&gt;&amp;nbsp;You just have to write server side classes on the same project...and that's all. Then it is very easy to use these functions...because you don't have to worry about data sending types, names, response parsing... it is just like calling simple function. BUT, because I am not a Java guy I couldn't do many things that had to be accomplish on server (e.g. file uploading with JumpLoader, sessions). And of course there is the problem with Java servers JBoss, GlassFish a.o. --- I just think they are hard to configure. So then I decided to use PHP with Apache...easy and proven value.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;b&gt;Application development - debug mode&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;Before I continue, something has to be explained - how application development works.&lt;br /&gt;
&amp;nbsp; &amp;nbsp;When you are writing code and want to test it, you have to do it in Debug mode - because the compilation to JavaScript takes some time. There are two ways how you can launch the debug mode :&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&amp;nbsp;normal Web application - then some kind of GWT's Java server (named Jetty) is started and server side code is executed on it - great if you are developing with Java server code. And can be used if there is no communication with server, just a static web page with widgets or something else. I guess Jetty server doesn't support PHP.&lt;/li&gt;
&lt;li&gt;Web application (running on external server) - then Jetty isn't launched, and you don't need one, because the communication is done with PHP via JSON or XML (recommend JSON). BUT then arises one big problem I struggled with for many hours....&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; If you put project in default Eclipse workspace path and launch normal Web application mode, then 1)you have to use full url for server requests (e.g.&amp;nbsp;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;http://localhost/ManagementSystem/php/login.php&lt;/span&gt;) 2)You can't make normal AJAX requests, because browsers implement SOP (Same Origin Policy). In short - browsers forbid to use data from different host or port (in our case Jetty and Apache ports are different).&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-KwCsDQVdXL4/TjQqsYcWZlI/AAAAAAAAACE/UPhZ5O0ewkc/s1600/proxy21.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="261" src="http://2.bp.blogspot.com/-KwCsDQVdXL4/TjQqsYcWZlI/AAAAAAAAACE/UPhZ5O0ewkc/s320/proxy21.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; There are workarounds explained here&amp;nbsp;&lt;a href="http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html"&gt;http://code.google.com/webtoolkit/doc/latest/tutorial/Xsite.html&lt;/a&gt;&amp;nbsp;, but they are just confusing everything. At the beginning of project I used JSONP requests and everything worked, but the code was complicated and that way you can send data only with GET method. I think IE has some restrictions with url (GET) length. There are situations when you really need to do such a request, i.e. for some kind of a Yahoo service, but that wasn't my case. I will later write an article about how to implement this JSONP with some source code.... the one on GWT's web page is missing something.&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;a name='more'&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; IF you launch web application (running on external server) then it must be&amp;nbsp;accessible for Apache. 1)You can configure Apache to give access to pages on Eclipse's default workspace directories. 2) Put your project on Apache's public directory (what i did). When creating a project, I just put it in xampp/htdocs/ directory ( Linux would be /var/www/ ). &amp;nbsp; &amp;nbsp;And...yeah I am using Windows for GWT development, because Linux's Eclipse hurts my eyes :)&amp;nbsp;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-OKV11i3b5T0/TjQur4t4FyI/AAAAAAAAACI/Tgyz4pkUmMI/s1600/my-eyes-hurt.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="190" src="http://2.bp.blogspot.com/-OKV11i3b5T0/TjQur4t4FyI/AAAAAAAAACI/Tgyz4pkUmMI/s320/my-eyes-hurt.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; This way all your project is accessible via browse&lt;span class="Apple-style-span" style="background-color: white;"&gt;r&lt;span class="Apple-style-span" style="color: #0b5394;"&gt; &lt;span class="Apple-style-span" style="font-family: inherit;"&gt;http://localhost/ProjectName/war/ProjectName.html&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;.&lt;/span&gt; You can make a php directory and then requests can be made by &lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;php/requestFile.php&lt;/span&gt; . Simple, no problems. And when you are making your application&amp;nbsp;publicly&amp;nbsp;available, just take the war directory and put it on server.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8850940645657481756-3270490988781067411?l=chocis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/3270490988781067411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chocis.blogspot.com/2011/07/thinking-ahead-gwt-server-side-java-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/3270490988781067411?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/3270490988781067411?v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/2011/07/thinking-ahead-gwt-server-side-java-or.html' title='Thinking ahead - GWT server side : Java or PHP'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='07474109698985959527'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-KwCsDQVdXL4/TjQqsYcWZlI/AAAAAAAAACE/UPhZ5O0ewkc/s72-c/proxy21.gif' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;D08HQX8_fyp7ImA9WhdREE8.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756.post-6700858570143935766</id><published>2011-07-30T04:37:00.000-07:00</published><updated>2011-07-30T04:37:10.147-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-07-30T04:37:10.147-07:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='Tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><category scheme='http://www.blogger.com/atom/ns#' term='install'/><category scheme='http://www.blogger.com/atom/ns#' term='Eclipse'/><title>Installing GWT - Tutorial</title><content type='html'>&amp;nbsp; &amp;nbsp;First thing you need to do is install GWT on your computer. It's very simple if you are going to use Eclipse - it's possible to download SDK&amp;nbsp;separately, but I don't think it's necessary. Only once when there was an error in newest GWT plugin update, I downloaded SDK and configured Eclipse to use it.. but that was only for a while.&lt;br /&gt;
&lt;br /&gt;
Installation steps:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Download Eclipse&amp;nbsp;&lt;a href="http://www.eclipse.org/downloads/"&gt; http://www.eclipse.org/downloads/&lt;/a&gt;&amp;nbsp;if you don't have it already installed&lt;/li&gt;
&lt;li&gt;Install GWT SDK plugin&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-QQo1dn8NYfw/TjPoASb0jvI/AAAAAAAAACA/IMJ0Ac82eL8/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="343" src="http://4.bp.blogspot.com/-QQo1dn8NYfw/TjPoASb0jvI/AAAAAAAAACA/IMJ0Ac82eL8/s400/Untitled.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; And insert link from this site &lt;a href="http://code.google.com/eclipse/docs/download.html"&gt;http://code.google.com/eclipse/docs/download.html&lt;/a&gt;&amp;nbsp;according to your Eclipse version. There are detailed instructions if you need. If you don't know your Eclipse version here is a good description how to find it out -&amp;nbsp;&lt;a href="http://www.thinkplexx.com/learn/howto/ide/eclipse/find-out-exact-eclipse-version"&gt;http://www.thinkplexx.com/learn/howto/ide/eclipse/find-out-exact-eclipse-version&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;3. Install Designer plugin, so you will be able to drag and drop widgets just like in normal desktop application development. Use the same steps from previous plugin installation and insert link according to your &amp;nbsp;Eclipse version -&amp;nbsp;&lt;a href="http://code.google.com/webtoolkit/tools/download-gwtdesigner.html"&gt;http://code.google.com/webtoolkit/tools/download-gwtdesigner.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&amp;nbsp; Now you don't have to worry about anything, because the newest versions will be downloaded automatically, so you will have the newest framework and features.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8850940645657481756-6700858570143935766?l=chocis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/6700858570143935766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chocis.blogspot.com/2011/07/installing-gwt-tutorial.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/6700858570143935766?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/6700858570143935766?v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/2011/07/installing-gwt-tutorial.html' title='Installing GWT - Tutorial'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='07474109698985959527'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-QQo1dn8NYfw/TjPoASb0jvI/AAAAAAAAACA/IMJ0Ac82eL8/s72-c/Untitled.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;C0QCSXw5eip7ImA9WhdSGU8.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756.post-6127516028352988400</id><published>2011-07-28T23:36:00.000-07:00</published><updated>2011-07-28T23:36:08.222-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-07-28T23:36:08.222-07:00</app:edited><category scheme='http://www.blogger.com/atom/ns#' term='Tutorial'/><category scheme='http://www.blogger.com/atom/ns#' term='GWT'/><title>GWT - What is it and how I use it in my project   -  Tutorials</title><content type='html'>&amp;nbsp; &amp;nbsp;Now I am working on a document system project. Requirements - web interface, desktop alike application, document upload, viewing, editing, security and so on. So I needed a framework, which could satisfy those requirements. Of course everything can be made in pure PHP and javascript, but the web is developing, so I decided to use some kind of a new technology. Gmail is created with GWT, and maybe even this blogging site.&lt;br /&gt;
&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-CWQalShOjfM/TjJTvG38zcI/AAAAAAAAAB0/mMwdYCLDsAo/s1600/gwtlogo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="160" src="http://2.bp.blogspot.com/-CWQalShOjfM/TjJTvG38zcI/AAAAAAAAAB0/mMwdYCLDsAo/s320/gwtlogo.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&amp;nbsp; &amp;nbsp;In short about GWT - It's Google's project, where you can write Web application in Java and then it is compiled to pure JavaScript.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href="http://code.google.com/webtoolkit/overview.html"&gt;http://code.google.com/webtoolkit/overview.html&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Advantages:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Use (Eclipse or&amp;nbsp;NetBeans) IDE - syntax check,&amp;nbsp;auto complete, debugging, compile time error checking.&lt;/li&gt;
&lt;li&gt;Source code is compiled as small as possible (with variables a, aa...).&lt;/li&gt;
&lt;li&gt;JavaScript is compiled for each browser&amp;nbsp;separately, so you don't have to worry about that. And the code is using each browser's specific functions, so it is faster.&lt;/li&gt;
&lt;li&gt;Page (application) is loaded only once, everything else - pure Ajax&lt;/li&gt;
&lt;li&gt;JUnit testing (haven't used it myself)&lt;/li&gt;
&lt;li&gt;Can work without JavaScript knowledge&lt;/li&gt;
&lt;li&gt;Can include third party libraries (I am using SmartGWT), jQuery is possible&lt;/li&gt;
&lt;li&gt;Server side can be Java, PHP or other&lt;/li&gt;
&lt;li&gt;Use of designer (drag and drop Widgets)&lt;/li&gt;
&lt;li&gt;...............&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;Disadvantages:&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;ul&gt;&lt;ul&gt;&lt;li&gt;Not so straightforward including pure JavaScript (at first)&lt;/li&gt;
&lt;li&gt;GWT default Widgets lack of richness - must implement yourself (or use extra library)&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;&lt;/ul&gt;&lt;div&gt;&amp;nbsp; &amp;nbsp;In other words, I highly recommend using GWT in your projects...maybe because I haven't used other frameworks...but why should I, if I'm not disappointed :)&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8850940645657481756-6127516028352988400?l=chocis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/6127516028352988400/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chocis.blogspot.com/2011/07/gwt-what-is-it-and-how-i-use-it-in-my.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/6127516028352988400?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/6127516028352988400?v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/2011/07/gwt-what-is-it-and-how-i-use-it-in-my.html' title='GWT - What is it and how I use it in my project   -  Tutorials'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='07474109698985959527'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-CWQalShOjfM/TjJTvG38zcI/AAAAAAAAAB0/mMwdYCLDsAo/s72-c/gwtlogo.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;Dk4NRn07cSp7ImA9WhdSGEo.&quot;'><id>tag:blogger.com,1999:blog-8850940645657481756.post-306280737800022332</id><published>2011-07-28T10:43:00.000-07:00</published><updated>2011-07-28T10:43:17.309-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-07-28T10:43:17.309-07:00</app:edited><title>Losing virginity</title><content type='html'>&lt;div style="text-align: left;"&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Hi&lt;/b&gt;, all my readers ( I hope at least my girlfriend will read this) :). This is my first post and first blog and first public &amp;nbsp;using of English language, so please don't judge me... I guess first posts will get some help from Google Translate ;)&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-ceJ9CHXwnbI/TjGcCCsoiWI/AAAAAAAAABs/ajqRbqLjJJ8/s1600/Capture.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://4.bp.blogspot.com/-ceJ9CHXwnbI/TjGcCCsoiWI/AAAAAAAAABs/ajqRbqLjJJ8/s400/Capture.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&lt;b&gt;Little about this blog&lt;/b&gt; - first I thought I should make two blogs - one with geeky technical stuff and other for mortals, who can read and understand something. But as I gave a little thought,&amp;nbsp;understood&amp;nbsp;that no one is going to be interested in the normal stuff, because .... well who cares. There is Twitter now where everyone can follow and get the newest information...no point of going to my page and read everyday stuff.&lt;br /&gt;
&amp;nbsp; &amp;nbsp; So this is going to be my &lt;b&gt;TUTORIAL blog&lt;/b&gt;. Most of it will contain information about technical stuff (programming, computer science), but I will try to include other interesting stuff too - e.g. last year I began learning guitar for my self, so now I think I could make some kind of a tutorial or progress - how, where to find information, where to start. If I knew that stuff earlier, it would be great, that's why I've always wanted to contribute my knowledge, so no one should struggle with these stuff.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; Are you asking, what is going to be the technical stuff? If you are not, then...I will tell anyway. In short - I am IT specialist (not a big one - learning now to get Masters degree) and I've worked for some projects where I encountered many new stuff that was very interesting, but lacked of more documentation. So I thought - &amp;nbsp;tutorial blog it is. hell yeah. My project experience - C#, PostgreSQL, MySQL, PHP, HTML, JavaScript, Qt and now GWT (Java , SmartGWT). There is good amount of information about C#, PHP bla bla, but Qt and GWT aren't so widespread that's why I will write some info about those technologies, mostly about GWT while I am on a project using this framework.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; I will try of course to add posts about technical stuff that can be understood by someone who is using computer just for fun. If any friend is going to read my blog, maybe I can post some tutorial about...don't know emmm.. general information - what is Linux and why aren't you using it :)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; C ya.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8850940645657481756-306280737800022332?l=chocis.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://chocis.blogspot.com/feeds/306280737800022332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://chocis.blogspot.com/2011/07/losing-virginity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/306280737800022332?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8850940645657481756/posts/default/306280737800022332?v=2'/><link rel='alternate' type='text/html' href='http://chocis.blogspot.com/2011/07/losing-virginity.html' title='Losing virginity'/><author><name>chocis</name><uri>http://www.blogger.com/profile/09349391814681539234</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='07474109698985959527'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ceJ9CHXwnbI/TjGcCCsoiWI/AAAAAAAAABs/ajqRbqLjJJ8/s72-c/Capture.PNG' height='72' width='72'/><thr:total>0</thr:total></entry></feed>