Web Development Tutorial - Server-side scripting

LinkedIn Learning
19 Jul 201403:14

Summary

TLDRThis chapter shifts focus from front-end to server-side technologies, explaining the evolution of server-side scripting from CGI scripts to modern languages like PHP and Java. It details how scripts process data, interact with databases, and enhance dynamic web experiences, while also discussing the security benefits and performance challenges they present. The summary highlights the blending of client-side and server-side scripting for seamless user experiences in web development.

Takeaways

  • 🌐 The chapter shifts focus from front-end to server-side technologies used to create dynamic websites.
  • 📜 Server-side scripting is any programming that runs on a web server, including form processing and user registration.
  • 🛠️ CGI (Common Gateway Interface) was an early method for running scripts like C++ or Perl on websites.
  • 🚀 Modern server-side scripting includes a variety of languages and frameworks such as PHP, Java, .NET, and Cold Fusion.
  • 🔁 The process of server-side scripting involves the web server processing scripts before serving pages to the browser.
  • 💾 Processing may include database interactions, calculations, or content selection for the webpage.
  • 🔍 Once processed, the script's output is sent to the browser for rendering, without exposing the script to the user.
  • 🔒 Server-side scripts enhance security by keeping the source code and data hidden from the end user.
  • ⏱️ Server-side processing can slow down websites, especially with high traffic, requiring more server resources.
  • 🔄 Dynamic page flow can be frustrating due to page refreshes needed to display new content.
  • 🤝 The distinction between client-side and server-side scripting is blurring as developers integrate both for better user experiences.
  • 💡 JavaScript is increasingly used for powerful client-side scripting and to control server-side scripts without page refreshes.

Q & A

  • What is the main focus of this chapter?

    -The main focus of this chapter is to explore server-side technologies and scripting that are used to create dynamic websites.

  • What is server-side scripting?

    -Server-side scripting refers to any scripting or programming that runs on a web server, handling tasks such as processing forms, managing online purchases, and registering new users.

  • What does CGI stand for and what was its purpose?

    -CGI stands for Common Gateway Interface, and it was created as a way to run scripts from programming languages like C++ or Perl on websites.

  • How have server-side scripting technologies evolved over time?

    -Over time, server-side scripting technologies have evolved from CGI scripts to include a multitude of programming languages and frameworks such as PHP, Java, .NET, Cold Fusion, and others, giving developers a wider array of tools.

  • What is the general process for utilizing server-side scripting on a web page?

    -The web server first processes the server-side script when a web page containing it is requested. This can involve pulling information from a database, making calculations, or choosing content to display. Once processed, the resulting content is returned to the browser and rendered.

  • Why are server-side scripts hidden from the end user?

    -Server-side scripts are hidden from the end user because they run on the web server prior to serving the content, adding a layer of security for both the data and the source code.

  • What are some downsides to using server-side scripting?

    -Downsides to using server-side scripting include the burden of running the application on the web server instead of the client machine, which can slow down the site or require upgrading to larger or multiple servers to handle the load.

  • How does server-side scripting affect the user experience?

    -Server-side scripting can be frustrating for end users because it usually requires a page refresh to display new content, as the server must process the scripts.

  • What is the relationship between client-side scripting and server-side scripting in modern web development?

    -The terms client-side and server-side scripting are becoming nebulous as developers use JavaScript to blend the two methods together into a seamless user experience.

  • Why is JavaScript increasingly used for both client-side and server-side scripting?

    -JavaScript is increasingly used for both client-side and server-side scripting due to its versatility and the development of techniques that allow for powerful client-side interactions and server-side control without requiring page refreshes.

  • What advice is given to those interested in web development regarding server-side and client-side scripting?

    -The advice given is to focus not only on the server-side software but also on how JavaScript is being used for powerful client-side scripting and controlling server-side scripts.

Outlines

00:00

🌐 Server-Side Scripting and Web Technologies

This paragraph introduces the shift in focus from front-end to server-side technologies, explaining the role of server-side scripting in creating dynamic websites. It covers the evolution from CGI scripts to modern languages and frameworks like PHP, Java, and .NET. The process of how a web server processes scripts before serving pages to the browser is detailed, including interactions with databases and content selection. The paragraph also touches on the security benefits of server-side scripts being hidden from end users, and the challenges of server processing burden and page refresh requirements, which can affect user experience. It concludes by noting the blurring lines between client-side and server-side scripting, with developers increasingly integrating both for a seamless user experience.

Mindmap

Keywords

💡Front-end technology

Front-end technology refers to the client-side components of web applications that users interact with directly, such as the visual elements and user interface. In the video, it is mentioned as a contrast to the focus of the current chapter, which is server-side scripting and technologies. The script implies that while front-end technologies are important for user experience, the video will delve into the back-end processes that power dynamic websites.

💡Server-side scripting

Server-side scripting is the process of executing scripts on the web server to generate dynamic web content before it is sent to the client's browser. The script explains that this can include tasks like processing forms, managing online purchases, or registering users. It's a fundamental concept in the video, as it underpins the discussion on how dynamic websites function and the various technologies used to create them.

💡CGI scripts

CGI, or Common Gateway Interface, is a standard for external gateway programs to interface with information servers such as HTTP servers. In the early web, CGI scripts were used to execute scripts written in languages like C++ or Perl to generate dynamic content. The video script uses CGI as an example of early server-side scripting techniques, highlighting the evolution of technologies in this domain.

💡PHP

PHP, which stands for Hypertext Preprocessor, is a widely-used open-source server-side scripting language designed for web development. The script mentions PHP as one of the programming languages that have matured alongside server-side scripting, providing developers with tools to create dynamic websites. PHP is an example of how server-side scripting has evolved to offer more functionality and ease of use.

💡Java

Java is a high-level, class-based, object-oriented programming language that is commonly used for server-side scripting among other applications. The video script lists Java as one of the many programming languages that have been utilized for server-side scripting, indicating the diversity of tools available to developers for building dynamic web applications.

💡Cold Fusion

Cold Fusion is a commercial web development software suite developed by Adobe Inc., which includes a server-side scripting language. The script briefly mentions Cold Fusion as part of the array of technologies that have emerged to facilitate server-side scripting, showcasing the range of options for developers to create dynamic content.

💡Database

A database is an organized collection of data, typically stored and accessed electronically. In the context of the video, databases are mentioned as a common resource that server-side scripts interact with, for example, by pulling information to generate dynamic web content. This highlights the integral role databases play in the server-side scripting process.

💡Web server

A web server is a system that hosts websites and serves web pages to users over the Internet. The script explains that when a web page with server-side scripting is requested, the web server processes the script before serving the page to the browser. This processing can include interacting with databases or performing calculations, emphasizing the web server's role in delivering dynamic content.

💡Client-side scripting

Client-side scripting refers to the execution of scripts in a web browser by the client, as opposed to server-side scripting. The video script contrasts client-side scripting with server-side scripting, noting the growing popularity of client-side scripting due to its ability to create a seamless user experience without the need for page refreshes, and how it's being integrated with server-side processes.

💡JavaScript

JavaScript is a high-level, interpreted scripting language that is a core technology used alongside HTML and CSS for building interactive websites. The script mentions JavaScript as a tool that developers are using to blend client-side and server-side scripting into a cohesive user experience. It also notes the increasing use of JavaScript for powerful client-side scripting and controlling scripts on the server.

💡Dynamic websites

Dynamic websites are web applications that serve content that changes based on user input, database queries, or other factors. The video script explores the technologies behind dynamic websites, such as server-side scripting, and discusses how these technologies enable websites to provide interactive and personalized experiences for users.

Highlights

Shift in focus from front-end to server-side technologies in web development.

Server-side scripting enables dynamic website functionalities like form processing, online purchases, user registration, and hotel bookings.

Introduction to CGI scripts as early server-side scripting tools using languages like C++ and Perl.

Evolution of server-side scripting with languages and frameworks such as PHP, Java, .NET, and Cold Fusion.

Consistent process of server-side scripting across different languages involving web server script processing before content delivery to the browser.

Script processing may include database queries, calculations, and content selection for the webpage.

Server-side scripts enhance security by hiding the source code and data from end users.

Drawbacks of server-side scripting include increased server load and potential slowdowns for large applications or high traffic sites.

The need for server upgrades or multiple servers to handle increased load in dynamic sites.

Client-side scripting gaining popularity due to its ability to run without page refreshes, providing a smoother user experience.

Emergence of techniques that execute server-side scripts without requiring page refreshes.

Bleeding lines between client-side and server-side scripting as developers adeptly blend both for seamless user experiences.

JavaScript's increasing role in both powerful client-side scripting and server-side script control.

Encouragement for web development enthusiasts to explore both server-side software and advanced JavaScript usage.

The importance of understanding how JavaScript is being used for more complex client-side and server-side operations.

Transcripts

play00:00

in our last chapter we discussed

play00:02

front-end technology in this one we're

play00:04

going to change our focus to exploring

play00:06

what happens on the server and the types

play00:08

of technologies that are used to create

play00:10

dynamic websites

play00:12

any scripting or programming that runs

play00:13

on a web server is referred to as server

play00:16

side scripting this could be anything

play00:18

from processing a form

play00:20

managing an online purchase

play00:22

registering a new user or even something

play00:25

like booking a hotel room

play00:27

as websites have matured technologies

play00:29

that surround server-side scripting have

play00:31

matured as well in the early days of the

play00:33

web

play00:34

most server-side scripting was done with

play00:36

what we call cgi scripts

play00:39

cgi stands for common gateway interface

play00:42

and it was created as a way to run

play00:44

scripts from programming languages like

play00:46

c plus or perl on websites

play00:50

since then a multitude of programming

play00:52

languages and frameworks like php

play00:55

java.net cold fusion and others have

play00:58

given developers a wider array of tools

play01:01

to choose from when they're creating

play01:02

dynamic sites

play01:04

although each language is slightly

play01:06

different the process for utilizing

play01:08

server-side scripting on a web page is

play01:10

pretty consistent if a web page

play01:13

containing server-side scripting is

play01:14

requested from a server

play01:16

the web server first processes the

play01:18

script before the page is served to the

play01:21

browser

play01:22

processing the script can involve

play01:23

pulling information from a database

play01:26

making simple calculations or choosing

play01:28

which pieces of content to display on

play01:30

the page once the script has been

play01:32

processed the resulting content is then

play01:34

returned to the browser and then it's

play01:36

rendered

play01:37

this process can occur from either a

play01:40

simple page request through something

play01:42

like a user filling out a form or from

play01:44

interacting with a specific widget

play01:47

since the scripts run on the web server

play01:49

prior to serving the content the scripts

play01:51

themselves are hidden from the end user

play01:54

now this adds a layer of security for

play01:56

both the data and the source code itself

play01:59

there are of course some downsides to

play02:01

using server-side scripting since the

play02:03

processing must be done on the server it

play02:05

places the burden of running the

play02:07

application on the web server itself

play02:10

rather than the client machine

play02:12

for larger applications or sites with a

play02:14

lot of page requests this can slow down

play02:16

the site or force the site to upgrade to

play02:18

larger or even multiple servers to

play02:20

handle the load

play02:22

the flow of dynamic pages can be

play02:24

frustrating for end users as well

play02:26

because the server must process the

play02:28

scripts there's usually a page refresh

play02:31

required to display new content this is

play02:33

largely the reason that client-side

play02:36

scripting has gained in popularity as

play02:38

well as the development of techniques

play02:40

that run server-sized scripts without

play02:42

requiring page refreshes

play02:44

to be honest the terms client-side

play02:46

scripting and server-side scripting are

play02:48

becoming rather nebulous

play02:50

developers have become very adept at

play02:52

using javascript to blend the two

play02:54

methods together into a seamless user

play02:56

experience

play02:57

if web development interests you be sure

play02:59

you focus on not just the server side

play03:01

software that we're going to be

play03:02

exploring in this chapter but also how

play03:04

javascript is being increasingly used

play03:07

for more powerful client-side scripting

play03:09

and as a method of controlling scripting

play03:11

on the server as well

Rate This

5.0 / 5 (0 votes)

Related Tags
Server-SideWeb TechDynamic SitesScriptingCGIPHPJavaSecurityPerformanceClient-SideJavaScript