Well i tried GWT a few days ago and liked it very much. I'm not a js expert and for that reason dont use it too much in my web applications. But from time to time i need some fancy client-side apps to do ajaxian stuff easily. I had written an Independent Django app which was an ajax-driven event calendar. Therefore i did most of the work remotely via Django. I used jquey for ajaxian calls. But if i were a better js programmer i would do that job with less remote calls. But the Magic in GWT is cool you create your application with Java ; a very cool and easy language and it converts the written code into javascript which is compatible with most of the browsers. Therefore you dont bother with strange behaviour of the js and dont bother about if your code will run on BrowserA or BrowserX.
I followed the tutorial in GWT site and had a running application (StockWather). To complete that tutorial you probbaly would need to complete the StockWatcher firstly and then go on from here or you can just pull the code i wrote for that purpose from here[1] and just inspect it.
For communication of both ends i used XML,if you're not a fan of it you can use JSON also. I didnt use JSON because of the JSNI usage in Java code. I dont like hybrid codes like that...
Well that is all,it took some time to glue both of them (Django and GWT) but we have here a happy end :) GWT is cool but it has some little weird stuffs i dont understand yet. One of them is Designing the applications.I should find
an easy way to explain it to my designer :)
[1]: GWT-Django app
I followed the tutorial in GWT site and had a running application (StockWather). To complete that tutorial you probbaly would need to complete the StockWatcher firstly and then go on from here or you can just pull the code i wrote for that purpose from here[1] and just inspect it.
For communication of both ends i used XML,if you're not a fan of it you can use JSON also. I didnt use JSON because of the JSNI usage in Java code. I dont like hybrid codes like that...
- First create the server side code in Django :LINK
- You need to build a GET request in you JAVA code so u do that from here: LINK
- Parse the incoming XML string from Django and convert it to JAVA objects: LINK
- Write unittests for your client side code (GWT) because if you have errors u will get some strange JS errors which are not so decsriptive. : LINK
- Put GWT application in your media and put the generated HTML file in your templates directory.
Well that is all,it took some time to glue both of them (Django and GWT) but we have here a happy end :) GWT is cool but it has some little weird stuffs i dont understand yet. One of them is Designing the applications.I should find
an easy way to explain it to my designer :)
[1]: GWT-Django app