Server-side vs. Client-side Code

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Ruby files (.rb)

Server-side. These files are the core of a Sinatra application. The code within them runs on the server while handling incoming requests.

Gemfile

Server-side. This file is used by Bundler, the Ruby dependency management system, to install libraries need to run the program.

_______ is data that persists over time.

State

JavaScript Files (.js)

Client-side. The code within these files is evaluated by the JavaScript interpreter within a web browser (a client) to add behavior to a web page. But what about the HTML tags within a view template? Aren't those client-side code? This is a common point of confusion, as these files contain both client-side code (HTML tags) and server-side code (Ruby). However, since they must be processed by a program on the server before being sent to the client, the ERB templates we've used in this course are considered to be server-side code.

Client-side.

Client-side. The code within these files is interpreted by the web browser (a client) as instructions for how to display a web page.


Set pelajaran terkait

Development: Abnormal Development Practice Questions

View Set

Distracted Driving Costs and Consequences

View Set

section 14 unit 3: Environmental Hazards and Other Property Impacts

View Set

Realism and the Invention of Photography

View Set

Honan - CH. 2 Health education and health promotion

View Set