PHP Usage in the Enterprise
acostin writes "Some open survey results were published about PHP usage in the enterprise on the InterAKT site. An alternative survey on the PHP open source mouvement can be found on Zend site. See how we've evaluated the PHP market size($$$), what people think about PHP as an alternative to Java and .NET, and what should be done in order to have your large clients adopt open source solutions."
For those of you that hate M$ and dont want to learn Java, its perfect.
The early bird gets the worm, but the second mouse gets the cheese!
What problems have people had in trying to migrate their applications to php, and how did you overcome them? How would you sell php to your boss? Bearing in mind most of our applications aren't simple database-driven (and I used that word hesitantly!) ones like Slashdot - hint: banking and insurance sector.
See how we've evaluated...what people think about PHP as an alternative to Java and .NET
.NET.
I don't know about java, but I can see anything as being a good alternative to
DO NOT WRITE IN THIS SPACE
okPHP usage in the enterprise
that by the 23rd century they would have left PHP behind.
Or maybe it just shows the durability of opens source software.
I really enjoy using PHP for web development. I find that you can't beat scripting languages for ease of maintenance, quick turnaround time, and tweakability.
One of the big reasons I chose PHP was the availability of "LAMP": Linux, Apache, MySQL, PHP. I know these technologies have been around for years and will be around for many more years, so it's an easy sell to management. There's plenty of talk on the newgroups if you ever get stuck and PHP's online documentation with user comments is priceless. I think more documentation should follow this example.
That aside, the pure performance and reliability of the above is excellent. These technologies were made to work together, and from what I hear the teams even collaborate to make sure their stuff stays working together. It really shows.
Years ago I worked on ASP/SQL Server solutions and where you had to go with native code for high-performance with ASP, I find that with PHP it is high performance on its own.
Great job to everyone who has helped put together these technology solutions. A shining example of the high quality that can come out of the collaborative efforts of many.
PHP is a great tool, especially if you just plan to throw something together in no time flat. Start up MySQL with PHP and Apache and you have a rather full-featured system at an affordable price: $0. On the other hand, I have no idea on reliability figures for that mixture. Still, PHP is great to work with. Easiest interface in the world.
(P.S. Lots of programmers in the Enterprise. Data and me were always slapping together code for that clunky thing. Cloaked Romulans? Yeah right--just software bugs in the sensory system. "Uh, Captain, they've gone cloaked again." "Damn! Those ships have that capability!?!" Works every time.)
I can't have been the only one to think, "Gee, wouldn't it be odd to see Worf trying to bang away at some php in the middle of a battle?"
Guess it could be worse. If the Enterprise used PERL, the show wouldn't make any sense to anyone except the people who made it... oh, wait. Isn't that how it is right now under B&B?
I'm so confused...
For both the Zend and InterAKT surveys, there are lots of raw numbers presented, but the interpretation is lacking. The commentaries on the InterAKT results are little more than "as you can see, such-and-such wedge of the pie is the largest," and there is no interpretation whatsoever on the Zend site.
.NET, and found both of them to be too far disconnected from the HTML that I'm trying to create. PHP provides an excellent blend of power, speed, simplicity, and directness.
Of course, this is a cheap and easy way to conduct a survey (multiple-choice), but the results are almost meaningless if they can't be put into context. I would have preferred to have seen a hundred randomly-selected PHP developers interviewed, essay-style, about why they are using PHP, their thoughts on PHP versus other technologies, etc., and then have the results compiled into a journal-quality article supported by graphs and raw numbers. The important information isn't in those graphs; it cannot be enumerated and broken down into clean categories.
Personally, I develop PHP sites because it's the fastest and simplest way I've found yet to publish dynamic web content. I've tried making sites with Java and
It's hard for thee to kick against the pricks.
The beautiful power of PHP never fails to impress me.
All I can say, judging by the links in the spam I'm getting lately, is that the spammers have jumped all over PHP. Each and every last goddamn one of them is using it to process their form responses.
What do we think about PHP as compared to Java and .net? What do we think about an grape as compared to a basketball and an egg? These are 3 quite different things. A HTML-generation targeted scripting language compared to a compiled general purpose language as compared to a distributed object and language framework is a pretty disparate set of things to compare.
The language as it has been in most of it's 4.x.x iteration has been just about fine. Good for quick slap em together websites and small applications. But...
.Net) where you can rely on the functionality of the objects without having to second guess the original developers.
I have seen huge cumbersome application servers built around PHP that are a nightmare to maintain without having intimate familiarity with the code of the application server, such as Ampoliros or Ariadne, something which defeats the purpose of using such a large system in the first place. Such things really do work better with a OO by design language such as Java or ASP.Net (I assume, don't know
My guess is that PHP needs a better OO design (and no, PHP5 is not it, yet) and better seperation of logic and presentation for larger systems.
But for smaller stuff, well it's hard to beat in terms of price and speed.
is the prime enterprise use example (although they still use legacy, prepritary web programming based on C, all their new developments are run on PHP and BSD, correct me if i'm wrong)
I worked in a small shop, the web app isn't mission critical stuff like banking, but it wasn't "brainless dump data from Mysql". I was lucky that my boss was totally not picky about languages, as long as it gets the job done. But if I have anyone I work with that doubts the power and simplicity of PHP, Yahoo would be my example.
And so far, developing on the so called LAMP platform, I love PHP and would use it for any and all web development. It can be used as a quick hack (an argument always used against PHP btw, that it's only good for a quick hack and not for professional use), OR you can code it like a pro with objects et al. I was not impressed by Mysql however, it is by no means stable (this is v 4.0.13), but that's another topic.
My sig is my personal pet project using PHP
VIVA1023.com | Political Fashion.
"Unable to comply: Error 404"
I don't get it. Are you saying that the Enterprise was Slashdotted?
"Derp de derp."
Yeah..
To write clean, well structured PHP, you really need to do some good design, use OOP, seperate content/formatting/logic/etc, and basically at that point, you're left with a half-ass OOP implementation, annoying pass by value, messy syntax, no exception handling, etc.
PHP was meant for making relatively minor webpage hacks, and it shows. This still remains PHP's strong point; building enterprise applications (that are designed well) does NOT.
Here's my list of bitches about PHP:
* No class attributes, only instance attributes
* No namespaces (and they were dropped from PHP 5). include()/require()'ing a file just dumps its namespace into the big happy global namespace, and it's a freaking nightmare.
* OOP sucks. You have to litter &'s everywhere to get references, and lots of other problems that I'll refrain from typing out. Ok here's one -- how do you pass an instance method for use as a callback? Something like array($object, "method_name_in_a_string"). Good god.
* No exception handling. Want to "handle" an error? Toss a @ in front of it, then you'll never see it. How helpful.
* Type handling is a nightmare, sure, they make it real easy for the newbies to use numbers-in-strings as numbers, but when you're not a newbie, you begin to run into issues where it's expecting you to be stupid and as a result ends up being stupid itself, and causing you to write disgusting checks just to make sure things are sane.
And that's the root of the whole issue, I think. Things that bend over backwards to cater to newbies end up doing a shitty job for people who have a clue.
Also, if anyone knows of any projects (with source available) written in PHP that are designed well, I would be interested to hear of them. I looked at a tiny bit of PHPMyAdmin's code just for kicks and was horrified. But that's not a valid judgement by any means. Again, I'm just interested to see if there are any out there (and have a look at them).
And a last thing, I might be biased by knowing Python (but I knew PHP first!). Python tends to flow very naturally for me, and even big complex things just end up being big and complex, instead of big and complex and A COMPLETE FREAKING NIGHTMARE like big things in PHP tend to wind up (for me).
Go Python! Death to PHP!
Cold Fusion is also a web scripting language, but costs quite a bit.
.net (a proprietary collection of patent encumbered programs and methods) even more so.
The last time I compared the two (admitedly a while ago) PHP had many more features and was the much better choice. (Even if they were priced the same, which they are not.)
Even more telling is the amount of books available for each. There are seven Cold Fusion books still in print according to Amazon. (Most the same book for different versions of Cold Fusion.) A search for PHP gets 112 hits. (I am not certain how many are still in print. Much more than seven.)
Comparing Java (a general purpose language) to PHP (a web scripting language) seems to be a bad comparison. Comparing it to
"Trademarks are the heraldry of the new feudalism."
You'd think the Federation would have advanced beyond PHP.
When you've laid eyes on an Apache/AxKit driven site that uses XPathScript and XSLT, then we'll talk. You want completely unmaintainable content? First, you have XML files which somehow are supposed to respresent data. Nevermind that somebody is supposed to make some kind of heads or tails of these things. Second, you have either XPathScript (.xps) or XSLT (.xsl) which is somehow supposed to transform that XML into discernable HTML that a browser can use. In the case of XPathScript, you have an wacked hodgepodge of Perl and HTML. Nothing halfway understandable like an Embperl, Mason, or even Text::Template template or component. No, go look up XPathScript to see what I mean. XSLT stylesheets are no better.
I want to believe in the XML's mission, but when I recently took up a migration of someone else's AxKit driven site, I haven't been able to get much sleep (it's 2:28am on a Friday night and I'm rebuilding a server to accomodate this goofy setup).
PHP is the coolest language for Web development today. It provides the features of Perl but designed to be a Web development language. PHP is my primary choice if the applications doesn't demand complicated business abstractions (Java scores in such situations). Using an accelerator like ionCube will be icing-on-the-cake.
No class attributes, only instance attributes
Not a big deal. Just constants or globals that are prefixed with the class name (seriously, it works fine in practice).
No namespaces (and they were dropped from PHP 5).
See above.
OOP sucks.
Yes, parts of PHP do stink, I'd love to never see a "&" again, though I think I've mostly figured it out. Also inheritance and constructors is a bit ugly. That will be fixed in PHP5.
No exception handling.
This is a big problem. Actually the only "real" problem on your list, imo. What I usually do is just die() right then and there.
Type handling is a nightmare, sure, they make it real easy for the newbies to use numbers-in-strings as numbers, but when you're not a newbie, you begin to run into issues where it's expecting you to be stupid and as a result ends up being stupid itself, and causing you to write disgusting checks just to make sure things are sane.
I actually like the way it converts strings and numbers. Just be sure not to test them as booleans and you won't run into too many problems. Since your data is usually coming from outside, you better have pages of disgusting checks to begin with!
Also, if anyone knows of any projects (with source available) written in PHP that are designed well, I would be interested to hear of them.
PEAR (pear.php.net) is a nice library for PHP. I enjoyed looking through the source code for inspiration. Sure, it's not Python (or Ruby, my fav) but it's readable and uses good practices for php.
Also, there is a site with patterns in PHP, google for it.
Also also, there is PHPUnit framework for unit testing. Not exactly JUnit (no exception handling!!) but I have been using it with "test-first" development, and churning out very nice PHP code.
I used to hate PHP because of the lax security, but I think it has a lot of potential as a "lite" language that can handle big projects. My boss loves it because he understands it, I like it because of the objects.
Also, if anyone knows of any projects (with source available) written in PHP that are designed well, I would be interested to hear of them.
Check out Binarycloud
I looked at a tiny bit of PHPMyAdmin's code just for kicks and was horrified. But that's not a valid judgement by any means.
Most open source code (be it C or PHP) is absolutely terrible. PHPMyAdmin is not a good example of well designed PHP code.
Many of your complaints about PHP have been corrected in PHP5 -- you might be interested in checking it out.
What I usually do is just die() right then and there.
die()'ing is nice, if what you want is to stop execution.
die()'ing is worthless, however, if what you want is to catch errors and correct them.
Imaging a banking transaction.
Step 1) Receive a transaction request.
Step 2) Debit the money from the source account.
Step 3) Insert the money into the destination account.
Step 4) Tell the source that the money was taken.
Step 5) Tell the destination that the money was received.
What happens if an error occurs in step 3? The money has been taken out, but now you're going to die? That doesn't do anyone any good.
Exceptions are required for enterprise quality applications. Until PHP gets exceptions, it will remain a toy scripting language great for rapidly developed websites and horrible for mission critical applications.
--
Use Vobbo for Video Blogs
Php 5 addresses a lot of your concerns although not all of them.
"Also, if anyone knows of any projects (with source available) written in PHP that are designed well, I would be interested to hear of them."
ADODB.
War is necrophilia.
Maybe this will be a good way to get my company to fund my PHP Cruise.
Too bad we're all Perl/JSP Shop.
GeekWares - Buy and Download Today!
Not a big deal. Just constants or globals that are prefixed with the class name (seriously, it works fine in practice).
I think that's a good point. These things do *work*, and it's what the PHP standard library does (and PEAR AFAIK), but honestly, it just feels way too nasty for me. I think I just want PHP to be Python, and anything short of that won't be good enough for me. Honestly, I *personally* don't even give a crap about PHP. It's just that I'm stuck with it at work, which is a real bummer. Also inheritance and constructors is a bit ugly. That will be fixed in PHP5.
Ironically, neither of those have caused me any real trouble. :)
I actually like the way it converts strings and numbers. Just be sure not to test them as booleans and you won't run into too many problems. Since your data is usually coming from outside, you better have pages of disgusting checks to begin with!
But I'm talking about stuff coming from internally. Question: How do you check if a string contains an integer? is_numeric() only checks for float *or* int. is_int() actually checks the type. You have to do if(is_numeric($foo) && (int)$foo == (float)$foo). Maybe I missed something on that one. It all feels convoluted to me, but I guess that's personal preference. I like things being somewhat strict.
PEAR (pear.php.net) is a nice library for PHP. I enjoyed looking through the source code for inspiration. Sure, it's not Python (or Ruby, my fav) but it's readable and uses good practices for php.
I really need to get around to looking at PEAR. I looked through the docs, and nothing there seemed all that appealing to me, but I'm sure there has to be *something* I can gain from it.
Also, there is a site with patterns in PHP, google for it.
phppatterns.(net?), yes, I have seen it before, actually I have read a couple interesting things there. Probably the best PHP site around, it's actually something other than mysql+php or "how to make an image gallery", etc.
I used to hate PHP because of the lax security, but I think it has a lot of potential as a "lite" language that can handle big projects. My boss loves it because he understands it, I like it because of the objects.
I think it makes a good "lite" language too. Great for handling html and whatnot. It's just when you want to write the whole *application* in PHP, that I feel it falls short.
In order to win a pitch with a PHP solution, a company should offer a good price and should have a very good proposal.
To get a profitable PHP business, you have to sell either CMS's or Intranets.
The obstacles to be surpassed are the fear of unknown technology, the compatibility between PHP solutions and existing ASP or Java applications. One should focus on the solution offered not on the technology when bidding for a project.
This is about WEBSITES for Intranets. This isn't in the enterprise, this is the information site the HR department thinks everyone should have. And while I do applaud the rules above, i.e. sell solutions not technology, I question the idea that this is PHP in the enterprise.
PHP in the enterprise would be PHP being used within a business critical function. Say something like your stock management system, or procurement system, CRM etc.
Now to all the people who are about to write pithy replies, please realise that 95%+ of systems out there are NOT websites, and that the ability to render pages easily is last on the list of reasons to use a technology.
This is "PHP in the low end of the website market" NOT PHP in the enterprise.
An Eye for an Eye will make the whole world blind - Gandhi
The criteria for enterprise-readiness is stability and security, NOT complexity. Complexity comes from the programmer, not from the language. Unless you have to tie in with other systems like Java of course (you would use JSP in that case), I don't see any limiting factor that would keep PHP from being used in your definition of enterprise use (financial, mission critical stuff).
My point is, Yahoo is a big website / service and the stability and security of the language it is built on is as important as any financial use (although i admit you have more to lose with a banking system going down than Yahoo going down, I've never seen PHP doing funny things like BSODs)
PS. I forgot to put <shameless plug> tags around my shameless plug in my initial post, sorry about that
VIVA1023.com | Political Fashion.
i used perl almost exclusively, then had a couple of projects and used php. it was a dream to use. nice syntax, powerful built in functions, not super verbose like java nor bizarre like perl. you can cruft together a few pages or create a huge site. been there, done both. however, remember PHP is a templating language. designed to be so. so, it is not necesarily an OOP language, yet is is OO in nature. for instance, create different .php files and piece together your pages. as for security, use good programming skills. duh. for instance, keep your connections in separate files. then just include("connection.php"); that will help.
.NET by what's that company, i forgot. linux didn't really enter mainstream until IBM ponied up a billion. no matter how great a tool, it just seems cheap, and to businesses, they just won't "risk" it. sad. the other problem that php has it that it is esy to put together a good site, and easy to learn and use. java and .net are not. so, it seems like BASIC. you can't use that for serious apps.
that being established, it will have trouble being accepted as an enterprise tool because it is not backed by a company. java backed by sun,
My problem? I was perfectly gruntled, until some numbnuts came by and dissed me.
It's a bummer, too. I think it's fun and challenging to write something that not only works well, but is coded *perfectly*. Of course, perfect never happens, but it's a constant process of trying to get there. :)
Many of your complaints about PHP have been corrected in PHP5 -- you might be interested in checking it out.
Yep, I definitely have been eyeing it, however, by the time it is in widespread use, I hope dearly that I will not be doing PHP anymore. As mentioned, I would not even deal with PHP if it weren't for work. Kinda something I have to deal with right now, so I end up lashing out like this whenever I get a chance. :)
Did captain Picard approve?
-------
Support Indy Music. Buy
Until PHP gets exceptions, it will remain a toy scripting language great for rapidly developed websites and horrible for mission critical applications.
And what's wrong with that? Why does a language that's good for one thing have to evolve into some language that suits it (probably badly) to a whole 'nother level of application -- and in the process makes it worse for what it was originally good at. PHP is great for rapid prototyping, doing lightweight web apps and scripting. If you need something heavier duty -- like your banking example -- go with J2EE, not some UberPHP.
-- Alastair
If you are interested in the scripting language comparison, see Server-Side Scripting Shootout.
I could not justify my existence if I were a turkey farmer. Would I terminate myself? Undoubtably, yes.
I've been using php for about a year to do scripting at work. It's familiar feel and ease of use make it a perfect candidate IMO. True it's not the fastest language out there, but it IS powerful and very easy to code (again, IMO).
I've also done a lot of web programming w/ PHP as well (www.gamerznet.com for one), and i find it WONDERFUL for web work. i've tried everything from shtml to C++ coded binaries for web stuff and havent found a lanuage for it yet that i like more than php...
The problem is that people *do* use it for these heavy duty tasks. "PHP Usage in the Enterprise"...
It's like a lot of things: not bad, but grossly misused. Flash is not a bad technology. PDFs are not a bad technology. Javascript is not a bad technology. The problem is that people use them for all kinds of stuff that they shouldn't, and it winds up working like crap and annoying people.
I think the comparison is not so much in the scope of the languages / platforms, but on the utility of them to develop web sites / services?
VIVA1023.com | Political Fashion.
Well, that's true enough. But it's the fault of incompetent developers (maybe they only know one language -- if your only tool is a hammer, every problem looks like a nail) rather than the technology.
-- Alastair
I generally try to avoid using regexps when not needed. Even when reading my own code, I have to stop and examine *exactly* what each regexp does. Many times there is a function(s) that does what I want, that has a sane name, and has less overhead.
The main point was, Why, if is_numeric() checks the contents of a string, does is_int() check for the actual type? It just seems completely braindead to me.
I can understand why people think that Java is slow, taking that Java GUI widgets are usually slower than native widgets on the desktop. But J2EE is not inheritably slow.
Though there are clunkly J2EE apps out there, I'd wager on a hunch, that the average J2EE app would out-perform a same sized PHP app. If we add a PHP accelerator to the mix, like Turck MMCache, then PHP may have a fighting chance.
But remember, J2EE compiles the web application only *once* at startup, and can also ( and probably does ) optimize for the specific processor that it's running on. PHP, without an accelerator compiles on every hit, and PHP can't optimize for the specific processor unless you have a good sysadmin.
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
I'm not sure about this. Merriam-Webster uses PHP for their online dictionary; Yahoo uses PHP for their site and many other corporations are using PHP for thier web development.
.NET. And it does a good job doing what it does :).
;).
Additionally, PHP 5 has true OO support and ends up looking a lot like a hybrid C/C++/Java.
I think one of the main reasons it hasn't been picked up in corporations is because of its lack of OO features (and possibly its inability to be compiled into a single app), although you do have plenty of good encoders and caches.
I don't think speed's really an issue -- PHP consumes a relatively low amount of memory and is quite fast. On a 143MHz UltraSPARC IIi, I can fetch and pattern match 70,000 directory listings from a MySQL connection to a remote computer and display output in approximately 15 seconds. On a modern machine, this is instantaneous. Additionally, the caches speed up the process by magnitudes. PHP has a much lower overhead than enterprise Java (even J2SE) and
And I'd suggest that you take a look into using the require_once language construct instead of include
Finally, PHP is an Apache Group-backed project, so it's not just floating out there with a few developers. PHP has great documentation, tons of developers and a huge publisher interest (buy my books, BTW). I think it could make it.
www.sitetronics.com/wordpress
I have done quit a bit of work for large clients with both Cold Fusion and PHP. Most clients did not care what language the code was written in.
They rarely cared about much more than these three things:
1- How much will It cost us to deploy solution X.
2- Who quickly will solution X be operational.
3- Is it compatible with our current infrastructure.
Becaues of this clients who were already using Cold Fusion wanted us to use it for their new projects. The rest were quite happy when we would suggest a PHP solution.
--
Ernie Dambach
Ernie Dambach
"It is no small thing to celebrate a simple life -Tolkien
I used to think highly of PHP when I was using it for small tasks (creating a blog page and a half ass forum) but man oh man does it suck for doing big projects. In the enterprise marked, there really only one player I'd look to and that is Java. Everything else is really irrelevant. Yes Java has a steep learning curve but once you get ahead of the curve you are never going back to whatever you were using. Java + Eclipse is a deadly combination.
-----
One is born into aristocracy, but mediocrity can only be achieved through hard work.
.NET has COM+ for backend systems, Java has EJB, but PHP has nothing :(
I can't use distributed transactions, transparent failover, declarative security and transaction demarcation in PHP.
Wrong on some counts....
I agree with your statement that php lacks namespaces and certain other things.
But you can make a nice clean seperation between application and data with php.
As for a clean/well coded project take a look at xoops.
When I joined the IT department at SST (a fabless chip manufacturer), they were 100% MS. I said I would be using PHP or they would be hiring someone else. They hired me, so I went hog-wild. I hired on the guy who built edrugtrader.com, the guy who built beerotopia, and one of the developers of Yube (which is/was a primarily Java shop). We've built up a massive intranet product in PHP. It's modular, with 196 files all interoperating nicely. Thanks to our Yube guy, it's object-oriented in the most-reused parts. It has areas for file management, posting news, creating new Web pages with a built-in GUI editor (thanks HTMLArea!), org charts, a task management system, a budgeting tool, employee evaluation systems, a signoff system with escalations & delegates, a form builder, and a lot more. On a day when we post earnings, the intranet can see just as much traffic as the public site. We've sustained over 100 requests/second in a few spots, and done just fine. I know that's not Yahoo-size numbers, but it's not "small" either, I don't think. If it is small, I know that edrugtrader sees many times more traffic and performs well. So no qualms there.
The problems we've had with PHP were small in number and quickly resolved. First, 4.3.2 had a bug that resulted in blank pages displaying intermittently to our users. That sucked, but 4.3.3 fixed it. And way back about 3 years ago as we started the site, we had to increase the memory allotment for just about everything -- we had some big processes with hundreds of queries getting read into PHP arrays, and we hit the default memory limits pretty quick. Other than that, no problems. Development is quick, often easy, usually fun. If we need to go OOP, that's fine. If we need to do simple templating, that's fine too. And increasingly, we're using it outside of the Web. We have a dozen cron jobs now that are all PHP scripts. Some things, especially screen scraping and working with mailboxes, still need to be done in Perl. But lots of server management stuff -- filesystem work, data dumps, monitoring -- seems to be going along fine with PHP nowadays. I'm pretty happy to have bet my career on PHP so far.
My Greasemonkey scripts for Digg &
Then what's the set_error_handler() function for?
I have to agree about the OOP, though. I wrote a pretty large-scale ecommerce project in php, though, and it took me about 1/5 the time it would have taken in perl.
Do you really need reason for beer? Wingman Brewers
I have seen huge cumbersome application servers built around PHP that are a nightmare to maintain
:) Perhaps it's more common in PHP because the barrier to entry is lower.
This problem doesn't discriminate by language.
My guess is that PHP needs a better OO design (and no, PHP5 is not it, yet)
I think you could argue PHP5's OO design is good enough, or just as easily argue that it's not. I'm curious, though, what your main complaints wants with it are.
better seperation of logic and presentation for larger systems
I was looking for this for quite a while and then found Smarty. At first, it seemed so simple that I disregarded it as being glorified search-and-replace templates. The temptation is to think "I can just do that by echo variables inline." But truth is, there's much more to it than that. After giving it a fair shake, I've discovered that it's an incredible useful, clever design. It's much more functional than it seems on the surface. It made PHP substantially more useful to me.
Between PHP5 and Smarty, I think there's a pretty good basic core toolset to work with. I actually think Java tries too hard in certain areas -- too many features, too much syntax, too heavy-handed typing system, too much complication. But no question it has its merits.
- Scott
Scott Stevenson
Tree House Ideas
I'm not saying this is some ultimate solution, I've also missed exceptions badly, but if the application needs exception handling only in a few places it's quite simple to simulate them:
Far from beautiful, but you know a lot of "enterprise applications" have been written in COBOL, Fortran or C which none of them has exception handling AFAIK (if gotos don't count).
The criteria for enterprise-readiness is stability and security, NOT complexity.
In that case, an IBM mainframe (or clone) shop is probably as "enterprise" as you can get. Almost nothing can beat a mainframe as far as being large and reliable. Application development ease? Well, that is another issue.
But, I cannot find a consistent definition of "enterprise". The only commonality seems to be the expenditure of boat-loads of money on tools and/or consultants and contractors.
Table-ized A.I.
I'm not sure if our PHP usage would qualify as "enterprise" but we do use it where I work (one of the rather large telecoms). Me and a co-worker were asked to build an inhouse tracking system to handle the work that the entire office does (a little over 150 users in this particular office and we needed to track the work flow of about 16,000-18,000 work orders a month). We were given a budget of exactly $0. Options were limited. We chose apache, PHP and MySQL. We initially ran it on a spare desktop with Win2k Pro. It has grown to cover 4 offices (each with their own desktop ha!). Our office finally got to "ugrade" so we spent about $500 and threw together a cheap dual processor system running the LAMP combo. We can easily go 9 months to a year between reboots. Now our little "system" serves about 800 users total, tracks almost 3 million work orders (and counting) and has cost next to nothing. All we had to do was break the corporate standard to get it done (calling it an ongoing test helps)... but it works and all support comes from me and my co-worker so IT doesn't bother us. I can vouch for PHP as a viable solution when budgets are tight (they always seem to be tight for some odd reason)... it works and works well. Considering that any changes to the legacy systems used in office can cost over $4,000 (for the tiniest thing) and people can call us up and we make changes in about 5 minutes at no cost... people love it. Apache, PHP and MySQL has been a godsend for almost 3 years now
Problem with using Yahoo and Amazon as case studies is that they any but typical applications. Very few people can, or should try to, identify with them.
Yahoo, as you said puts a lot of their business logic in C code. Amazon probably does something similar. They have to, because it would be difficult for them to put the massive amount of business logic that these sites need in PHP efficiently.
The problem is PHP's runtime. Do you think Yahoo uses PHP's builtin session management? They could, but I very much doubt it. PHP uses a files to serialize session variables, and the session may be resumed on a different process. This means that PHP can't save any variables that can't be serialized eg. some complex objects, or resources that are tied to a process by the OS usually, eg. IMAP, LDAP, or any socket connections, file ids, etc.
Another example is performance. Sites like yahoo and amazon do things such as decoupling database access from page views, instead generating static pages or almost complete static pages and serving those; or they cache html output agressively; They have huge server farms and they rather take a performance hit instead of paying enterprise wide licenses. etc., etc.
In other words, they're trying to solve a much different problem than what most of us are solving.
PHP is a great language, but personally, I don't see it being well suited for medium to large web applications at all.
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
why don't you post as a real person so ppl can mod you -1 redundant?
I agree that PHP is a template engine that's perfectly suitable for portals like Yahoo, but calling Yahoo not an enterprise is silly.
Say it with me: Enterprise means big companies with a lot of cash to burn and a lot to lose.
VIVA1023.com | Political Fashion.
forgot to preview.
I agree that PHP is a template engine that's good for database / application abstraction only to a certain degree, and building a banking system using it is not using the right tool for the job. But Yahoo is fine using it for what it does, and it is an enterprise.
VIVA1023.com | Political Fashion.
Exceptions are required for enterprise quality applications.
I don't think that they're required, look at perl & C.
PHP definitely has some issues.
* By the time you're done coding it right, it's as long as similar C code
* Exceptions are a very nice way to handle things properly and concisely, and die() is certainly not a solution.
* Not easy to contrain variables to a type (type contraints are essential for any good database, why not for a language?), i.e. you can't cast a variable without doing something ugly like settype($x,"integer"), which modifies the argument.
* Not good class/object support, no namespaces
* Include()/require() are weak
Let's face it: PHP's strength is not the language, it's not the library, it's the platform!
PHP makes a nice template language that helps you organize simple web apps in a simple way, quickly. It's nice for a sysadmin of a virtualhost (it allows safe mode operation and enforces it's own limits on RAM & CPU). PHP knows what it takes to write a web app, and it puts everything right in front of you, and that's what's good about it, the platform.
So, I say scrap the language! Just steal perl or python or ruby or any combination of the above! Use their syntax, their libraries, their speed, their developers, their object models, everything. Why did they need a new language? Who in there right mind thinks that PHP is on the cutting edge of syntax, or consistency, or standard libraries, or OOP, or anything like that? Embed some other language into the platform.
Think if all of the PHP developers time was spent coding something like mod_python|perl|ruby. Maybe they could even allow any language per coding page or something cool like that.
Social scientists are inspired by theories; scientists are humbled by facts.
Honestly, cut the crap. Show me how PHP has better OO than C#. Can you catch exceptions ?
What's even more ironic about your example is that most database operations involve the use of a scripting language (SQL)
I am not sure I would call SQL a "scripting language". (BTW, I think we need a new relational language to replace SQL, but that is another rant for another day.)
"Dynamically typed", or "type-free" is probably a better title for "scripting languages". "Scripting" is sort of diroggatory sounding IMO. Static-typing fans and dynamic fans often fight over their turf for months in discussion groups. They make for interesting debates. Personally I now lean heavily toward to dynamic. It seems to be a personal preference, for each has its tradeoffs that hit different people with different impact velocities.
Table-ized A.I.
Show me how PHP has better OO than C#. Can you catch exceptions ?
You seem to define "good" in terms of being like C#. Lets see an example code snippet of C# being better OO than PHP. (Personally, I think OO is mostly hype, but that is another issue.) Also, I think try/catch blocks are kind of stupid and cluttery. But, I will chalk it off to personal preference. If we all thinked the same, there would be no language wars, and life would be boring on slashdot.
Table-ized A.I.
One tip of the typing front, if you want a comparison which looks at value AND type, use === rather than == phpMyAdmin is one of the first generation of PHP apps and I agree is full of classic hacks but it works perfectly for it's intended purpose. If you want to put together a well designed PHP app, you really need to pick a one of the available PHP frameworks, unless you want to spent alot of time re-inventing wheels. eZ Publish is worth examining as is Interakts Krysalis (a port of Apache's Cocoon to PHP) although both "tie" you into quite deeply to their way of doing things. On the more "lightweight" framework front, it's worth investigating ISMO or WACT. But if you're really dying, try this: http://pear.php.net/python: "This extension allows the Python interpreter to be embedded inside of PHP, allowing for the instantiate and manipulation of Python objects from within PHP."
I cant remember the computers on the Enterprise using PHP.Have we got any screenshots ?
Having used both PHP and J2EE for major projects, I'd have to say that I prefer PHP because:
.NET goes, it never reached my radar since it is Windows-only.
1. It is more concise - java even _less_ compact than C++ with a good set of libraries - whereas PHP has loads of very forgiving high-level functions builtin.
2. It is more lightwight - java is just _still_ too bloated and slow even after all these years of promises from Sun.
3. The Java VM's for Linux really suck, they 'officially support' only RedHat and are unstable as hell running on Debian.
That said I really miss the J2EE ability to cache persistent data between requests in memory simply by declaring a variable as static. It's the only feature I miss in PHP.
As far as
There are 75.000 PHP development companies in the world, totalling 150.000 professional developers. Each company creates 12 websites per year on average, and one website takes approximately 32 work days to be completed.
The average price of a PHP dynamic website is USD 6.000, and a regular company receives USD 75.000 income from PHP development per year. By multiplying this with the number of companies in the world, we can estimate the size of the PHP software development market - USD 5.6 billions.
Potentially that's a massive market to anyone selling PHP related tools (and their aren't many). Of course that's based on the questionee's estimate.
Zend is throwing the number "500,000" PHP developers around. That might be accurate - Interakts survey made the assumption that you worked for a PHP development company and had clients. That ignores, for example, those building intranets for internal use only, which my, guess is a significant number.
400 years in the future I would think that the Enterprise would use something more advanced than PHP.
I've done quite some web developement with lot's of stuff, including JSP, Zope/Python and PHP. I'Ve looked into CF and ASP.Crap and have heard all the MS Junkies doing verbal wee-wee in their pants over how so very sweet their new stuff is. .Net but still stomped to chunky kibbles by PHP and it's community. Both won't even come close. .Net zealots serious anymore.
After all these years I've had my perception of things confirmed day in and day out:
The best existing webapp technology ever concieved to this very day is the Zope Application Server together with it's intergrated Object-Relational Database, it's PL Python and the SSI solution TAL (Template Attribute Language). It will take _everything__else_ in the industry something like 5 years at least to catch up.
Apart from that, anything that strives to go the pure SSI approach with a separated DB eiher uses PHP or most certainly is crap. It's really that simple. I've evaluated CF (Nice dynamic flash with a poor mans PHP for 10000$. No thanks.) and ASP, finally moving into usable regions with
JSP is a nice substitute if you've got a Java Enviroment there allready. But then again, who would want one if you get allmost everthing (apart from maybe banking applications) ready or done faster in PHP.
Bottom Line: If you've got a standalone Server for your project, use Zope and all the goodies that come with it. On the other hand, if Apache is a must, mod_php is present and/or you need a finished OSS solution *now* you use PHP. PHP has the largest dev-community, and for good reasons too.
I really can't take CF or
We suffer more in our imagination than in reality. - Seneca
You can't compare PHP and ASP.Net.
PHP is not a true object-oriented programming environment. Take a look at the scope of class member functions and properties. In PHP, all variables in a class are accessible externally for both reading and writing, making it impossible to hide a class' implementation.
On top of that, the PHP language is not strongly typed, and you don't even need to declare variables. PHP has no structured exception handling.
Objects in PHP are language values. When performing operations like variable assignment and passing the object as a parameter to a function, the whole object is copied. That's a bad thing.
On the other hand, ASP.Net is a true OO language, with inheritance, polymorphism (overloading of methods) and encapsulation. ASP.Net is strongly typed. ASP.Net is compiled and JIT'd.
This isn't really a valid comparsion.
Here's a presentation about what the following tech companies have publicly said about PHP:
c la ss.pdf
Macromedia, IBM, Oracle, Sun, Apple, Symantec, Novell, Microsoft, MySQL
http://php.ist.unomaha.edu/presentations/second
I think the biggest news is that Oracle is putting the PHP module into their 9i Application Server.
http://tinyurl.com/4ny52
IN FP languages, like Lisp, the code is the data: there is very well defined reflection, I can construct new functions and manipulate existing ones as they are first class objects. Same/similar situation is in ML and Haskell.
Well, among traditionally imperative programming languages there are more and more cases of "the code is the data" paradigm as well. First of all in iterpreting (scripting) languages, like Python, Perl and Tcl. You can construct the text of the function and "eval()" it. The problem is that in FP languages there is a very well designed math model for it protecting you from many errors (you construct real functions, not a text for for functions). In scripting languages it's more like a hack leading to many errors in a similar way as C pointers and Fortran GOTO operators.
Less is more !
PHP is more analagous to ASP or JSP, not .NET or JAVA. It is a scripting language, like ASP (VBScript) and JSP (JScript). .NET and JAVA are compiled, even in ASP.NET. Sure, there's cross over- you could do classes in ASP, and can in later PHPs- but the whole thing is interpreted and run at each request.
This will probably go over like a lead brick, but this is interesting...
Honestly, cut the crap. Show me how PHP has better OO than C#.
PHP lets you substitude objects for one another based on their behaviors, like Smalltalk. C#, instead, imposes restrictions based on inheritance. C#'s choice simplifies type checking and make work easier for the compiler, but it severly limits the flexibility you have during object-oriented design and development.
Can you catch exceptions ?
Sure. But exceptions, convenient and useful as they are, have nothing to do with the object system of a language.
IMHO the good parts about PHP are also the bad parts. ie, * you don't have to say what type a variable is, but that means you can't specify a type of parameter to a function. * you don't have to specify scope, but then you can't protect functions that should be private etc.
I looked at a lot of Java code for ideas on what I could do with PHP to clean it up . The main things that I did were: set up a 3 or 4 tier architecture.
- database abstraction layer
- business layer
- presentation layer (preferably using templates)
(I modeled a lot of this on Enhydra - www.enhydra.org)never use globals. Wrap up the HTTP_GET_VARS, HTTP_POST_VARS etc in a class (ie Request). Create classes to wrap the server vars and whatever else.
Use classes for everything. This gives you a reasonable amount of namespace control.
Never access variables directly in classes. Create accessor methods for them.
I think that if you are feeling the need to structure your PHP, you will probably need to move towards Java or some other more structured language. It can definitely be more challenging to write, but as your applications get bigger, the compiler-enforced type checking, programatticaly enforced/supported interfaces etc will save you a lot of time in the long run.
...that Captian Kirk and Mr. Spock even had web server, let alone apache with php!! .. oh wait.. IN the enterprise.. not ON it!
doh!
-- I am. Therefore, I think!
What's the point: the underlying PHP language is one of problems of PHP, but not the ony one. I can list them here with the solution I propose (Zope):
- Language: sure Python is better choice for a readable code and OOP. In my personal opinion, Python is the best among imperative languages. I love using FP style in Python, getting the smaller code doing more and still very expressively.
- Templates: Even DTML in Zope beats PHP. As for ZPT - after learning it you cannot go back to PHP. Never.
- Namespaces: ZPT has a very excelent design and implementation of namespaces. All accordingly to W3C standards and traditions.
- Content management: in PHP you still have to write it (or find it, or buy it). With Zope you have already got it, working, convinient, secure and well designed. CMF with Plone improve it even more bringing in workflow management and collaboration.
- Database persistence: even if you don't care you already have it ZOPE. ZODB is object, transactional, reliable DBMS. If you care to integrate it with you existing SQL applications than you can use Adaptive Storage (APE) which gives you a transparent way to do it, similar to VFS+fstab give you filesystems in Linux.
I encourage disappointed PHP people to learn Zope. Even if your clueless boss will dictate you the choice of Sun MicroSCOftsystems, the value of concepts in Zope you learn cannot be overestimated - you can reuse patterns from Zope in all other other technologies, like ASP.Less is more !
Before I start, understand that come from a long Java background in a large enterprise. We were doing Java/CORBA 5+ years ago (I represented our company at the OMG), and have begun the migration off CORBA to J2EE using WebSphere.
In my off time I've starting writing a system for a self-employed friend. When I'm finished, the system may be usable by other independents in his field. It is web accessible, so I needed some form of web application.
I strongly considered Java+Struts+Apache+Tomcat+MySQL, but the installation, management and configuration are more than I want to deal with. Installing a PHP+Apache+MySQL application will be less complex than the alternative, unless I want to baby sit every installation. Granted, in an environment that already has a J2EE container system, just deploying a WAR file is not too complex. Fewer moving parts to worry about.
And as to the comments about the Java persistence model, as one of the primary people that gets called when any Java application in our environment (and most of these have literally thousands of concurrent users) is too slow or mis-behaves, you really DO NOT what massive amounts of information presisted between calls. Java's performance in the J2EE space degrades rapidly when your application server must utilize large amounts of RAM (one of the apps I initially debugged ended up requiring the JVM be configured for a 1 gig! heap due to session object persistence) do to the memory management issues.
What I'm seeing is that for the applications in an enterprise, a large portion really boil down to table maintenance applications. If they are for a small user community that doesn't need web access, I'd recommend (don't laugh) Visual Basic (can't use VB.net, we are a Unix (AIX/HP-UX) and MVS shop). Other wise, if we didn't already have a J2EE presence, I would certainly oppose going that route.
Cryptic! Cryptic! Cryptic! And hard to read and maintain, too... Have I worked with Perl? 10 Years. Have I worked with PHP? 5 Years. The sooner I can get away from Perl, the sooner my my migraines will subside. Java beats them both in syntax elegance, but [sorry advocates] it truly is slow.
I'd be curious to know how PHP-GTK performs against JVM for client-side development.
I've developed some decent applications using PHP, I LOVE IT!
PHP is clean, straighforward, performs reasonably well, makes socket connections and multi-system communications a breeze, offers enough OO support to be useful, and doesn't mire one into the details of whether an "a" is an "a" or actually ord('a')...
One of the most common complaints for PHP is error handling. I've found that where it's needed, just create a class with its own error handling function(s). It's not hard, and the only limitations of an error handling system like this are the limits you put on it.
Using PHP-GTK allows me to write client-side applications that seamlessly integrate with a PHP-based server side... a serious advantage since dataset compatability is a non-issue, and combining this with various forms of encryption result in a very secure communication system.
PHP is generally distributed only as source - but it's definitely NOT a requirement. Use the Ioncube encoder to "compile" your PHP or PHP-GTK application. It's cheap - $200. You can compile a single file for just $0.50.
In my most recent, 30,000-ish line PHP-GTK application, I see acceptable performance all the way down to a P-200, though it's not "snappy" until you get up to around 400-500 Mhz PII.
Seems to me to be very similar to Java in this regard. Can anybody comment intelligibly?
I have no problem with your religion until you decide it's reason to deprive others of the truth.
- it uses taglibs everywhere for code reuse
- it's pages are designed as aggregated pipelines with cache support for performance and for site section independence
- it is based completely on the separation of application logic from the presentation layer - so changing the presentation layer can be made with a simple click
- it already includes a very powerful structure manager
- has various page types (to be rendered in the central site section) and can easily include new page types
- it can import RSS streams from other sites
- has support for various types of nuggets (not as many as nuke, but we are welcoming contributions)
- includes a visual HTML editor (KTML lite)
- and many other features.
Komplete can be found here
Alexandru
Don't you mean something about sitefinder instead of 404...?
* No class attributes, only instance attributes
Fixed in PHP5. Classes can have constants.
* No namespaces (and they were dropped from PHP 5). include()/require()'ing a file just dumps its namespace into the big happy global namespace, and it's a freaking nightmare.
Static class methods, and some of the syntactical sugar introduced in PHP5 solve this problem.
* OOP sucks. You have to litter &'s everywhere to get references, and lots of other problems that I'll refrain from typing out. Ok here's one -- how do you pass an instance method for use as a callback? Something like array($object, "method_name_in_a_string"). Good god.
No more &'s anymore in PHP5 all objects and arrays are passed as references. The rest of the whole OOP has made a generational jump as well, with private member variables, interfacs, abstract classes and destructors. Agreed that it was basically a functional language with OO tacked on in PHP3->PHP4 but, in PHP5 it actually has become an OOP language.
* No exception handling. Want to "handle" an error? Toss a @ in front of it, then you'll never see it. How helpful.
Exception handling built in to PHP5. Current error handling is done with set_error_handler(), which I agree is not the best methodology (exception handling would be), but it is certainly better than tossing an @ in front of the function call.
* Type handling is a nightmare, sure, they make it real easy for the newbies to use numbers-in-strings as numbers, but when you're not a newbie, you begin to run into issues where it's expecting you to be stupid and as a result ends up being stupid itself, and causing you to write disgusting checks just to make sure things are sane.
PHP5 now allows type hints for variables passed to functions. Also, how do you expect a loosely typed language to handle type handling? The type handling in PHP is far better than any other loosely typed lanaguage that I know of.
If you want some examples of well written PHP, take a look at PEAR. Granted not all of it is the best code in the world, but most of it is pretty well written.
Kris
Congratulations!
:)
.php applications as .jsp just to win the attention of large companies and sell our solutions :)
You've done a nice work - and belive me (we hire PHP programmers) this is the type of employees we are looking for
Anyway, we might consider your idea of presenting
Alexandru
The average price of a PHP dynamic website is USD 6.000
a regular company receives USD 75.000 income from PHP development per year
one website takes approximately 32 work days to be completed.
There are 75.000 PHP development companies in the world, totalling 150.000 professional developers.
These numbers are very bad. $75,000 income for the work of two developers? Throw in 50% overhead, s&a etc. and each developer is getting paid $17,000 or so per year. You can get paid more as an assistant manager at McDonald's.
Problem with using Yahoo and Amazon as case studies is that they any but typical applications.
Exactly. For example, the reason Yahoo excluded J2EE from contention is that FreeBSD has crappy threading support. Most organizations would question the use of FreeBSD rather than exclude J2EE under these circumstances.
The 5.6 billion dollars market is our initial figure, supported by the people that filles our survey
Alexandru
We haven't invented those numbers, we've just processed the survey responses. And this is the PHP Indistry average.
Alexandru
I'm tired and angry about this 'links.php' page
constantly being pointed to. Look at the two companies listed under 'support'. Zend is NOT a support company. They support their own products, not PHP in general. I can not contract with Zend for 24/7 or toll-free support. thinkphp.de may be good, but it's just *one* company in Europe listed.
There *are* more companies - mine among them (http://tapinternet.com) - which offer PHP support services (http://www.phphelpdesk.com). Whoever runs the php.net site has seen fit to ignore my requests for listing us on that page, which leads me to believe other support companies are also not listed.
We offer training courses as well, and that's becoming something more in demand, but the support aspect is something people want too.
creation science book
I love the idea of have used php which I know well to create our OLAP enabled services.
But there are no available good Open Source OLAP servers (just something in the works with Java). So I'm using ASP which is ugly but has the powerful MS olap server. I don't like to use MS products, but in this case is the one with the most favorable cost/benefit ratio.
Want to increase PHP market share... integrate it with OLAP technologies. Help Open Source OLAP technologies. You will increase marketshare and I will use something nice, stable and open.
We are Turing O-Machines. The Oracle is out there.
I've used PHP quite a lot lately. And it's great. On the whole it is every bit as good as the last versions of ColdFusion and ASP that I've used (admittedly those are a version or two old by now).
To me, the biggest strength of PHP going forward is the huge number of people that are improving the PHP experience every day.
1) New features? There are free extensions and modules for templating, database abstraction, compiled script caching, and more.
2) Sample code. I'll bet that there are more free as in speech snippets and full applications of code available for PHP that any other web language.
2) Community. There are lots of sites and other online resources where PHP developers can find help with debugging code when they need it.
Once you toss in great cross-platform support - PHP runs on just about any web server of interest - and a good price ($0), PHP is very competitive.
No, I wouldn't want a bank running on PHP, but for MANY other uses inside companies, PHP is good and getting better. I liken it somewhat to Linux a couple years ago with respect to corporate acceptance. The foundation is more or less built, what's left is some time to mature and gain credibility.
2. If I would go with pure XSL solution that it will be Cocoon - many developers know it so it would be no problem to make a team. Cocoon has a very stable support from one of open source leaders: Apache. And Cocoon has the best XSL-oriented design for being used in content-processin applications. However, I don't think that "pure XSL" solution is the way to go. XSL doesn't cover everything. It's good for dynamic content processing, while typically I need a content management. How kristalis solves that problem?
3. The most important part missed in XSL is that functionality (as it's applied to a content) should be managed as a part of the content in a same dynamic way. That's why in Zope Python is a very essential part of DTML and ZPT. I know that some functionality can be implemented in XSL, but people who have some experience of building a very complicated systems with XSL can confirm: it's a pain in the neck. How is this issue addressed in Kristalis?
4. XSL is not designed as a general programming languages. But all attempts to extend it with non-scripting languages will almost always fail. You need a flexibility of a scripting language to embed it to tags on the fly. At the same time Perl and Tcl are not OOP enough, nor they are expressive/readable. That's why the choice is coming to Python in Zope. Can you compare it in details to Kristalis?
Less is more !
Anybody suggest some support vendors for PHP?
small plug:
phphelpdesk.com. Currently pricing is a flat rate 'all you can eat' - this will be changing in Q4 to both a 'pay as you go' and 'prepay x hours quarterly/yearly' service. We've already been servicing a number of clients on 24/7 basis as needed, and will be ramping up to meet demand.
creation science book
I guess we'll have to wait till 5 is in production.
> Exceptions are required for enterprise quality applications.
I don't think that they're required, look at perl & C.
Perl has exceptions. Look at the 'Error' module, e.g.:
Also has various other blocks ('otherwise' 'except' etc.).
czth
Jacksonyee said
"If Zope, ColdFusion, or J2EE had more availability or less cost, then I would try those as well"
First, ColdFusion is a free download that reverts to a single IP (developer version) in 30 days. Most people are on shared hosts and there isn't much difference between a CF hosted site and a PHP one.
Looking to write object oriented CF MX code try the free Mach-II (in beta) here.
If you want totally free then use NewAtlanta's BlueDragon server here . Granted it's a generation behind CF MX but I know a fellow who put together a Linux + MySQL + BlueDragon site on an AMD box for under $500 with the only cost being the hardware.
The dirty little secret about PHP as compared to CF, JSP or ASP is that it's not scalable. IMHO sometimes by paying a little you get a lot.
Man Holmes
I wasn't picking the right terms when searching on it.
I forget what 8 was for.
I'm curious why you'd want to do this. Surely the whole point of sessions is to record things like key IDs to account numbers etc.
I've seen people do actions like attempt to create a file without checking for it's presence first, and wrapped the "create" with some try/catch code.
When I used to write COBOL code, I never wrote exception code, except to do with file handling (which is sort of dealt with for you by the File Section calling a paragraph). I always checked BEFORE doing the action.
The other thing is, I'd often rather give a user an "ugly" error if an unexpected situation has happened. Saying "An error has occurred, please contact helpdesk" only results in more time investigating.
But look at visual basic. For every highpaid project that uses VB [may not include whole salary here] there's 10 students/hobbiests making screensaver for free/shareware. The average visual basic is probably not much more than what PHP is.
Remember PHP [and web development in general] is still mostly a hobbie market. Most websites are created by someone who "knows a guy" etc. I could split $6k/ month as a side job and be quite happy with the extra cash. [75k is more twice what I make right now at my day job!] Pros are going to be doing more like 2-3 web sites [concurrently] in 30 days and of course charging a bit more for that service.
Is the standard library OOP in PHP 5? Are standard types objects? As far as I can tell, neither are the case, and thus it still feels very much like OOP is tacked on, except, it's tacked on with lots of features!
Also, how do you expect a loosely typed language to handle type handling?
That's exactly it; I don't like loose typing. I find it convoluted and doesn't reward learning. I have this weird belief about learning curves. A good learning curve should be a little hard at first, but gradually get better and better and when you're a pro, it should be freaking awesome. A bad learning curve will make it super easy at first, but not reward you for learning. As you get better and better, you start actually running into problems that you didn't at first. I hate this type of learning curve. And this is the type of learning curve I seem to have encountered with PHP, while Python has the former, extremely better (IMO) learning curve. With Python I end up finding more and more good things, while PHP only went downhill..
No, not at all.
Classic example that has caused me, and probably many others lots of pain is the web mail clients written in PHP, eg. squirrelmail. These clients have no choice but to open an IMAP connection on *every* page view. An app server based web client only opens an IMAP connection once for the *entire* session, since the app server can cache that connection.
I installed a webmail system for my college, we had a bit over 4000 accounts. We got a bit over 1000 visits a day, which translated to about 50,000 hits a day. I estimate about 10,000 were probably hits to PHP pages which accessed IMAP.
The result, I estimate is that we are causing 10,000 hits on our IMAP mail server a day when all we needed with a app server solution, eg. JSP, is 1000 ( ie. the number of sessions ).
Based on upvotes, Ageism is the only "-ism" Slashdotters care about and think isn't SJW
Everything on slashdot is a troll. PEAR is perhaps an attempt at a real standard library for PHP (versus the big cobble of functions that it is now), it does not in any way have anything to do with the language itself. PHP is still PHP, PEAR just gives you more code to start off with, instead of reinventing a bunch of wheels.
Tk is a gui library, and somehow I doubt that all Tcl programmers care about creating gui applications.
I'll be starting college in the spring, and I have no plans to STFU, but I appreciate your concern.
...that so many people assume PHP is "only for web pages". The entire first report linked above seems predicated on the notion that "PHP is for companies to make money setting up websites for other people, and other uses are 'fringe' or irrelevant."
PHP is definitely good for web-pages, but I've increasingly found it to be very useful for a lot of command-line programs and system administration, much as Perl is.
PHP-GTK has also already been mentioned in other postings, and the increasing interoperability with Java means you can implement a variety of parts of your PHP projects in "native Java" if you want to...and that's not just "Java for web pages" code, either.
Hacker Public Radio is our Friend
Speaking of webmail, IMP seems to be the most advanced of all the webmail apps written in PHP. Don't know how it solves the non-persistent imap connection problem, but there it says U of Penn is using it after evaluation of different systems. It didn't quite put performance into consideration however..
VIVA1023.com | Political Fashion.
oh no not tablizer again....
look through their previous posts, they are crazy.
Bush and Blair ate my sig!
but actually in some countries (Romania for example, or even France), USD 17000 might be a decent salary.
Romania, Russia, India, sure. It is totally out of the question in France or any other place in the G7.
> Also, if anyone knows of any projects
/
> (with source available) written in PHP
> that are designed well, I would be
> interested to hear of them.
http://dev.phorum.org/cvsweb/cvsweb.cgi/phorum5
Another example is performance. Sites like yahoo and amazon do things such as decoupling database access from page views, instead generating static pages or almost complete static pages and serving those; or they cache html output agressively; They have huge server farms and they rather take a performance hit instead of paying enterprise wide licenses. etc., etc.
In other words, they're trying to solve a much different problem than what most of us are solving.
When I read this, I get the message that these companies would rather throw money at a problem than figure out a way to make things work. That has always bugged the crap out of me. I am firm believer in making things work right. I have done work for people, where they were considering moving to some convoluted multi-server setup when all they needed was someone to recompile Apache/PHP/Mysql with the stuff they NEED and add some keys to a table. Rather than just look into it, they wanted to throw money at it and make the problem go away.
. It looks like a great VB replacememt, but can it run on Windows, Linux, BSD, and OSX [more?] without changing the programming?
Windows and Linux so far, Mac OS/X with the X-windows library loaded, though I can't claim to have seen it myself.
Yeah, it's quite promising, and a "VB Replacement" would be a good way to "pidgeon hole" it...
I have no problem with your religion until you decide it's reason to deprive others of the truth.
As for content management, we have Komplete Lite that uses the whole platform in the most clever approach we've been able to find. We haven't thought Krysalis as an XSL only platform, I mean we still offer as main feature the possibility of including application logic to the Krysalis XML generator, either using taglibs (like psql:execute-query) or by using direct PHP code to embed the application logic. So the first layer of a Krysalis request is the application logic layer, that will generate a dynamic XML tree, and then XSL will be used as a generic template language to add the presentation layer. Yes - as we include support for PHP code inside the original XML generator, we don't rely on XSL for generating the dynamic content.
I think you should take a look at Krysalis, it's a pretty mature platform and you will surely find a lot of interesting features inside.
Alexandru
PHP communicates via HTTP and outputs HTML (not always but most of the time). Both have one type which is string. Types are a extra candy in PHP. Anyway. When you do your checks on input data its not problem. A really short example is:Put your application parts in classes and let a framework call them and things like that and coding and maintaince is as easy as with a Java based solution. I should know. I wrote such a framework and made the design with a java-freak
b4n
Yeah, but what about php-GTK?!?!
I have no problem with your religion until you decide it's reason to deprive others of the truth.
The web site for Eaton Vance got a new look today. Some ASP pages were replaced with PHP. I wish they had used BRL, but they liked that there were published cookbooks for PHP.
Also, if anyone knows of any projects (with source available) written in PHP that are designed well, I would be interested to hear of them. I looked at a tiny bit of PHPMyAdmin's code just for kicks and was horrified. But that's not a valid judgement by any means.
ezPublish 3 Very impressive with a choice of GPL or commericial.
I agree that many popular open source PHP apps have a pretty face but are painfully ugly below the surface. Most that I have tried still need register.globals = On.
{
$text=urlencode("
$title
$text");return " ";
}
We have PHP, html, javascript, and a boatload of backslashes, all in one. Static paths to images, inline CSS.. Not my idea of "well written."
Ok, that didn't work out well, I suppose my fault for not previewing.. anyways, it was full of html, javascript, etc.