Archive for AJAX

OOP Javascript

Already heard about Object Oriented Programming on Javscript, well !, now post it in here cos i think this very important, specially people who will concern about AJAX scripting. However know about OOP on Javascript will make you better on Javascript programing.

This is a very simple sample, how to write:

<script language="Javascript">


ProgKu={
pariabelsatu : "Javascript" ,
   parkedua : "" ,
   fungsiSatu :
      function(val){
         if ( ( (val * 5) % 2 ) == 0 ) {
            this.pariabelsatu = "Javascript hasil OOPJs";
            this.parkedua = "Genap" ;
            return true;
         }else{
            this.pariabelsatu = "Hasil gak bener";
            this.parkedua = "Ganjil" ;
            return true;
         }
      }
   fungsiDua :
      function(){
         var t = prompt("Masukan angka 1 hingga 1000");
         var myVal = parseInt(t);
         if(isNaN(myVal)){
            alert("Yang dimasukan bukan angka");
            return false;
         }else{
            this.fungsiSatu(myVal);
         }
      }
}


//Sudah diluar class
function cobaCoba(){
var h = ProgKu.fungsiDua();
document.getElementById("test").innerHTML =
h.pariabelsatu +" mungkin karena "+h.parkedua;
}

And on HTML please put this code :

<div id="test">Look at here</div>

OK, have nice try :p

Leave a Comment

CakePHP vs Symfony, hmm..???

After i found a PHP framework who is called cakePHP, now i heard about the other ones framework which it’s name Symfony PHP5.

So what is different between both of its …? I don’t know much, but i can see several difference from its.

  • Installation, server requirement phpCake use PHP 4.3 or greater, and Symfony must use 5
  • Database, Symfony compatible with most engine like MySQL, Ms SQL, PostgreSQL and Oracle, but i don’t see cakePHP can use Oracle engine.
  • Models, Symfony has two versions of the data object model in two different directories and not for cakePHP
  • Propel XML, Symfony understands the Propel native XML schema format and i don’t think so on cakePHP

There is a several which i think difference from both, and i need your suggestion, input or addition to complete this article. And please correct if on above is wrong.

Comments (2)