If anyone notices any errors, please tell me.
--------------------------------------------------------------------------------------------------
Overview
At what point does one cross the line between designer and developer. That point is here, when you discover Server-Side Scripts. Server Side Scripts are the top-most nodes in the web language hierarchy. They are able to manipulate HTML, CSS & Javascript, allowing a web page to dynamically change based on the viewer and certain conditions. There are variety of Server Side Script languages such as PHP, ASP & JSP.
So what exactly is a Server Side Script? In order to explain this, lets first discuss how HTML, CSS and Javascript are rendered on your browser. When you open an HTML file, your browser reads and interprets the code and then displays the output of the code to your screen. This is different for Server Side Scripts however. When a Server Side Script, such as a PHP file, is opened, a server reads and transforms the script to HTML which is then interpreted by the browser, who then displays the web page on your screen. You may be asking yourself “So what's so great about that?”. Well, server side scripts, just like Javascript, have variables. That means that when they are transformed to HTML by the server, they may look different for various viewers because of those variables (ex. The time). In other words, one script determines what HTML is sent to the browser. This is cooler than you may think.
Webdesignerforum.co.uk uses some kind of server side script for its forum. For example, when a user who is not logged in tries to post a reply, the script checks to see if he or she is logged in and if not outputs an HTML page that says “you must log in”.
What you need.
Unfortunately, scripts such as php require more than just a text editor and a browser; they require a server. I will explain what a server is later. For now, just search the web for “xampp” and download it for whatever OS you have. Follow the installation instructions (if any) if you have to. For Windows it's easy, but for Linux, it takes a little more work. Xampp is a local server that you can install on your computer.
Setting up the local Server
When browsing the internet, users type in an address (www.whatever.co.uk) to get to a webpage. The address is a link to specific server. When you go to the address of the server, it returns to the viewer, the index page, which is the entry point of all websites. The viewer's browser then displays the HTML of the index to the screen.
Xampp is a bundle of utilities that can be used to view server side scripts before actually putting them on the Internet. The two utilities bundled with xampp that are the most important to us are Apache and MySQL. Apache is the actual local server on your computer. MySQL is a database that can be used by server side scripts. In order to start the server, you must start Apache. On Windows, xampp provides a control panel for starting the various utilities. In order to start any utility, navigate to the control panel and select the items you wish to start. Once you've done this, and apache is active, when you type in “http://localhost/”, xampp should redirect you to its home page. When this happens, your are ready to start scripting, server-side style.
When you navigate to the xampp root folder you'll see a whole bunch of folders. The most important folder to us is the “htdocs” folder. The “htdocs” folder is the equivalent to typing in “http://localhost” in our web browsers. All scripts go in this directory or in folders in this directory. For example, if we were to save a file name “dude.php” in a folder named “dudefolder” in the “htdocs” directory, we could then see script as an html file by typing in “http://localhost/dudefolder/dude.php” in our browsers. By using “localhost” in the URL, you are enlisting the abilities of the server to view whatever page you want to view.
That's it. I recommend that you read about xampp and servers in general.
Which Server Side Script to learn
ASP and PHP have been compared for years. While some claim that ASP is better, PHP has remained the most popular of the two. If you are using xampp, PHP is your only choice as xampp doesn't support ASP. There exists another server side scripting language name JSP which was developed by Sun Microsystems. I, however, have no experience whatsoever with JSP. Google it for information.
Tutorials
Unfortunately, there aren't lots of decent Server Side Scripting tutorials available on the web. Consequently, one must now rely on books to learn. However, there is light at the end of the tunnel. A website named ebookee.com exists and people upload ebooks which can be downloaded for free. When you are at the website, try searching for PHP or ASP and see what pops up.
Page 1 of 1
TUTORIAL: Learning Server Side Scripts Getting started with Server Side Scripts
Share this topic:
Page 1 of 1
Help















