where download web application source code examples ?

J

Jasper

Hi building an ecommerce website here, is there anywhere on the web
one can download the perl source for a basic one ? Its probably a
search problem but I cant find any..

thanks !

Jasper
 
G

Gregory Toomey

Jasper said:
Hi building an ecommerce website here, is there anywhere on the web
one can download the perl source for a basic one ? Its probably a
search problem but I cant find any..

thanks !

Jasper

Most are in php but you can try
http://www.google.com/search?ie=UTF8&q=perl shopping cart

I'm writing a shopping cart of my own at the moment, & you get lots of
flexibility with Perl. For example, I've got a C program that prints the
html headers/logo/sidebar menu to stdout in about 1 msec (I want a speedy
site like www.eyo.com.au ), and them Perl generates the rest of the html.
While this may be possible with php, its easy & logical in Perl.

gtoomey
 
S

Sam Holden

Most are in php but you can try
http://www.google.com/search?ie=UTF8&q=perl shopping cart

I'm writing a shopping cart of my own at the moment, & you get lots of
flexibility with Perl. For example, I've got a C program that prints the
html headers/logo/sidebar menu to stdout in about 1 msec (I want a speedy
site like www.eyo.com.au ), and them Perl generates the rest of the html.
While this may be possible with php, its easy & logical in Perl.

And the time taken to fork a process doesn't swamp any speed
benefit the C program might bring?
 
G

Gregory Toomey

Sam said:
And the time taken to fork a process doesn't swamp any speed
benefit the C program might bring?

- The Perl part takes around 160 msec (140 msec for compilation, 20 msec
writing to stdout) & includes html whitespace removal
- fork on modern Linux/unix is < 1 msec
- logon to mysql from C is 3 msec, though I dont do that (yet).
- the C program is optimised (-O2 in gcc) & staticly linked
- Also some versions of Apache insist on generating a "Content Length" in
the header (eg Apache in Redhat 9) which means they run the cgi & buffer
stdout, calculate the content length, then send everything back to the
browser. Recent versions of Apache send content back to the browser as soon
as the cgi generates to stdout.

This whole process is designed to start sending content back to the browser
a few milliseconds after it hits the server.

I've written about related issues at:
http://gregorytoomey.com/index.php?option=content&task=view&id=2&Itemid=2

gtoomey
 
S

Sam Holden

- The Perl part takes around 160 msec (140 msec for compilation, 20 msec
writing to stdout) & includes html whitespace removal

So the C program isn't being run from the perl script then? Since
otherwise it'd take 140 msec before it got started anyway.

Whatever is doing "run C program, run perl program" will be
able to do "run C program, run php program" or
"run C program, run python program". So I can't see how
perl is involved in making it "easy & logical".
 
G

Gregory Toomey

Sam said:
So the C program isn't being run from the perl script then? Since
otherwise it'd take 140 msec before it got started anyway.

Whatever is doing "run C program, run perl program" will be
able to do "run C program, run php program" or
"run C program, run python program". So I can't see how
perl is involved in making it "easy & logical".

Yes, there is another small wrapper around this, which add a few msec. I may
roll this into the other C program.

The "easy and logical" bit is in comparison to the alternatives - mod Perl,
php, Java servlets (yuk - slow). The easy bit is that it can be run from
the command line, which can't be underestimated. Tweaking/testing is easy
if you can run you cgi from the command line.

gtoomey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top