Slashdot Mirror


Drupal Competes As a Framework, Unofficially

tgeller writes "Drupal developer Ben Buckman attended the BostonPHP Framework Bake-Off with the hopes of pitting the CMS against CakePHP, Symfony, Zend, and CodeIgniter. He was told that he couldn't because Drupal is 'not a framework,' a response he felt was 'coder-purist snobbery ("it's not a framework if you build any of it in a UI").' So he decided to unofficially compete in the back of the room by accepting the challenge of building a job-posting app in 30 minutes, while the official competitors did the same from the stage. He recorded the results, which are impressive. In the process he raised the question: What is a framework, anyway?"

28 of 178 comments (clear)

  1. Steak by Anrego · · Score: 4, Insightful

    I’d call Drupal a tool with a framework for extending said tool rather than a straight framework.

    Why? Just what my gut tells me. At the end of the day it doesn’t really matter (save for contest qualification purposes I guess). Use what does the job for you.

  2. I never thought I'd see the day by Megor1 · · Score: 5, Funny

    I'd never thought I'd see the day when PHP developers would have "'coder-purist snobbery"!

    --
    Everyone that disagrees with me is a paid shill
    1. Re:I never thought I'd see the day by Foofoobar · · Score: 2

      if you are using PHP and want purity with the ease of scripting language, you seriously need to jump ship.

      --
      This is my sig. There are many like it but this one is mine.
    2. Re:I never thought I'd see the day by silentcoder · · Score: 2

      There has been several, though no mainstream ones really. C was the first truly portable language and gave us the first portable OS (Unix) until then all OS's were written in machine code for a specific platform.

      Since then though there were quite a few OS's written in other languages. Sometimes for purely academic research, sometimes just for fun, some as serious projects with real users (though granted not a great many of them).
        XEROC wrote their PILOT system in Mesa.
      PERQ was written in Object Pascal

      The USCD P-System was written in old style non-object Pascal and in it's day was one of the best OS's available, not least because it was the most portable ever written at the time.

      --
      Unicode killed the ASCII-art *
    3. Re:I never thought I'd see the day by AmonTheMetalhead · · Score: 2

      Java blows. I absolutely hate Java. A while ago we encountered a specific issue with our Java based service bus, that caused it to run out of memory. While diagnosing the issue I noticed the JVM was opening a lot of TCP/IP connections, so I went to one of our Java 'programmers' to get an idea of how much ram/heap such an object uses, and all I got was a blank stare. (Still don't know the answer to it, but i was right that it was the huge number of open TCP/IP sockets that caused the JVM to run out of memory). If you can't handle allocating and managing memory, you don't deserve the right to call yourself a programmer.

  3. "Framework" isn't just a buzzword... by MrEricSir · · Score: 4, Funny

    ...it's a way to seamlessly align the holistic design-process in an integrated, next-generation infrastructure using best practices and maximizing ROI.

    Going forward, frameworks are a paradigm shift in cost-effective and value-added solution development.

    --
    There's no -1 for "I don't get it."
    1. Re:"Framework" isn't just a buzzword... by ChipMonk · · Score: 3, Funny

      You left out "XML-aware" and "dynamic response".

    2. Re:"Framework" isn't just a buzzword... by MrEricSir · · Score: 4, Funny

      Great, let's touch base. By not letting that slip through the cracks of our knowledge process, we can take our core competencies to the next level and increase our brand visibility in mission critical logistics.

      --
      There's no -1 for "I don't get it."
    3. Re:"Framework" isn't just a buzzword... by Cow+Jones · · Score: 4, Funny

      Bingo!

      --

      Ah, arrogance and stupidity, all in the same package. How efficient of you. -- Londo Mollari
  4. framework by mattack2 · · Score: 2, Interesting

    What is a framework, anyway?"

    What are Frameworks?

    A framework is a hierarchical directory that encapsulates shared resources, such as a dynamic shared library, nib files, image files, localized strings, header files, and reference documentation in a single package. Multiple applications can use all of these resources simultaneously. The system loads them into memory as needed and shares the one copy of the resource among all applications whenever possible.

    http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WhatAreFrameworks.html

    I know that's not what you were really asking...

  5. PHP supports closures (as of 5.3) by rsborg · · Score: 2

    As a coder-purist snob myself, my opinion is that using PHP disqualifies you from being either of the three.
    Honestly, why would you build a framework in a cobbled-together templating language?

    So where's your closure support, Java? C++?
    Even ObjectiveC and *javascript* support closures, for crying out loud (something as cool as jQuery wouldn't exist without closure support).

    Functional programming is a serious win for code reuse and extensibility.

    --
    Make sure everyone's vote counts: Verified Voting
    1. Re:PHP supports closures (as of 5.3) by oldhack · · Score: 2

      You get the same thing with class instances.

      What's with the buzzword?

      --
      Fuck systemd. Fuck Redhat. Fuck Soylent, too. Wait, scratch the last one.
    2. Re:PHP supports closures (as of 5.3) by larry+bagina · · Score: 2

      c++0x has lambda functions/closures.

      --
      Do you even lift?

      These aren't the 'roids you're looking for.

    3. Re:PHP supports closures (as of 5.3) by icebraining · · Score: 2

      The C code is very different from the Javascript code, because the 9 is bound at compile time. What makes a certain function a closure is how you can have multiple instances of the same function with different variables bound to it.

      Furthermore, since they bind to variables, changing the value of the variable outside the closure is reflected inside it:

      function a() {
          var x = 1;
          var c = function() { return x; }
          x = 5;
          return c;
      }
       
      var b = a();
      print b(); //prints 5.

  6. It's a long way by TheModelEskimo · · Score: 3, Insightful

    ...from the elephantine Drupal to a use-as-you-need-it framework like Zend. So, "use the right tool for the job" is a huge part of this. Personally I err on the side of "less is more" and look at my local Drupal community and see people who are picking a kitchen sink tool because they have limited time and resources. Not the sort of example I race to follow.

    My experience with another large CMS/CMF taught me that maintenance costs (which have to be passed on to clients) really start to add up quickly with the behemoth-sized packages, if you have a very active client. And if you're developing a small site with Drupal, and think of yourself as a moderately technical person, I sincerely ask you why you're not using something like Processwire instead. The last three people I saw do this did it because Drupal was "what they knew." That's uh...interesting. Why not just learn several tools that can fit into a more flexible toolchain? Drupal has one heck of a footprint!

    The summary mentions a GUI, so it's probably worth bringing up Django -- an otherwise all-code framework that comes with its own admin panel GUI already built.

  7. Drupal is a pain by pacergh · · Score: 3, Insightful

    You may be able to argue Drupal, or even Wordpress, are frameworks. Nevertheless, Drupal is a bear to work with, fickle, frustrating, and overly complex.

    Perhaps for complex websites it's worth it, but I don't make complex websites. I make simple ones. The few times I tried to use Drupal to do so they became far from simple.

    I'd rather code from scratch than use Drupal.

    1. Re:Drupal is a pain by Narcocide · · Score: 2

      You know you're right. I know you're right. The problem is that there are so many horribly inexperienced, disorganized, and utterly belligerently incompetent web programmers out there that they give the few of us who actually know our asses from a hole in the ground a bad name. The perception amongst the broader small and medium sized business community (a.k.a. 90% of all available clients) is that if you're not using a framework you can't possibly know what you're doing. They think there's no possible way someone could be experienced enough to make a secure, efficient, and stable website simple enough that it might cost less to build it from scratch and maintain it than the "equivalent" product created via an infinite amount of Joomla or Drupal customization.

      Though it seems like nobody who has only bought websites and never made one themselves has ever survived the financial damage of making this mistake the first time, so the myth persists because none of the clients out there know their asses from a hole in the ground either.

    2. Re:Drupal is a pain by pacergh · · Score: 2

      Maybe you should take the time to actually learn how Drupal works. Yes, it's hard to work with, if you do not understand the concept of hooks. Almost impossible actually.

      I've taken enough time to learn how Drupal works to know I don't want to work with Drupal.

      Wordpress works better for basic content management that clients can easily use without calling me all the time. Plus, it's more easily theme-able than Drupal is out of the box. Add to that the ease with which my clients can change themes or add plugins and Wordpress far outshines Drupal in basic content management. (And it appears to run better, too.)

      For custom content management I either find an already in place program or roll my own. For example, had to work on a website for an academic journal. I initially tried a few CMSes, including Drupal, but each offered significant complexity on my end AND the user end. No dice.

      Then I found the Open Journal Systems (OJS). Their solution worked for my specific task. It was a bit complex, but I wouldn't have had to write my own modules to do what I needed. Plus, it was more intuitive for my users. (Although it's user-workflow is still a bit clunky.)

      For other systems, such as basic customized contact management systems, I roll my own. The rise of frameworks utilizing the MVC principle is a blessing.

      It's long been a good maxim to separate the data from the code from the layout. MVC frameworks like Rails or Cake help do that up front instead of me having to design the separation myself. Drupal? Not so much.

      I'd say Drupal, in the broadest sense, could be called a framework. Nevertheless, I don't know why you would want to use it that way. The maintenance required for custom Drupal sites -- and I mean having to field calls from users fixing or modding modules, or adding new ones, or teaching them how to use existing things, on top of fixing problems and tuning it for resources -- is beyond what I want to provide. I'd rather Wordpress or Rails.

      And, more importantly, unlike most Drupal "developers" I know I'm not a "developer;" I'm a web designer who can hack away at stuff. If a client needs a developer I tell the client to get a real developer, or choose to use a more simple solution. TCO isn't something to be sneezed at, although it can be hard to educate clients on it.

      Finally, why is it so many Drupal people say something like:

      Maybe you should take the time to actually learn how Drupal works. Yes, it's hard to work with, if you do not understand the concept of hooks. Almost impossible actually.

      Really? Here's the skinny: Drupal is supposed to make development easier. Why the heck should I have to learn what amounts to a new bloody language to make Drupal "work," to access it's "full power." Heck, I'll just learn to access the full power of PHP (or learn an MVC framework like Rails) rather than spend "the time to actually learn Drupal;" time I could better spend getting projects done with the knowledge I have.

      Access for "the concept of hooks," really? It's not bloody rocket science, I could take the time to learn it, but once again why should I? If Drupal is going to make itself so bloody hard to use, why don't I just code from scratch?

      And don't give me that malarkey about security and avoiding cross-site scripting and avoiding SQL-injections. If you're spending the time to create a complex site that needs to take advantage of the solutions that lead to possible security problems like that then you'll also have the time to read up on best practices.

    3. Re:Drupal is a pain by Narcocide · · Score: 2

      While that's true in theory, my rough estimate based from first-hand experience is that only around 15% of the deployments of these "standard frameworks" stay standard enough for that to be true. The rest of the time the client expects the full customization capability of a site written from scratch along with this supposed "easily replaceable" coder. The code base tends to end up getting chopped all to hell and by the time they're done (IF they get done) it no longer shares enough in common with the official distribution to either benefit from future updates and compatibility with 3rd party contributed modules or to benefit from any time/cost saving that standardized, reusable code is supposed to afford.

  8. Re:And they have great timing by Xgamer4 · · Score: 2

    It really is great timing. I now have a good reason to not RTFA.

  9. Actually... by dandaman32 · · Score: 3, Interesting

    (This post contains shameless self promotion)

    I think GUI elements are an essential part of a web development framework nowadays. I maintain a small open source CMS called Enano. It's very basic, but during the course of its development I've written a ton of GUI building-blocks, among other frameworkey things, and documented the APIs for them so that plugins can use the same features. Regarding the GUI elements, I think consistent interfaces are an important part of any web application. Thus, what better way is there than to use a good, solid framework that, among its other jobs, takes care of some of the GUI design ugliness for you? Stuff like a standard way to present and validate forms, show message boxes, log in users, provide visual feedback for a process, etc.

    In my opinion, a framework should do more than just provide a bunch of random pick-and-choose APIs that you can use. It should take care of the boring details you don't want to have to rewrite for a web app, like user account management, sessions, user data, database abstraction, that kind of thing. That's why people are writing applications using software like Drupal and Enano: they want to write a web app that does what it needs to do without having to reinvent the wheel. I'm currently using Enano as the foundation for an e-commerce site (contracted project). Yeah, eating my own dog food, but shows that it can be easy to take something like Enano/Drupal/Wordpress and use its existing, established core features to write a whole new application that uses those features.

    Yes, I've used a more traditional framework before (CodeIgniter). It's great, and I love its design for basic applications, but you still have to write your own user management and a lot of other prerequisites to create something like an e-commerce site. In contrast, I've developed the entire e-commerce plugin with about 50-60 hours of work, including a couple of very minor modifications to the core.

  10. Re:Drupal is shit. PHP is shit. by tgeller · · Score: 2

    Summary: "I hate Drupal because it undermined my high-priced business". If this was a troll, nice work!

    --
    Tom Geller
  11. obligatory by Weezul · · Score: 3, Funny
    --
    The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
  12. There are two sorts of PHP developers by SmallFurryCreature · · Score: 4, Insightful

    The first you don't hear much about, they know the language, its stengths and its limitations and simply use it because nothing else out there can compete.

    Then you got the second kind, that will be fuming at the last bit in the previous paragraph. They are forced to use it for some reason, mostly because the latest language they wish to use simply isn't supported enough. Personally, I think these are the lesser developers, the bad photographers who think if only they get a Hasselblad they will turn into a top class photographer instead of having to use this cheapo poloraid that nobody could ever possibly use to make art.

    Personally I also think frameworks are silly. If you can lash up a site in 30 minutes, then the request simply isn't distinctive enough. Your site will be the Xth among thousands and fail. For the next job board site, you need to add something new, do it different, improve the process/experience else the monsterboards will simply keep the position they got.

    If a wizard can write your code, you are not a developer but an assembly line worker. Granted there is a living to made at this, but please, don't call yourself a developer, you are a code monkey.

    It is amusing for me to see the developers that every problem they encounter, they say: Oh if only we used tech X, this would be easy... WAY to sell your talent kiddo. It is even more amazing to see when they get away with it. Companies running everything from PHP, Perl, Python, Ruby on Rails, ASP and god knows what else, in the same company and in one extreem case, the same site... I don't care how much you hate an individual language, more then one you need a BLOODY good reason, more then two and you are insane.

    But hey, keep looking for the magical language that no longer requires you to express yourself to achieve what you want. If people could write amazing code in assembly then why can't you make the language the project uses just work?

    Really, if you claimed that you would be a better driver if only you had a proper car, every real driver would laugh at you. Instant poloroids are used by the pro's. Some serious art is produced with nothing but paper and charcoal.

    But for a website, you need the latest tech so you can never learn all its secrets. Right.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

    1. Re:There are two sorts of PHP developers by Alt_Cognito · · Score: 3, Insightful

      > Personally I also think frameworks are silly. If you can lash up a site in 30 minutes, then the request simply isn't distinctive enough.

      Let me first point out that I agree with most of what you say (which is essentially that the value of a programmer is in solving problems which have not already been solved), however:

      The entire point of a framework is to give you the underlying repetitive parts so you can focus on coding the complicated domain specific pieces later.

      Frameworks and libraries are everywhere. In fact, many people judge the quality of a language by the quality of the libraries they have.

  13. Re:Drupal is shit. PHP is shit. by SimplyGeek · · Score: 2

    Yeah, how dare a technology come around that commoditizes our business! *shakes fist at the moon*

    You're in the same league as graphic designers bitching about 99Designs. How about other now-commodity stuff like ODBC drivers? There used to be entire companies around that one piece of tech. Now it's something we expect to just work as a matter of fact.

    If that means the bar is lower for web development, then so be it. Yes, more morons will get into the game. But so will competent people who otherwise may not have. In the end, it makes web development more affordable and within reach of more people. If that's not a win, I don't know what is.

  14. Drupal is a jack of all trades by Crouty · · Score: 2, Interesting

    I have build Drupal sites for the last 5 years and yes, Drupal can be frustrating. But Drupal still develops fast, Drupal has just released version 7 with many usability improvements over the previous ones. The problem is everyone of us has to specialize because the day does not have enough hours to become expert in three or more systems. And once you earned some experience with one or two systems you usually can achieve the desired results quickly and IMHO Drupal is among the faster ones, because of the tons of modules and documentation for it. Plus Drupal does not make you jump through countless XML configuration hoops like some other frameworks do. Oh, and "writing from scratch" is a sure way to insecure sites. As soon as you need user registration it is just not worth taking the risk of SQL injection or cross site scripting bugs. Which you will inevitably make.

    --
    On se Internetz nobody noes your German.
  15. I say not framework by kikito · · Score: 2

    I thought it was pretty much agreed that you could not "run" a framework. Just "use" it to build something (a website, an app...) that then you run. Significatively, there's no "content" (understanding content as "the thing that the end users usually change and use").

    Drupal can run by itself, with no modifications (granted, the default installation will not let you do much, but you still can) so to me, it might be a framework plus something else - but definitively not "only" a framework.

    I don't know the Drupal internals well enough, but if it is well designed, it should be reasonably easy to separate the "Drupal Framework" (classes that can be used to build other things) from the "Drupal website" (the "default content" that Drupal starts with).