SitePoint Sponsor

User Tag List

Page 4 of 4 FirstFirst 1234
Results 76 to 96 of 96
  1. #76
    Non-Member coo_t2's Avatar
    Join Date
    Feb 2003
    Location
    Dog Street
    Posts
    1,819
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by arborint

    Repeating over and over that "PHP already *is* a Web development framework" will not make it true. PHP is a language with libraries just like any other language.
    I remember Sterling Hughes making the argument in his blog several months ago(maybe more than a year ago) that PHP is a framework. I'd link to it if that site was still up. It was at http://www.edwardbear.org/blog/.

  2. #77
    SitePoint Enthusiast
    Join Date
    Sep 2002
    Location
    Wyoming USA
    Posts
    36
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why would anyone use PHP for anything other than very small projects? The only thing it has going for it is the low upfront cost. Here in the US I'm competing against very low wage and frequently highly skilled competition from India, Russia and Vietnam to name just a few. I have to PRODUCE to compete. That means being able to design and develop high and low level (Dreamweaver and hand code) using DW to crank out work and knowing the hand coding to fix errors. That means choosing ColdFusion for projects of any size because it is simply faster to write. This isn't art. This isn't about choosing tools you 'like'. It is about businesses being brutally efficient and about survival. </grenade>
    Peace


  3. #78
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by minimal
    It's maybe true about the OO stuff and such but I think most of us admit those things are only implemented in large websites/CMS systems. Most sites still don't need that much complexity.
    And that is where the line in the sand is drawn.

    On one side you have the procedural programmers, most of whose needs are relatively simple; they just want a language that is simple to use and that will help them generate dynamic content as easily as possible. For them, and they are the majority of the PHP programmers out there, PHP really is the best language out there.

    On the other side, there are the OO Purists, and for them, PHP is... lacking. Seeing how green the grass elsewhere just makes it more apparent how painfull it is to properly program in an OO way in PHP. PHP5 is a step in the right decision, but it's still a long way from being a true object oriented language.

    You're right that most sites probably wouldn't benefit from OO due to the added complexity that it brings; but you might find that, as you improve as a programmer, and as you take on bigger and more complex projects, an OO approach can make even the most difficult projects manageable. And this is where you might start enjoying PHP less and less.

  4. #79
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    You're right that most sites probably wouldn't benefit from OO due to the added complexity that it brings; but you might find that, as you improve as a programmer, and as you take on bigger and more complex projects, an OO approach can make even the most difficult projects manageable. And this is where you might start enjoying PHP less and less.
    I can't compare since I don't use/know other languages for websites. I read it often that PHP isn't appropriate for big OO sites and believe this from more experienced programmers than me. However it would be nice to see some page with "php oop vs (other language) oop" with examples that show us why it works better in that other language.

    About Has the fun gone out of PHP.. Well I don't know, time flies when you concentrate on other things for a while (like CSS to only name one).

  5. #80
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    On the other side, there are the OO Purists, and for them, PHP is... lacking. Seeing how green the grass elsewhere just makes it more apparent how painfull it is to properly program in an OO way in PHP. PHP5 is a step in the right decision, but it's still a long way from being a true object oriented language.
    What specific features do you think PHP lacks that makes it so painful to "properly program in an OO way"? Reference handling in PHP 4 is painful if you want to do some advanced design patterns. But beyond that, I don't see your point.
    Dagfinn Reiersøl
    PHP in Action / Blog / Twitter
    "Making the impossible possible, the possible easy,
    and the easy elegant"
    -- Moshe Feldenkrais

  6. #81
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by minimal
    I read it often that PHP isn't appropriate for big OO sites and believe this from more experienced programmers than me.
    The problem is that programmers tend to believe that they must have the features of the language(s) they happen to be familiar with. To compare two languages meaningfully, you really need to have significant experience in both. I used to believe that Perl's strict feature (or something even stricter, like statically typed languages have) was indispensible. After programming PHP for a year or two, I finally realized that its practical importance was limited.

  7. #82
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dagfinn
    What specific features do you think PHP lacks that makes it so painful to "properly program in an OO way"? Reference handling in PHP 4 is painful if you want to do some advanced design patterns. But beyond that, I don't see your point.
    At a fundamental level, it's the fact that PHP's primitive types and arrays aren't objects, and that the included library of functionality is procedural. This may not seem like a big deal, but it does mean that proper OOP is impossible.

    As for working with your own objects, I'd say the biggest iritations are the lack of support for namespaces or packaging, and the lack of a proper mechanism for working with properties (something I truly miss from my VB days). Then there's the weird interface behavior (not being able to implement two interfaces that have the same function??); the addition of typehinting without including primitive types, and without true method overloading; the lack of metaprograming features (PECL extensions marked as experimental don't count)... and if you're stuck working with PHP4, there's a whole batch of other issues.

    Granted, these things are not really show stoppers, but compared to other languages that support them, PHP OOP features seem rather primitive. And that's especially apparent once you've worked with Ruby.

  8. #83
    SitePoint Guru dagfinn's Avatar
    Join Date
    Jan 2004
    Location
    Oslo, Norway
    Posts
    894
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    At a fundamental level, it's the fact that PHP's primitive types and arrays aren't objects, and that the included library of functionality is procedural. This may not seem like a big deal, but it does mean that proper OOP is impossible.
    "Proper OOP" is a pretty vague term that means different things to different people. Could you give us an example to illustrate what you mean?

    And would you say that "proper OOP" is possible in Java?

  9. #84
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by 33degrees
    As for working with your own objects, I'd say the biggest iritations are the lack of support for namespaces or packaging, and the lack of a proper mechanism for working with properties (something I truly miss from my VB days). Then there's the weird interface behavior (not being able to implement two interfaces that have the same function??); the addition of typehinting without including primitive types, and without true method overloading; the lack of metaprograming features (PECL extensions marked as experimental don't count)... and if you're stuck working with PHP4, there's a whole batch of other issues..
    I believe that except for namespaces, things like those mentioned in this fairly standard advanced OO PHP developer wishlist never come up in the PHP Group's new feature discussion (for example the recent one for PHP6).
    Christopher

  10. #85
    SitePoint Guru 33degrees's Avatar
    Join Date
    May 2005
    Posts
    707
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dagfinn
    "Proper OOP" is a pretty vague term that means different things to different people. Could you give us an example to illustrate what you mean?
    I simply mean having to switch between between procedural and OO methods continuously within an application; having to do things like count($array) instead of $array->length. Again, this is due to primitive types and arrays not being objects, along with there being a function library instead of a class library (complete with exceptions). That's why there are projects like www.cucua.org, but really, a class library should be part of PHP itself, not a third party add on.

    Quote Originally Posted by dagfinn
    And would you say that "proper OOP" is possible in Java?
    It's much closer, because there's no such thing as a procedural function in java! But Java has a it's own issues IMO; I'm not sold on the benefits of static typing, and the mix of primitive types with corresponding classes is cludgy. Ruby is much better, and it's a OO purist's wet dream, having been designed from the start as a pure OO language.

    I suppose your third question would be "does any of this really matter?" For most, not really; PHP's OO features are good enough for the majority of tasks. But if you care about this kind of thing, then your enjoyement of programming in PHP suffers.

  11. #86
    SitePoint Guru
    Join Date
    Jun 2004
    Location
    Finland
    Posts
    703
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Sorccu
    YES. Period.
    I hate to quote myself, but I just had to add that somehow PHP has become not-so-boring again, maybe even fun. I still hate all that add/view/modify/delete -ing, and references in PHP4 make me cry, but it's just something that you have to do. I'm still going to learn Ruby, though

  12. #87
    get into it! bigduke's Avatar
    Join Date
    May 2004
    Location
    Australia
    Posts
    847
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its fun no doubt, just that sometimes the tasks you need to accomplish with it get monotonous. I'm keeping java to play with

  13. #88
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Yakima WA.
    Posts
    100
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm the guy who wrote the original thread in the ruby forum that sparked this thread I guess. I have used php for around 4-5 years heavily and still like the language. You never forget your first love ;-) But clinging to a tool that you know just because you don't know another tool is a little bit short sited. I decided to try our rails last fall because I had some experience with ruby as a text processing cli tool. And everything I had written in ruby had come out so clear and simple, while still being very powerful.

    Rails *is* a great framework but what I really love is ruby *itself*. Don't get me wrong I am by no means a php basher, far from it. But ruby is a much more elegant language that has been designed with consistency to itself from the beginning. It flows much better and the OOP is at the very heart of the language. You will soon find yourself in trouble if you don't start to understand OO when using ruby. PHP is very inconsisteng as far as method naming conventions and 3000+ functions in the global namespace? I mean come on, no-one here can argue that that is a good thing about php can they?

    If you are serious about programming in general or for the web, you owe it to yourself to check out ruby and rails. For everyone saying that they don't understand how a language it self can be fun, I challenge you to seriously run ruby through its paces. If you still think its not fun I owe you a cookie ;-).

    I still have to support php apps and even ocasionaly knock out some quick functionality with php even in my rails apps(ohh the sacrelige! ;-)). But for anything larger or more complicated I find rails to be a much better solution. And if your the type who like to create your own framework the you should give ruby a shot. The meta-programming features that make rails and Domain Specific Languages so nice with ruby is a seriously powerfull abstraction. It allows you to design the API for your libraries *first* and then bend the language and build it up to you domain and api instead of catering to the language to make things work. I mean after all computers are supposed to make things easier for humans right? So a flexible language like ruby with the seriously powerful OO features and standard class library make this a much simpler task than trying to do the same thing with php.

    I'm not sure the fun has gon out of php. I still really like the language. But if you are serious about programming you really owe it to your self to try ruby/rails out. I mean what have you got to loose except a little time? And think of the serious gains you can have in productivity if ruby 'clicks' for you. If you don't like it then you can just gop back to php where you are comfortable. But I have found that just really taking some time to learn ruby has greatly increased my knowledge of OOP and makes my php code infinitely better now when I do program in php.

    Of course take all this with a grain of salt as it is all my personal opinion. But what have you really got to loose by learning something new? I was as much of a php devotee as any of you but ruby has drastically expanded my programming horizons.

    Thanks for your time. And ps. the site that I rebuilt with ruby is here :
    http://yakimaherald.com
    and the old php version that I inherited is still here:
    http://legacy.yakimaherald.com

    Cheers, and whatever language you use, if you love it it should be fun ;-)

    -Ezra

  14. #89
    SitePoint Wizard
    Join Date
    Aug 2004
    Location
    California
    Posts
    1,672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ezmobius1
    I'm the guy who wrote the original thread in the ruby forum that sparked this thread I guess.
    -Ezra
    Thanks for the response. I thought your original entry was really interesting and now you have elaborated a little more here. This thread has the usual "Why are you being mean to PHP!" and "Programming not about fun!" tangents but I think there have been many thoughtful comments on why one chooses a programming language. Ruby is language that is having a lot of influence on the programming landscape right now -- and I think it is for the better.
    Christopher

  15. #90
    SitePoint Enthusiast kennyisnotdead's Avatar
    Join Date
    Apr 2002
    Location
    Massachusetts
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by mmj
    First, you mention that PHP is no longer fun, and has become boring 'like C'. In what way is C boring? What perspective are you saying this from?

    How can any language itself be fun? It's new to you? By that logic, any language will be fun when it is new, but will become 'boring' in your eyes once you are familiar with it. That is a rather short sighted attitude in my opinion and it encourages the use of less mature technologies simply because they are different to previous languages.
    I do not believe he means fun like going out and having a good time. I think fun means more like, ease of use with nice features to improve productivity. With technology changing so much, some platforms have fallen alittle behind from lack of updates. And I think he is just feeling like he's trying to make new inovative stuff with an old platform.

    but besides that, over the past few months I have done 5 sites were the client wanted his php/mysql site to be migrated to .net/sql server. I have never used php before this so it was learning experience the first 2 projects. But I will say if I was using mySQL I would highly recommend php for the site.

  16. #91
    SitePoint Member
    Join Date
    Oct 2005
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Although the move from PHP4 to PHP5 was a long time coming it created some problems...in a lot of ways it remindes the move from VB\C++ to .NET languages.

    You need time to adjust your self and then move all your old code in to it.

    Never the less I dont know about you all,but i still enjoy writing scripts in PHP with or without the php5 extra features.

  17. #92
    SitePoint Addict
    Join Date
    Apr 2005
    Location
    San Diego, CA
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using PHP since 1997. It was a lot of fun because I ported a site in PERL to PHP in about 1 week which was my first experience with PHP. I was hooked from then on.

    After I wrote the CMS, back in 1999-2000, that my hosting customers use and began work on version 2 it started to become "work." Not because of PHP however but because I'm a new product / new ideas kind of person and maintenance just doesn't appeal to me.

    When I began work on version 3 I just about had it. About 1/2 way through development I took a 2 month break and went and learned something completely new unrelated to programming. When I came back I had a clear mind and dove right in. It was the most fun I'd had in years.

    I've created so many classes, functions, and procedural code that I no longer have to start from scratch anymore. Whether it's an ecommerce site, informational, or just a one page site I already have an entire structure that's very close.

    What I did finally do was make my functions and classes generic and use a config file to make the major changes like database connections, urls, emails, colors, sizes, etc. Now I can get a decent CSS XHTML 1.0 site up in just about 2 hours and get content and images online in about 2 days.

    The big help I got was an html class I got from another developer and a css class I wrote that lets me dynamically build the css data anywhere in the code. I never really took to someone elses frameworks or template systems, although I've checked quite a few of them out, because 1/2 the fun was figuring it out and writing my own. The other 1/2 was solving business problems.

    There were some other tools that make it easier but the main point is that most of the technical hurdles that were fun in the beginning but became "work" later on are solved and now PHP is fun again and now I mostly just solve business problems which is also fun.

    Cheers
    I study speed waiting. I can wait an entire hour in 10 minutes.

  18. #93
    SitePoint Guru
    Join Date
    May 2003
    Location
    virginia
    Posts
    988
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by PHPCamp.com
    I've created so many classes, functions, and procedural code that I no longer have to start from scratch anymore. Whether it's an ecommerce site, informational, or just a one page site I already have an entire structure that's very close.

    What I did finally do was make my functions and classes generic and use a config file to make the major changes like database connections, urls, emails, colors, sizes, etc. Now I can get a decent CSS XHTML 1.0 site up in just about 2 hours and get content and images online in about 2 days.
    OK and a download link?

  19. #94
    SitePoint Addict
    Join Date
    Apr 2005
    Location
    San Diego, CA
    Posts
    205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I never thought of packaging them. The classes would need some cleanup. I'll follow-up if I do that.
    I study speed waiting. I can wait an entire hour in 10 minutes.

  20. #95
    SitePoint Wizard DougBTX's Avatar
    Join Date
    Nov 2001
    Location
    Bath, UK
    Posts
    2,498
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by PHPCamp.com
    I never really took to someone elses frameworks or template systems, although I've checked quite a few of them out, because 1/2 the fun was figuring it out and writing my own. The other 1/2 was solving business problems.
    This is the problem with Rails, as you find you've got that first 1/2 of your time to spare now.

    Douglas
    Hello World

  21. #96
    SitePoint Wizard Ren's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    1,060
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I think the fun has gone from PHP.

    The other day finally got around to playing with MySQL5, with stored procedures finally.
    Converted a MySQL4 db over, added some stored proc's, replaced the SQL with sp calls, and suddenly getting "Connection Lost" warnings in PHP5/PDO. Gets very tiresome and annoying.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •