Domain: si.kz
Stories and comments across the archive that link to si.kz.
Comments · 8
-
Re:Misleading
I develop in VMs under linux and it's irrelevant because I deploy and test on servers, not on my workstation. FCGI and reverse proxy solutions (mongrel etc) are common, I've developed sites on mod_php/Apache for deployment with php_fcgi/nginx and vice-versa.
IIS is a poor choice for production server, not for performance reasons but because it's basic and configuration sucks. That makes it a poor choice for development too, may as well use nanoweb or something. -
Brainf*ck!
http://nanoweb.si.kz/manual/mod_bsp.html 'nuf said.
-
This has been done already
Someone already wrote a PHP webserver, and it does alot more than you're web server also. You can get it here: NANOWEB
-
Re:From the author
All I can say is this is a completely misdirected use of talent. You're right, no one should be stupid enough to do this. I always get a laugh when someone points at Nanoweb (another webserver in php) and the authors actually have the balls to say it's "fast and robust". That guy has been the laughing stock of #php/Freenode for a while now, second only to the author of PHPNuke, for obvious repeat security issues.
As a proof of concept, well, _anyone_ with some knowledge of PHP could have _told_ you it could be done. Those same people with enough knowledge to know it could be done also would have told you _not to do it_. It's impractical, and a total waste of time to do what you've done.
Not only do you incur the overhead of the interpreter, which is rather nasty all on it's own, but PHP has lousy garbage collection, and is not meant to write applications with a sustained runtime. I'm very surprised it hasn't crashed.
I do love the php language for it's simplicity, and ease of use. As a web developer, it has aided me greatly, and I've done much with it. However, we should get back to using it for what it's actually meant for, building great websites. -
Re:Scripting Is Becoming Programming
You bring up some good points. Check out this webserver. Completely written in PHP. I think you can write CGI's in C, but I'm not sure. =)
The thing is, they are not different, they are both programming languages. It's just a matter of how we differentiate them. Yeah, I like apples and am allergic to oranges. That doesn't mean one is a fruit and the other is not. Yeah, the scripting languages do not enforce good programming form(excluding Python, et al.) or practices, but you can make a crappy program in C just as easy. Yeah, I choose C/C++/Obj-C for stand alone programs and PHP/Perl for web and some scripting, but that's _my_ choice. QT/KDE libraries work alot easier with C++, not Perl, in my opinion. Of course, if there is a mail client written in pure perl(there are several I believe) that I want, then I won't not use it because it's written in Perl. -
I'm unimpressed
I submited this one some weeks ago but it didn't make it to the frontpage. It's a new http server, written 100% in PHP, somebody ever tried it ?
-
Re:Why is PHP so bad?It is generally a good idea to know what you are talking about before talking about it.
1. Lack of seperation between content and logic. Embedded logic code inside presentation can lead to a bewildering jungle of death for anyone who tries to maintain the code. Also, repeated logic must be maintained across all pages, instead of changing it in one place. (this goes for all ASP, PHP, perl type scripts)
There are a number of template solutions that you can use to avoid this problem. I work almost exclusively with PHPLIB's template class.
2. Performance problems with interpreted languages
Strictly speaking, PHP is not interpreted. PHP files are compiled before being run, and are cached for a while. This gives you a combination of great performance, much like a compiled language, with the write & immediate play of an interpreted language.
3. Can't take advantage of OO goodness. php is a flat procedural-like language, you can't do the robust object modeling, or any of the other spiffy OO things you can do with c++, java, (maybe .net) etc.
Did you pay attention to my answer to point #1 above? That bit about a class? Yeah, a class. PHP supports OO, in a clear, intuitive manner. Oh, and '.net' isn't a language.
4. HTML lock in. Your code will forever live in HTML, if you want a different display format (unlikely) you're stuck. ie. what if you want to have a propriatary client instead of html on your plam, you have to rewrite all the logic.
Only with very poor planning. You do plan your development before you start, right? There are plenty of template solutions you can choose. You can intersperse HTML for that quick 20 minute hack, use template objects for large projects that must scale.
5. Fancy features availible in Java (maybe .net) first. Oracle Objects, native DB connectors, will probably be written for Java before anyone tries to implement them (if ever) in PHP. You might not need these features of a small site, so its not that big of a deal.
As Yoda once said: "Hard to see the future is." - so I can't comment. But, did you know:
-
- PHP is not web-only. I do large amounts of system administration and database manipulation in PHP. Its string handling abilities are concise, consistent, and powerful.
- PHP is the most frequently installed Apache module. (As of a few months back, I couldn't locate current statistics)
- PHP has bindings for GTK. That's right. You can write GUI applications using PHP if you like.
- Using the Zend Optimizer, you can compile PHP scripts to binary code that can be distributed without revealing your sources.
- PHP will be bundled with Netware.
- A full featured Webserver has been written in PHP. Yes, the webserver itself. Features include HTTP/1.1, CGI support, name-based virtual hosts, server side includes, authentication, gzip content encoding support, Apache combined format and MySQL logging. Look out, Apache!
Not that I'm a fanatic, or anything... but PHP is a powerful, fast, flexible language that's easy to learn, and easy to read.
I can read somebody else's code almost immediately, unlike Perl or to a lesser extent, c, and the built-in functions for string handling allow me to get insane amounts of work done in a staggeringly short development cycle.
Only people who don't know bitch about PHP.
-
-
PHP is now more than a web scripting language
phpmole is a start, and check this out, it was on freshmeat yesterday : a php webserver
php is becoming the next great scripting language, after all perl and python had their time :)