Monday, February 27, 2006

Thick Client or Thin Client

While I'm surf the net, I found Brad Neuberg blog entry, speak about Thick Client and Thin Client architecture. He's clearly explain the difference between those two architecture. I believe, my current office project is Thin Client architecture, which its mean use a simple UI. On the other side, I feel that my office commarade project module is Thick Client architecture, which is heavy UI.

One of readers comment mention about Qooxdoo Library for Thick Client. I've check their website, and take alook at their example/demo page. Woaa Extremerly heavy UI. I dont think I wanna use this one for my project. But, Its interesting to learn it.

Other reader XFORMS, XHTML which belong to next generation of web application. He also deliver an introduction link, I should have to take alook at it and learn it little bit. Its W3C standard complient for web 2.0 application.

Thursday, February 23, 2006

Desperately need for DHTML Effect Library

Currently, I'm joining our company developer teams to build our internal integrated system. It will build using some of open source project, such as PHP, MySQL, AJAX, MAMBO, and so on. The biggest challange we've found is The Rich GUI Web. Yes, we dont have any skill about this, but we will take this path.

So far for The AJAX toolkit is solve through Mochikit which provide JSON as their primary data exchange format, and we realy happy about it. It's work now with our application. But Mochikit is lag of visual effect or widget. I hope their script.aculo.us port version will be deliver as soon as posible.

We had many candidate for our DHTML Effect Library, and it hard to choose one of them, because it will need time to learn and the other limitation is our skill in javascript arena.
Here the list :
- BACKBASE Community Edition --> we had a problem with their licencing term.
- Script.aculo.us, Open RICO, Moo.fx which are base of Prototype AJAX Library --> Prototype doesnt support JSON right now.
- Yahoo UI Library provide by yahoo teams ---> just release in this week

So, while we waiting to choose the right one, we go directly by our self. We search and download available DHTML trick and try to run it on our application. We also had an idea to go get hire someone out there whos expert on javascript arena, but its hard to find around our city.

If you had any DHTML Effect Library candidate, please let me know.

Saturday, February 18, 2006

PyMSSQL got broken

Woa, something goes wrong on my TG installation.

It said an error message "can't commit" when I tried to execute "DBNetLib ... bla bla bla ... server does not exist ... bla bla bla ... access denied". I dont know why it happend, but I guess it happend because I just re-install my operating system last time. So, I had to go to sqlobject site, pyMSSQL site, and turbogear site. Finaly, I found something on python ADO-DB site, Its about an extention of python on Windows. So, after I installed this extention, my pyMSSQL can connected to our SQL Server Machine.

Then here comes another error message ... "can't commit" when I execute "tg-admin sql create" which are create our model class. It contains 5 classes. I dont know why, but I'll solve it somehow.

Saturday, February 04, 2006

Activate TG 0.9

A while back, I had a TG 0.88 installed on my machine, and then accidently I execute the setup.py intall from my TG trunk directory, and wollaa.... my TG broke down. I dont know why. Sorry, Im just a newbie on python world, so after long googling, I found that I execute TG 0.9 development source code to replace my TG 0.88.

So, in order to make my TG running again, I had to use TG 0.9, I dont mind about it, so here's the stuff that I had to execute first :

1. Install the pre-request. The RuleDispatch
easy_install -f http://peak.telecommunity.com/snapshots/ RuleDispatch

2. go to the TG 0.9 trunk directory and run this below command
python setup.py develop

3. go to on eachside of thirdparty directory which are cherrypy and sqlobject and run this below command on each of them
python -c "import setuptools; execfile('setup.py')" develop

4. Then the lasting is install the Nose for testing purpose
easy_install nose

and wollaa.... my TG is back
hehehehehehe

Friday, February 03, 2006

Mochikit on PHP

Hi there, hehehe, frankly enough huh ?
yes, I manage to run mochikit on my office project, built on top of php.
Here's the tips :
1. on your html file put a javascript like this one :


// define the DOCManager Object classes
DOCManager = function()
{ // define the property
this.target_div = getElement("response");
this.parameter = "&company_id="+ getElement("company_id").value +
"&grin_type="+ getElement("grin_type").value +
"&grin_no="+ getElement("grin_no").value +
"&ref_type="+ getElement("ref_type").value +
"&ref_no="+ getElement("ref_no").value +
"&order_no="+ getElement("order_no").value;
// bind the methods
bindMethods(this);
};

// define the DOCManager methods
DOCManager.prototype =
{
"loadDOC" : function()
{ alert( " will gonna define the JSON Doc" );
var doc = loadJSONDoc("{FRONTCOMPONENTURL}ajax/ajax.bedjo.php?task=search"+
this.parameter
);
alert( " define DOC, and we will proccess the doc" );
doc.addCallbacks(this.processDOC, this.errorDOC);
alert( "DOC process complete" );
},

"processDOC" : function(data)
{ alert("come to processDOC baby");
var rows = data.rows;
var cols = data.columns;
var newTable = TABLE({"id":"repeat_table", "name":"repeat_table",
"width":"100%", "border":"0", "cellpadding":"1",
"cellspacing":"0"},
THEAD(null, map(this.colDisplay, cols)
),
TFOOT(null, TR(null,
TD({"colspan":"3", "class":"sectiontableheader"}, " "),
TD({"colspan":"5", "class":"sectiontableheader"}, " ")
)
),
TBODY(null, map(this.rowDisplay, rows)
)
);
swapDOM('response', newTable);
},

"errorDOC" : function(data)
{
alert( data.message );
},

"rowDisplay" : function (data)
{
return TR({"class":"sectiontableentry2"}, map(partial(TD, null), data));
},

"colDisplay" : function (data)
{
return TR(null, map(partial(TD, {"class":"sectiontableheader"}), data));
}

};

function search_grin()
{ doc_manager = new DOCManager();
doc_manager.loadDOC();
};


Please remove the // sign in front of the tag, since It forbiden in here
and you have to made an on-click action on your submit-button, I'll bet you know what I meant.

2. Create the ajax file , I named it ajax.bedjo.php, and heres the sample code with a JSON and XML return doc :

$task = $_REQUEST["task"];


switch ( $task )
{
case 'create':
header("Content-type: text/xml");
echo "";
echo "";
echo "";
echo $action;
echo "";
echo "kembang jepun kembang krampung, aku mlembung kakean diambung ";
echo "";
break;
case 'find':
echo '[{';
echo '"id" : "8370",';
echo '"name" : "KANG BEDJO EMANG EMOY"';
echo '},';
echo '{';
echo '"id" : "8360",';
echo '"name" : "TESTING SODARA SODARA SEKALIAN"';
echo '}]';
break;
case 'list':
echo '{';
echo ' "columns": [[ "domain_name", "create_date", "expiry_date", "organization_name"]],';
echo ' "rows": [';
echo ' ["json.org", "2000-05-08", "2006-05-08", "Douglas Crockford"],';
echo ' ["mochibot.com", "2005-02-10", "2007-02-10", "Jameson Hsu"],';
echo ' ["pythonmac.org", "2003-09-24", "2006-09-24", "Bob Ippolito"],';
echo ' ["undefined.org", "2000-01-10", "2006-01-10", "Robert J Ippolito"],';
echo ' ["python.org", "1995-03-27", "2007-03-28", "Python Software Foundation"]';
echo ' ]';
echo '}';
break;
}

Ok thats all, now u can use it. Anyway this is a simple tutorial on using mochikit with php.

Ok, cu next