When should I use Perl CGI instead of PHP (or vice versa)? -
For the purposes of the hobby, I have a shared space on the hosting server, many of them, both PHP and Pearl CGI I have read in many places that the CGI scripts are obsolete, I think mainly for performance issues (like).
But since I started studying Pearl, then I did not want to waste time in implementing the solutions PHP which is very easy (or only possible) in Perl.
In addition to this there are boilerplate issues, I know about CPAN (it exists, not yet content), but is not familiar with PHP libraries (although I suspect that they exist) I am not ready to write the launch process or the original user administration with a scratches for 10 ^ 10th time.
I do not luxury at this time to waste a lot of time in research for hobbies, so I thought, so let's ask the experts for a headstart. "Obsolete" is really a factor of CGI if you work on large, complex sites with big ideas.
are doing.
Many people think that CGI is obsolete. What really is not known by CGI is a widespread misconception that CGI is an underlying Pearl-based technology. Many people attack CGI that they support communal attacks on Pearl, which support the language they support. If you want to be a real technologist, then you have to understand the fundamental issues and make choices based on the facts of the situation.
CGI is an interface with a webserver that allows you to write in interactive pages any language--. When a server receives a request for a page controlled by CGI scripts, the server runs the script and returns the results to the requester.
If your programming language requires VM, interpreter or compiler to load each time it executes, then this start-up time will need to reach your page every time.
If you are making a simple, personal or hobby site, such as CCGI accelerator, such as FastCGI, mod_php, mod_perl and so forth, to keep an interpreter / VM in memory at all times, Then CGI will be cured. So PHP will be
If your site needs faster tech, then you can go to mod_perl, fastcgi, or other CGI acceleration techniques.
This tool provides what you want to use and how it fits with your needs
- Make a list of the capabilities you need <
- Make a list of deal breakers
- Now check your potential toolets against these two lists
- Which best comes out? Test it out.
- Is it suck? Cross your list, and go back to step 4. Besides, I suggest suggesting to use just because it is possible, that does not mean that you should use it.
Update: As the masters say, mod_perl, mod_php, mod_ruby, and many others are more than just CGI accelerators; They provide access to the Apache API.
Update 2: PHP and CGI: The CGI accelerator is not mutually exclusive. . PHP is often used with FastCGI.
Comments
Post a Comment