yoyoyoyo |
07-26-2005 05:37 PM |
Quote:
Originally Posted by MrNase
I don't want to have any perl scripts on my website.. vB is written in PHP and I don't feel like I want to mix it up with some Perl script :)
|
Then feel free to buy a commercial script, or develop one of your own, or wait until a free one comes along here. This script is what it is, and I can't make it what it isn't.
But, before you make decisions like that you should ask youself why you feel that way. PHP is great for what it is, and so is plain old HTML, and so is perl. They all can do things well, and they all do things their own way, and they can all work well together.
I don't want this to turn in to a PERL-bashing thread, and I am not biased either way- they both work well at what they do. Both PHP and Perl (as applied to Web applications) are interpreted languages. Interpreted languages are not pre-compiled and executed in a binary format, rather, they are parsed by an interpreter on demand and compiled on-the-fly. Because of this, both Perl and PHP are very portable. Both languages can run on any platform that has an interpreter for the language (with subtle difference here and there).
Perl (Practical Extraction and Report Language) borrows features from C, shell scripting (sh), awk, sed, and many other programming languages, including HTML and javascript. Perl is a general-purpose programming language originally developed for text manipulation and now used for a wide range of tasks including system administration, web development, network programming, GUI development, and more. The language is intended to be practical, and its major features are that it's easy to use, supports both procedural and object-oriented programming, has powerful built-in support for text processing. Perl is not only a Web-scripting language, and looking at is as such only shows a microcosm of its true nature. Perl is, at its most basic level, a text-manipulation language. It provides powerful features that allow the user to easily do some operations that are very complex in C, and also complicates some other things that are easy in C! Perl, in conjunction with CPAN (the Comprehensive Perl Archive Network) offer an enormous amount of "ready-made" modules, that allow code to be reused and shared- database interface modules, CORBA modules, scientific calculation modules, network programming modules, SGML/XML/HTML modules, and so much more. Obviously, because of Perl's powerful and easy text manipulation functions, it was quite natural for web developers to expand their toolbelt to include Perl. Perl can be embedded within HTML documents, run as an SSI (Server-Side Include), or run as its own application (CGI, or Common Gateway Interface). Perl, as applied to CGI and web application design, is designed for the programmer who wants to "output" webpages. A Perl Web application is nothing more or less than a backend program, that interacts with the browser using HTML. Perl's infinite extensibility and modular design make it incredibly popular among web application developers who want a single program (usually with a horde of included modules), or a couple programs, to be their application instead of the several hundred HTML pages (or vbulletin templates) that the same application might require if it was done in PHP.
PHP is an embedded scripting language. A PHP-aware webserver parses HTML documents looking for PHP code, processes it, and sends the results back to the browser. In effect, PHP separates web design from application design. PHP is developed with the web, and web development in mind.
Also- PHP It is not a general purpose language. While it has many facilities specifically catered towards web programming, it is not Perl (or C or C++ or Java). PHP probably cannot beat Perl in terms of convenient and efficient text crunching. Perl is designed with crunching text in mind and has facilities for handling strings and the like that put most other languages to shame. However, PHP does have adequate facilities for most web purposes.
PHP and Perl are both powerful languages that can make web application programming, automation, and dynamic content easy to work with. They are both powerful, wonderful languages, and I enjoy using them interchangeably.
Both Perl and PHP are crucial tools for the Web developer. A lot of the best Web-application developers I know pick one of the languages as their strong language, but keep in mind the other for those times when it just makes sense. I recommend learning them both. Don't get into the zeal wars, understand both languages and you'll see where I'm coming from. Both PHP and Perl are wonderful, extraordinary languages.
|