Web Development Tutorial - Server-side scripting
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
🌐 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
💡Server-side scripting
💡CGI scripts
💡PHP
💡Java
💡Cold Fusion
💡Database
💡Web server
💡Client-side scripting
💡JavaScript
💡Dynamic websites
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
in our last chapter we discussed
front-end technology in this one we're
going to change our focus to exploring
what happens on the server and the types
of technologies that are used to create
dynamic websites
any scripting or programming that runs
on a web server is referred to as server
side scripting this could be anything
from processing a form
managing an online purchase
registering a new user or even something
like booking a hotel room
as websites have matured technologies
that surround server-side scripting have
matured as well in the early days of the
web
most server-side scripting was done with
what we call cgi scripts
cgi stands for common gateway interface
and it was created as a way to run
scripts from programming languages like
c plus or perl on websites
since then a multitude of programming
languages and frameworks like php
java.net cold fusion and others have
given developers a wider array of tools
to choose from when they're creating
dynamic sites
although each language is slightly
different the process for utilizing
server-side scripting on a web page is
pretty consistent if a web page
containing server-side scripting is
requested from a server
the web server first processes the
script before the page is served to the
browser
processing the script can involve
pulling information from a database
making simple calculations or choosing
which pieces of content to display on
the page once the script has been
processed the resulting content is then
returned to the browser and then it's
rendered
this process can occur from either a
simple page request through something
like a user filling out a form or from
interacting with a specific widget
since the scripts run on the web server
prior to serving the content the scripts
themselves are hidden from the end user
now this adds a layer of security for
both the data and the source code itself
there are of course some downsides to
using server-side scripting since the
processing must be done on the server it
places the burden of running the
application on the web server itself
rather than the client machine
for larger applications or sites with a
lot of page requests this can slow down
the site or force the site to upgrade to
larger or even multiple servers to
handle the load
the flow of dynamic pages can be
frustrating for end users as well
because the server must process the
scripts there's usually a page refresh
required to display new content this is
largely the reason that client-side
scripting has gained in popularity as
well as the development of techniques
that run server-sized scripts without
requiring page refreshes
to be honest the terms client-side
scripting and server-side scripting are
becoming rather nebulous
developers have become very adept at
using javascript to blend the two
methods together into a seamless user
experience
if web development interests you be sure
you focus on not just the server side
software that we're going to be
exploring in this chapter but also how
javascript is being increasingly used
for more powerful client-side scripting
and as a method of controlling scripting
on the server as well
浏览更多相关视频
Differences between server side scripting and client side scripting
SSR, CSR, SPA, PWA
React Server Components vs Client Components
Tổng hợp Full Lộ Trình và các Công Nghệ Web nên học năm 2024
Introduction to Servlets
1 | Introduction to PHP Programming for Beginners | 2023 | Learn PHP Full Course for Beginners
5.0 / 5 (0 votes)