Server-Side Scripting/Introduction
This lesson introduces server-side scripting.
Objectives and Skills
editObjectives 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
editMultimedia
editGo
editNode.js (Express)
editPHP
editPython (Flask)
editExamples
editActivities
edit- 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.
- Modify the example Hello World program to instead display
Hello name!
, wherename
is your name. Include comments at the top of the program and test the program to verify that it works correctly. - 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.
- Research Wikipedia: Docker (software). Consider setting up a Docker environment to run and test your server-side scripts.
- Express: Docker/Express
- Flask: Docker/Flask
- Go: Docker/Go
- Java: Docker/Tomcat
- PHP: Docker/PHP
- Ruby: Docker/Ruby
- Research cloud deployment options for your selected programming language. Consider setting up a cloud solution to run and test your server-side scripts.
- Docker - AWS: Elastic Beanstalk Docker Configuration
- Express - AWS: Deploying an Express application to Elastic Beanstalk
- Flask - AWS: Deploying a flask application to Elastic Beanstalk
- Go - AWS: Creating and deploying Go applications on Elastic Beanstalk
- Java - Creating and deploying Java applications on Elastic Beanstalk
- PHP - AWS: Creating and deploying PHP applications on Elastic Beanstalk
- Ruby - Creating and deploying Ruby applications on Elastic Beanstalk
Lesson Summary
edit- 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- 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
editReferences
edit- ↑ 1.0 1.1 Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ Wikipedia: Server-side scripting
- ↑ https://www.codeconquest.com/website/client-side-vs-server-side/
- ↑ "Introduction to the server side - Learn web development | MDN". developer.mozilla.org. Retrieved 2021-01-20.
- ↑ https://learntocodewith.me/posts/backend-development/
- ↑ Wikipedia: Client (computing)
- ↑ https://developer.mozilla.org/en-US/docs/Web/HTTP/Overview
- ↑ https://en.wikipedia.org/wiki/Platform_as_a_service
- ↑ Wikipedia: Scripting language
- ↑ Wikipedia: Server (computing)
- ↑ https://developer.mozilla.org/en-US/docs/Learn/Server-side/First_steps/Web_frameworks
- ↑ Wikipedia: Web application