30 Nisan 2009 Perşembe

Using GWT with Django


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...

  1. First create the server side code in Django :LINK
  2. You need to build a GET request in you JAVA code so u do that from here: LINK
  3. Parse the incoming XML string from Django and convert it to JAVA objects: LINK
  4. 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
  5. 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

21 Nisan 2009 Salı

GSOC 2009 Again


Well i'm again in the Game :) That summer i will be working on my last year GSOC project FUNC again.Big Thanks to Adrian Alikins(my mentor) for choosing me again. And Bigger thanks to GOOGLE for paying us to do open source programming. If you hear for the first time FUNC,it is a great Remote management Framework for doing things reamotely easier. You can even open your shell and do management by playing with its Python API. My aim that time is to make that cool API even more cooler.Here is the list with ideas :
  • Implementing Func Facts : Wouldnt it be cool to say func update machines that are ">f9" or list the machines with dual core cpus. That is what func facts claims to be an ORM like remote querying system.
  • Implementing a Pluggable Connection Manager for Func :Well that is kind of hard one, currently he FUNC is using XML-RPC over SSL. The aim of that item is to make Func to support different connections by reading its conf files. The first connection to be implemented seems to be qpid/AMQP/qmf. After having the pluggable structure it will be easier to add different connections i hope.
  • Structuring the Results : Currently FUNC recieves different kind of results in different formats. Having a way to query and process that result without too much loops will be realy great.
  • Funcweb Development : Func has a Web interface fo doing all the stuff visually,so new features should be added to that cool app.

I hope to finish all the stuff succesfully again like last year. (INSH ;))