Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Server-side Scripting, Exams of System Programming

Side Scripting because all the activity takes place inside the browser. Page 22. Advantages of client-side scripting. □ Allows for more interactivity.

Typology: Exams

2021/2022

Uploaded on 09/12/2022

gilian
gilian 🇬🇧

4.6

(11)

7 documents

1 / 32

Toggle sidebar

Related documents


Partial preview of the text

Download Server-side Scripting and more Exams System Programming in PDF only on Docsity! | Server-side Scripting Slides courtesy of Xenia Mountrouidou URLs and web servers  Usually when you type a URL in your browser:  Your computer looks up the server's IP address using DNS  Your browser connects to that IP address and requests the given file  The web server software (e.g. Apache) grabs that file from the server's local file system  The server sends back its contents to you 2 http://server/path/file What are they and what are their differences? Server-Side vs. Client-Side Scripting Languages By Lories Slockbower Scripting Language  A new style of programming language different from system programming languages  Designed as glue language or system integration language  A single statement can execute huge number of machine instructions  Are normally ‘typeless’  Build complex algorithms and data structures..  Can create dynamic web pages  Change based on user input Types of Scripting Languages  Server-side Scripting Language  Can use huge resources of the server  Complete all processing in the server and send plain pages to the client  Reduces client-side computation overhead  Client-side Scripting Language  Does not involve server processing  Complete application is downloaded to the client browser  Client browser executes it locally  Are normally used to add functionality to web pages e.g. different menu styles, graphic displays or dynamic advertisements Different Scripting Languages  CGI (Common Gateway Interface)  Server-side solution  Needs to launch separate instance of application for each web request  Allows direct interaction with users  ASP.NET  Server-side technology to create faster, reliable and dynamic web pages  Supports .NET framework languages (C#, VB.NET, JScript.NET)  Provides flexibility to designers and developers to work separately Different Scripting Languages  VBScript  Microsoft’s scripting language  Client side Scripting language  Very easy to learn  Includes the functionality of Visual Basic  JavaScript  Client-side Scripting language  Easy to use programming language  Enhance dynamics and interactive features of a web page  Allows to perform calculation, write interactive games, add special effects, customize graphic selections, create security passwords Conclusion  Scripting languages make the web development work  Easier  Faster  Best utilization of resources  It is the programmer’s choice which one will suite the best considering  Knowledge  Practice  Resource What can server scripts do?  Customize a web page and dynamically change its contents  Respond to queries from users or from HTML forms  Access database and send the information back to the browser Advantages of server-side scripting  User does not need to download plugins like Java or Flash  User can create one template for the entire website  The site can use a content management system which makes editing simpler.  Generally quicker to load than client-side scripting  User is able to include external files to save coding  Scripts are hidden from view so it’s more secure. Users only see the HTML output. Disadvantages of server-side scripting  The scripts can be used by attackers to access the server. They do this by changing the URL to something that takes advantage of a hole in security. System administrators must keep all server-side scripting updated and use an application firewall to prevent this.  Scripting software must be installed on the content management system tools in order to store the dynamic data. How does it work?  Usually, JavaScript code starts with the tag <script language="JavaScript"> and ends with the tag </script>.  Files are first sent to the user’s computer by the web server which executes the script and displays the document.  The client-side script may also include browser directions based on certain user functions such as clicking buttons.  Frequently, you can see the the source card by viewing the file that contains the script. Example of client-side scripting  Suppose a person completes a form but omits information. When they slick the submit button, an alert box appears telling them about the mistake.  This is JavaScript and is an example of Client Side Scripting because all the activity takes place inside the browser. Advantages of client-side scripting  Allows for more interactivity  Can perform actions quickly without going to the server  May be easier to use for those whose browsers don’t support scripts  Are available from many free resources Client Side vs. Server Side Web  Simply defined, client-side code executes on the end-user's computer, usually within a web browser.  Server-side code executes on the web server, usually within a web application environment, which in turn generates HTML to be viewed in a browser. PHP 30 What is PHP?  PHP stands for "PHP Hypertext Preprocessor"  Server-side scripting language  Used to make web pages dynamic:  provide different content depending on context  interface with other services: database, e-mail, etc.  authenticate users  process form information  PHP code can be embedded in XHTML code 31 Hello World! 34 <?php print "Hello, world!"; ?> PHP Hello world! output Viewing PHP output zilla Firefox File Edit View History Bookmarks Tools Help @-2{-@ eG ft i file:///C:/Dal=|&] IGl-|Google |S) Oz a Firefox File Edit View History Bookmarks Tools Help @->-@ © @ [GB http:/focah| =] B) (IG-[Google [&) Hello world! Done h- PHP syntax template 36  Contents of a .php file between <?php and ?> are executed as PHP code  All other contents are output as pure HTML  We can switch back and forth between HTML and PHP "modes" HTML content <?php PHP code ?> HTML content <?php PHP code ?> HTML content ... PHP C:\Users\SCRAT\Dropbox\Belk\UCY Teaching\EPL344
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved