News for hackers. Stuff that matters.
Re:Bedrock: a modern WordPress stack by Xdes on Wednesday December 18, 2013 @02:05PM (#6929758)
Hi, I have not written a single of line of php. How hard would it be to get started with a Ruby/Node/.NET background?
Re:Bedrock: a modern WordPress stack by smacktoward on Wednesday December 18, 2013 @02:46PM (#6930098)
You probably won't have too hard a time. With that background, your main challenge will be overcoming the wave of nausea that will sweep across you when you realize that WordPress is a gigantic mass of procedural code studded with inconsistently documented hooks and filters rather than something with a nice, clean, easily extensible OO architecture. But with liberal applications of patience and Pepto-Bismol, this feeling eventually passes.
Re:Bedrock: a modern WordPress stack by wise_young_man on Wednesday December 18, 2013 @08:39PM (#6932349)
I believe WordPress is moving forward. Here is just one of the many OO classes. You can also do OO in plugin development as well.

https://github.com/WordPress/WordPress/blob/master/wp-includ...

Re:Bedrock: a modern WordPress stack by calgaryeng on Wednesday December 18, 2013 @04:09PM (#6930775)
lol :)
Re:Bedrock: a modern WordPress stack by bretthopper on Wednesday December 18, 2013 @02:10PM (#6929799)
WordPress is known for being "easy" but that depends on what you want to do with it. It's definitely easy to get a simple blog up and running since it's mostly done for you. But WP can quickly get complicated since it isn't designed well and the documentation is pretty bad surprisingly. There's a ton of resources online but the quality of it is hit and miss.
Re:Bedrock: a modern WordPress stack by homersapien on Wednesday December 18, 2013 @03:26PM (#6930424)
Not hard at all. PHP is incredibly easy. Wordpress is very well documented, and the enormous community support (plugins) means that you can do quite a lot without having to get your hands dirty with the code. And believe me, that's not an analogy. Wordpress is a great example of how NOT to code, regardless of the language being used.
Re:Bedrock: a modern WordPress stack by chc on Wednesday December 18, 2013 @02:45PM (#6930090)
PHP isn't the most fun language, but it's not that hard either. It's unusually quirky, but not unusable. As for WordPress, though — if you're used to a nice, sane API like you get in Rails or .NET, you're probably going to find the massive heap of cruft that we call WordPress a little bit aggravating.
Re:Bedrock: a modern WordPress stack by krapp on Wednesday December 18, 2013 @03:30PM (#6930451)
Yes, it's probably worth mentioning that even people willing to deal with PHP find Wordpress code to be 'aggravating'. It is, unfortunately, not an example of PHP application design at its best...

Upshot, though, there's plenty of documentation and SO threads out there and a huge ecosystem of plugins. Most of the time you never even need to look at the actual source code.

Re:Bedrock: a modern WordPress stack by smacktoward on Wednesday December 18, 2013 @05:28PM (#6931338)
And in the WordPress core developers' defense, it has been getting steadily better as time goes on. It's still a long way from perfect, of course, but they're working on it.
Re:Bedrock: a modern WordPress stack by krapp on Wednesday December 18, 2013 @05:43PM (#6931427)
things like this need to stop though:

   <?php /* pointless comment */ ?>
   <?php echo $something; ?><div><?php if($blah){ echo stuff(); ?></div><?php } ?>...
...keeping track of that context switching in a complex theme can be maddening. Especially if it includes inline css and javascript or (heavens forfend) mixes php in with the inline css and javascript...
Re:Bedrock: a modern WordPress stack by pestaa on Wednesday December 18, 2013 @06:09PM (#6931585)
Unfortunately, this is precisely the only thing PHP was invented for. It is a templating engine planned to be used exactly how you quoted.

Everything else is just accidental complexity.

Re:Bedrock: a modern WordPress stack by krapp on Wednesday December 18, 2013 @06:21PM (#6931670)
I know. Doesn't mean I have to like it though.
Re:Bedrock: a modern WordPress stack by thebiglebrewski on Thursday December 19, 2013 @08:19AM (#6934454)
If you're interested in doing wordpress in a Rails style, you should checkout my repo wordpress-haml-sass on GitHub! Directory structure and files like Rails, compiles to a Wordpress theme. You're still writing Php but it doesn't feel like it!

https://github.com/zachfeldman/wordpress-haml-sass