Start learning to become a web developer with the Flatiron School Prework

I ran across theĀ Flatiron School of programming a while back, and I thought it was pretty cool. They have a “pre-work” list of resources for their web development course. I expect it is quite good.

I ran across Flatiron school when I listened to a podcast the founder of the school did. I think it is pretty inspiring.

OK, enjoy learning to program. I’m pretty excited for you!

p.s. This post was based on an email reply I wrote to a reader of this blog who asked me for some resources to start learning Ruby on Rails.

WinniVote Rspec Feature Tests

I spent several hours today creating the specs for WinniVote’s signup feature.

I feel it is a valuable investment of my time for several reasons:

  • WinniVote’s current tests do not feel high quality, so hopefully my examples help other WinniVote devs.
  • I’ve been thinking about what quality tests look like for a while now, but have not had a chance to get feedback from other developers, so I’m interested what others think about my style.
  • I look forward to the further evolution of my style based on the feedback I might receive.

Rails vs. WordPress

I’ve been thinking about the topic of when I should use an MVC | framework, and when I should use a CMS platform ever since I discovered Drupal about 2.5 years ago. I don’t believe the topic is covered really well on the Web, and most people seem to have a shallow understanding of the topic, so I’ll share my thoughts with you.

The popular question in my company these days is “Rails or WordPress?”, but I will probably touch upon the broader questions of “MVC or CMS?” and “Ruby or PHP?”, so you can often substitute “Rails” for “MVC framework” in the article.

Something to also keep in mind is that in my experience the other MVC frameworks are much closer to being real competitors to rails than any other CMS is to WordPress, so that is something also to keep in mind (let us know in the comments if you want to propose some CMS candidates for using on projects instead of WordPress).

The Cop-out

The most common answer I hear from people, who I assume haven’t really thought about this for long, is “Rails is for web apps, WordPress is for websites.” But is my web-based system a website or a web app? Can most web-based system be put into one or the other category, or the other? Do you think you could score 5 out of 5 on a quiz which would show you a web-based system and ask you to pick a) website or b) web app?

The Gimmes

I’ve identified some traits of web-based systems which make it easy to choose one or the other.

I should say that regardless of the requirements of the system you’re building, in my opinion you should strongly consider whether the programmers you have available are much more proficient in one of the two environments. If your programmers are experts with Ruby and Rails and haven’t written even a 1000 lines of PHP, it is almost certainly better to use Rails for any system (except if you need a blog or promotional corporate website without any custom software development). Same for a team that is made up of WordPress and PHP experts with little Ruby and Rails experience.

Rails Gimmes

If you’re building a transaction processing system in which data and various views of that data are the only functionality, Rails is the natural choice. Examples that come to mind are a POS system, or a system that stores data about the amount of calls your call center is receiving, and then creating robust reporting based on that.

If the web-based system you are creating does not have an element of web publishing, and your customer does not have a need for most of the screens in the WordPress admin, you should pick Rails.

If your web-based system is a web service built on top of an existing legacy database and doesn’t have a website component, you should pick Rails.

Please contribute good descriptions of projects where you’d pick Rails in the comments, and I will include them here along with a reference to a URL of your choice.

WordPress Gimmes

If you’re building a blog, you should use WordPress.

If your project will need all or most screens of the WordPress admin, you should use WordPress.

If you’re making a web publication system (CMS-based system) you should use Drupal. No, just kidding, use WordPress, since Drupal kinda sucks unfortunately. Sorry Drupal, you were an OK attempt, but WordPress is probably a better choice for any web-based system.

Please contribute good descriptions of projects where you’d pick WordPress in the comments, and I will include them here along with a reference to a URL of your choice.

The Pattern

If your team is about as proficient with both WordPress and Rails, or you’re shopping around to hire a team and both solid Rails and WordPress teams are available, it comes down to opportunities for code reuse. Will your system re-use more code if you use WordPress and its very usable admin area, myriad of available plugins and themes? Or can you re-use more code by harnessing the object-oriented design, DSLs and good software development practices mecca that is Ruby, Rails and the available libraries and tools?

In terms of the decision of Rails vs. other CMSs available, technically Rails is probably the leader of the pack for a large majority of applications. The advantage of Rails disappears if your programmers are much more proficient with Python or PHP, since there are probably good enough alternatives in their language, namely Django and CakePHP, but code re-use opportunities each MVC framework will bring should again be taken into consideration.

Writer’s Bias (Why I think I am well-positioned to write this article)

You can read about my professional travels so far.

I now work for a company that uses both Rails and WordPress, and I am actually hired and paid to help make these exact kinds of decisions. I hope you will provide valuable feedback and discussion to help reach a further deeper understanding of the topic.