I've used php since v3, in its non-OO days. Coming from perl , that fit nicely. Today, I still avoid OOPHP and continue to write procedurally. The convenience of web-oriented functionality, broad deployment, and soft typing is basically unparalleled, although writing this way requires a bit of discipline. It's also a surprisingly good fit for a lot of server side code if you scale beyond a merely web-based execution…
Agreed. There are a few things which are stateful and are therefore made easier/better by OO, mainly DB connections. For everything else, we mostly use classes as namespace (pre-5.3) with lots of static methods. In general for backend web it's pretty silly to spend a bunch of time building up stateful objects when your real goal is usually to load up the subset of information the user needs right now, return that and…
Taking PHP Seriously [pdf]
31–40 of 155 posts
Re: Taking PHP Seriously [pdf]
#32Earlier quoted context omitted.
Just checking: do you have any experience with it? When was the last time you tried working with PHP in a team?
I've done more projects in PHP than I would care to admit. I ported the University of Chicago's "Uncommon Application" from Cold Fusion to PHP using an OO data access model, MVC, and explicit templates. (This was a long time ago before people realized that MVC was a bad idea.) I've also hacked up a bunch of open source projects (wordpress, joomla). No tests, so you never know what you've fucked up, and you spend more…
Re: Taking PHP Seriously [pdf]
#33Earlier quoted context omitted.
Just checking: do you have any experience with it? When was the last time you tried working with PHP in a team?
I've done more projects in PHP than I would care to admit. I ported the University of Chicago's "Uncommon Application" from Cold Fusion to PHP using an OO data access model, MVC, and explicit templates. (This was a long time ago before people realized that MVC was a bad idea.) I've also hacked up a bunch of open source projects (wordpress, joomla). No tests, so you never know what you've fucked up, and you spend more…
Re: Taking PHP Seriously [pdf]
#34Earlier quoted context omitted.
I code in Python, BASH, C, and PHP on a regular basis and still strongly prefer PHP for everyday coding and hobby tasks. I even prefer to create command-line scripts in PHP (though will switch to Python if it's large to begin with). For me getting Flask to work properly under NGINX + uwsgi was such a hassle. Having to tell it what module, and hooking things up to touch versus just passing to PHP under fast cgi. To be…
In what ways is PHP less hassle than Python? I don't understand this argument.
Re: Taking PHP Seriously [pdf]
#35As for php encouraging shitty programming, a good bit of that is that so many more people program in php because its easier to get started with. This does not mean that just because php attracts shitty programmers that it doesn't have more or many awesome programmers than languages such as python.
Re: Taking PHP Seriously [pdf]
#36Earlier quoted context omitted.
Just checking: do you have any experience with it? When was the last time you tried working with PHP in a team?
I've done more projects in PHP than I would care to admit. I ported the University of Chicago's "Uncommon Application" from Cold Fusion to PHP using an OO data access model, MVC, and explicit templates. (This was a long time ago before people realized that MVC was a bad idea.) I've also hacked up a bunch of open source projects (wordpress, joomla). No tests, so you never know what you've fucked up, and you spend more…
So the answer is No, you don't have any experience with professional PHP, and you haven't used it in more than half a decade. Could have just said that.
Re: Taking PHP Seriously [pdf]
#37Earlier quoted context omitted.
I've done more projects in PHP than I would care to admit. I ported the University of Chicago's "Uncommon Application" from Cold Fusion to PHP using an OO data access model, MVC, and explicit templates. (This was a long time ago before people realized that MVC was a bad idea.) I've also hacked up a bunch of open source projects (wordpress, joomla). No tests, so you never know what you've fucked up, and you spend more…
That's because you're stuck writing crap code in crap libraries. Really, you judge PHP off of Wordpress and Joomla?
Re: Taking PHP Seriously [pdf]
#38Earlier quoted context omitted.
$productid = "0x4zz5"; print $productid + 4; If printing "8" is your idea of a working interpretation of that code, then PHP is the language for you. If not, then PHP doesn't work. End of story.
Things like this and some interesting developments from Facebook concerning them are mentioned in the presentation, so it would be nice if people would actually discuss that. Just a suggestion.
Re: Taking PHP Seriously [pdf]
#39Earlier quoted context omitted.
I code in Python, BASH, C, and PHP on a regular basis and still strongly prefer PHP for everyday coding and hobby tasks. I even prefer to create command-line scripts in PHP (though will switch to Python if it's large to begin with). For me getting Flask to work properly under NGINX + uwsgi was such a hassle. Having to tell it what module, and hooking things up to touch versus just passing to PHP under fast cgi. To be…
In what ways is PHP less hassle than Python? I don't understand this argument.
I think the primary difference is PHP is web first: it was designed to be a language for the web above all. Everything else is tacked on. On the other hand, Python is useful for a whole array of problems and a website is just one problem you can solve with it.
Re: Taking PHP Seriously [pdf]
#40Earlier quoted context omitted.
I've done more projects in PHP than I would care to admit. I ported the University of Chicago's "Uncommon Application" from Cold Fusion to PHP using an OO data access model, MVC, and explicit templates. (This was a long time ago before people realized that MVC was a bad idea.) I've also hacked up a bunch of open source projects (wordpress, joomla). No tests, so you never know what you've fucked up, and you spend more…
That's because you're stuck writing crap code in crap libraries. Really, you judge PHP off of Wordpress and Joomla?