Rails Overview
Background
Ruby on Rails (Rails) is a software framework for building Web Application.
Features:
- Building using the Ruby programming language.
- Open source - MIT License.
- Provides a full stack - back-end data store to front-end presentation of web pages, and everything in between.
- Released in 2004, and has continued to evolve rapidly.
Rails - What's Inside
- Rails is a Ruby gem (a gem is a prepackaged Ruby application or library)
- Rails includes an extensive set of code generators, automated testing script and other features that are intended to make the job of programming a web application easier.
- A suite of additional tools are provided as part of the Rails ecosystem that make it easy to deploy a fully-functional web application:
- Rake - comes from RubyMAKE, i.e. it's utility similar to the UNIX make. You use it to create and migrate databases, clear web session data, etc.
- WEBrick - web server for hosting Rails web application. Can also use other web servers, e.g. Apache, Thin, Unicorn, etc
- SQLite - a simple database engine pre-installed with Rails. It is perfect for development. When you go to production, you can simply switch to something like MySQL or a post grasp production database.
- Rack Middleware – standardized interface for interaction between web server and web application
Model-View-Controller
The Rails framework is built around the Model-View-Controller (MVC) design pattern:
Rails Criticisms
It doesn't scale - High profile issues at Twiter.
It is magic - The framework and code generation means you really don't know what's going on "under the hood"
Our answer - It is all a part of the natural progression
Bits → Assembly → HLL → OOP → Frameworks
“The point is that the cost per request is plummeting, but the cost of programming is not. Thus, we have to find ways to trade efficiency in the runtime for efficiency in the ‘thought time’ in order to make the development of applications cheaper. I believed we’ve long since entered an age where simplicity of development and maintenance is where the real value lies.”
David Heinemeier Hansson
Latest Post
- Dependency injection
- Directives and Pipes
- Data binding
- HTTP Get vs. Post
- Node.js is everywhere
- MongoDB root user
- Combine JavaScript and CSS
- Inline Small JavaScript and CSS
- Minify JavaScript and CSS
- Defer Parsing of JavaScript
- Prefer Async Script Loading
- Components, Bootstrap and DOM
- What is HEAD in git?
- Show the changes in Git.
- What is AngularJS 2?
- Confidence Interval for a Population Mean
- Accuracy vs. Precision
- Sampling Distribution
- Working with the Normal Distribution
- Standardized score - Z score
- Percentile
- Evaluating the Normal Distribution
- What is Nodejs? Advantages and disadvantage?
- How do I debug Nodejs applications?
- Sync directory search using fs.readdirSync