Reader Question: Which should I learn first JavaScript or Perl?
I am a beginner interested becoming a Web Master. Does anyone know if Javascript is a better language to learn than Perl? i want to take a class in javascript with html and was wondering it would be worth the money learn Java over perl.
My Thoughts
Firstly, I need to be a little bit anal here and point out that Java and JavaScript are two very different beasts. :-) Java is a programming language, and while it would probably serve you better in career prospects to learn it over JavaScript - but you wouldn't be a webmaster then, you'd be a Java developer. (Yes, yes, it is possible to write Java for Web pages and JSP is the Java equivalent to PHP, but whatever.) Okay, analness over...
When I started out, I learned C and then Perl. But that was because I started out a long time ago, and the only really effective way to interact with Web readers was through CGI. Plus JavaScript was really poorly supported when I started building Web pages. It was simply more effective to write code on the server and only use JavaScript for silly things like rollovers. Now... I would probably start by learning JavaScript (I'm assuming that you have the basics of HTML and CSS already - as learning them first is really critical to becoming a Web developer). Then I would skip Perl altogether and learn a server-side scripting language like PHP, ASP, or JSP. The advantage of server-side languages is that they give you all the programming abilities of Perl, but have more web-focused functionality. Perl is a great language, and I still use it all the time, but in terms of getting a job, more companies are looking for PHP, ASP, and JSP developers than Perl scripters.
More Resources
- How much programming does a Web Designer do?
- The Common Gateway Interface (CGI)
- JavaScript and Ajax Information
- CGI Scripts
- Perl Information
- PHP Information
- Resources for Professional Web Programmers
What would you recommend to nickky0922?
What programming language would you recommend as best to learn first for a beginning Web developer? If you have suggestions, you can post them in the comments here or reply to his message in the forum.



Comments
Javascript then PHP or ASP. (I am still better at PHP than Javascript, though.)
I prefer PHP to ASP but it really depends on who you will work for as to which of the two you choose.
I would definitely recommend learning JavaScript and then PHP. Perl doesn’t really have much to do with web development.
I work with a team of Java/JSP/javaScript developers. Although my web development background is in xHTML/CSS/PHP/MySQL, they brought me on board because they needed serious help in the layout & design of the application. They’re great programmers, but don’t really have much knowledge in the “front end” side of things. I would recommend focusing on xHTML and CSS if you are still new to that. Then go for javaScript followed by PHP. PHP is similar to Perl in some ways, but PHP is much better for web while Perl is better for running server side scripts and processes. Jumping into Java would probably be a little too overwhelming for someone new to development, especially today. Maybe consider learning Java or C/C++ later on when you are comfortable with a scripting language. You’ll also find that there are many similarities between the various languages. So, learning one really well, will bridge some of the gaps when you need to learn a new language. I would not, however, learn ColdFusion. Personally, I would stay away from that…. no offense to others out there who use it but it’s far too different in syntax, too expensive to run.
I’m going to through a serious “it depends” answer out there. If you are looking to make a page sing, dance, and make AJAX (or similar) requests after it has been loaded in the user’s browser JavaScript is the way to go. If you need to process forms, generate dynamic content, service AJAX (or similar) requests, then you need something server side. (Perl, PHP, ASP, JSP, Python, … The list goes on and on).
It depends on your motivation and career goals.
If you’re aims are to work in a darkened room looking after servers, then PERL is a very useful language. Otherwise there are better options for server side scripting, such as PHP or ASP.
If your aim is to build web pages then you probably would want to get a good grasp on javascript along with HTML & CSS before diving too deeply into server interaction. If you’re a copmlete novice at the moment you should definately start with learning to hand code HTML and CSS, and do so from somebody who uses it properly. Once you have a good understanding (even if you need to keep referring to books when hand coding (I do and I’ve been coding HTML / CSS for nearly 10 years now) you can start to play around with some javascript writing, you’ll probably naturally start including other peoples scripts much earlier. You’ll also learn how to intereact with server scripts at a basic level as part of learning HTML, so this will give you a start when you decide to ‘dip your toes’ into server side scripting.
I hope you find this comment useful.
Cheers
I would agree with Keith above - think of what you want to accomplish as a web professional and build your learning around that. The key to success is not trying to master every discipline! Select the discipline which will bring you closest to your career aims and study it in depth. Learn enough of the other disciplines to have a working knowledge, and build a strong network of fellow professionals and specialists whom you could outsource parts of your work to if your clients’ needs called for their expertise.
Definitely make sure you have a good basis in html and CSS before you start anything new. Then you have to decide: do you really like designing a web page and work with functionalities on the page (visitor oriented), or do get more satisfaction from adding back end functionality to a website, like creating accounts, a database etc.? If you’re into design, I’d say go for the Javascript first, which lets you be very creative with the look and feel of a webpage. If you’re care more about how the site works and not so much about how it looks, go for the PHP first.
Then, like the others have mentioned, take a peek at everything else that’s out there, so you have a good understanding about how it all fits together.
(As for myself, after I had learned front end and back end development, I decided that I didn’t really like either one that much, but liked putting it all together - I work as a project manager now:)
Actually, I might even recommend PHP first, and then JavaScript. I use PHP far more often than JS, and it’s been a far more useful tool to learn.
“I need to be a little bit anal here and point out that Java and JavaScript are two very different beasts”
I’d hardly call that being anal; these ARE two very different languages.
So JS or Perl .. it all depends on what you want to do, obviously. What IS it you want to do because JS are Perl are serve different purposes?
You need to figure out what you want to do first then identify the language/technology you need.
Regarding the question; you are comparing apples to
shoelaces. Perl will let you build anything from a small website to an, er, big website. Javascript will let you add awesome functionality (see: gmail).
I say learn Perl first.
Actually, PHP might be a better option for you solely because of your lack of technical knowledge. I would hate to have you giving Perl a bad name.
You learn HTML, CSS and then JavaScript. If you like working on the front end, you learn a lot more about those three and the DOM or move on to the back end which gets handled by PHP/MySQL, .net, and sometimes the planets align, the nether regions freeze over and that one Perl job is born. I don’t hate Perl but that’s no reason to delude somebody about how often they’re going to get work with it.