Page 1 of 1

New Project -- PHP or Perl?

Posted: Thu Feb 02, 2006 9:24 pm
by dwroth
I am starting a new project which will be to design a thirdparty schedule maker that syncs with the course schedule information from my university. The most complicated part of the project is that it is going to have to parse information from the online course catalog/schedule of classes before it can manipulate that data. I don't have access to the universities database.

I know some PHP, but not much. I would not be heartbroken to hear that I need to adopt another language to carry out this task, so I ask: what is the most efficient language in which to program this? I have heard that PHP is easier, but Perl is more powerful. The program will depend on a lot of server-side programming, and very few tags embedded within the HTML documents.

I'm also sort of leaning towards Perl because the university does most of their programming in Perl, and it wouldn't hurt to have experience should I try to get a job there.

Any advice would be greatly appreciated.

Thanks.

Posted: Thu Feb 02, 2006 9:31 pm
by josh
So far you have told us that it has something to do with a schedule and it has to parse a course catalog online. Also you have not told us goals outside of gaining perl experience, do you want to find the language that benchmarks and performs the best, do you want to speed development?

Posted: Thu Feb 02, 2006 9:33 pm
by dwroth
I suppose I want to write it in the language that is fastest to write. Are the performance differences significant?

I should also mention that I have a lot of experience with Java, so a language with similar syntax would probably be better.

Posted: Thu Feb 02, 2006 9:57 pm
by josh
dwroth wrote:I suppose I want to write it in the language that is fastest to write.
Go with whichever language you have the most experience with, do you have any experience with perl at all?

Posted: Thu Feb 02, 2006 9:59 pm
by dwroth
No. I guess I'll write it in PHP. Thanks for the help.

Posted: Fri Feb 03, 2006 3:51 am
by Jenk
You could always write in both..

PHP deals with the UI/Webpage and the custom searches etc.

Perl collects data from the online catalog on a timed rota, parsing it into say XML for the PHP to use locally.

Posted: Fri Feb 03, 2006 9:58 am
by Chris Corbyn
If you're *primarily* pulling data from web pages and manipulating it Perl walks all over PHP since it's RegExp implementation is top-notch (they essential *are* the regex people :P).

PHP can do all the regex stuff to some extent but I'd possibly actually use perl depending upon what else needs to be done. If you know perl better, go with perl.

/me prepares for flames

Posted: Fri Feb 03, 2006 10:02 am
by josh
d11wtq wrote:/me prepares for flames

booooooooooooooo

Posted: Fri Feb 03, 2006 12:09 pm
by Buddha443556
d11wtq wrote:If you're *primarily* pulling data from web pages and manipulating it Perl walks all over PHP since it's RegExp implementation is top-notch (they essential *are* the regex people :P).

PHP can do all the regex stuff to some extent but I'd possibly actually use perl depending upon what else needs to be done. If you know perl better, go with perl.

/me prepares for flames
I agree.

I'd go with Perl if I was going to be processing any really large data sets too.

Posted: Fri Feb 03, 2006 12:19 pm
by Christopher
I'd say that what you know best (or want to learn) and what the university perfers are much more important considerations. Honestly, any of the languages you mention would be fine fo building the app you describe.

Posted: Sat Feb 04, 2006 7:33 pm
by printf
I would say go with Perl, it's the back end king! No scripting language can manipulate complex text based operations better. I would not use PHP for anything processor intense. You have to understand each language to understand that. In short, PHP is a web based scripting engine that gives you core tools and basic sort cut functions to do many different things! Perl on the other hand, give you the compiler and allows you to create functions based on your needs.

Perl does supply a vast library of some of the best extension type functions, but they are not part of Perl's core. Why is Perl's idea better? It's better because Perl developers love to reinvent the wheel, trust me there is always a faster, better way to do something. Most PHP developers use core functions to do simple tasks and never take time to find faster ways of doing things. Many core PHP functions are very slow compared to ginny rigging your own scripting based function that are core equivalents.

One simple difference, Perl's pack() and unpack() functions can do well over one hundred things that PHP uses one hundred different functions for! Yes PHP pack() and unpack() are very different than Perl's. Ruby and Python are also wonderful, I think Perl, Ruby and Python are more developing type languages where PHP is a scripting based language, any ways Perl is still my favorite + it's been paying my bills for years.


pif

Posted: Sun Feb 05, 2006 9:40 pm
by zipdisk2003
I prefer to php viewing higher population and support.