SitePoint Sponsor |
|
User Tag List
Results 1 to 25 of 120
Thread: Why php?
-
May 16, 2003, 20:22 #1
- Join Date
- Sep 2002
- Location
- Richmond, VA
- Posts
- 975
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Why php?
I notice soooo many people using php. Why? I'm into JSPs/Servlets and ASP.NET/C# myself. I enjoy each platform. I'm curious as to why PHP is such a hit. I can think of one easy reason, most every web host in the world supports it with mysql. Isn't php just a bunch of scripts in a page (ie: original asp)?
-
May 16, 2003, 20:25 #2
- Join Date
- Sep 2002
- Location
- Los Angeles
- Posts
- 1,709
- Mentioned
- 5 Post(s)
- Tagged
- 0 Thread(s)
To be honest, the major reason I chose PHP as my language to learn is because the software free. I don't have the funds to pay for Microsoft products or even think about Macromedia.
TAKE A WALK OUTSIDE YOUR MIND.
-
May 16, 2003, 20:28 #3
- Join Date
- Sep 2002
- Location
- Richmond, VA
- Posts
- 975
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
That's one reason I started with Java myself. Free is always good. Now that I've opened myself to consulting work, clients are willing to pay for items such as VS.NET and SQL Server. Hell, I'm happy with JSPs/Servlets, Apache/Tomcat, and MySQL. Great combo with little to no cost.
-
May 16, 2003, 22:24 #4
- Join Date
- May 2003
- Location
- Salt Lake City, UT
- Posts
- 274
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You use the tools you have available, and PHP being available on most (Apache) servers is probably a major reason for it's popularity.
These days, though, ASP, JSP, or PHP - or even Perl or Python - are available for just about any platform. Use the one that's comfortable for you. I use PHP because I know it inside and out and don't need to learn anything, but I'm sure I could accomplish the same things in another language if I needed to.
-
May 16, 2003, 23:27 #5
- Join Date
- Jul 2000
- Location
- Perth Australia
- Posts
- 1,717
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
"I can think of one easy reason, most every web host in the world supports it with mysql"
PHP had a rapid rise to popularity not because it had a good hosting base nor because it was free (i.e. PERL is free as well) but because it was an excellent solution to many web-scripters needs , much easier than PERL whilst at least as powerful as ASP (I am talking PHP3 days here btw)
My first experiences with PHP were with postgreSQL or MSQL as the DB as MySQL hosting was pretty slim at that point.
Developing smaller applications in PHP is a breeze compared to JSP/servlets + its faster than JSP/servlets no matter how fast JSP should be ..cos its slow regardless, + its far easier without losing any raw grunt etc etc.
With essentials that came with PHP4 (session support!) many found that PHP could not only handle those small to medium sites but much larger ones as well , MySQL is only 1 of the databases that PHP supports and the fact it can talk to Oracle and its ilk made it a useful tool in larger more complex applications ... that said MySQL itself still continues to perform despite all the things that are supposed to be wrong with it.
PHP5 with full OOP support should ensure PHP's continuing rise , yes its getting even better , very soon
Isn't php just a bunch of scripts in a page (ie: original asp)?
if thats how you want to code it yes , if not then no , its up to the coder (I won't go to far into this as .NET'ters may have an attack of the vapours)
-
May 17, 2003, 00:41 #6
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Obviously coming from another language/environment altogether you have a severe lack of PHP understanding.
This I can understand, though I would say that PHP if a lot lot more than simply 'a bunch of scripts in pages'.
Why do I use it ? Simple really -
1) It's open source and under constant developement from any number of angles
2) It's a powerful scripting language offering just about any functionality that you can throw at it in terms of application development
3) It's easy to learn and develop for
4) It uses the Apache Web Server - for a lot of people this is the one real reason why they develop for PHP alone.
5) With PHP5 about to be released as a stable language later this year, it's heading for the big time - far far more powerful than what CF has to offer at the moment IMO
6) .NET is a closed Microsoft technology; where is your freedom to innovate I ask ?
You could say the same for Java though.
7) Freely available scripts and forums with an incredible feeling of community openness for PHP.
Really, developers use PHP today in large numbers because it can provide a quick (relatively speaking compared to other languages) solution with the minimum amount of headache - there is an incredable community spirit as I stated above for PHP that apart from Java, no other language has this for developers.
So .Net ? No thanks, as I'm going to continue to use the most powerful scripting language available to mankind today.
-
May 17, 2003, 01:31 #7
- Join Date
- Dec 2001
- Location
- UK
- Posts
- 105
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
- promotes Rapid Application Development (RAD)
- quick and easy to learn
- very widely supported (as with most Open Source projects)
- constant stream of improvements and bug fixes, not determined by financially-focused, corporate steering committees!
- extremely feature rich
- powerful
- fast
- FREE!
- and..and...*sigh*..just everything
-
May 17, 2003, 02:47 #8
If you're into Java/Servlets then PHP is a very logical step, as it has the ability to integrate with Java components. Its very possible to use Servlets for the 'core' of your coding, and use PHP to form the user interface. Thus gaining points from the sheer speed of PHP, without losing the power of Java.
-
May 17, 2003, 05:58 #9
- Join Date
- Sep 2000
- Location
- Halmstad, Sweden
- Posts
- 7,400
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
The reason PHP is more popular over more advanced programming frameworks, like Java or .NET (and more recently ColdFusion, in it's MX variant) is that it's so extremely available on many levels:
1. It's VERY easy to learn.
2. It has an fabulous developer community (which means hogloads of tutorials, forums, existing code and extensions)
3. PHP/mySQL hosting is very cheap
This is not so much due to PHP itself being free, but due to the fact that it's "default" environment (Linux, Apache, mySQL) is a free OS, a free Web server, and a free DB serve. Java and .NET generally requires more expensive stuff to run optimally. With that said, I resent hyperboliks notion that it's more expensive to develop .NET than PHP, which is untrue - all the needed development tools are provided for free by Microsoft, except for Windows itself.
Originally Posted by torrent
6) .NET is a closed Microsoft technology; where is your freedom to innovate I ask ?Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
-
May 17, 2003, 06:29 #10
- Join Date
- Dec 2001
- Location
- UK
- Posts
- 105
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by M. Johansson
As for Coldfusion, well, I found that CFMX was fabulous for doing the quick and easy tasks as it has some pretty neat functions. However, when you wanted to do something a little more complex then it became a bit of a trial. For example, regular expression support is abysmal, as is developing socket based interfaces (a common requirement for us). Speed wise it was quite impressive, bettering PHP in some areas, but not in others. Overall though we were very unimpressed with Macromedia's support and questionable product direction.
As an organisation, we took a corporate decision to use Java and PHP where web management tools were being created (for a particular bespoke product we supply), depending on what the size, complexity, and nature of the tool implementation would be. It helped also that PHP can call and use Java objects and methods.
I'd be interested to hear what evidence you based your views on.
Oh, if anyone is interested we also ran a load and destruction test study against Oracle, MySQL, local HSAM, and local ISAM databases (didn't have the means at the time to include MS SQLServer).
-
May 17, 2003, 06:51 #11
- Join Date
- Sep 2000
- Location
- Halmstad, Sweden
- Posts
- 7,400
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
You are definetly more experienced than me, and if you have done first-hand testing, it's more valid than my views, which are mostly based on benchmarks that I have seen. It's unfortunate that you did not include .NET in your testing, as I'm yet to see any decent comparison between it and PHP.
What was your conclusion on Java and PHP, speed wise? Is PHP faster, and if so, by how much?
Oh, and doesn't CFMX run on top of Java nowadays, or something like that?
edit- also, for the record, I never said that ASP was faster than PHP. None of the testing I have seen have indicated that at all.Mattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
-
May 17, 2003, 07:03 #12
- Join Date
- Sep 2001
- Location
- Singapore
- Posts
- 5,269
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yeap I would also be interested to see your benchmarks.
Which container/app server did you use to test your Java applications? WebLogic? J2EE RI? Or just Apache linked with Tomcat?
How did you reconcile a fair benchmark test when Java app servers are built to scale for large complex applications, but are overkill for simple web scripts, with PHP's speed in web scripting?
I agree that Java app servers have large memory consumption, but they do much more. That said, this is after all a web development forum so little would people here be compelled to switch to Java server programming. If anyone is interested in being an enterprise developer though, J2EE and .NET are the 2 bandwagons you should jump on. PHP doesn't cut it yet, though integration with Java is a big step.
-
May 17, 2003, 07:58 #13
- Join Date
- Dec 2001
- Location
- UK
- Posts
- 105
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Regarding the exact details of the testing environments, I would have to find that out as I was not directly involved with actual trials. My involvement came when I (as a Senior Project Manager) was scoping out the work involved for a project in the Middle East, I read a report on which technologies are being endorsed by our company for web development purposes. The concensus was, as Redemption summised, that Java was the way to go when needing to follow good MVC methodology and producing an Enterprise wide solution and that PHP was deemed (by our company at least) the way to go when requiring RAD. PHP5 may address some of PHP's short comings with regards with to Enterprise solutions, although I still doubt it will be a match for J2EE in that environment.
I'm not sure we'd ever get round to testing against .NET as we pretty much require platform independent code (another thing that went against ASP as Chillisoft doesn't cut the mustard). Can .NET run on non-MS Windows servers? I don't think it can (my knowledge of .NET is extremely limited)?
-
May 17, 2003, 08:15 #14
- Join Date
- Sep 2000
- Location
- Halmstad, Sweden
- Posts
- 7,400
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by torrent
http://www.go-mono.comMattias Johansson
Short, Swedish, Web Developer
Buttons and Dog Tags with your custom design:
FatStatement.com
-
May 17, 2003, 08:17 #15
- Join Date
- Sep 2001
- Location
- Singapore
- Posts
- 5,269
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
There is the Mono project which is, and I quote, "is an open development initiative sponsored by Ximian that is working to develop an open source, Unix version of the Microsoft .NET development platform."
I have no experience with it, nor much experience with .NET itself so I can't comment on it.
[EDIT] slower than Mattias
-
May 17, 2003, 08:20 #16
- Join Date
- Dec 2001
- Location
- UK
- Posts
- 105
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Just looking at the link you posted now.
V. interesting. Tx both for that.
-
May 17, 2003, 08:55 #17
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
While torrent's opinion may be based on experience, most of his list is contained in other languages. Sure, they are reasons to pick PHP, but most of his short list aren't reasons to pick PHP over any other language.
I still love the fact that "free" is thrown in there. Some people mock my viewpoint that free isn't free. Well, this week we gave Linux a shot. We needed to put a new firewall in, so were going to need to pay no matter what, perfect opportunity to give it a shot.
Got a new server, got Linux installed and then gave the team 20-40 hours to do configuration and tweaking. At the 40 hour mark it would have been cheaper to buy a high-end firewall solution. At the 100 hour mark it would have been cheaper to buy a firewall appliance.
The team, yesterday, hit the 100 hour mark and it still isn't working properly. Certainly part of this is due to me giving them the freedom to fail (which is important since one of the developers is a Linux "advocate" and he never believed me that Linux isn't always cheaper).
That said, the original poster is coming from a .NET environment, so others should try and give him reasons why PHP is a benefit to him where he's at. He's not coming from an ASP or CFM environment so much, and so needs to be given advantages over Java and .NET. Don't worry, there are those advantages, the main one being that by and large PHP can be quicker to develop for on smaller projects and websites.
J
ps: pfft @ PHP encouraging RAD, it encourages exactly the opposite by the fact that it still allows old, antiquated and useless code while "enabling" new advances such as OOP. Having these as an option means new developers will almost always pick the simplest route, which is always the dirtiest one.
-
May 17, 2003, 09:17 #18
- Join Date
- May 2003
- Location
- UK
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Got a new server, got Linux installed and then gave the team 20-40 hours to do configuration and tweaking. At the 40 hour mark it would have been cheaper to buy a high-end firewall solution. At the 100 hour mark it would have been cheaper to buy a firewall appliance.
-
May 17, 2003, 09:20 #19
- Join Date
- Jun 2001
- Location
- Toronto, Canada
- Posts
- 9,123
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
I'm sorry, which part of the story infers that the team were without skills or not up to the task?
J
-
May 17, 2003, 09:25 #20
- Join Date
- Sep 2001
- Location
- Singapore
- Posts
- 5,269
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Jeremy W.
RAD (rapid application development) is a concept that products can be developed faster and of higher quality through:
* Gathering requirements using workshops or focus groups
* Prototyping and early, reiterative user testing of designs
* The re-use of software components
* A rigidly paced schedule that defers design improvements to the next product version
* Less formality in reviews and other team communication
-
May 17, 2003, 09:31 #21
- Join Date
- Dec 2001
- Location
- UK
- Posts
- 105
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I would say that typically the "quality" of the code is down to the "quality" of the developer. In any language. Choose a strong developer who understands good-practice methodologies (such as MVC), and you will produce good quality code. Any poor workman can blame his tools (or his employees)
-
May 17, 2003, 09:38 #22
- Join Date
- Sep 2001
- Location
- Singapore
- Posts
- 5,269
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by torrent
With the Linux firewall, it would be more difficult to setup and cost a company in terms of the time used (which is money). With a high-end firewall solution, you often get a solid product and support, but if you don't have good practices, the firewall might as well not be there.
-
May 17, 2003, 09:54 #23
- Join Date
- May 2003
- Location
- UK
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm sorry, which part of the story infers that the team were without skills or not up to the task?
-
May 17, 2003, 10:41 #24
- Join Date
- May 2003
- Location
- UK
- Posts
- 7
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
With PHP, it is difficult to have good practices (evident in many projects).
-
May 17, 2003, 11:07 #25
- Join Date
- Nov 2000
- Location
- Switzerland
- Posts
- 2,479
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
On the cost of Linux (and it's general ascent) one of the most level headed pieces I've read is thanks to the Economist here.
As to why PHP? There are many reasons ranging from ease of use, flexibility, availability, the energy of the community (i.e. massive quantities of free code) and even "ethical" reasons. One nice quote I've heard from here is;
Because PHP is built by developers for developers, rather than by marketers for BDMs, I know I'm generally going to get the best solution to solve my problem with minimal overhead (redundant BS code).
Well worth reading is Bruce Eckel's thoughts on Strong Typing vs. Strong Testing. The idea that "strongly typed must be better" is beginning to look shaky.
Bookmarks