Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 31st, 2003, 01:31 PM
Nuclear_Fr0g's Avatar
Nuclear_Fr0g Nuclear_Fr0g is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 Nuclear_Fr0g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Which language is best suited..

I have an idea for a website which will rank things in a way smiilar to imdb.com. There will be a lot of individual items to be ranked by the users of the site, by choosing the better of two randomly selected objects. Also, new items would be added through some sort of admin control panel. I have taken an introductory C++ course, and it seems that perl is the easiest to learn from there. The easiest way I can think of doing it is to use perl to write text files with the data of each object, and perhaps a master list of some sort, although, this is just an idea at the moment. First of all, is this possible to do if there are multiple users on the site and at some point two webpages try to write to the same file at the same time. Or would another language be better, such as php, or any others. I know practically nothing about databases, but if that would be the easiest way to implement it, I would consider that.

Thanks for your input.

Reply With Quote
  #2  
Old July 31st, 2003, 02:02 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
IMDB runs mod_perl, which is perl embedded in the apache server. It is undoubtedly backed with a database.

With mod_perl you can easily write applications as fast as, and often faster than, PHP. With mod_perl you also have the largest base of quality free code available to you via www.cpan.org Perl is generally considered a more mature language with stabler interfaces than PHP.

Perl or PHP would be good choices, though perl is a little better if you're a control freak. mod_perl is incredible. The way it integrates with apache is crazy- you can turn apache into your own custom application server via mod_perl.

Many large sites are actually a mix of different things implemented in different languages. I'd say pick whichever language that interests you the most and learn it to the level where you're coding non-trivial apps in it, and then learn another.

Reply With Quote
  #3  
Old July 31st, 2003, 02:35 PM
Nuclear_Fr0g's Avatar
Nuclear_Fr0g Nuclear_Fr0g is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 2 Nuclear_Fr0g User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thank-you, my followup question is it possible to use text files (ie CSV files) for my information. Potentially there could be two users ranking the same object, would the server be smart enough to wait until one user was finished, before it tired to write a second time. I realize it wouldn't take very long as at most 3 or 4 small values would be changed in the file, but I'm not sure how it would work. My understanding is that perl can read and write files, and with some configuration of the server, they can only be read/written by the perl script or admin. Also what advantage would mysql have over this type of system? Would it be faster or easier to work with? Reason being, as I said before, I know very little about it and it would take some time for me to learn how to use it. Thanks again for the help.

Last edited by Nuclear_Fr0g : July 31st, 2003 at 02:43 PM.

Reply With Quote
  #4  
Old July 31st, 2003, 02:52 PM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
It it MUCH easier to work with databases rather than flat files (aka text files) when you have to deal with concurrent users. File locking is trickier than it seems, and some operating systems don't support it. Databases will take care of a lot of locking issues for you transparently.

Databases are also superior when it comes to reporting and access control. Flat files (unless you use a wrapper like DBD::CSV in perl) are very tedious to work with once you've learned databases.

I suggest, as part of your learning, that you create a minor application that uses flatfiles. Then learn how to use databases and revisit what you did. It'll surprise you how much time you save in development by not using flat files.

As to whether or not MySQL would be faster than flat files, there is no general answer. It depends on the data, what you're doing and how it's coded. As far as if it's faster to develop reliable code with databases rather than flat files, the answer has to be "yes".

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Which language is best suited..


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT