Slashdot Mirror


Taking the Sting Out of PHP 5 Programming

bfioca writes "Where are the all-in-one PHP frameworks that make building well-factored and maintainable applications as easy as building simple sites? O'Reilly ONLamp's recent article Simplify PHP Development with WASP shows how to make a simple database-backed site with WASP in just a few lines of code. Other PHP 5 frameworks such as symfony and PRADO have been getting a lot of recent attention as well."

12 of 159 comments (clear)

  1. Bogus by Anonymous Coward · · Score: 4, Insightful

    Give me a break, depending on such things is terribly bad for maintainable code. Exactly the opposite of the billing given above. Will code written with it be compatible with PHP 6? How long after PHP 6's release will such tools be made compatible? If you need tools to simplify php coding, you might as well just forget it.

    If you want a quality product, there are no shortcuts. There is no such thing as a free lunch.

    A big thumbsdown on this kind of crap. "Sting" to PHP 5 programming? Get real.

    1. Re:Bogus by afd8856 · · Score: 3, Insightful

      You are either ignorant to what a real open source framework would represent (limit code reinvention, benefit from community effort, etc) or are not in the target group of such a framework (maybe you work for a big company that has a large programming team, who knows).
      Either way, I can tell you that, from my personal experience, learning and adopting a framework in your work can have a lot of benefits, for me, as a small custom business solutions provider.

      --
      I'll do the stupid thing first and then you shy people follow...
  2. I don't see the magic words MVC... by aphexddb · · Score: 4, Insightful

    JASPF (Just another silly PHP framework)

    If you are looking for quick app development and you aren't joe home user making a website you are going to need something thats based off a model -> view -> controller architecture. Symphony does this, so does the cake framework.

    --
    "We're all mad here." --Cheshire Cat
  3. Re:Just use Ruby or Python by onion2k · · Score: 2, Insightful

    Currently I'd discount Ruby from any sizable web development as it's still very much a minority language and it'd be practically impossible, or outragously expensive, to hire a Ruby developer. If your development team or company vanish (run over by a bus, move to Australia, whatever) you need to be able to get someone else who can come in and maintain the code quickly. That just wouldn't happen for a site written in Ruby. Of course, it'd be fine for any small development like a homepage or a blog .. but PHP would be equally fine for such an unimportant venture despite it's shortcomings. To a lesser extent the same can be said for Python. There's a lot fewer Python developers about than PHP, but there are some.

    Caveat: IAAPD (I Am A PHP Developer), so perhaps I'm horribly biased.

  4. Re:Drupal? by rdean400 · · Score: 2, Insightful

    I looked at the symfony site. Once I got to the HTML templates with embedded PHP, I closed the window. If I want to combine code with HTML, I'll use JSP or ASP - the component model and syntax are cleaner.

  5. Re:I need PHP by killjoe · · Score: 4, Insightful

    So let me get this straight. You don't know PHP, you don't want to learn PHP but you want use PHP to build some web apps. Did I get that right?

    Seems like a fools errand to me. I predict you will fail miserably and your web site will be hacked within 24 hours of you putting it up.

    You really should learn the language that you are trying to build web sites in.

    --
    evil is as evil does
  6. Attempts != Problem by truthsearch · · Score: 2, Insightful

    So portscans of my Macs prove there are many Mac exploits? Drupal has had just a few very specific security issues, just like any other internet-based app. There are many thousands of drupal-based sites, so evil-doers have written scripts to hunt down and take advantage of those that haven't upgraded. Nothing here uncommon to any other system. My drupal referrer logs fill with thousands to requests for IIS-specific files, yet I've never run a site on Windows.

  7. a framework is NOT a shortcut (or a CMS!) by webwright · · Score: 4, Insightful

    I tear my eyes out everytime someone calls a framework a "shortcut". Usually they follow it by "There's no substitute for good coders writing good code." The business reality is that most coders are not exceptional, and some are pretty lousy. You can spend all of your budget on human resources finding epic-quality coders (and then scratch some more to come up with their epic-salaries) or you can do what the rest of the world does-- get the best programmers they can find and afford. A framework helps un-exceptional coders write better (and more consistent/maintainable) code. This arguments seems akin to saying "forget word processors! Just get someone who can make Vi or Emacs dance and turn 'em loose." It seems to me that the evolution of software is pretty much the act of layering increasingly-smart frameworks on top of machine language to allow high quality results more accessible to more people.

  8. actually, the "sting" of php5 is... by acroyear · · Score: 2, Insightful

    the fact that because of all of the php-4 compliant code that it breaks, few ISPs doing web hosting services are in any hurry to upgrade because too many customers simply don't have the time to rewrite their applications to be compliant with php-5, much less take advantage of any or all of the new features.

    this is hitting me hard as i'm trying to put together an xml-intensive app and am stuck using home-grown open-source XML parsing and generating packages, mostly unfinished, that won't be finished because they've been superseeded by the php5 libraries that i can't use yet.

    --
    "But remember, most lynch mobs aren't this nice." (H.Simpson)
    -- Joe
  9. Re:Just use Ruby or Python by CoughDropAddict · · Score: 2, Insightful

    If your programming immune system immediately rejects any language that is more mindbending than the simple if/while/for/switch/function constructs of C-like languages, you will forever be a pretty naive programmer.

    As an example, JavaScript has OO, but no classes! How do you suppose that is? It's prototype-based OO. It's an interesting alternative to class-based OO. Well-rounded programmers can pick up a concept like that rapidly -- they don't just say "this is too much of a hassle."

    The basics in Ruby are no harder than C or PHP. Things only get more difficult when you start saying things that simply cannot be said in C or PHP.

  10. Frameworks, stygma, and rolling by eruanno · · Score: 2, Insightful

    Frameworks are fantastic beasts. I fear them yet I adore them at the same time. I do this with anything that I didn't write. Indeed, I moreso do this with anything that I do write!

    To the point: I see a lot of people bashing the concept of frameworks and stating that you shouldn't use frameworks because it's just being lazy or that frameworks are a bad thing. I believe this negativity comes from inexperience and ignorance.

    I agree, these are biting words, but consider the fact that the arguments used to support these ideas are based on incorrect assumptions and false information: thusly revealing that they know nothing about the framework(s) nor have they used them. (Either that, or they've used them incorrectly, producing a negative response! Try brushing your teeth with a hacksaw!)

    Goals of various frameworks are many, with each framework focusing on something completely different. I'll consider the framework that I am currently in the process of developing as an example: this framework's goal is to provide a semi-rigid structure for web application development, with particular emphasis on separating executive logic, data logic, and interface logic. (For anyone that doesn't know right off, this is the MVC pattern.) I chose this pattern simply because it suited how I like to develop my programs and gives me the amount of flexibility I need to provide for easy ways to quickly develop and make changes, to work with teams, and to better see how my code is interacting with the flow of the program. What happens with something doesn't work? Well, I pinpoint what type of error is ocurring, then I can cut out two-thirds of the code (granted, very little code is required for the model to actually work).

    I read a number of comments ago that PHP was designed without a rigid structure to provide for rapid development and flexibility. The commentor is absolutely correct, but it wasn't designed to disallow structure completely. In fact, with the blank canvas that PHP does provide, it certainly welcomes all attempts at structuring code. This is evident in its (newly-revamped) support for object oriented design as well as even basic support of functions.

    Another argument that I heard levied against frameworks is that they sometimes don't support certain functionality. There are two responses for this: firstly, not every solution is perfect; secondly, some frameworks are poorly designed. Of course, the second point is just that and requires no further exploration. However, the first point must be clarified. Certainly, we all agree that there are no perfect solutions, but doesn't this seem a bit like a copout? I don't believe so: I believe that limitations from using a well-designed framework stem from a lack of understanding its design or from not having enough creative foresight to know how to use it effectively. At this point, I seriously have to ask you if this framework suites what you're trying to do.

    Honestly, not every website will benefit form a framework. You have to realize this. Don't use the framework for more or less than it's intended for.

    One last address: for those that think that using a framework inherently means added complexity, sometimes you're right. However, you must realize that some more complexly designed websites with intricate functionality (to a safe degree) could benefit from using frameworks just as you can benefit from using standard functions for writing quick scripts.

    M.T.

    --
    "Support Bacteria - Its the only culture some people have" - Circa 1985
  11. Slashdot for Self-Promotion?! by GoCats1999 · · Score: 2, Insightful

    I'm disappointed that Slashdot editors are allowing more and more people to use /. simply as a means for self-promotion. Case in point: here we have a posting by Brian Fioca, referencing an article by Brian Fioca, which talks about a framework by Brian Fioca.

    And I wonder why I'm always so surprised that people complain about bias in the media...