Old 10-08-2008, 04:55   #41 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 3,751
I didn't realise you could, as I don't think I have ever come across a site that does.

Surely if you were to use C for web development then you would need to code all your own functions for session handling, email, mysql, image editing, etc, which would cause each site you make to be a huge filesize and take a hell of a lot longer to code.

I am going to be learning C and C++ soon for making non-web software. I might take that time to look at using it for web development with Fast-CGI.
  Reply With Quote
Old 10-08-2008, 13:27   #42 (permalink)
Hunch
Grumpy old man
 
Hunch's Avatar
 
Join Date: Oct 2007
Location: North Japan
Posts: 2,407
Quote:
Originally Posted by freelancr
Surely if you were to use C for web development then you would need to code all your own functions for session handling, email, mysql, image editing, etc.

And what do you suppose that the PHP function libraries are written in?

I wouldn't waste too much time learning C/C++ for web development. PHP is perfectly capable, and easy to implement, with a huge, almost entirely web oriented code base. But I would recommend you have a crack at another language even if it's just to expand your horizons.
__________________
"Hunch is a retard. He is fat, car, homosexual, gay, smelly, hungry, and doesn't like that Montel guy, because that's from Schindler's List."
  Reply With Quote
Old 10-08-2008, 14:45   #43 (permalink)
freelancr
Web Developer
 
freelancr's Avatar
 
Join Date: Oct 2006
Posts: 3,751
I've done a bit of C#, but only for ASP.NET, and stopped doing that because IIS/ASP.NET is so fucking slow at displaying pages.
  Reply With Quote
Old 11-08-2008, 07:24   #44 (permalink)
Hunch
Grumpy old man
 
Hunch's Avatar
 
Join Date: Oct 2007
Location: North Japan
Posts: 2,407
The point is, if you're a games programmer trying to squeeze a few extra frames per second out of a cutting edge graphics engine, performance really matters. You're talking about something where tens, if not hundreds of millions of calculations are being performed every second and peformance gains of microseconds can really make a difference. C++ and perhaps a little assembler would be your tools of choice.

But when you're faced with a situation whereby the page you generate takes say on average 5-10 seconds for a browser to download, render and display, it really isn't going to make a huge difference whether your code takes 0.1 seconds or 0.01 seconds to execute. Coding efficiently is usually good practice, and it'll help you if you get more serious. But unless you work on Googles search engine, or some other overwhelmingly hammered site, small performance improvements really count for very little. If they mattered, a lot more people would use faster languages.
__________________
"Hunch is a retard. He is fat, car, homosexual, gay, smelly, hungry, and doesn't like that Montel guy, because that's from Schindler's List."
  Reply With Quote
Old 16-08-2008, 02:30   #45 (permalink)
pepsipunk
Registered User
 
Join Date: Aug 2008
Posts: 4
Quote:
Originally Posted by freelancr
I didn't realise you could, as I don't think I have ever come across a site that does.

Surely if you were to use C for web development then you would need to code all your own functions for session handling, email, mysql, image editing, etc, which would cause each site you make to be a huge filesize and take a hell of a lot longer to code.

I am going to be learning C and C++ soon for making non-web software. I might take that time to look at using it for web development with Fast-CGI.

I use a mix of PHP and C for web development. C is many times faster, has better memory management, and has more flexibility in terms of data pointers, etc. Writing critical functions in C and calling them from PHP has many benefits, and allows you to use C whilst not having to code all the handling functions that are already integrated in PHP.

cheers
  Reply With Quote
Old 16-08-2008, 03:06   #46 (permalink)
Synook
What happened?
 
Synook's Avatar
 
Join Date: Jul 2008
Posts: 1,827
A good example of a situation in web development where a compiled low-level language like C would be advantageous in in the construction of a search engine. There, you need to perform many calculations and handle vast amounts of information at a level where PHP will simply crash.

Also, remember that PHP scripts can only run for limited amounts of time...
  Reply With Quote
Old 16-08-2008, 11:46   #47 (permalink)
Hunch
Grumpy old man
 
Hunch's Avatar
 
Join Date: Oct 2007
Location: North Japan
Posts: 2,407
Yeah, that would be why I posted a link to a page comparing C and PHP for search engine development where they made the point that PHP couldn't handle the execution time. But presumably you didn't read that and just came out with this amazing expression of knowledge by yourself.
__________________
"Hunch is a retard. He is fat, car, homosexual, gay, smelly, hungry, and doesn't like that Montel guy, because that's from Schindler's List."
  Reply With Quote
Old 17-08-2008, 04:51   #48 (permalink)
Synook
What happened?
 
Synook's Avatar
 
Join Date: Jul 2008
Posts: 1,827
Oops sorry no I didn't read that. I was thinking of Google, and the search engine and spider I recently wrote in PHP that took way too long to find anything.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet