Ferry Mulyono

See also: Other Geeks@INDC

June 2005 - Posts

Phalanger (PHP.NET)

Phalanger, bbrp saat yang lalu (uda lumayan lama seh...) perna saya post. Skrg baru sempet saya coba install, PHP.NET 1.0 . Basically, PHP.NET ini bisa dipake untuk buat Console App, Windows App (tapi gak ada sample, jd blom dicobain), Class Library, dan PHP (running on-top of IIS and using Microsoft .NET Framework 1.1)

Untuk Console App, PHP.NET ini lumayan enak dipake, karena dia gak mandatory require OOP, jd bisa buat sequence coding (as in C and Pascal). Tapi PHP.NET ini juga uda support OOP. Berikut contoh code “pemaksaan” Console PHP.NET

<?php

// Reading user input from console

echo " PHP.NET\n“

echo " Do you like Phalanger? (yes, no) ";

$answer = fgets(STDIN);

while (trim($answer) != "yes")

{

echo "\n";

echo " I ask you once again: DO YOU LIKE Phalanger????? (yes) ";

$answer = fgets(STDIN);

}

echo "\n";

echo " OK. I know that you are an intelligent guy :)\n";

echo "\n";

echo " Enjoy it!\n";

echo "\n";

fgets(STDIN);

Well, the code is self-explanatory. It will do loop until we answer yes. Phalanger ini udah integrate ke VS.NET 2003 (kecuali untuk PHP.NETnya). Pada saat membuat New Project, hanya ada pilihan Phalanger Project (tidak dapat memilih PHP.NET atau Console). Tapi kita dapat memilih antara Console, Class Library, atau Windows pada Project Properties. Pada Console App sendiri, PHP ini akan dijalankan dari entry point yang dapat dipilih di Project Properties jg.

Disadvantages:

  • No PHP.NET Integration with VS.NET 2003 (No Code-Behind stuff)
  • No ViewState support
  • No WebControl support

Advantages:

  • For Console App, it is possible to write sequence code and disregarding OOP principle.
  • Phalanger comes with several Extensions that can be used from other .NET Project (C#.NET for example). In the Sample code, you can find the sample of SWF extension usage where using C#.NET code we can create SWF movies on-the-fly. There are many other library that you will find usefull, and free too, like PDF, GZip, etc.

Well, sekian ttg PHP.NET. Untuk catatan, saya menggunakan PHP.NET 1.0 yang mungkin featurenya masih kurang. Sekarang kalau tidak salah sudah keluar PHP.NET 1.3 beta. Mungkin ada yang tertarik untuk membuat JSP.NET? Hehe.....

Share this post: | | | |
Viewing Web Cast Offline

Viewing Web Cast Offline, buat yang bandwidthnya kecil dan internet super lambat (termasuk saya :p)

http://blogs.netindonesia.net/ferry/articles/4323.aspx

Share this post: | | | |