Friday, March 17, 2006

Twisted - A Network Framework

Its on my radar.
Fuih, so many application or framework come up on my radar. Why ? Its happend for my office purpose actually. We build our integration application on PHP front end application. But we did not decided yet our back end application. I tried to found a good platform for our back end.

Zope is still my first consideration, but yes, I still have some problem to implement it. Many things come up to things. One of the main reason is ZODB. It doesnt mean I dont like it, but Zope is depend on it and it hard to remove. Some people may say, "we can build application on zope without ZODB". But I thinks its hard.

Next, is Twisted. I got attract to twisted by reading many blog post on python daily. Then letter on, someone drop me a pdf file about twisted. Its interesting. It has a flexible DBConnection, it has a many network protocol. I might gonna use one of those protocol for my application, but not decided yet which one of them.

My application it work like this : It should be work as a robot application. It will start and monitor many transaction table. It can make transaction summarize, report and calculate many background process. It should made a history log on file or DB. It can make to daemon/service.
At advance, it can provide an XML-RPC or SOAP, to retrieve document generate or xml data.
It may run every 15 minutes or End of Day process.

I think twisted is suite enough.

But recently, Zope 3.2 come up with twisted 2.1 on it. I dont know the combination between these two, but if it does, it would be a great combination tools on hand. So what should I do ?
Take pure twisted or Zope 3.2 with twisted included ? give me a light.

Thursday, March 16, 2006

Dojo Toolkit as my DHTML Library

A month ago, I was looking for various DHTML Library for my office project. I have define 3 DHTML groups which on my radar. Finally, none of them is fit with my requirements. Then, I saw on Mochikit mailinglist, many mochikit users take dojo toolkit as their DHTML Library.

Dojo is still on beta version, but please dont ignore it, even if this is beta version, it work quite good. You may take a look at TurboAJAX site, they provide many tools build on top of Dojo Toolkit. They are an awesome product.

So, After collecting many information from mochikit mailinglist, I can able to make dojo and mochikit work together. Heres the sample code on one of my page

< type="text/javascript" src="http://localhost/js/mochikit/MochiKit.js">< / script >
< type="text/javascript" src="http://localhost/js/dojo022/dojo.js">< / script >
< type="text/javascript" src="http://localhost/js/dojo022/src/widget/TabPane.js"> < / script >
< type="text/javascript" src="http://localhost/js/inventories.js">< / script >

< type="text/javascript">

//initialize dojo
dojo.require("dojo.widget.ContentPane");

function qc_search()
{ alert("masuk sini");
doc_manager = new DOCManager("order_response", "qc_search");
alert("initialize");


That all part of my code. As you can see, we have to load mochikit before dojo. If not then we have to mention mochikit function completly which was ugly to do.