Choosing a Platform

From CSE330 Wiki
Revision as of 11:58, 11 January 2014 by Shane (talk | contribs)
Jump to navigationJump to search

You've learned a large variety of platforms in this course. Which one should you use? This page summarizes some of the pros and cons of each platform.

PHP

PHP is a language built for server-side web development. You built a file sharing application and a news syndication site in PHP.

PHP Pros

  • Largest support community: Easy to find help if you get stuck.
  • Distribution: Runs on virtually any web server in existence.
  • Easy to Debug: Because there is no framework involved and the PHP interpreter is well maintained, it is easier to pinpoint bugs and wrap your head around what is going on behind the scenes.

PHP Cons

  • Language: Few people will say that PHP is the most elegant language known to mankind. The language makes it easy to fall into the trap of bad coding practices.
  • Security: PHP does very little for you automatically in terms of web security.

Django

Django is a web frameworks written in the Python scripting language. In more ways than not, it is the Python equivalent of Ruby on Rails.

Django Pros

  • Less Code: Implementing common web design patterns, like social login or commenting, is usually as easy as a pip install.
  • Conventions: Django forces you to write neat and organized code, leading to better software engineering practices and scalability down the road.
  • Security: Django automatically implements common security practices, leading to a more robust web application.

Django Cons

  • Difficult to Debug: Django's high level of abstraction is a double-edged sword, because bugs and errors are sometimes difficult to find and can take hours to fix.
  • Heavyweight: Django is designed for larger web applications, and it is not suitable for smaller projects with just one or two controllers.

Bottle and Flask

Bottle is a web microframework written in the Python scripting language. Flask is similar option. Although you did not explicitly use Bottle or Flask during a module, it's worth listing on this page. In more ways than not, Bottle and Flask are the Python equivalents of the better-known Sinatra, a Ruby microframework.

Bottle and Flask Pros

  • Lightweight: There are few enough files that you can find your way around and be in full control of your application logic.
  • Access to Python Libraries: A lot of the things you do in Django you can do in Bottle and Flask, except that you have more control over the ways that they are implemented.

Bottle and Flask Cons

  • Lack of Conventions: Bottle and Flask give you the tools you need to build maintainable code, but unlike Django, they don't force you to. It's easy to end up with Python scripts containing hundreds of lines of unrelated application logic.

Node.JS and Express

Node.JS is a low-level implementation of JavaScript that enables you to write networked and web applications. Express is a Sinatra-like microframework that runs on top of Node.jS.

It is also worth bringing your attention to Meteor, a bleeding-edge framework for Node.JS that abstracts away client-server communications. (Watch the promo video; it's pretty awesome.)

Node.JS Pros

  • Speed: Node.JS is the fastest of the options on this page. It is easy to scale up your Node.JS applications.
  • Modern: Node.JS is also the newest of the options on this page, so most of the plugins you find for it use the best and latest practices.
  • Language: With Node.JS, you can use just one language for both your server-side and client-side logic.
  • Real-Time Options: Node.JS enables you to write real-time applications with ease, for example, with Socket.IO.

Node.JS Cons

  • Lack of Conventions: Like Bottle, Flask, and most other microframeworks, Node.JS and Express don't force you to stick to predefined conventions, giving the potential to build messy code.