4/3 What is advantage/disadvantage of various server-side scripting?
JSP, M$ ASP, PHP?
\_ Next page of replies summarized: Your mileage may vary.
\_ visit link:www.codecharge.com for a nifty tool. Otherwise, PHP is my
favorite since it has source, is designed from ground zero for
web-pages, and is cross-platform.
\_ JSP -> Its java, its slow but its pretty secure and reasonably
well thought out.
ASP -> Its M$. You are pretty much stuck to shitty x86 boxes
running windows if you want ASP. Yes there is Sun's
Chillsoft ASP for Linux but they you are stuck with
shitty x86 boxes running Linux. In either case your
box will be r00ted in a short time, so you will need
to get lots of boxes and keep reimaging them frequently.
PHP -> D00D PHP 15 S0 '1337. It is OSS and all that other
GN00 non-sense and in addition it is a immature language
saddled with horrible half broken libraries that have
inconsistent volatile interfaces and "object models".
Given the right circumstances (ask php to exec a ten
line c program that fork's and execs) and it will lock
up you machine. And don't even think about doing db
interactions in php.
If it were up to me, I'd say go with perl (modperl or fastcgi)
or java servlets instead of these stupid scripting languages.
If you are really interested in speed, security and flexbility
write the damn thing in C.
\_ PHP, JSP and perl all have better security features than C.
\_ Name them. Name a single "feature" that cannot be
implemented in C.
\_ He can't. What he's really saying is his coding fu
is weak and he needs a baby scripting language to
coddle him through at the expense of speed and power.
\_ I would not consider perl a "baby scripting
language", but you are right on all other
counts.
\_ I'm a perl coder and I've seen them on TV. It's
easier than C and slower thus I call it a baby
scripting language.
\_ Everything is possible in C, just not necessarily as easy.
You get a *lot* of speed but give up everything else for it.
and therefore already in memory so the context switch cost
is going to be low relative to the speed gained for any
non-trivial program and even many trivial ones. Try it
yourself. You'll see. --done it before
\_ uh... how can you get speed writing server-side stuff
in C?
\_ Why not? What's so magical about "server side" that makes
C slow? Are you sure you know what "server side" means?
\_ There is a direct correlation between the two. You can't spend
3 years building all the things in C that are free w/ MS or
Java. So you just don't have those things. So your shit sucks
because it is slow or lacks features.
\_ Java and Perl code tends to run from within Web server/
app-server process space, ie down't spawn new processes.
C CGI, on the other hand, will probably be forking a new
process for every shitty little page, which is totally not
worth it. Hence, C CGI tends to be a good deal slower than
Perl/Java. -muchandr
\_ Uh oh... someone is unaware that a C app will be cached
and therefore already in memory so the context switch
cost is going to be low relative to the speed gained
for any non-trivial program and even many trivial ones.
Try it yourself. You'll see. --done it before
\_ C code can be run in the context of the web server if
desired by writting a trivial module that uses shared
memory to communicate with your real C deamons that do
all the work.
\_ Speed Java (/ASP?) >> Speed C when you think about all the tools
for Java that are available to do things like load balancing, cxn
mgmt, etc.
\_ No. This is development time not code speed.
\_ There is a direct correlation between the two. You can't
spend 3 years building all the things in C that are free
w/ MS or Java. So you just don't have those things. So
your shit sucks because it is slow or lacks features.
\_ a few clues: libraries, code borrowing, thanks for being
with us today, Rice A Roni on your way out. And for some
things 3 years to build something that will be fast when
it's done is better than 6 months for something that will
always be too slow.
\_ and what happened to Kiva? NetDynamics? iPlanet?
all that beautiful C++ code got thrown away in favor
of the Java reference implementation. -gosha
\_ C++?!?! Are you fucking insane? How dare you put
C++ into the same sentence as C!?! WTF is wrong
with you? Of course the C++ code got thrown away!
Like, uhm, duh! Damn, has the whole motd gone 420?
\_ C is slow. Write code in assembly.
\_ 010100110101101011100111001010110011001101010101010100101
\_ do it in hardware.
\_ Provide a lab and I'm there.
\_ Tcl... like Perl but faster learning curve
\_ Madness ye all who pass this way!
\_ who gave phil greenspun a csua account? |