Ruby or Python?

Oct 27, 2007
17,009
5
0
I'm building some podcast management software and I'm looking to make it "cloud-based" by storing the podcast information on a database and using HTTP GET requests to return the information to the user about new podcasts that are available for download etc. Basically I want all of a user's information to be stored on a web server and use the desktop app as a "thin client" (sorry about the buzz words ).

I figure the best way to do this is to have the app make HTTP GET requests to my server, which will return XML data (the desktop app is already up and running and uses locally stored XML files). So what I need is a simple web service that will query the database and transform the data to XML. I decided to take this opportunity to learn one of the funky dynamic languages that seem to be all the rage at the moment. The application also needs to regularly (maybe once an hour) go through each podcast in the DB and look for new items. This is pretty familiar territory for anyone who has written RSS readers and the like.

So what do you think? Which of these two languages should I learn? Are these appropriate tools for the job I want to do?
 

Woosta

Platinum Member
Mar 23, 2008
2,978
0
71
Python. More mature, faster, popular, more of a variety of frameworks out there incase you decide to make another web app ( Pylons, Django, Turbogears, dozens of mod_wsgi based frameworks ). More resources to learn, better documentation, more libraries.

Oh and the fact that it owns
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,604
4,521
75
Perl. Actually, LWP::Simple is good for GETs, and print << EOF is good for printing large text (or XML) blocks. Is there a single command to GET an HTTP request into a string in Python?

Edit: Looks like there is:

import urllib
print urllib.urlopen('http://www.google.com').read()

So I guess you can go with Python.
 
Oct 27, 2007
17,009
5
0
Any recommended resources for getting started in Python? I don't really want to go the Perl route at this stage.

Should I jump straight into a framework or focus a couple of weeks on learning the language basics first?
 
Oct 27, 2007
17,009
5
0
Wow, thanks Woosta! Thanks also BrianP, I'll spend the weekend looking carefully at all of this stuff before I make a decision. Any more opinions are more than welcome.

Edit - oh, I see BrianP's links are pay-for screencasts. I've noticed that this attitude is endemic in the Ruby community, everyone is always trying to sell me stuff.
 

BrianP

Member
Oct 12, 1999
74
0
0
If you go to Amazon and search for Python you'll find plenty of resources and none of them are free either. Pragmatic Programmers (which also has some Python books) is a publisher and most publishers aren't charities. I can give you free Ruby resources that are akin to those posted above for Python but the screencasts are directly relevant to your task and not 'programming for dummies' ebooks. I, of course, don't know how much your time is worth vs. $5 or $10.
 

aceO07

Diamond Member
Nov 6, 2000
4,491
0
76
Take a couple of hours and explore both languages. I don't know both, so I can't compare them.

In Ruby, specifically in Ruby on Rails, you can output xml very easily. For example, Podcast.findall, :conditions => "created_at > #{Time.now - 1.hour}").to_xml would create xml for your new podcasts created within the last hour. You just need to create the database models in RoR to match your current database, create a controller and an action. For the most basic implementation, you should be able to do it in a day if just starting and have a book/reference. Probably take 15-30 minutes for someone with experience.

As a reference, I would recommend the 'Agile Web Development with Rails, 3rd edition' book. It should get you rolling and get your basic implementation done. Check it out at your local bookstore.

It does seem like some people have jumped on the screencasting thing to make some money. However, there are also free screencast resources available too and the usual free blogs/references/newsgroups.
 

BrianP

Member
Oct 12, 1999
74
0
0
If you go the Rails route (which is what I would personally use) check out railscasts.com for over 100 free screencasts. There are new episodes over Monday. I don't know which one's would be relevant to what you are doing though.
 

degibson

Golden Member
Mar 21, 2008
1,389
0
0
Originally posted by: GodlessAstronomer
...Basically I want all of a user's information to be stored on a web server and use the desktop app as a "thin client" (sorry about the buzz words ).
...

RoR

(Sorry Python, you know I love you like the three-legged mangy dog I never had).
 
Oct 27, 2007
17,009
5
0
Well I spent most of last night exploring the Ruby space, and although there are things I don't like about the language, I'm pretty impressed by the frameworks. I do wish it was easier to set up your development environment on Windows, but with patience it can be done. I played around with both Sinatra and RoR, and I think I'll go with Sinatra. It's probably the simplest, most elegant and lightweight web framework I've seen.

I'm so impressed with how noise-free a Sinatra web app is.

require 'sinatra'

get '/' do
"Hello world"
end

Amazingly simple. Hopefully hooking Sinatra up to a database will go as smoothly, which I'll have a crack at today. I'm still open to RoR or Python if anyone has an opinion to share.
 

TruePaige

Diamond Member
Oct 22, 2006
9,874
2
0
I don't use Ruby personally but have heard it described as "A solution looking for a problem".

If you don't need it to run on any one elses server/machine though (sounds like you don't), I'd go with whatever you are more comfortable with.
 
Oct 27, 2007
17,009
5
0
Originally posted by: TruePaige
I don't use Ruby personally but have heard it described as "A solution looking for a problem".

If you don't need it to run on any one elses server/machine though (sounds like you don't), I'd go with whatever you are more comfortable with.

I'm most comfortable with .NET, but yes I need to be able to run this service on Dreamhost hosting. .NET hosting is just too expensive unfortunately, and so is Java hosting in most cases.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,604
4,521
75
If you prefer .NET, maybe you'd like to practice with IronRuby (or IronPython) before diving fully into the standalone language(s)? You can access all the .NET classes with either one, but obviously you can't with the standalone languages.
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |