Should I Be Using Rails or Ruby for This Website Application? How

Should I be using Rails or Ruby for this website application? How?

Sounds like Rails might be a bit heavyweight for your situation. Perhaps Sinatra might be a better fit? It's an ultra-lightweight framework: a hello world app might look something like:

require 'sinatra'
get '/' do
"Hello World!"
end

Can we use Ruby on rails to develop a mobile web app?

Absolutly YES!

Ruby on Rails just a backend tech, is the same as what you plan to do for normal browser. There are only two things that you need to consider about mobile app. First is mobile browser's content size because you need to adjust your layout to fit the size. There is a HTML meta tag called viewport can help you.

Ex.

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">

This script will tell user's browser that the content should be fit the devise size,initial-scale defines the viewport rate and maximum-scale defines how many times this page can scale, and user-scalble=0 means user cannot scale the page. More about viewport you can check the Mozilla's doc.

The other thing you need to consider is the HTML5 techs, but actually these aren't problems when you are using jQuery mobile. I recommend you to check their docs. This is very useful and clear for anyone.

Ruby and Rails or Ruby on Rails

The name "Ruby on Rails" is sometimes shortened as "Rails", or "RoR", which is the same - a web development framework.

You can, of course, use Ruby without Rails, as you can use any other programming language, to build different programs, not only web applications.

You cannot use Rails without using Ruby, because as you wrote yourself, Rails is a web framework built in Ruby. When you build web applications in Rails, you write your code in the Ruby language (there are some other rewrites of Rails, like GRails, which uses Groovy, but this is a different thing).

If you follow the installation guide on the Get Started page, you will see that you first install Ruby for your platform, then install RubyGems (which is a package manager for installing additional Ruby libraries), and then use RubyGems gem install rails command to install Rails with all its dependencies. So you might say that Rails is a library for Ruby.

This installation of Rails then provides a set of scripts, including the rails command, which help you build your web application according to the set of conventions adopted by Rails.

Is Ruby on Rails suitable for a non-web application?

Rails is specifically a web application framework, however there are GUI toolkits that can be used with Ruby, including Qt (although not the open source version).

Ruby on Rails or a PHP framework

Answering your questions in order:

  1. You could certainly learn Rails in that time. It's enough time to build a Web site too, but whether it's enough time for you to build your Web site is a different question. I would personally not want to try such a thing on a tight deadline.
  2. You can write your own SQL queries, but there's little point to using Rails if you are going to work around all of its features.
  3. Joins are normally done as part of the database queries generated by ActiveRecord.
  4. Using ROR is pretty much orthogonal to having images, videos, etc. on a page.
  5. I haven't used it, but CakePHP aims to be quite Railsy. Zend and CodeIgniter are more popular and I'm told better by people who have used all three, though.

Web service: PHP or Ruby on Rails or Python?

Ruby-on-rails, Python and PHP would all be excellent choices for developing a web service in. All the languages are capable (with of course Ruby being the language that Ruby on Rails is written in), have strong frameworks if that is your fancy (Django being a good python example, and something like Drupal or CakePHP being good PHP examples) and can play nicely with MySql.

I'd say that it would depend mostly on your past experience and what you'd be the most comfortable with. Assuming that you're developing C# on .NET and have experience with Objective-C PHP may be a good choice because it is most certainly from the C family of languages. So the syntax might be more familiar and a bit easier to deal with.

I'm a PHP developer so I'll give you that slant and let more knowledgeable developers with the others give theirs as well. PHP is tightly integrated with Apache, which can make some of the more mundane tasks that you'd have to handle with the others a bit more trivial (though when working with a framework those are usually removed). The PHP documentation is second to none and is a great resource for getting up and going easily. It has decent speed and there are good caching mechanisms out there to get more performance out of it. I know that getting up and running with PHP on Dreamhost is trivial. I haven't done it in the other instances although it wouldn't surprise me if those were just as easy as well.

I'd suggest digging a bit more into the documentation and frameworks for each language to find out what suits you best.

Uses of Ruby on Rails

Generally speaking, you will build a full site with Rails, though you can integrate it into an existing website, as well. It is designed to provide a top-to-bottom solution for entire websites.

For standalone features or small scripts you just want to expose to the web, you might look at something like Sinatra or Camping.

Ruby on rails web application

Well I just started learning Ruby on Rails and according to my experience I started with learning Rails using Micheal Hartl's guidelines book on Ruby on Rails. Along with that I learned Ruby from Peter Cooper's Beginning Ruby, this helped me learn both the language and Framework with hand on experience.

This should be good to get started with Ruby on Rails. Other than this there are other really good materials like Learn Ruby Hard Way. The best way is to start practicing.

Detect if Rails is Running a Site

Every Rails site has:

meta content="authenticity_token" name="csrf-param'

Or could have a submit button where the name="commit"

At least that's what I have consistently seen.

Header responses are not reliable, here are three from various Rails sites:

Server:Apache/2.2.14 (Ubuntu)
Server:nginx
Server: thin 1.4.1 codename Chromeo

You know nginx and Thin are popular in the Rails community, but that's not conclusive enough to say there is Rails behind it. You would need to run a script that scrapes the site and looks for the meta-tag above. BeautifulSoup is a pretty good if your script is going to be in Python. Mechanize gem is great if you are going with Ruby.



Related Topics



Leave a reply



Submit