As we wind down the course in Web Design 101, some attention should be paid to scripting languages. Scripts are nothing more than programming code (software) that allows Web pages to become both more interactive as well as dynamic. Though it really isn’t necessary for most IMers to learn much if any scripting, it’s still a pretty good idea to get an appreciation of the power they possess and in what circumstances you might want to employ scripts.
The first order of business is to distinguish between the two types of scripts:
- Server-side scripts
- Client-side scripts
Back during my programming days when I first got started doing Web applications programming, I often got confused between where certain pieces of code got executed — on the server or the client? Once I understood that languages such as ASP, PHP, and Perl under CGI are run at the Web server and that JavaScript is run within the browser on the client side all was good.
CGI, which stands for “Common Gateway Interface” was a very popular way of creating server side scripts. These scripts in most cases were written in the Perl language, but could also be written in other languages such as C. The major drawback with CGI is the number of resources it uses on the server. Every request creates a new instance of the CGI application on the server. For a small number of clients it’s really not a problem, but scalability becomes an issue as the number of users increases.
These days, most Web applications are written in languages such as PHP, ASP, ASP.net, and Python. There is also the Ruby scripting language and the follow on called “Ruby on Rails“, which specializes in database applications. I’ve never touched Ruby and really don’t have a clue about it, but it seems to be pretty hot at the moment.
I have written applications in PHP and ASP and I have dabbled a bit in ASP.net. I’ve always appreciated the integrated development environments from Microsoft and the one for ASP.net is very nice. However, all my hosting and work is done on Linux servers running Apache so PHP is my server side scripting language of choice.
There is also Python, but like Ruby, it’s a language I’ve never looked at. I know that Paul Kenjora, the author of the Arkayne WordPress plugin is a big fan of the Django platform, which is written in Python. Paul has mentioned the benefits of Django to me on several occasions and I have been very impressed with the sites he’s been able to quickly put together using it. It does require a specially configured server, which puts it out of reach for me at the moment, but is still something that I’m keeping my eye on.
As far as JavaScript, in most cases you can get away without ever learning any of its syntax. Just learn how to recognize the opening and closing tags for it when you copy and paste JavaScript code into your Web pages. Perhaps the best known and most commonly used snippets of JavaScript is Adsense. It’s also used for specialized widgets and certain “advanced” affiliate links and banners.
JavaScript can also be used for what’s called “Dynamic HTML“. This is where JavaScript is used to change the page display in some way such as providing rollover effects, menu dropdowns, and popups all without a round trip call to the Web server.
However, such use of JavaScript is now being deprecated in certain cases in favor of using Cascading Style Sheets (CSS). Things like rollovers can be easily performed using CSS. There is also a technology called Ajax, which stands for “Asynchronous Javascript and XML“, which allows calls to the server to happen in the background (asynchronously) so that the Web page appears to be an interactive application running on the client PC.
This is the sort of thing that fascinated me when I first got started with ASP programming 10 years ago — distributed computing using a Web browser as the container for the user interface. The barrier to entry when programming a desktop application can be high when creating and wiring up all the components of the GUI.
Even with application programming frameworks such as Visual C++, .Net, and the Java Swing Library, it’s still a heck of a lot of work to just get the simplest of GUIs up and running. If all that can be specified using HTML and then displayed in a browser, then it’s super quick to put an application together. It’s the distributed part that makes such applications for a single user less appealing.
Even if you never write a single line of code, it doesn’t hurt to at least understand the concepts behind how such applications are structured. This will help you if you should ever have the need to contract a coder to program a script or application for you.
I’ll probably put a post together soon on what you need to know and do when hiring a coder.
Tags: IM 101, open source projects, php development, Programming












2 responses so far ↓
1 Drew // Jun 30, 2008 at 10:36 pm
Hey Rich,
This is a nice overview of all the different languages and a good push to learn some of them. I’m curious what you recommend learning in terms of general computer science. I’ve been trying to teach myself some of these languages, but I feel like a lack of clear fundamentals keeps me from really mastering anything. Do you think a fundamentals course belongs in your coursework somewhere or is it ultimately superfluous and driving the student more towards programming and less towards IM?
2 Rich // Jul 1, 2008 at 6:38 pm
Hi Drew,
You ask a great question — where does programming fit into a curriculum based around IM?
I think like most college curricula, a course in programming would either be an elective or an IM major could declare a minor in ComSci.
Alternatively, a watered down introductory course in programming concepts could be offered within the IM curriculum.
I think you’re right about the difficulty in teaching yourself a particular programming language as a result of not having a foundation in software design concepts.
For something like this, it’s probably best to just jump right in and get your hands dirty. If you have a Web hosting account with PHP, then I’d recommend hacking away at some PHP scripts to get a feel for things.
The SAMS “Teach Yourself PHP in 24 Hours” book by Matt Zandstra is a pretty good introduction to PHP.
At the end of the day, an Internet Marketer has to know how to make money and build a business. Things like coding, Web design, etc., can all be outsourced. We all need to identify our strengths and go with those strengths. The rest can be outsourced.
Rich
Leave a Comment