Why the Light Has Gone Out on LAMP 443
menion writes to tell us that Cliff Wells has an editorial calling into focus some of the perceived problems with LAMP. Wells calls PHP and MySQL this generation's BASIC citing the Free Online Dictionary of Computing: "BASIC has become the leading cause of brain-damage in proto-hackers. This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously. A novice can write short BASIC programs (on the order of 10-20 lines) very easily; writing anything longer is (a) very painful, and (b) encourages bad habits that will make it harder to use more powerful languages well. This wouldn't be so bad if historical accidents hadn't made BASIC so common on low-end micros. As it is, it ruins thousands of potential wizards a year."
It's just a tool (Score:5, Insightful)
Of course, the "wizards" will recognize a tool its deficiencies and start using something more appropriate.
Re:It's just a tool (Score:5, Insightful)
If you want high-performance access to single DB tables (which many webapps do), use MySQL.
If you want to quickly put together a site because your purpose isn't actually maintaining the site but putting up some content, use PHP.
If all you want to do is create a simple program to do a one-off task, use BASIC.
If you want to create a straightforward GUI for a database, use Delphi.
If you want to do something different, use a different tool. Don't bitch about a screwdriver being a bad tool for painting the walls.
Re:It's just a tool (Score:2, Insightful)
I
Re:It's just a tool (Score:5, Insightful)
Re:It's just a tool (Score:4, Insightful)
Re:It's just a tool (Score:5, Insightful)
I learnt that lesson as a teenager in the early 80's, thanks to over-hyped computer games which truly sucked when they finally (if ever) arrived. Other speccy users will know exactly which titles I'm referring to.
Re:It's just a tool (Score:3, Funny)
Re:It's just a tool (Score:3, Insightful)
At any rate, I'm speaking from experience, having spent 7 years doing web applications exclusively. I no longer work for them (I left to move to another state), and although we were more expensive than some of our competition, we focused on 'doing it right.' Some customers left to come back later, others knew from day one that it was worth it to pay to do things right the first time.
I still talk to my friends their,
Re:It's just a tool (Score:5, Insightful)
Customers don't want to pay out the ass again for you to add a simple feature because you didn't take the time to do it properly the first time around.
I say that customers want exactly that. This is the model of software development that Microsoft has adopted from the start and customers can't seem to get enough of it. If customers had really wanted solutions that just worked and didn't have problems, then Unix would have been a much more dominant operating system in the late 80's and early 90's. Instead customers just wanted the next thing from Microsoft that fixed the problems from the previous version. Of course, MS's cheaper price didn't hurt, but true ROI anaysis would have show a "full" solution would have been better, even if more expensive.
Don't get me wrong. While I'm being critical of this tactic by MS, it definately works and has worked extremely well for them. We are always waiting for the next Microsoft os that will "have everything". As Vista has shown, that will never happen, but its really because MS doesn't ever want it to happen.
Because, in reality, thats what customers really want. Delivering now and making them upgrade (or fix) later is really what they expect. It shouldn't be, but it is.
Re:It's just a tool (Score:4, Interesting)
And I have to agree. Our customers (the USAF BTW) just want new features, new features, new features. Sure we fix a lot of bugs, make the app tighter, etc etc but all they care about are the exciting new features the next version will bring. The only exception to this is when a show stopper bug occurs, but those seem to be rare. There is a fine balancing act between software engineers and customers. Customers want it now and don't care much about the internals as long as it works. And software engineers want to create the best possible/elegant solution. At least this is how it is from my own experience as a programmer.
Re:It's just a tool (Score:4, Insightful)
Customers can't get enough of the fact that MS gave them exactly what they wanted. Speaking as a developer, their tools (VS) have improved steadly over the years, incorpating features I want and that make my job much easier. The same can be said for thier OS.
Security wasn't there because customers didn't want to pay for it. So MS gave them an insecure OS. Now customers realize security is important. So MS responds with more security. There's more security coming in Vista, and Win2k3 is pretty secure right out of the box, with jsut about everything extra disabled by default.
Your post is just MS bashing. MS gives customers what they want. Sometimes that's not good, because its not in the customers best interest (ie., no security..), but to say customers want crappy software is not accurate. They want good software that does what they want.
Re:It's just a tool (Score:4, Insightful)
They want good software that does what they want.
Customers do not want "good" software. Good software is tight, clean code created using a proper development methodology. Good software takes time to create, but is far easier to maintain. Customers want "acceptable" software. As long as it does what it is supposed to, doesn't have any show stopper bugs, and is available tomorrow, the customer will take it over any "good software" available the day after. Then, when the customer reaches the limits of the hacked-up solution he/she clamors for the next version.
This is just from my personal experience.
Re:It's just a tool (Score:3, Insightful)
Customers don't want to pay out the ass for you to take the time to do it properly the first time around, either.
Re:It's just a tool (Score:3, Informative)
For almost 90% of the clients I went to and I brought up the topic they all said these are the requirements and we will never need to expand on them, Of course they are 100% wrong. But what can you do, you need to eat, s
Re:It's just a tool (Score:4, Insightful)
They most certainly do!
When I was first hired as a PGSQL developer, the company I was working for had two projects going. One of them we delivered to the customer without all of their original specifications met, but basically working. Having delivered a product they could see and use, they were more than happy to keep paying for features and performance enhancements. They ended up paying more in change orders than they did for the original contract, and they were damn happy about it.
The second project was delayed because the data we were given to work with was screwed up beyond all expectations. Taking the time to "do it right" would have pushed us way past our original deadlines. But we tried anyway. Without something they could put their hands on, broken or not, the suits got anxious as soon as our deadline passed. That project ended up in arbitration.
Re:It's just a tool (Score:4, Funny)
Re:It's just a tool (Score:5, Interesting)
That's a rather limited view on a very powerful tool. But, your statement is accurate as your final sentence indicates.
As a software engineer, I speak a variety of programming languages rather fluently. In the 90's, the choice in the business community was clear - C++ or Visual Basic. Then, a new tool came along and challenged that view - Delphi.
I have been now been programming in Delphi as my primary language since version 1.0 was released. Delphi was not the name of the language - Delphi was and IDE coupled with their version of an O-O PASCAL. While the language syntax is based on PASCAL (hence structured and somewhat verbose), it provided a tremendous amount of power and reliability."Mission Critical" applications became possible because of Dephi's exception handling constructs. I wrote applications in D1-D3 that simply would not break (try that with VB) - Windows (3.1,95/98 were the limitations). It provided excellent database connectivity, exception handling, RTTI, an extensible IDE and, more importantly, an excellent component model that ultimately became the basis for Jave Beans. That same component model provided opportunities for many 3rd party vendors to become successful.
Borland did have the right idea when they created Kylix for Linux - essentially Delphi for Linux. However, they blew the marking and pissed off the OSS developers. But, it is what it is. I would have loved to see them utilize GCC as the backend - oh well.
What do I use Delphi for today? I create mission critical services for the public safety sector. They integrate our company's core product (also written in Delphi) with systems and devices utilized by law enforcement. Our clients, as a general rule, are Windows shops - hence we chose the best tool for that environment. That tool was Delphi combined with some of the powerful 3rd party tools out there (like advanced NT service frameworks, Oracle connectivity tools, and TCP/IP and middle-ware technologies).
Delphi has evolved to the
Borland has had their uphill battles to fight - they weren't Microsoft and they irked the OSS/Linux community through bad marketing decisions. Too bad.
Is Delphi the best language or tool out there? Probably not - but it is far more capable than most developers have given it credit for. And, I will miss it and the Borland influence when Borland finally sells off their IDE line.
Well, that's my $0.02 worth.
Cheers,
RD
Re:It's just a tool (Score:3, Insightful)
No, it means that people that are euphoric and sloppy naturally can still use them and get something done, even if its not a bulletproof webapp suitable for the most intense uses.
It also means that people that are more meticulous have more time to spend researching and planning the particular needs of their applications than if they were using something harder to use.
Sure, there are times when other technologies may be the more prod
Re:PHP-MySQL vs. Basic. (Score:3, Insightful)
By now I guess you've gathered that t
Re:It's just a tool (Score:2)
Re:It's just a tool (Score:5, Funny)
Not "suddenly", you know... ;-)
Re:It's just a tool (Score:3, Insightful)
Well, true.
But we live in a world where people don't seem to be very good at making distinctions. As, for example, in the difference between a screwdriver and a chisel.
Part of this is the fault of salesman, who want you to buy their product as the one true tool for everything, and part of t
Unfinished rant (Score:3, Interesting)
Notice the guy says 3/4 here. Notice how he then goes on to criticise only MySQL and PHP. So what was the third item he was going to criticise, Apache or Linux (either would seem strange)? Seems to me he hasn't even finished his own rant.
This is another case (like Pascal) of the cascading lossage that happens when a language deliberately designed as an educational toy gets taken too seriously.
Well, I'm a great fan of Delphi-style object-pascal, maybe using it has brain-damaged me, or maybe it doesn't bear too much resemblance to original pascal, I don't know. Then again, my first exposure to any sort of programming was BASIC on the ZX81, so maybe I'm a lost cause
Re:Unfinished rant (Score:2, Insightful)
He says that he doesn't like Apache either. Just not as much as he dislikes PHP/MySQL.
Re:Unfinished rant (Score:4, Insightful)
Today's friendly fact check brought to you by the letter "K".
Re:Unfinished rant (Score:2, Insightful)
The latter, I suspect. The original Pascal had some mind-numbingly dumb "features", like fixed-length strings.
No, I don't mean just fixed-length buffers like bad C. I mean fixed-length strings. If you wanted to store a five-character string in a variable declared as a 10-character string, you had to pad it out manually with spaces.
Delphi'
Re:Unfinished rant (Score:3)
IIS? CommuniGate Pro? NCSA HTTPd?
Bad programmers are still bad programmers! (Score:5, Insightful)
On a day to day basis I'm dealing with systems written by other people, which are held together by duct tape, spit and good-will. PHP is a productive language, just as to a C/C++ developer Python/Ruby etc. is also productive and can lead to very good results.
The problem is when you get pseudo-programmers writing code which uses 'magic_quotes_gpc' as a safety net among other things, and come PHP 6 the 'shit will hit the fan' when everybody realises that with this automatic escaping functionality isn't there any more and their web applications are open for the world to abuse.
I think MySQL should be kept out of the question as it's more coincidence that it ended up being a PHP bed fellow, when PostgreSQL could've been in with a chance given the right circumstances.
At the end of the day bad programmers will write bad code, it's just easy to learn languages (such as Basic and PHP) means they can write more bad code a lot quicker with (arguably) more negative impact when it folds in on it'self.
Just my $0.02.
Re:Bad programmers are still bad programmers! (Score:5, Insightful)
Re:Bad programmers are still bad programmers! (Score:5, Interesting)
I understand his point that it's easy to write bad code for PHP. However, only a total idiot would think that it's not easy to write bad code for any language. By all means, let's move all the pseudo pogrammers over to his beloved Python, then he'll have to hate it and find something else to love.
At the most basic point his argument fails because it's not motivated by logic or reason, but by visceral emotional prejudice. Guess what, nobody should care how you feel about PHP or MySQL.
Re:Bad programmers are still bad programmers! (Score:3, Insightful)
Re:Bad programmers are still bad programmers! (Score:3, Interesting)
The workforce will have plenty of bad Python code-monkeys before you know it.
Re:Bad programmers are still bad programmers! (Score:3, Informative)
Re:Bad programmers are still bad programmers! (Score:2)
Re:Bad programmers are still bad programmers! (Score:2)
That's unlikely, since LAPP is such a crappy acronym.
Re:Bad programmers are still bad programmers! (Score:3, Funny)
Re:Bad programmers are still bad programmers! (Score:2, Funny)
Perhaps someone should invent magic_apostrophe_gpc.
Re:Bad programmers are still bad programmers! (Score:5, Insightful)
PHP is a rather boring C-like language, with some semi-serious issues w.r.t. library consistency (compare the call signatures of the various sleep functions), backwards compatibility (PHP3 uses [] for string access, PHP5 uses {}, PHP6 will use [] again...) and possibilities to shoot yourself in the foot (Magic quotes, safe mode, etc.). It is by no means perfect, but I really don't think comparing it to BASIC is fair. Not only does PHP force you to use functions instead of gotos (thogh a special goto-like syntax will probably be added in PHP6), PHP also has a mostly sane Object model, complete with a sane reflection interface, inheritance and everything.
And don't even get me started on MySQL. People talk about ACID, transactions and other high level concepts, but real-world PHP-programmers don't even use joins or subselects. Look at the big, famous open source PHP projects like Joomla and various Forum software. You'll find that the coders generally do multiple selects instead of a single join. They even write loops where they do two or three selects per lap in the loop where a single joined query would be enough. This isn't mysql's fault, mysql has supported joins for a s long as I've used it. This is purely a case of incompetent coders.
So in the end, the tools that are most popular get the blame for the fact that people don't know how to use them. *meh*
Re:unroll your joins (Score:3, Informative)
Try dumping the left join and using simple queries" is the first thing I suggest to my junior developers when they have gone and done the competent thing and ended up with a web app query that takes a full minute to return a result. Once they actually analyze the problem (instead of just trying to brute-force it with a MySQL one-liner), they usually discover there are other shortcuts and optimizations they can make, too. They may end up with 100 lines of code instead of 1 query, but they also end up with a
Re:unroll your joins (Score:3, Interesting)
What's the point of having a relational database if all you do is use it as a flat storage with all the relations done in code?
None, of course, but that's not what I was suggesting, was it? I was suggesting that when faced with queries that take minutes to resolve, you can often get orders of magnitude improvement by simplifying the query and moving some of the logic into the application.
If you prefer, you can try to get orders of magnitude improvement by reindexing or refactoring your schema, but it
and that's why you shouldn't use MySQL (Score:3, Insightful)
Y'see, I'd rather that my developers not get punished for "doing the competent thing", and get to spend their time developing new features rather than having to hand-optimise existing ones. As the other reply suggests, if an RDBMS can't properly analyse a complex query and retur
Re:Bad programmers are still bad programmers! (Score:4, Interesting)
PostgreSQL lost out because while MySQL was becoming popular, postgres was difficult to install, difficult to maintain, and even more poorly documented than MySQL. These days they're on about equal footing in these areas (MySQL documentation is still laid out dramatically better than postgres though - amusingly either one is better than SQL Server, whose documentation tells me to use tools that do not exist though I did a full install) but MySQL has the momentum.
A lot of Open CMSes decided to use MySQL instead of initially writing a compatibility layer and targeting it. This is one thing that's stopped me from developing my own CMS, I'm too lazy to deal with the database abstraction and refuse to do it without abstraction. Since I am stuck with IIS/ASP/SQL Server and refuse to use VBscript, I would very much like to have a wholly different CMS written in Jscript. No such beast seems to exist, not that I blame anyone for not developing for IIS/ASP.
For my own purposes, I host on linux and use whatever I feel like. Right now I have a bunch of content in drupal, but it will be trivial to pull out if I want to migrate later, since it's all just SQL. Huzzah!
Bah! (Score:5, Insightful)
Re:Bah! (Score:3, Insightful)
Basic had goto and gosub, rather than procedures and functions? No decent data structures? No proper error checking?
Welcome to how computers actually work.
Sure it doesn't scale. But it's a good thing to learn about that sort of problem early, because every language and programming tool has scaling problems.
A wizard can do wizard stuff in Basic. A non-wizard is a non-wizard whether he's equipped with Common Lisp or Smalltalk or Objective-C or Algol.
Basic didn't ruin thousands of potential wizar
Lights gone out ? Where ? (Score:3, Interesting)
All else talk is crap, as the experience shows otherwise.
Plain bullshit rant.
...it ruins thousands of potential wizards a year. (Score:5, Funny)
Of course, as we all know... ;-)
Re:...it ruins thousands of potential wizards a ye (Score:2)
Learning C teaches them that if they don't have the patience and brains to be an excellent developer, then they should find a career that will give them long term satisfaction that doesn't involve an entire team of co-workers covering for their mistakes.
Re:...it ruins thousands of potential wizards a ye (Score:5, Funny)
No, it doesn't [ioccc.org].
What's up with the BASIC knocking? (Score:2, Insightful)
Re:What's up with the BASIC knocking? (Score:2)
Seriously?
The only time I can think of is if you just can't find anyone that knows how to program...
Re:What's up with the BASIC knocking? (Score:2)
BASIC? (Score:5, Insightful)
Sure, it's easy to write crap code in PHP if you don't know what you're doing. It's considerably harder to write crap code (that actually works) in C if you don't know what you're doing. So everyone should use C, so people who don't know what they're doing can't write code? I don't think so.
If you do know what you're doing, you can mostly use good design and practices in PHP - not as well as other languages like Perl (and I assume Ruby and Python), but a hell of a lot better than BASIC which, if I remember correctly, doesn't support local variables, short-circuit evaluation [wikipedia.org], passing arguments to subroutines and returning values, and plenty of other things I can't think of at the moment - let alone OOP. PHP at least tries. On top of that, languages like PHP have functionality built-in or readily available to deal with things like XML, databases and network I/O, so you don't have to write all of that code yourself.
I'm thinking anyone who compares PHP to BASIC either doesn't know BASIC, or doesn't know PHP.
Re:BASIC? (Score:2)
Here exactly lies the problem: you either do, or you don't. Trying is not good enough. I've used PHP4/5 several times in the past and I was continually baffled by the way PHP (mis)handles OOP (like constructor overloading or reflection). It is as if the developers of PHP said at one point: 'hey, lets add OOP since that is a really good programming paradigma', but forgot that the language at first was conceived (not designed) to be iterative.
This not only shows in the sloppy
Re:BASIC? (Score:5, Insightful)
Weak typing, poor/nonexistent scoping rules and worse yet, auto-vivifying variables, are the big points of irritation.
Having said that, if you avoid trying to use all the "features" of php, and just use it for what it was intended for - web pages (remember, PHP originally stood for "Personal Home Page"), its "good enough" 99% of the time.
I used to write CGIs in c/c++, but I wouldn't want my stuff to share a server with someone else's c CGIs if they've only had, say, 5 years of programming experience. A badly written/implemented c CGI can bring the whole machine down. A badly written php cgi will "just" time out.
So let everyone use the "P" glue scripting language of their choice - Perl, PHP, Python ... whatever floats your boat.
Besides, there's one argument that should carry more weight with slashdotters than any other: More pr0n is served up by the Apache and the P languages than any other solution: specificially, the Netcraft confirms that largest pr0n site in the world is running FreeBSD/Apache/1.3.28 (Unix) PHP/4.3.6.
Re:BASIC? (Score:3, Funny)
If nothing else... (Score:2)
http://it.slashdot.org/article.pl?sid=06/03/07/133 8223&from=rss [slashdot.org]
Are you more concerned about the methodology of your webserver, or rock solid stability?
Apache is portable, scalable and stable. When BASIC came about, much better programming languages existed. BASIC was in fact the wrong approach in many ways. It ruined the way programmers thought. It was weak and cumbersome. It was also painfully straightforward and not in the least bit modular (not until QBasic at the very least)
Everybody's WIMP (Score:2, Funny)
Windows/ISS/MS-SQL/PHP
Re:Everybody's WIMP (Score:2)
Windoes IIS MS-SQL VBScriPT (or perhaps C-SharP)
This is silly (Score:5, Insightful)
I understand that the language is getting better with PHP5 and PHP6, but nobody's jumping on board. The majority of LAMP machines out there are running Apache 1 and PHP4 instead of Apache2 and PHP5. At least MySQL 3.23 is finally going out of style and 4.0 is becoming commonplace. But look what's out now: MySQL 5.
I really think PHP is starting to majorly stagnate and fragment. So much so, that given a few years, I can imagine something like Python or Ruby taking away some serious mindshare given a few killer apps using the language.
Re:This is silly (Score:2)
That aside... magic quotes are VERY important. I hated them when I first started, but the web would be a shittier place without them. Google for login
Re:This is silly (Score:4, Insightful)
(A continuation of number 1) Scoping in general is completely screwed up. GLOBALS aren't actually really global. Unless you specifically bring it into scope with the "global" keyword, but even there the behavior is subtly different. Or if it's a "SUPERGLOBAL" (e.g. the variables which are registered by REGISTER_GLOBALS) which are always in scope. I also find the scoping behavior within functions to be incredibly annoying, but unfortunately that brain damage hasn't limited itself to PHP.
(A continuation of number 4) Not only is MAGIC_QUOTES incredibly irritating, it's just not right. Most databases other than MySQL use '' instead of \' to escape characters, so adding the slash not only doesn't help, but makes it harder to clean the input. (Yes, I know about MAGIC_QUOTES_SYBASE, but in my experience, nobody uses it, instead resorting to stripslashes + str_replace.) That this is even needed as a language 'feature' is ridiculous in the first place. If they had a decent database abstraction from the beginning (or at least much earlier on than they did) that handled escaping properly, this misfeature might never have been created.
And finally, what is with having language features being configurable in the first place? There's no clean way to write a redistributable PHP application that will reliably run on a given installation of PHP without listing a whole set of configuration options that the user needs to set in an
No cookies, no access? Right. (Score:2)
-dZ.
Repost of the Article (Score:2)
--
I can't speak for everyone, or for that matter, anyone but myself, but I'm good at doing that so here goes.
I'm quite opposed to using MySQL and PHP, and I'm none too fond of Apache. Anyone who knows me or happens into a conversation with me about development quickly learns of my distaste for these particular
Re:Repost of the Article (Score:4, Interesting)
HOW TO BLOG EFFECTIVELY
(or nifty writing for the web two-point-oh)
1. Find a subject you have an issue with, even if you do not know much about it.
2. Click on "Creat new entry" on your favorite blog-o-matic software du juor.
3. Start ranting about such subject, avoiding obsolete hallmarks of the web one-point-oh era, such as:
a. Proper grammar and sentence structure.
b. Research
c. A point
d. spell-checker (or worse, actually spelling correctly in the first place)
e. Eloquence
f. Proof-reading (or re-reading at least once) when you're done writing.
4. Click "Submit" or "Save".
5. ???
6. Profit!
-dz.
Re:Repost of the Article (Score:2)
My qualm is that he made no effort to really sell his point while making what I believe to be a rather inflammatory statement.
I still hold that if a recent study showed the LAMP stack to be supposedly the most bug-free OSS project in existence, then you need to somehow back up claims that two of the major components need to be dismissed out of hand for being buggy.
Re:No cookies, no access? Right. (Score:2)
Hum, I'm using Firefox 1.5.0.3 (DeerPark) on MacOS X Panther, so my problem is not the platform. My problem is that I refuse to accept cookies from a site just to read a rant, when its only purpose is to inflate some two-bit blogger's traffic stats and fuel his ego and AdSense revenue.
-dZ.
BASIC's the worst, except for the other lang's (Score:4, Insightful)
Handling everything about the machine is neat, but it's something that honestly just wastes your time if you need a program that: reads a file, processes data and produces output. If that's all I'm doing, then why do I need to operate at a level that the O/S is going to conflict with?
I agree (Score:2)
I found the transition to languages like PASCAL impossible because of the syntax difference.
As I liked to put it "I learned most of my bad habits in BASIC". The transition to OO programming was particularly difficult because of the path I took from BASIC.
Now, I do love an English-like verbose syntax because it just allows me to eyeball my code and just get it.
The brighter LAMP (Score:5, Funny)
Apache
mod_perl
PostgreSQL
Weak dynamic languages will die! (Score:2, Insightful)
Save LAMP! (Score:5, Funny)
Nothing new and wrong conclusion. (Score:5, Insightful)
Being a professional freelance web developer and familiar with various web technologies I can say this guy has got it all backwards.
1) MySQL is not a full blown database. Big news. Would've you thunk? What this guy aparently just discovered the other day or so others have been aware of for years.
I've got more news: Databases in general are pathetic. View logic and transactions just move the problem into the DB and away from the App. They don't really solve it. Object-relational setups and DBs do, but they are still a few years away from widespread use. In that respect Postgres and Oracle are closer to MySQL than to ZopeDB. On top of that, in order to utilize a DB properly you have to know about the problems you'll be facing. And that you learn of best by using flatfiles or it's SQL equivalent: MySQL.
2) PHP is the web generations Basic. Very true. Does it spoil developers? No. The legend of procedural (Basic) coders lost to OOP was spread by academics who were unable to explain OOP in correct terms and context. Meanwhile people wo aren't that arrogant and mix OOP and functional programming whenever they feel like it (Symfony, Rails, Django, Zope) are kicking the collective asses of old-school hardcore 100% polymorphic OOP bloat advocates up and down the street (Java).
LAMP isn't the end all of web technologies. Nobody has ever said otherwise without making himself look extremly silly. But LAMP is a viable solution for any project of any size if the enviroment permits using it. The tools and production pipeline are among the most sohpisiticated FOSS programms around. Half of Googles Database is filled with forum postings and tutorials on PHP. DBDesigner, Clay and MySQK Workbench make working with MySQL so easy and fast that Oracle is seriously concerned about it. A bazillion of available FOSS and commercial tools and solutions for PHP are biting huge chunks away from the serverside Java market, pushing it back to where it belongs: The client.
Bottom line:
LAMP isn't beautifull or notably advanced. Has never been and probably never will be.
But it is:
a) Extremely easy to get rolling with.
b) Used by the largest amount of stable and mature OSS projects.
c) Growing it's featureset and best-pratice compatibility in the same rate the general populace is becoming aware of OOP and what Databases where initially meant for.
d) Nearly so widespread it can be considered a monopoly.
e) Entirely FOSS.
f) A T-Rex-sized Microsoft/Oracle/Macromedia/BEA/[fill in commercial webappserver vendor here] Boogieman.
And that's why it will remain a wide used setup and why that's a good thing.
Re:Nothing new and wrong conclusion. (Score:4, Insightful)
No, they don't.
And, what problem are you talking about? You mention a problem, but fail to mention just what this problem is.
As far as object-relational databases: they suck far worse than pure relational databases. Relational databases are built on solid computer science-- specifically, set theory, which has its own algebra. Object-relational databases have no such solid foundation, and so are not as rigorously based in actual, real math. Hell, there isn't even a common definition of what an object-relational database is, let alone what problem domain they solve. Also, they don't provide a damned thing not already provided by a good relational database.
Now.
The SQL language sucks. I'll give you that. We could certainly do better. But, at least it's marginally relational, with a complete (though stupid) grammar.
The thing is.... (Score:3, Insightful)
Granted, if they were using, say, Perl, they still probably wouldn't know how to build anything big and important, but PHP in particular provides some simple, obvious, and well-defined mechanisms to implement Bad Coding Practices. Separation of the logic and the content are the first things thrown out the window; PHP's SQL-related functions invite no end of bad design (database-specific query functions instead of something generic like Perl's DBI classes, no prepared statements, practically BEGGING for SQL injection vulnerabilities -- then there's the whole register_globals fiasco, short-tags vs long tags and magic-quotes settings just to keep you excited, and so on and so forth...)
There are other things, too - some will point out the lack of decent namespaces, inconsistent function naming schemes, too many functions that are too similar, and such- many valid complaints, a few silly complaints -- but they pale in comparison to all the Bad Stuff that PHP invites upon itself from novice coders.
Same old story - old is bad, new is better (Score:5, Insightful)
I'm really surprised to see that there are knocks against MySQL, particularly the argument that it could have been PostgreSQL or SQLite. This seems like revisionist history to me - MySQL was THE END ALL AND BE ALL of databases. Referential integrity - who needs it if your programmers have a clue, and anyone arguing for this was an IT weenie or a SUIT. Anyone advocating "real db functionality" was old school and didn't realize the world had moved past them because the only important feature was speed. Boy, how things have changed. Now, his argument must be "all of the
The same was true for Perl - back in the day, Larry Wall was God incarnate, and only an idiot would ever write code to sit behind a web site when you could script it with Perl. Of course, now P stands for PHP. And in this respect, the guy is just a bigot. To quote, "PHP is another sore spot for me. I've gotten to the point that not only will I not write PHP code, I won't even run applications written in PHP (my long search for decent blogging software was due to the restriction that it not be written in PHP)." So, even though there may be a perfect tool for me to solve a problem I need solved, I refuse to use it because it is written in PHP.
So, what happened? Perhaps the problem is that LAMP became popular. A popular undercurrent of sentiment is that if something is popular, then it is no longer l33t, and to express how l33t you are, you need to be a champion for the next "big thing". This shows how cool you are and how much smarter you are than everyone else. The problem is, once the cause that you are championing becomes popular, you are just like everyone else.
One of the arguments for LAMP was that it was easy to create websites. In fact, it was so easy, that you could teach your friends and family how to create web sites with LAMP. The argument was that it was just like BASIC. Now, that it has become popular and it is ubiquitous, the argument against it is that it is just like BASIC.
You just can't seem to win.
An excellent scrubbing script (Score:3, Insightful)
Hell, I worked with a kid who had math and CS degrees (I hold two degrees, but neither degree is math or CS) and he littered his code with magic quotes.
The problem is that PHP is left in the wilderness. It's easy to learn, but too powerful to weild. But the C++ers talk it down, so there aren't enough people teaching the right way to use it.
PHP can be brilliant. It can also be a portal into hell.
But, ultimately, empowering new entries into the industry requires that we educate, not intimidate, them.
BASIC is a brilliant way to get started (Score:4, Insightful)
C is a language that's too powerful for a beginner. There are too many ways to hang yourself if you don't know what you're doing. Someone who has never programmed before isn't ready for it. BASIC taught me to develop algorithms, so that when I was learning C, I was struggling with the syntax and semantics separately from the process of learning to write algorithms. Pascal taught me discipline that I used to structure C programs in ways that aren't required by the compiler but necessary to keep one's code organized and managable.
BASIC is a good thing. It's like drinking milk as a baby. Pascal is a good thing. It's like learning to get along with other kids in kindergarden. People aren't ready for C until they've gone through those stages.
I shall speak up for my beloved PHP (Score:5, Interesting)
It's a losing battle so I'll make this quick. PHP is:
If PHP is the only language you know, use this article as an excuse to learn Perl or Python. If you already understand the basics of HTML/CSS and have taken a few "programming 101" classes somewhere, *good* open-source PHP projects are an excellent way to learn *good* programming; not just a "working script", but the whole shebang.
And, to be fair, the "copy/pasters" are "copying/pasting" no matter which language it is.
Code is Code (Score:3, Informative)
Vaguely written rants laced with trendy buzzwords and university eggheads flaunting their scholarly beaks at plebian programmer tools aside, let's look at why LAMP has been and will continue to be a viable web development platform.
First, I've coded on just about all platforms, from COBOL, REXX/CLIST and Assembler on IBM mainframes to C on Unix boxes to LAMP to Ruby (including some RoR apps). And, code is code — in the hands of an unskilled practicioner, the product is going to be crap no matter what the tool. And a gifted artisan can craft a masterpiece with nearly any tool.
There's a great deal I detest about PHP. But, any language that I've toiled in for over a few years in writing relevant legacy code/enterprise applications/dynamic web software shows its unsavory side. No such thing as the one true programming language exists — they're all just tools, and just as they have their selling points that shine, they all suck in some sense of matter.
Anyway, here's a short list of why LAMP is good.
Having laid a case out for LAMP out, let me share some concerns about future LAMP direction:
FLPR - FreeBSD, LightTPD, PostgreSQL, Rails (Score:3, Insightful)
Re:What he is suggesting (Score:5, Insightful)
Your examples:
- Google: They use whatever language they want, they've been around since ~1998 when PHP was still a little baby.
- bbc.co.uk - As far as I remember we're looking at progressive development from ~1995, around the time when PHP was only a sparkle in the postmans eye, they've got some very skilled Perl guys and smart sysadmins with years of work already in Perl.
- Slashdot - ~1997 and started out as slow as molasses regular Perl CGI, anybody working on the same website for ~9 years in any language should be able to make it run like a dream.
- Wikipedia ~2001, with initially being implemented in PHP in ~2002 and clustered in ~2003. Running large websites is damn hard, and your exaggeration of the problems is overrated.
When you run into large amounts of traffic the language becomes a small part of the equation, Microsoft.com was running on VBScript (and C++) for several years, most of Yahoo is running on PHP...
Yuch, my mouth tastes like flame bait.
Re:What he is suggesting (Score:2)
Do you have anything to back up that claim of "nothing else could cope", or is it simply baseless speculation?
Re:What he is suggesting (Score:2)
Do you have anything to back up that claim of "nothing else could cope", or is it simply baseless speculation?
I contribute regularly to several message boards on the BBC. Things were okay when the site used to run on perl. Nowadays, you tend to get frequent messages like "DNA thread failure" "Server too busy Error 5000" "Too many requests" etc. I understand the perl code was replaced with some MS code..
Re:What he is suggesting (Score:2)
I've heard many a DBA-type praise PostgreSQL up and down. However, for most end users, they aren't going to run something that requires the load of Slashdot or Google. SQL scales well, is easy to install/administer, and learning MySQL is fairly interoperable with learning MSSQL. I use MySQL on all my webpages, because I have to use MSSQL at work. I'm not database guru, but I tell you I've never had any complaints
Re:What he is suggesting (Score:2)
You can't imagine how your text sounds ridiculous by referring to MS SQL Server as "SQL". A comparison of the two databases won't ever show that SQL is bad because SQL is a language and because it is used by both databases.
Responding to your comm
Re:What he is suggesting (Score:2)
Re:What he is suggesting (Score:3, Informative)
All commercial software vendors generally prohibit benchmarking to some extent these days. Yes, Oracle and IBM too. The idea is to prevent "bad" benchmarks by improperly configured setups. Most vendors' service organizations will assist journalists and even end-users with performing standard benchmarks (sometimes for a price).
As for SQL benchmarks,
Re:What he is suggesting (Score:2)
Slashdot runs MySQL:
http://www.mysql.com/news-and-events/success-stori es/slashdot.html [mysql.com]
Most PostgreSQL advocacy I've heard ends up being an anti-MySQL rant. It must be frustrating to think you have better technology and find people using the competition's stuff anyway. I like MySQL though, and the complaints sound a bit shrill to me.
Re:What he is suggesting (Score:2)
Re:What he is suggesting (Score:3, Insightful)
I use MySQL myself too, since it's available, free and fast, but I have also ran into the lack of referential integrity and subselects. I've not had to deal with transactions in MySQL yet, since I only use it for CMS's, but I've required transactions at work (using DB2), so I understan
Re:What he is suggesting (Score:3)
And honestly, this is more my opinion, but the LAMP stack is probably underutilized by most people. They're happy to get PHPNuke or PHPBB up and running for their site. If it fits the bill for 90% of the users, and power users have alternatives that they're happier with (be it Perl and
Re:What he is suggesting (Score:5, Informative)
Transaction support in MySQL doesn't depend on the version, it depends on the storage engine you're using for your tables. The InnoDB, NDB Cluster, and BerkeleyDB storage engines all support transactions. InnoDB also supports foreign keys. InnoDB has been available in the -max releases since MySQL 3.23.43a (early 2002) and has been part of -all- MySQL releases since 4.0 (late 2002). Any web host offering a MySQL server that doesn't support transactions and referential integrity either can't be bothered to update their software at least once every 4 years, or else they're building their own and deliberately leaving out InnoDB. In either case, you need to find another hosting company.
Re:What he is suggesting (Score:2)
Well god for them they're not using PHP, because I agree that it is not very well suited to large apps.
but...
Nothing else could cope.
What the hell is that supposed to mean?
Misguided (Score:3, Informative)
If you need some prospective; about 3/4th's of my google searches for a specific topic (i.e. "stegosaurus" and not "Error no. 43245")
Re:What he is suggesting (Score:2)
And lastly Wikipedia. Runs with PHP and MySQL! Their servers blow weekly, copious lengths of downtime, search function regularly disabled. Pages are nearly always slow to respond. QED
To be fair: Slashdot used to be down quite often (though mostly due to tinkering I guess) and it does use MySQL...
Not such a great study of PHP/MySQL. (Score:5, Interesting)
Be fair to Wikipedia. They are more media rich and interactive than any of above and their service does not blow as badly as all that. In fact, the service is good enough to justify deployment at any organization if not of the Wiki used by Wikipedia then any of the other four or five choices.
Re:i only agree with PHP (Perl) (Score:2)
P is usually taken as "scriPting language" or "Language starting with P" such as Perl, Python or Ruby.
Re:i only agree with PHP (Perl) (Score:2)
-dZ.
Re:Too easy to criticize LAMP this way (Score:2)
Re:Oh, PHP is by far not that painful (Score:2)
In a language where numbers and strings are distinguished to the extent that you must call a function to convert one to the other, it's less unacceptable to recycle operator