Ruby/Reasons for choosing RoR

From Meshplex

Jump to: navigation, search
Image:Ruby_on_rails_tutorials.jpg
Ruby for complete beginners
Ruby Introduction
What can I use RoR for?
Reasons for choosing RoR over other popular programming languages such as php or asp.net .What makes Ruby so much more special
Where can I find RoR? In what “forms” does it come?
How to install RoR.Solutions for both the novice and professional programmers on Windows,Mac OS X and Linux.Prerequisites.
Ruby programming tutorials for beginners:
Ruby Basics
Ruby Variables, Datatypes, Operators
Ruby Symbols
Ruby Statements
Ruby Converting data to another type: type conversion or typecasting
Ruby Arrays, Hashes, Ranges
Ruby Functions and built in functions
Ruby Control structures
Ruby Regular expressions and blocks
Ruby Loops
Ruby Recursion
Ruby Data Structures
Ruby Methods, Classes, Modules, Namespaces
Ruby Exceptions
Ruby Object Oriented Programming
Ruby Multithreading
Ruby File Handling.Input and Output
Ruby Basic GUI
Ruby and databases.Ruby on Rails and MySQL
Ruby Basic CGI.Using fastCGI
Ruby Basic Networking and web programming
Ruby Basic Graphics
Ajax and Rails.Web 2.0 and what it means
Ruby Testing, Debugging, Automation of tasks
Ruby Apache,Capistrano, Mongrel,lighttpd – reviews and tips
Finding a Ruby on Rails ready web hosting company
BONUS: mini tutorial for a simple RoR application

[edit] Reasons for choosing RoR over other popular programming languages & frameworks written for PHP or ASP.NET .What makes Ruby so much more special

We've already actually discussed one of the reasons for choosing RoR over other web-targeted programming languages: scaffolding.If you don't remember exactly what that is,please go to the previous page.Plus, it doesn't also hurt that RoR is also quite growing in popularity by the day..it doesn't hurt to be cool right? Well..it does sometimes, but it's not the same case with RoR.

There are people who say RoR isn't suitable for business-critical applications because it's slower that other programming languages already available and that the ActiveRecord database model just don't offer any help when you need more complex database functionality.

While some parts of these statements might be true for the moment, let's not forget that this was the case with virtually any new programming language and framework - until someone believed in it and realized it's true potential and decided to participate in the community and contribute with code or valuable advice.

Point is, Ruby has probably been present longer than even PHP but was only used by a few programmers in Japan, until Rails came in and things are just starting to get great.I truly believe that this is not a momentarily hype and Ruby will have a great future and it's quite possible that in a few years other even better frameworks written for it will appear.

That being said, let's mention a few other reasons why you shouldn't give up on Ruby or Ruby on Rails just because of some other people might say or because you're too used to one programming language and think it's the solution to everything.Actually, there probably isn't one "best than all" programming language or framework, it all depends on the programmers skills of accomplishing the give task with it.There only are advantages and disadvantages..and preferences of course.

  • Ruby has a simple syntax, following natural language
  • Ruby code is easy to read and understand

Take this example:

quote="It's the same each time with progress. First they ignore you, then they say you're mad, then dangerous,
then there's a pause and then you can't find anyone who disagrees with you."
print quote

It's easy to understand,isn't it? The variable quote takes the value between the " " and then it's printed by the print command on screen. We'll discuss variables and how to assign them values in the next chapter.

  • Ruby and Ruby on Rail's popularity is constantly increasing.This means that more and more support will be available to the community offered by the growing number of members.Chances are that if you encounter a more unusual problem, there will be someone out there able to help you;and if not now,most certainly in a near future.
  • Ruby code is easier to maintain,cleaner also due to the "Don't repeat yourself" principle and scaffolding.
  • You can now save time because most applications take now less to code due to Ruby on Rails's architecture
  • Since the language has a growing base of fans, it's quite possible that new Ruby frameworks will be developed, better than Rails at the moment.
  • If you've never programmed in your life, it will be much easier for you to start on Ruby than if you would've started first with asp or php, or Java for example
  • Ruby and Ruby on Rails communities and forums contain much more recent,relevant to the current trends than other programming language's forums.It should be a lot easier to find solutions to a problem because more up to date information is posted.
  • Unlike other web programming languages, Ruby is a full featured object-oriented programming language
  • A lot of code for basic operations has already been written for you if you use the Rails framework.This saves you a lot of development time.This can also be true for other programming languages tough, for example if you've heard of the Code Ignite framework for PHP or CakePHP.
  • The ActiveRecord will bring your database much "closer" to you than other traditional OOP development techniques;it will make you feel you have a lot more control over your development process.In most cases,the database will be one of the most important parts of the project.
  • Rails is Web 2.0 ready.It can provide an easy way to implement AJAX functionality specific to the Web 2.0 trends.It also has an emailing framework built in, web services and caching.
  • Ruby code is easy to test and fix because of it's built-in testing features.If you're using Rails, it will automatically create basic tests for you that you can later expand if you wish.The less time you need to spend on these processes, the more productive you'll be.
  • Test cases can be easily planned and ran with "harnesses" and "fixtures" and then deployed automatically with "rake" that you can get here.In fact, with Rails you get separate environments for development, testing, and production also.
  • Rails uses code generation and metaprogramming also,unlike other frameworks which mainly rely on code generation.Metaprogramming allows the use of programs to write other programs.You can get more info on metaprogramming concepts here
  • Rails is open source.This means that it can be easily improved,modified,have bugs fixed.Newer,better distributions of it generally can appear at a faster rate than it happens with other proprietary-code frameworks,because open-source allows others to contribute.

Surprisingly, I would like to add a few cons now, just to keep things balanced:

  • Since Ruby and RoR are still relatively new to being used on a large scale, it would be best to avoid trying to build large business-critic applications on it just yet.You don't want to reach to a point where your servers will just crash and have no backup immediate plan.We are still waiting on gathering enough experiences from programmers on Ruby's scalability and efficiency on such critic mediums.
  • Ruby is great tough for projects that have a well defined scope and that do not need to sustain tens of thousands of users.It appears that at least for the moment,Ruby is slower than php or asp...this could also result in you having to add more resources to your system than you would have to in the case of php or asp or java.
  • Shared-hosting that is Ruby ready is still not widely available.You will probably need a dedicated server or a VPS if a shared-hosting account won't suit your space or bandwidth needs or if you want to modify the standard Ruby configuration deployed on the specific shared hosting server.

To conclude with, there are a lot more pros than cons on why to choose Ruby.It really is a programming language truly worth learning.

    • If you want to see other people's opinion on this topic,please check this and this especially
Previous Next
Personal tools