php和asp是否也是server的程式?

2007-04-16 10:55 pm
php和asp的功能上到底有何不同?

回答 (2)

2007-04-17 3:35 am
✔ 最佳答案
是,它們都是server side scripts

php比asp執行的速度快(原因我不多說了,因為太長),php可以在不同平台上執行,但asp不可以,asp規定在iis上執行,php supports大多數的database,可是asp 主要support access同mssql

php雖然係object-oriented,但係php run procedural code時都一樣ok架,o岩晒任何人由初學者到高手程度

有好多簡單功能php做到但係asp如果冇額外既資源係做唔到架:好似 FTP, data compression, file uploads, XML, MD5, encryption 同埋 email

亦有d複雜既功能php係免費,但係asp永遠都冇可能做到:dynamic images, IMAP, SNMP, dynamic flash, PDF, native access (non ODBC) to Oracle, Ovrimos, Postgre, Sybase, mSql, MSSQL, Ingres, Interbase and Informix databases, LDAP, sockets

我個人建議用php比較好,因為php的bug通常一搵到都會在24小時內被解決,反而asp就多到積埋積埋,有牌都未fix好

最緊要係php是免費,但asp不是 :-)

2007-04-21 04:22:47 補充:
回garlic2010:你誤會我的意思了,我不是指用php編寫的人能在24小時內把bug fixed好,我說的是”php的bugs”,不是指”php scripts的bugs”換句說話來說,我指的那些”人”是php的implementer,不是編寫php scripts的script/page writers(亦即是我們這些php的”programmer”),那些implementer能夠這麼快把bug fixed好的原因是因為php的結構是很易明白,

2007-04-21 04:26:16 補充:
而且一開始是為了那些features而特別去寫的,跟asp不同的是,microsoft先把核心寫好再加上其他features,所以很多bugs出現另外,編寫asp是免費的,但要用asp的額外功能如:email、XML 、 MD5 、 encryption等就不是免費的了

2007-04-21 22:51:18 補充:
補充:scalability, ease of maintenance, performance, down time這些都要視乎使用者的架構設計,如果兩種語言的core functionalities/架構上不是太大分別,而且大家的memory management沒甚分別而且同樣是oop,其實選用哪種語言不太重要,因為比起這些,架構設計更重要還有就是,假如我要有imap support,asp永遠都冇可能做到,而且microsoft未來都無意去implement之類的support

2007-04-21 22:51:47 補充:
中立黎講,我覺得php係好過asp,因為php無論速度同性能上每一方面都比asp做得好,唔係我偏見,只係用左php同asp差唔多8年,我都搵唔到響功能上,asp有邊方面比php既做得好,呢個亦係點解microsoft放棄左asp而要用.Net既原因

2007-04-25 05:24:33 補充:
我覺得spaghetti code都係因為編程者懶得再去學習而成既姐,好多人學到一定level,做到佢地想做既野就停止左唔再學點樣可以把code寫得好dphp support oop,而且self-defined function仲好flexible,寫好code既自由度係好大,不過d人唔想去學點寫得好d姐如果係jsp同.net黎講,架構設計上而言當然會比較好,但係availability唔夠php咁好,同埋佢地既maintenance通常都比較昂貴

2007-04-25 05:24:59 補充:
不過個人覺得,我唔會話佢地係一代比一代好,雖然佢地都係server-side scripts,但係好明顯佢地都著重響唔同方面,例如jsp響threading上做得比php好,但係php響type checking 上又比較靈活,總之真係各有各既,不過總括而言,如果講複雜既處理上要同php或jsp比較,asp整體黎講都好似輸一層咁,真係唔俾.net淘汰都唔得
2007-04-21 9:33 am
hidyfool [小學級 4 級]說

php的bug通常一搵到都會在24小時內被解決,反而asp就多到積埋積埋,有牌都未fix好
最緊要係php是免費,但asp不是

I cannot agree to this. Bug fixing depends on how good or bad the code is written and the skills of the programmer, not the language. I would say bug fixing is not friendly for asp because there is no IDE (integrated development environment) for asp that has a debug utility.

asp is free. You need only use the Windows Notepad to write the code. Windows XP Professional comes with IIS 5.0 which you can use to develop and test.

asp.net can do most (or all with third-party components, if not more) features php can.

I am not syaing one is better than the other. For an enterprise web site, the consideration on the choice of technology includes scalability, ease of maintenance, performance, down time, etc. For a hobbyist, just choose the technology one is comfortable with.

2007-04-23 12:23:49 補充:
我對php比asp快和性能好絕無異議,從CGI到asp,php,cold fusion,jsp,.net,每一種技術都基於上一代加以改良而取代,不同技術的優劣比較,往往變得很 religious.對初學者而言,asp和php都很容易上手. If something is easy to do, it is easy to do it incorrectly. 大量 php web sites是由spaghetti code寫成就是一種證明.


收錄日期: 2021-04-25 19:54:48
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070416000051KK01745

檢視 Wayback Machine 備份