Go to Post Cue all the jokes about natural selection in the Darwin division - TDav540 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-05-2002, 21:38
mikefrei's Avatar
mikefrei mikefrei is offline
Registered User
#0628 (Northern Robarctics)
 
Join Date: Apr 2002
Location: Fairbanks, AK
Posts: 19
mikefrei is an unknown quantity at this point
Send a message via ICQ to mikefrei
Question What's better, PERL/cgi or PHP/my_sql?

I need to design a website heavily relying on a database and was wondering what would do the job better, and why
__________________
greets,
-Mike
Student on #628
Xerox Creativity Award for HEXAGORE
  #2   Spotlight this post!  
Unread 25-05-2002, 21:42
Rob Colatutto's Avatar
Rob Colatutto Rob Colatutto is offline
Roboticsrob
FTC #10092 (Green.Griffins;)
Team Role: Mentor
 
Join Date: Feb 2002
Rookie Year: 2001
Location: San Diego, CA
Posts: 849
Rob Colatutto is a splendid one to beholdRob Colatutto is a splendid one to beholdRob Colatutto is a splendid one to beholdRob Colatutto is a splendid one to beholdRob Colatutto is a splendid one to beholdRob Colatutto is a splendid one to beholdRob Colatutto is a splendid one to behold
from what i have seen php is great for designing web pages as long as you know the code
__________________
Follow me on twitter @roboticsrob and my FTC team @griffins10092
  #3   Spotlight this post!  
Unread 26-05-2002, 09:43
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
We've used both on ChiefDelphi.com

I'd have to say that using PHP/mySQL has been a whole lot easier. I don't know if its because I do it at work [well, with oracle and php] also, or if its becuase ive been using php/mysql longer and know it better..

either way, i like php/mysql better.
__________________
Brandon Martus
e-mail
  #4   Spotlight this post!  
Unread 26-05-2002, 17:01
mikefrei's Avatar
mikefrei mikefrei is offline
Registered User
#0628 (Northern Robarctics)
 
Join Date: Apr 2002
Location: Fairbanks, AK
Posts: 19
mikefrei is an unknown quantity at this point
Send a message via ICQ to mikefrei
what kind of database system do I hook up to PERL/cgi? my webhoster doesn't offer my_sql (unfortunately) but I might be able to get telnet access for a limited time.
__________________
greets,
-Mike
Student on #628
Xerox Creativity Award for HEXAGORE
  #5   Spotlight this post!  
Unread 26-05-2002, 17:59
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
I learned perl before I learned php, and though they are very similar, I think php is much easier. It's less learning syntax and more just programming (for example perl has 3 different symbols: one for a string/number ($), an array (@), and an assossiative array (%) while php only has one, $).

You can connect to any kind of database (postgre, oracle, mysql) using perl, you just have to find the right module (http://search.cpan.org/doc/JWIED/DBD.../DBD/mysql.pod). I know php can work with postgre and mysql, and it probably would work with all the others, but I'm not sure because I've only used it with mySQL.

Also, you can connect to any mysql server from in your script so your database doesnt need to be on the same server as the script. If your host doesn't offer it you might be able to find someone else who does.
  #6   Spotlight this post!  
Unread 26-05-2002, 19:28
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
First of all, PEARL/CGI vs. PHP/mySQL are not exactly the same. mySQL is the database, and PHP is the programming language. CGI (Common Gateway Interface) is a specification how to pass information between an HTTP server and a program that will do something with the request. Pearl is the language that this program would be written in. A few years ago, Microsoft wrote ASP which is basically Microsoft's server-side language and response to CGI's faults. ASP is also a way to proccess the requests, and the actuall programs in ASP, like in CGI, are written in other languages - Javascript, VBScript, Pearl, Python, etc. Meanwhile, PHP is the whole package in one - the instructions for interacting with the HTTP server and a programming language in one. MySQL is just a database, so whichever way you go, you're going to have to learn MySQL. Technically (yeah yeah, I'm being anal here, but I just thought you'd like to understand what you're considering better), your title should be "CGI/Pearl/MySQL vs. PHP/MySQL"

I'm just learning php/mysql right now (so far I can post to a database some information and view it/arrange it nicely, go me! ). My expierience is that php/mysql are pretty easy to pick up. That and I suggest php/mysql for a simple reason - it's newer.

My book on ASP has a little description about CGI and why Microsoft made ASP. The server needs to create a new CGI process for every CGI request. If the site is under a lot of stress, this severly limits performance. So Microsoft did something called ISAPI (Internet Server Application Programming Interface). Basically, ISAPI allows it so DLLs are loaded into the same memory space as the server. The server processes requests by executing code from the DLL, which, because is in the same memory as the server, results in no additional process overhead. Basically, "ISAPI applications execute exponentially faster than CGIs, while at the same time making less demands on the server's memory."

Now that was from my ASP book. It didn't really mention anything about PHP, but I'm assuming PHP is also an ISAPI application. What it comes down to is PHP is newer than CGI, and so, was designed with CGI's faults in mind (looking at it the other way, why make something completely new (PHP) when the old way (CGI) isn't broken?). If the differences really don't matter to you (you're site isn't going to be under that much stress), look at it this way - are you going to learn something old, or learn something new? Obviously, the old way is going to die out eventually, so my way of thinking is you might as well learn whats going to be used longer - PHP.

Now, I mentioned ASP. ASP is newer than PHP, so by my logic, ASP should be learned over PHP, which is why I got the ASP book instead of the PHP book (if you're curious, the improvement over PHP in ASP is "sessions" - these guys store information about unique users in the server's memory rather than external sources, like cookies or files on the server. The way I see it, unless you need that kind of tracking ability (i.e. commercial sites), there is no real difference between ASP and PHP). After some expirience with ASP, I'm liking PHP better. I like PHP better mainly because it's more flexible. I've found that you can do more with variables easier in PHP than you can in ASP (atleast using Javascript to make ASP pages, which is how the book taught it). However, the biggest reason why I prefer PHP over ASP is the fact that PHP is more broadly used. The reason why I kept on saying Microsoft made ASP is because ASP isn't supported on non-Microsoft platforms (I'm almost certain this is true). PHP on the other hand runs on almost every platform - Windows, Unix, Linux, etc. And if you know anything about the internet, you'll know most hosts don't use Windows. Because of this, it's very hard to find a provider that hosts ASP. PHP is also open-source, meaning it's undergoing constant revisions (open-source is also probably the reason why it's available on every platform). In conclusion, PHP is the way to go

DISCLAIMER: All of these facts are what I've learned (or atleast think I've learned) in my expierience with server-side languages. If you know something I said is complete bs, please tell me. I'd like to know
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies

Last edited by DanL : 26-05-2002 at 19:32.
  #7   Spotlight this post!  
Unread 27-05-2002, 00:01
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Quote:
Originally posted by Jay Lundy
I know php can work with postgre and mysql, and it probably would work with all the others, but I'm not sure because I've only used it with mySQL.
We've hooked PHP to Oracle at work...

Oh, and here is a good article comparing PHP vs PERL
__________________
Brandon Martus
e-mail
  #8   Spotlight this post!  
Unread 27-05-2002, 00:08
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Quote:
Originally posted by SuperDanman

Now, I mentioned ASP. ASP is newer than PHP, so by my logic, ASP should be learned over PHP, which is why I got the ASP book instead of the PHP book (if you're curious, the improvement over PHP in ASP is "sessions" - these guys store information about unique users in the server's memory rather than external sources, like cookies or files on the server.
I don't know if im reading this sentence wrong, but PHP does have very good session handling....
__________________
Brandon Martus
e-mail
  #9   Spotlight this post!  
Unread 27-05-2002, 15:37
DanL DanL is offline
Crusty Mentor
FRC #0097
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: Somerville, MA
Posts: 682
DanL is just really niceDanL is just really niceDanL is just really niceDanL is just really niceDanL is just really nice
Send a message via AIM to DanL
Hmmm, you're right. I read somewhere that one of the main difference between ASP and PHP is how they handle sessions. I thought it said that PHP doesn't do it (atleast without using cookies, but from my ASP-centric viewpoint (cause I learned ASP first), thats not really 'session-handling' as I learned it), but apparently I'm wrong on that one.

I read over the PHP manual on sessions, and yeah, I did find a difference. "A visitor accessing your web site is assigned an unique id, the so-called session id. This is either stored in a cookie on the user side or is propagated in the URL. " If I'm understanding it correctly, PHP leaves storing the session information up to the user. ASP, on the other hand, when a page is requested, it somehow determines if the user is unique, and based on that information, assigns that user's "unique information" a session ID - but all this is stored on the server. The PHP manual was kinda vague about whether the variables are stored on the server or the client, but all session information in ASP is stored on the server. The advantages of having it all on the server is that you have total control of the information. In PHP, a user can deny a cookie, and if their browser is closed, they loose the url-encoded information. In ASP, since everything is on the server, every request automatically has a session ID, and keeping this session ID reliable is now part of the server's job - not the client's. Now someone can view a page, reboot their computer, go back to the page, and (assuming it's within the session timeout limit) they're still using the same session. This gives you a bit more control. Long-term data is still stored in cookies. But again, unless you're going to use session-specific data in your website and you need this data to be accurate, you're probably not going to see a major difference in what you can do with ASP as opposed to PHP.
__________________
Dan L
Team 97 Mentor
Software Engineer, Vecna Technologies
  #10   Spotlight this post!  
Unread 27-05-2002, 22:47
Greg McCoy's Avatar
Greg McCoy Greg McCoy is offline
boiler up!
FRC #3940 (CyberTooth)
Team Role: Engineer
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Kokomo, IN
Posts: 484
Greg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond reputeGreg McCoy has a reputation beyond repute
Send a message via AIM to Greg McCoy
As far as databases go, MySQL is the way to go in my opinion. It is free and it is awesome. I know that some people use Perl scripts to access MySQL databases as well as PHP.

If you need somewhere to host a PHP/MySQL powered website, I would highly recommend http://www.tripod.lycos.co.uk. You get free PHP/MySQL, 50 megs and no advertisements with PHP files. I don't know if this is a fluke in their advertising system or what, because they do appear on files ending in .htm or .html.

For some reason, PHP/MySQL support is not available on the American Lycos but it is there on the Italian, UK, and some other versions. At least the UK version is in english

Last edited by Greg McCoy : 27-05-2002 at 22:49.
  #11   Spotlight this post!  
Unread 27-05-2002, 22:50
Brandon Martus's Avatar Unsung FIRST Hero
Brandon Martus Brandon Martus is offline
busy.
AKA: B. Slash Kamen
no team
 
Join Date: May 2001
Rookie Year: 1998
Location: Nevada, TX USA
Posts: 5,271
Brandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond reputeBrandon Martus has a reputation beyond repute
Send a message via ICQ to Brandon Martus Send a message via AIM to Brandon Martus Send a message via Yahoo to Brandon Martus
Quote:
Originally posted by Greg McCoy
You get free PHP/MySQL, 50 megs and no advertisements with PHP files.
Wow. Thats pretty nice of them.

Quote:
I don't know if this is a fluke in their advertising system or what, because they do appear on files ending in .htm or .html.
SHHHHH
__________________
Brandon Martus
e-mail
Closed Thread


Thread Tools
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
Forum Jump


All times are GMT -5. The time now is 02:52.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi