ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Actually, you can do web programming in many languages, Perl and PHP being only two examples. People even do it in JavaScript these days (yes, on the server). So, if you know any programming language (especially interpreted one, like the ones you've noted), there's a good chance you'll find web frameworks and other tools for it.
I personally use Python for web programming, but that's because I like Python in general and know it quite well. If you're going to check it out, there are many web frameworks to choose from. Django is probably the most popular, but there are others equally good, like Flask or Pyramid.
You can't go wrong with Python and Django. Without exception, other Python web frameworks have tried to distinguish themselves from Django not by having more features, but by being more streamlined.
Here's a video about the design decisions behind Web2Py, It should help you make an informed decision:
Don't subject yourself to PHP unless you have no other choice. For example, you need to work with existing PHP software, or you've picked out a PHP-only host.
I'm new to WebServer scripting. I was wondering among the community which is prefered these days for it- Perl or PHP?
I would say it depends on the size and the nature of the web applications you'll be developing.
I can speak to what I (myself) have done:
Small mod_perl web applications that interact with Shibboleth, MySQL, and OpenLDAP.
Small PHP web applications that interact with Shibboleth, MySQL, and a local filesystem.
Both required a small learning curve, and neither was particularly painful. I do find Perl to be a much more "natural" language than PHP. (For some reason I always feel like I'm contorting PHP to do what should be tasks that are logically straightforward.)
I'd say it's easy to get up and running quickly for PHP. There's a good reason the language is so popular.
If your web application is large, or if you'll be developing many related applications, you probably do want to invest the time into installing, configuring, and learning a well-vetted framework (as others mentioned).
It's become popular to dismiss PHP, but it nevertheless works quite well and can be found on nearly any web host. It's just one of those languages (like javascript) that allows you to write bad code if you aren't disciplined.
I've written web apps in Python too. It was nice in some ways, but a pain to set up on the web server and I kept missing a lot of the convenient web-oriented functions I missed from PHP.
Don't use Perl for server side stuff. PHP is more just *designed* for that. (with Perl, you might end up having to put large amounts of HTML in print statements, which is hellacious!).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.