Читать книгу Английский для программистов. Как общаться в международных IT-командах - - Страница 12

Introduction to JavaScript for Web Development (Введение в JavaScript для веб-разработки)

Оглавление

Сегодня Ирина и Алексей продолжают изучать основы веб-разработки, и теперь они познакомятся с языком программирования, который делает веб-страницы интерактивными – JavaScript. Ирина объясняет Алексею, что с помощью JavaScript можно добавить функциональность на сайт, например, заставить кнопки реагировать на нажатие или изменить текст на странице. Алексей решает узнать, как работает этот язык и как его можно применить для создания динамичных элементов.


Диалог на встрече:


Irina:

«Hi, Alexey! Now that you’ve learned HTML and CSS, it’s time to add some interactivity to your webpage. We’re going to use JavaScript.»


Alexey:

«Great! I know JavaScript is used for making webpages interactive. But how does it work exactly?»


Irina:

«JavaScript is a programming language that allows you to create dynamic content. For example, you can make a button change its text when clicked, or display a message when the user interacts with the page.»


Alexey:

«Ah, so with JavaScript, we can make the webpage react to what the user does?»


Irina:

«Exactly! JavaScript is used to create events, like a button click, a mouseover, or even when a user types something into a form. You can write functions to handle these actions.»


Alexey:

«Got it! And can we also change the appearance of the page with JavaScript?»


Irina:

«Yes! You can use JavaScript to modify the DOM, which is a representation of the HTML structure of the page. You can change the text, the colors, or even add or remove elements dynamically.»


Alexey:

«So, JavaScript is like the ’brain’ of the webpage, right?»


Irina:

«Exactly! It controls how the webpage behaves. If you want to create a dynamic webpage that reacts to users in real-time, JavaScript is the way to go.»


Alexey:

«Sounds awesome! But what if I need to handle more complex tasks, like storing data or interacting with a database?»


Irina:

«That’s where the backend comes in. For backend development, you can use languages like Node. js or Python. But you can still use JavaScript for backend tasks with Node. js.»


Alexey:

«That’s interesting! So JavaScript can be used for both frontend and backend development?»


Irina:

«Yes! JavaScript is very versatile. You can use it on the client side for frontend tasks, and on the server side with Node. js for backend tasks.»

Полезные фразы и выражения

JavaScript – язык программирования для добавления интерактивности на веб-страницы.


Event – событие, которое происходит, когда пользователь взаимодействует с элементом на странице (например, клик по кнопке).


DOM (Document Object Model) – объектная модель документа, которая представляет структуру веб-страницы, с которой можно работать с помощью JavaScript.


Dynamic content – динамическое содержимое, которое меняется в зависимости от действий пользователя.


Function – функция, блок кода, который выполняет определенное действие.


Backend – серверная часть веб-приложения, где обрабатываются данные и запросы пользователей.


Frontend – клиентская часть веб-приложения, которая отвечает за отображение данных и взаимодействие с пользователем.


Node. js – среда выполнения JavaScript на сервере.

Упражнения

1. Vocabulary Match:


Соедините английские фразы с их русскими эквивалентами:


JavaScript


Event


DOM


Dynamic content


Function


a) Функция, которая выполняет задачу

b) Событие, происходящее при взаимодействии с элементом

c) Динамическое содержимое, изменяющееся в зависимости от действий пользователя

d) Язык программирования для создания интерактивных веб-страниц

e) Объектная модель документа


2. Fill in the blanks:


Заполните пропуски подходящими словами из списка:


«To create interactive elements on a webpage, we use ______.»


«When a user clicks a button, an ______ is triggered.»


«JavaScript allows us to modify the ______, which is the structure of the webpage.»


«A ______ is a block of code that performs a specific task.»


(Answers: JavaScript, event, DOM, function)


3. Translate the following sentences into English:


JavaScript используется для создания динамических элементов на веб-странице.


Когда пользователь нажимает на кнопку, срабатывает событие.


Функция в JavaScript выполняет определенное действие.


4. Conversation Practice:


Практикуйте диалог с партнером или самостоятельно, используя фразы из главы. Один из вас будет играть роль Ирины, а другой – Алексея. Пример:


Person 1 (Irina): «What is the main purpose of JavaScript in web development?»


Person 2 (Alexey): «It’s used to make the webpage interactive by responding to events like clicks and mouseovers.»


Самопроверка:


What is the main role of JavaScript in web development?


a) To create static content


b) To add interactivity and dynamic content to the webpage


c) To style the webpage


What is the DOM?


a) A programming language


b) A structure representing the webpage


c) A tool for styling the webpage


What can an event in JavaScript be triggered by?


a) A function


b) A user action, like a click


c) A server request

Ответы

1. Vocabulary Match:

1 – d

2 – b

3 – e

4 – c

5 – a


2. Fill in the blanks:


«To create interactive elements on a webpage, we use JavaScript.»


«When a user clicks a button, an event is triggered.»


«JavaScript allows us to modify the DOM, which is the structure of the webpage.»


«A function is a block of code that performs a specific task.»


3. Translate the sentences:


JavaScript is used to create dynamic elements on a webpage.


When a user clicks a button, an event is triggered.


A function in JavaScript performs a specific task.


4. Self-Check:


b) To add interactivity and dynamic content to the webpage


b) A structure representing the webpage


b) A user action, like a click

Английский для программистов. Как общаться в международных IT-командах

Подняться наверх