Live data from Hacker News

Drupal's Golden Handcuffs

mikecr.it

121–130 of 148 posts

Re: Drupal's Golden Handcuffs

#121

Earlier quoted context omitted.

> And while PHP's is trying hard (see the other story on the front page at the moment) to modernize, the tools and ecosystem still don't compare to Ruby or Python. What do the current offering of PHP frameworks lack that Python/Rails provide?

I'm not going to claim up-to-date in-depth knowledge of the PHP ecosystem since my daily work ended in the 4/5 transition era, 6 years ago. So PHP is loads better, I'm sure, but I've seen the announcements of new features such as namespacing and closures, and it's clear that this stuff is shoehorned into the language and good use of these features is not ingrained into PHP culture. In the case of rails, beyond the ea…

> and it's clear that this stuff is shoehorned into the language and good use of these features is not ingrained into PHP culture.

Every major PHP framework uses both namespacing and closures.

> The ruby OO model with its mixins, implicit metaclass (eigenclass), and dynamic nature (ie. class definitions are just executable code), and standard functional features like lambdas w/ closures are all designed into the language in a very elegant way and this basic model has been more or less stable for the nearly 20 years of ruby's existence.

What you're describing here is the difference in the language itself. The PHP OO model is more traditional and Java-like, but that doesn't implicitly make it worse or behind the times.

> However if you look at the corpi of popular open source ruby code vs popular open source PHP code over the years, you find a much higher bar of quality in the ruby code.

I can't speak for the Ruby side, but on the PHP side you couldn't be more wrong. The open source efforts in PHP in the last 5 years have been nothing short of excellent. The open source PHP community has completely adopted the full range of PHP features, unit testing (TDD and BDD), and coding standards (https://github.com/php-fig/fig-standards/tree/master/accepte...). This is nothing new and it's been like this for a while.

Re: Drupal's Golden Handcuffs

#122

Earlier quoted context omitted.

"Drupal's custom content types, custom fields, and Views all allow developers to express complex logic that would, in any other development environment, be expressed as code and committed to version control" And that, in a nutshell, describes why Drupal's adoption rate is as high as it is compared to development frameworks developers actually enjoy working with. No fucking code. Non-developers can actually get result…

Being able to export and commit isn't really good enough; keeping a work log is only a relatively small part of the capacity for version control systems to expedite development. Many projects have development workflows where new features are developed in branches, and only merged when they're ready to be deployed. Suppose, in a Drupal project, you had two such features being developed simultaneously, and each added d…

"Being able to export and commit isn't really good enough; keeping a work log is only a relatively small part of the capacity for version control systems to expedite development. Many projects have development workflows where new features are developed in branches, and only merged when they're ready to be deployed."

Features, exportables, Strongarm (et al) are all compatible with the workflow you're describing. Our development workflow is heavily dependent upon branching. All new feature development takes place in branches that are later merged into dev, with stable "snapshots" taken from dev whenever we do a release. Pretty standard stuff, and we use features and installation profiles heavily in our implementation work.

"Suppose, in a Drupal project, you had two such features being developed simultaneously, and each added different new fields to a given content type, with corresponding changes to views and authorship workflows."

What you're describing isn't a credible workflow, it's a mess. Field declarations for a single content type strewn across multiple features? Why? Designing a content type and exporting it to code shouldn't take more than 30 minutes for even the most complex content types. If additional features are required they can be added to the feature but separation of concerns typically dictates that that code goes into a separate module. Cleaner that way.

"ssuming it were even practical for each developer on a Drupal project to have their own development instance of the database powering a site (which it totally isn't)"

All of our developers maintain local mirrors of the dev environments for all of the clients they work with. This includes snapshots of the dev database. Also, how is maintaining a local copy of a database either impractical or in any way a Drupal-specific problem? Any project that includes a datastore is going to have similar issues.

"The exported blobs are pretty much opaque to many Drupal developers (or non-developers, as you say), though, and may not be expressed sufficiently sanely that Git could figure out what changes actually took places. When these features were ready to be merged, would the merge work? Who knows? What if there were merge conflicts? Would developers be able to resolve them? Worse, what if Git's notion of the correct merge strategy didn't actually produce a semantically correct result?"

Merge conflicts happen with any workflow. Merge uncertainty is an issue with revision control, regardless of what platform you're developing in. As far as manual merges goes, I submit that any developer should be capable of manually merging simple array declarations (because that's all exportables are).

"All of these operations take place on generated code that nobody wrote and nobody reads, which is scary enough that the whole process wouldn't be trustworthy."

I think our definitions of both "code" and "trustworthy" differ greatly. Exportables aren't huge blocks of opaque logic. They're simple associative arrays. I have no problem trusting code that generates array declarations and has been tested by the core project devs, security team, module maintainers, and several thousand developers on tens of thousands of websites. Your mileage may vary.

"Exportables are yet another in a long series of efforts in the Drupal community to attempt to address a deficit they have with respect to most other web stacks, and again they've done it in a way that doesn't really deliver the benefits of the feature as it exists elsewhere"

100% accurate, you'll get no argument from me here.

"database abstraction layer"

My kneejerk reaction when this was first announced: DBTNG is a fucking travesty foisted onto the community by Acquia as part of a corporate play for the "enterprise" market. After a year of screwing around with it: It still a pain in the ass but with all of the bullshit going on with the MySQL project courtesy of Oracle, this might turn out to be very very useful.

"object-oriented design"

Who claimed Drupal was object oriented? Seriously, I'd like to know so I can spill my drink on them if I ever run into them at a DrupalCon afterparty.

Re: Drupal's Golden Handcuffs

#123
post #39

Earlier quoted context omitted.

Can you expand on this? How is this comment relevant to the article?

If that were the case, there would be no market for CMS. Everyone who wanted one would hack one up in Excel. Or maybe Word with macros.

Not really, a CMS is good because you don't have to build the same thing multiple times. However, if you plan on using a CMS as a tool to create solid, scalable, efficient applications, you will need to understand how to use the CMS properly. Many times that means understand what the CMS is doing behind the scenes. Any good programmer should be able to code a project like Drupal, granted that would take time, but they should be able to do it without sweating too much. I get extremely tired of the noobs and click-monkeys taking of the drupal community. If you can't write your own decent CMS because you don't know how, you should find another job, and leave application development to people who can do it properly and give clients a product that is worth the money they payed.

Re: Drupal's Golden Handcuffs

#126

Moving away from Drupal was one of my biggest steps forward as a web developer. I worked with Drupal full time for a little over two years. I spent much of that time clicking around in config screens, and when I did have to get my hands dirty with some custom code, I usually felt like I was just stumbling around in the shadow of the behemoth that is Drupal's API. I thought, "Surely this isn't what web development's s…

Kudos! Drupal is good as a tool. But writing real code is where it's at bro. :)

Re: Drupal's Golden Handcuffs

#127

Earlier quoted context omitted.

Being able to export and commit isn't really good enough; keeping a work log is only a relatively small part of the capacity for version control systems to expedite development. Many projects have development workflows where new features are developed in branches, and only merged when they're ready to be deployed. Suppose, in a Drupal project, you had two such features being developed simultaneously, and each added d…

"Being able to export and commit isn't really good enough; keeping a work log is only a relatively small part of the capacity for version control systems to expedite development. Many projects have development workflows where new features are developed in branches, and only merged when they're ready to be deployed." Features, exportables, Strongarm (et al) are all compatible with the workflow you're describing. Our d…

"Field declarations for a single content type strewn across multiple features? Why?"

Sorry for the confusion; I meant lower-case "features," as in, new pieces of functionality that both affect the same kind of data, not "Features" in Drupal terms. I don't think it would be especially unusual for multiple feature branches to affect the same content type in different ways.

"Who claimed Drupal was object oriented? Seriously, I'd like to know so I can spill my drink on them if I ever run into them at a DrupalCon afterparty."

Admittedly I've been away from the Drupal community for awhile, but I attended a DrupalCon several years ago in which the argument was made in multiple talks that Drupal's design followed the object-oriented philosophy despite not taking advantage of PHP-native object-oriented mechanisms. This (old) article seems to espouse these sentiments roughly as I remember them: http://drupal.org/node/547518 and I remember finding them to be pretty ridiculous at the time. Perhaps community sentiments have changed since then.

Re: Drupal's Golden Handcuffs

#128
post #6

I am puzzled by this: "Good Drupal developers are making a lot of money right now, much more than I'm seeing for Django or Rails or Node devs in general." I am curious where this is? This is not true in New York City, where I am. Developers who are good with a given PHP framework (Drupal, Symfony, etc) will make something like $60 to $70 an hour. The top Rails devs will make at least the same amount, and usually a li…

This doesn't make sense to me either, though I haven't touched Drupal for at least 6 years. In my experience, Drupal is ideal for cheap clients who want a zillion features but don't have the budget. You can deliver more functionality in Drupal than anything else, that is absolutely true. For high-end clients who are willing to pay for impeccable UX and solid problem-solving, I can rarely recommend Drupal because it s…

Digital/marketing agencies absolutely eat this shit up. I'm not sure what you consider to be a high budget, but it usually seems to be in the $80-$200k sweet spot where the agency wants to use Drupal so they can cut down on hours and still retain a lot of features.

Of course, they also want superb design and UX so things usually end up going over budget as we have to hack the hell out of Drupal to match the level of UX desired. Every single Drupal project I've worked on I've wished I could be using a real framework and code from scratch instead.

Unfortunately I don't see the perception of digital agency project managers changing much. They still think they can get the best of both worlds.

Re: Drupal's Golden Handcuffs

#129
post #39

Earlier quoted context omitted.

If that were the case, there would be no market for CMS. Everyone who wanted one would hack one up in Excel. Or maybe Word with macros.

Not really, a CMS is good because you don't have to build the same thing multiple times. However, if you plan on using a CMS as a tool to create solid, scalable, efficient applications, you will need to understand how to use the CMS properly. Many times that means understand what the CMS is doing behind the scenes. Any good programmer should be able to code a project like Drupal, granted that would take time, but the…

You're confusing Drupal with a CMS. It's much more, and less.

Re: Drupal's Golden Handcuffs

#130
post #39

Earlier quoted context omitted.

If that were the case, there would be no market for CMS. Everyone who wanted one would hack one up in Excel. Or maybe Word with macros.

Not really, a CMS is good because you don't have to build the same thing multiple times. However, if you plan on using a CMS as a tool to create solid, scalable, efficient applications, you will need to understand how to use the CMS properly. Many times that means understand what the CMS is doing behind the scenes. Any good programmer should be able to code a project like Drupal, granted that would take time, but the…

[deleted]
Post reply on HN