Can't find the right Hammer (Trying to pick the right langua

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
CodeMonk
Forum Newbie
Posts: 2
Joined: Sat Apr 24, 2010 10:29 pm

Can't find the right Hammer (Trying to pick the right langua

Post by CodeMonk »

I've been trying to use a google spreadsheet to log my workouts, and I'm sick and tired of FAIL. So, it's time to move onto a database, so I can generate my own reports and graphs, and not be constrained by a half spreadsheet.

But, I did like the online nature of Google Docs, so, I need that capability in my new tool. I briefly looked into local, shared databases (Bento for Mac / iPhone), and quickly discarded the idea -- again, no power. (Actually, even less power than a google spreadsheet, but I digress)

So, I need to create a simple database, have a way to enter workouts, both via my phone, and via my desktop, and I need to display custom reports of my logs.

Question is, what should I use? Creating the mysql database is trivial. And, I could easily script together some ap for the entry -- but -- the web based portion means that there are better ways to do it, other than trying to crowbar in some script. Hence the reason for this post.

I've narrowed my choices to php+mysql, and Ruby on Rails. I have hacked on php in the past (meaning, modified others' code). And, I've gone a little bit through a RoR tutorial. So, I'm pretty green on both. so, I thought I'd ask you guys (and people over on a RoR forum) what you thought I should use.

I know enough to know that the data entry part both can do. And, with the simplicity of my database, I know RoR is overkill. But, the hard part, IMHO, is the graphing / reporting. And, I'm not sure what architecture would make that the easiest, and most robust. I will likely CONSTANTLY be tweaking the reporting, so I want to be able to do it as simply as possible. And, maybe the solution is something else -- quick php script for data entry, and some free, Crystal Reports like tool for graphing -- I simply don't know. . . . I'm a fish out of water.

So, what do you guys think? Which direction should I go? (What book should I start reading?)

Thanks in advance!
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Can't find the right Hammer (Trying to pick the right la

Post by requinix »

It's all about experience. I imagine both languages are about the same in terms of available functionality (ie, graphing). ImageMagick has a PHP extension but the command-line version is (almost) as easy to use, or if you want to make the graphs yourself - they're easier than some people think - there's the ubiquitous GD extension.
Don't have much experience with Ruby, let alone RoR, so I can't say much there.

Which are you more comfortable with?
phu
Forum Commoner
Posts: 61
Joined: Tue Mar 30, 2010 6:18 pm

Re: Can't find the right Hammer (Trying to pick the right la

Post by phu »

As a 10-year PHP vet, the only reason I'd consider RoR in your case is native migrations, with the assumption that your schema itself will change. However, that in and of itself is a very bad thing for reporting (or, really, for anything).

I would recommend looking at Django. Python's syntax is simpler than Ruby's, and the framework (which in many ways is very similar to Rails) offers an extremely useful auto-admin app; it won't solve all of your reporting needs, but it will provide you with a zero-overhead data entry and review mechanism.

If you actually are looking at a highly malleable schema, there is a mature Django app called 'south' that handles migrations in a Rails-like way.

Personally, I pick Django for anything but the simplest of tasks, or where hosting limitations make it impossible. It ends up being far more manageable than a custom PHP script in all but the most trivial cases, and Python provides the same kind of power Ruby does (that PHP can't touch).
CodeMonk
Forum Newbie
Posts: 2
Joined: Sat Apr 24, 2010 10:29 pm

Re: Can't find the right Hammer (Trying to pick the right la

Post by CodeMonk »

Wow -- I hadn't though of Django -- I'll give that a try!
Post Reply