SitePoint Sponsor |
|
User Tag List
Results 76 to 100 of 138
Thread: PHP's hope for the future?
-
Sep 17, 2005, 09:32 #76
- Join Date
- Sep 2003
- Location
- Wixom, Michigan
- Posts
- 591
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Dr Livingston
Ruby was born in 1993
History of Ruby
PHP was born in 1995
History of PHP
Incidentally, I happen to think that judging the quality of a language by its age will not get you anywhere. Or do you program a lot in Cobol and Fortran?Garcia
-
Sep 17, 2005, 09:42 #77
- Join Date
- Nov 2004
- Location
- Toronto
- Posts
- 43
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
The Right Tool for the Job
Okay, just a couple of points.
First of all, all of the discussion concerning PHP vs Ruby is rediculous. I think that you are pretty limited in your ability if you only know one programming language - regardless of your skill level in that language. Every task - programming or otherwise - has a tool that is best suited to it's solution. Just as there are specific patterns that can help solve problems, your choice of platform/language/font size in your favourite editor are all variable. I wonder how many sites are using Bash Scripts as CGI programs? How many use PHP as their shell utility language? Have you ever tried to hammer in a nail with a screwdriver? Stop the "discussion" about PHP vs *, it's pointless. Learn as much as you can and make informed decisions.
Secondly, I think the main problem is that a lot more people are using PHP for Enterprise level applications and that is why there is more concern over it breaking now because of a mere point upgrade. Take a look at the growth of this community (the Advanced PHP forum) since it was first started back in January of 2002. PHP at the time was in version... 4.1 or something? I dunno about you all, but I thought 4.x was a Godsend after the 3.x series and was a real jump towards making it a serious language. Remember the "script" vs "real" language debates? The problem may be that the community using PHP has changed, grown up from simple scripts embedded in HTML. Even though Zend has taken over the engine, the core developers perhaps have not changed their practices and mindsets to reflect the newer, more Enterprise minded developers that are doing some amazing things with PHP.
Just my thoughts,
Matthew.
-
Sep 17, 2005, 10:23 #78
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by ghurtado
PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume. He named this set of scripts 'Personal Home Page Tools'. As more functionality was required, Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications. Rasmus chose to release the source code for PHP/FI for everybody to see, so that anybody can use it, as well as fix bugs in it and improve the code.
PHP/FI, which stood for Personal Home Page / Forms Interpreter, included some of the basic functionality of PHP as we know it today. It had Perl-like variables, automatic interpretation of form variables and HTML embedded syntax. The syntax itself was similar to that of Perl, albeit much more limited, simple, and somewhat inconsistent.As a language manic and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for, but couldn’t find one.
So, I decided to make it. It took several months to make the interpreter run. I put it the features I love to have in my language, such as iterators, exception handling, garbage collection.
Then, I reorganized the features of Perl into a class library, and implemented them.
DouglasHello World
-
Sep 17, 2005, 14:42 #79
- Join Date
- May 2005
- Posts
- 255
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by {RainmakeR}
what if something else like this happens in the future (i.e. a critical change to PHP internals)?
In other words, you can't rely on nothing changing in ANY language, EVER. That's why they release betas and release candidates of new versions. That's why you aren't forced into upgrading.
I won't argue the point about making this change in a point release, because a fatal error being thrown (rather than the php4 behavior of just tossing a notice and passing by value) is unacceptable. However, this change *had* to be implemented. The reason that your code probably broke was because you were actually relying on the memory corruption taking place (whether you realize it or not). NOT fixing a memory corruption bug was simply not an option - period. This fix will probably eliminate at least half of the bugs that can not be reproduced being sent to the bugs list.
And, yes, it's a pain in the ***. No doubt about it. But the vast majority of people will be largely unaffected by it. Here's the rough breakdown:
1.) PHP4 only guys doing heavy OO - More notices in your error logs, everything else will work the same so long as you weren't relying on the broken behavior.
2.) Those writing php4 and php5 code - issues will arise here the most commonly, but very few people are doing this in the first place, and those that did probably are better programmers, as a collective whole, and as such will not be too affected because their code will be easier to fix.
3.) Those writing php5-only code will pretty much never encounter this problem in the first place, unless they're doing completely unnecessary things like passing by reference for performance reasons.
Personally, I work for two companies, and fall into both categories 2 and 3. For company A, I'm running php 5.0.4 still, and not upgrading until they change the behavior to php 4.4 style (5.0.6 or 5.0.5a or whatever the hell they call it) and/or I can upgrade the rest of my code to php5. For company B, I'm running 5.0.5, and will upgrade to 5.1 as soon as it's released and I've had a chance to test it.
-
Sep 17, 2005, 16:19 #80
Originally Posted by DougBTX
-
Sep 17, 2005, 20:00 #81
- Join Date
- Aug 2005
- Location
- Santa Rosa, CA
- Posts
- 67
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Luke, I really don't know why you have to keep tooting the Ruby horn here. It's already been stated that Ruby is a fine language and Rails is a good framework. But don't get brainwashed by the hype machine -- PHP is a hugely popular language that works great for millions of Web developers, including myself. It ain't going anywhere, and it also has a good future as long as the core dev team doesn't implode. The reason we're talking about Ruby on Rails is because it's new, cool, and innovative. So was VisiCalc, and we aren't using VisiCalc now, are we?
-
Sep 18, 2005, 02:28 #82
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by Luke Redpath
@JaredWhite: I'm surprised you consider innovative is a reason not to use something. Rails is more than "good", Rails is to web apps as PHP is to web pages.
DouglasHello World
-
Sep 18, 2005, 09:56 #83
Originally Posted by JaredWhite
-
Sep 18, 2005, 14:18 #84Like phpMyAdmin, raise your hand if you rely on it every day! (me)Get your heelys now at flywalk.co.uk - But what are heelys?
Heelys are simply shoes with wheels in the heels!
Flywalk.co.uk - The UK Heelys Retailer
-
Sep 19, 2005, 12:08 #85
- Join Date
- Aug 2005
- Location
- Santa Rosa, CA
- Posts
- 67
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by DougBTX
Now, if you want to say that the Rails framework is superior than any framework currently available in the PHP world, that's a different topic. I might agree with you for some situations, probably not for others. IMHO, a good developer uses that which he is comfortable with and will get the job done. I build sites with my own PHP mini-framework at the moment, which works just fine for my purposes. Clients are happy, I'm happy. Job done.
All I'm saying is that Rails is a new, innovative produce backed by a company with good marketing and good community PR, and, as such, it's riding on a high of hype and buzz. Most of the hype is warrented, but I also fear that it's creating a "reality distortion field" that makes Steve Jobs look tame.I see no reason for me personally to switch away from PHP, and I'm your average Web developer. Therefore it just doesn't make sense when people cry the death of PHP and long live Ruby/Rails. That's just silly.
Jared
-
Sep 19, 2005, 13:14 #86
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by ghurtado
Also, it doesn't matter when a language is born. It is more important when the community of that language is born. Ruby 1.0 was released in 1996, earlier versions were only experiments. And until 1999, nobody knew about Ruby in Europe
-
Sep 19, 2005, 13:15 #87
- Join Date
- Apr 2003
- Location
- London
- Posts
- 2,423
- Mentioned
- 2 Post(s)
- Tagged
- 0 Thread(s)
Hi...
Originally Posted by Etnu
This is not helping in preventing bugs, it's just a real world mess. If you cannot write transitional code then upgrading a server cluster becomes virtually impossible without major downtime.
Regarding the M$ C++ implementation, there was a slow transition I believe (read years). You could at each stage migrate code that would run on successive versions. Testing was more work (installing two copies of M$ C++ was a nightmare apparently), but possible. I am a Unix man, so my direct experience is limited here.
yours, MarcusMarcus Baker
Testing: SimpleTest, Cgreen, Fakemail
Other: Phemto dependency injector
Books: PHP in Action, 97 things
-
Sep 19, 2005, 13:19 #88
- Join Date
- Nov 2004
- Location
- Romania
- Posts
- 848
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by JaredWhite
That's sweet. Please give a call when you come back from your trip.
Seriously, I have said it before myself, it is a lot of hype, and it's not good, but it is not a company backed marketing plan. That's stupid. Take your arguments to comp.lang.ruby and you will be eaten alive.
-
Sep 19, 2005, 16:41 #89
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by JaredWhite
PHP isn't just a language. Parsing $_GET and $_POST is so taken for granted in PHP that most people forget that that sort of thing is handled by something with "Framework" written on it in other languages.
We take for granted are things like <?php ?>. Rails calls an external library to handle that. MySQL connections, the code to connect to MySQL is written in Ruby, included with the Rails download. In PHP it is hidden behind mysql_connect.
Originally Posted by JaredWhite
If you're going to say PHP and Rails are "not comparable", you'll have to do better than saying that Ruby != Struts.
DouglasHello World
-
Sep 19, 2005, 17:09 #90
- Join Date
- Aug 2005
- Location
- Santa Rosa, CA
- Posts
- 67
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
You know, it's astounding that I'm getting attacked for complimenting Rails. Seriously. I say it's a great product, and I get attacked. Pardon me for wondering what the matter is?
All I'm saying is that Rails is a specific implementation of a full-stack Web framework for the Ruby language. PHP itself is just a language with a few Web-oriented shortcuts, so it's really comparing apples and oranges. I mean, saying that because it has $_GET it has framework-like capabilities is like saying Perl is a framework because it has $ARGV. MySQL extension? Puleeze. That's just a C extension that exposes some PHP functions. That's not a language, nor is it a framework.
Again, if you want to compare Rails to a full-stack PHP framework and weigh the pros and cons, that's fine. If you want to compare the PHP language with the Ruby language and weigh the pros and cons, that's fine. But saying that Rails will kill PHP just doesn't add up.
As for the marketing comment, do you think Rails would have caught on like it did if it weren't created by 37Signals but instead was created over a longer period of time by some anonymous Ruby geek? I certainly don't begrudge them their success, and I of course realize that the Rails community goes way beyond one company. Think of PHP: it's backed by Zend, but its community goes way beyond Zend. So I'm not trying to insult anybody.
However, as many folks agree, the "OMG you can build gigantic enterprise apps in Rails in only 5 lines of code in 1 minute!" mentality is actually hurting the project. At some point, the zillions of newbies who jumped on the bandwagon will realize that they actually do need to know how to program.And it will be PHP all over again. I'm the first to bemoan the fact that there's a lot of bad code in PHP-land (I wrote some myself years ago), but if anyone thinks it's impossible to write bad code in Ruby, well then...
Use the tool you like. If it's Rails, awesome. If it's PHP, super. If it's Java, more power to you. All I'm worried about is hype, not reality.
Jared
-
Sep 20, 2005, 01:39 #91
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by JaredWhite
DouglasHello World
-
Sep 20, 2005, 03:25 #92
I have to partially agree with this:
However, as many folks agree, the "OMG you can build gigantic enterprise apps in Rails in only 5 lines of code in 1 minute!" mentality is actually hurting the project
However I do think you are wrong about the comparisons of Rails vs PHP. If you want to start being pedantic, then yes, one is a web framework and one is a programming language aimed at the web. But there is little point in comparing Ruby vs PHP (other than as a language) because Ruby alone isn't being pushed as a web language. Whilst I'm sure you could do a lot of what you do in PHP in pure Ruby, its the Ruby and Rails comboitself thats being pushed as an alternative to PHP, not simply Ruby.
-
Sep 20, 2005, 03:40 #93
- Join Date
- Jan 2003
- Posts
- 5,748
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ruby, on rails or otherwise, is not going to kill off PHP. Not today, not in years to come. Sure, there will be at some point in the future, a battle over Ruby Vs PHP Vs ? but I suspect that no one language or technology will lose ground.
PHP you have got to understand is more than a mere web langauge, it's instilled in a lot of peoples lives, we are talking millions of peoples lives here. PHP for a lot of people is a way of life, a religion.
To other people, it's the only thing they know, in the sense that there are other development languages out there. PHP brought web development to the masses, and that is a legacy that will live on.
-
Sep 20, 2005, 04:11 #94
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I guess I don't understand why you don't want to compare Rails and PHP
If you take things from Ruby which are built in:
Code:class SoldShape < Shape attr_accessor :color end
Code:class Post < ActiveRecord::Base has_one :author end
On the other hand, if you compare this Perl:
Code:#!/usr/bin/perl print "Content-type: text/html\n\n"; $title = 'Hello, world!'; print "<html><head>\n"; print "<title>"; print $title; print "</title></head>\n"; print "<body>\n"; print "<h1>"; print $title; print "</h1>\n"; print "</body></html>\n";
Code:<html><head> <?php $title = 'Hello, world!'; ?> <title><?php echo $title ?></title></head> <body> <h1><?php echo $title ?></h1> </body></html>
Originally Posted by Dr Livingston
DouglasHello World
-
Sep 20, 2005, 06:19 #95
I see what you are getting at Doug - as well as being a full stack framework, Rails could also be considered a DSL for the web or web applications in places. Its one of the things I love about it.
-
Sep 20, 2005, 15:11 #96
- Join Date
- Aug 2005
- Location
- Santa Rosa, CA
- Posts
- 67
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Doug, your example makes no sense to me. The reason that that ActiveRecord subclass "does stuff" without you writing any real code is because it's a subclass of an object that does stuff. I could write:
PHP Code:<?php
class Post extends ActiveRecordBase
{
protected $has_one = "author";
}
?>
Anyway, we could go around and around with this, so I'm dropping it. If you folks want to talk about how much of a language or framework or whatever you get with the stock PHP distro, be my guest.
Jared
-
Sep 20, 2005, 15:46 #97
- Join Date
- Nov 2001
- Location
- Bath, UK
- Posts
- 2,498
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by JaredWhite
Cheers,
DouglasHello World
-
Sep 20, 2005, 16:50 #98
- Join Date
- Jul 2004
- Location
- Minneapolis, MN
- Posts
- 1,924
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm not limiting myself to one language, more like ten. I use PHP in all my web-based projects, although I have used a bit of Java and Perl here and there. XHTML, CSS, and JavaScript aren't languages, but take up the same brain capacity.
You do not get support with Open Source. If you use Open Source, and you expect support, then you have got a hard neck to expect so. Really, you have. You get no support using PHP as it is Open Source.
When it comes to large open source projects like PHP, I don't think that support at all is an issue. You have so much community support and documentation that you don't need it. Programmers usually are quite logical, and don't have too hard of a time figuring something out without someone physicall telling them.
-
Sep 20, 2005, 17:19 #99
- Join Date
- Sep 2003
- Location
- Wixom, Michigan
- Posts
- 591
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by charmedlover
As to JavaScript, well, it is a full blown imperative language in its own right, with many advanced dynamic features that other languages only wish they had (like closures or prototyping).Garcia
-
Sep 20, 2005, 18:52 #100
- Join Date
- Jul 2004
- Location
- Minneapolis, MN
- Posts
- 1,924
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Usually though, when you talk about programming languages you don't consider XHTML, CSS, and JS in this category. In their rights they are all languages as you have to remember a certain syntax and such.
Overall though most of my knowledge lies in XHTML, CSS, JS, and PHP. I know others in the bunch, but I don't use them (C++, Java, BASIC, Perl, etc.).
PHP is still a world in itself.
Bookmarks