Jump to content

Server-Side Scripting/Introduction

From Wikiversity

This lesson introduces server-side scripting.

Objectives and Skills

[edit | edit source]

Objectives and skills for this lesson include:

  • Understand the purpose of server-side scripting
  • Evaluate server-side scripting options
  • Select a programming language and framework for the course
  • Establish a server-side scripting test environment

Readings

[edit | edit source]
  1. Wikipedia: Server-side scripting
  2. Wikipedia: Docker (software)
  3. Wikipedia: AWS Elastic Beanstalk

Multimedia

[edit | edit source]
  1. YouTube: Go / Golang Crash Course

Node.js (Express)

[edit | edit source]
  1. YouTube: Express JS Crash Course
  2. YouTube: How to Run Node.js in VS Code From Scratch
  1. YouTube: Introduction To PHP
  2. YouTube: PHP Introduction

Python (Flask)

[edit | edit source]
  1. YouTube: Flask Tutorial #1 - How to Make Websites with Python
  2. YouTube: Python Flask From Scratch

Examples

[edit | edit source]

Activities

[edit | edit source]
  1. Research server-side scripting languages, including Go, Java, .NET Core, Node.js (Express), PHP, Python (FastAPI or Flask), and Ruby. Select a programming language to use for this course. If unsure, Node.js (Express) and Python (FastAPI or Flask) are currently popular choices for a first server-side scripting language. Use the Examples link above for your selected programming language and use one of the free online IDE links provided to try running the Hello World program.
  2. Modify the example Hello World program to instead display Hello name!, where name is your name. Include comments at the top of the program and test the program to verify that it works correctly.
  3. Research free downloadable tools for your selected programming language (interpreter/compiler, IDE, etc.). Consider downloading and installing a development environment on your system. Visual Studio Code is recommended. If you set up your own development environment, test the environment using your Hello Name program written above.
  4. Research Wikipedia: Docker (software). Consider setting up a Docker environment to run and test your server-side scripts.
  5. Research cloud deployment options for your selected programming language. Consider setting up a cloud solution to run and test your server-side scripts.

Lesson Summary

[edit | edit source]
  • Server-side scripting is a technique used in web development which involves employing scripts on a web server which produce a response customized for each user's (client's) request to the website.[1]
  • Scripts can be written in any of a number of server-side scripting languages that are available.[2]
  • Server-side scripting is distinguished from client-side scripting where embedded scripts, such as JavaScript, are run client-side in a web browser, but both techniques are often used together.[3]
  • Server-side scripting is often used to provide a customized interface for the user.[4]
  • Server-side scripts can be used to control access rights to the specific user.[1]
  • Server-side scripting enables the website owner to hide the source code that generates the interface, whereas with client-side scripting, the user has access to all the code received by the client.[5]
  • A down-side to the use of server-side scripting is that the client needs to make further requests over the network to the server in order to show new information to the user via the web browser.[6]
  • These requests can slow down the experience for the user, place more load on the server, and prevent use of the application when the user is disconnected from the server.[7]
  • Server-side scripts are completely processed by the servers instead of clients. When clients request a page containing server-side scripts, the applicable server processes the scripts and returns an HTML page to the client.[8]
  • Sever-side scripting is the best option for anything that requires dynamic data to be loaded, such as user validation, saving data entered by a user, online reservations, etc.[9]
  • Some popular server-side languages include Node.js, PHP, Python (Flask), Ruby, Java, C#, and many more.[10]

Key Terms

[edit | edit source]
backend development
Focuses on the functionality and logic powering the application. The technology used in the backend is never directly seen by users.[11]
client
A piece of computer hardware or software that accesses a service made available by a server as part of the client–server model of computer networks.[12]
HTTP
The Hyper Text Transfer Protocol (HTTP) is the protocol used for web client-server communication by sending and receiving requests and responses.[13]
Platform as a service (PaaS)
A platform based service that provides a platform allowing customers to develop, run, and manage applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app.[14]
scripting language
A programming language for a special run-time environment that automates the execution of tasks.[15]
server
A piece of computer hardware or software (computer program) that provides functionality for other programs or devices.[16]
server-side web framework
A set of libraries and tools that help build a web application. Some server-side frameworks include Symfony (PHP), Django (Python), and Express (Node.js/JavaScript). These frameworks work directly with HTTP requests and responses, route requests to the appropriate handler, simplify database access and management, and URL mapping.[17]
web application
Is application software that runs on a web server, unlike computer-based software programs that are run locally on the operating system of the device.[18]

See Also

[edit | edit source]

References

[edit | edit source]
  1. 1.0 1.1 Wikipedia: Server-side scripting
  2. Wikipedia: Server-side scripting
  3. Wikipedia: Server-side scripting
  4. Wikipedia: Server-side scripting
  5. Wikipedia: Server-side scripting
  6. Wikipedia: Server-side scripting
  7. Wikipedia: Server-side scripting
  8. Wikipedia: Server-side scripting
  9. https://www.codeconquest.com/website/client-side-vs-server-side/
  10. "Introduction to the server side - Learn web development | MDN". developer.mozilla.org. Retrieved 2021-01-20.
  11. https://learntocodewith.me/posts/backend-development/
  12. Wikipedia: Client (computing)
  13. https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview
  14. https://en.wikipedia.org/wiki/Platform_as_a_service
  15. Wikipedia: Scripting language
  16. Wikipedia: Server (computing)
  17. https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Web_frameworks
  18. Wikipedia: Web application