Submodule 1.1: Popular tools

Site: ΕΛ/ΛΑΚ Moodle
Course: WEB II - Advanced design course
Book: Submodule 1.1: Popular tools
Printed by: Guest user
Date: Thursday, 21 November 2024, 10:09 PM

Description

  • Browser
  • Code editor
  • Terminal
  • Node.js - NPM

The Browser and the Editor

A Web Browser is a software program that you use to access the internet and view web pages on your computer. This program translates the code that receives from the web server to text, images, audio video, links etc.

A source Code Editor is a text editor program designed specifically for editing source code of computer programs by programmers.

In these courses, as programmers, we will use the Visual Studio Code code editor. If you want to learn more about this editor click here.

Your terminal

In simple words, Terminal is a software which takes the command from your keyboard and passes it to the Operating System of your computer.  It's also called Command Line Interface - CLI or Windows PowerShell.

In the following image, you can see the ways you can enable Terminal, either from the Menu orfrom the Taskbar of your computer.

Enabling terminal

After enabling the Terminal a new window appears on your screen.

Terminal View

The basic commands of Terminal

  • Write help and press Enter to see a lot of things you could do!
  • Write clear and press Enter to start again!
  • Write pwd and press Enter to see the name of the working directory. [/home/ellak]
  • Write ls and press Enter to list all files and directories in the working directory.
  • Suppose that we want to move to the Desktop directory. Write cd De and press the Alt tab. You will see that the Terminal auto-completes the expression. Press Enter to move into the Desktop directory.
  • Write again cd and drag a folder from the Desktop and drop it into the Terminal to see what will happen after pressing Enter. [This command will open the folder!]
  • Write cd.. and press Enter to move upwards in the hierarchy of the directories.
  • Write exit and press Enter to close the Terminal window.

If you want to learn more about these commands click here

Node.js - NPM

Node.js is an open-source, cross-platform JavaScript environment that executes JavaScript code server-side.

Historically, JavaScript was used primarily for client-side scripting. Node.js lets developers use JavaScript for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.

NPM is the pre-installed Node package manager for the Node.js server platform. It installs Node.js programs from the npm registry, organizing the installation and management of third-party Node.js programs. 

Why do we need Node and npm;

These environments are already installed on your computer. To verify it, open your Terminal and write node -v or npm -v. The versions of node or npm package will appear on your screen as results of these commands.
We will use npm to install different libraries (e.g Bootstrap), to initiate local servers to watch our code, to create files etc.

We don't need deep comprehension of these ecosystems, but if you want to learn more follow the links.

Exercise

  1. What version of node and npm does your computer have?

Solution:

node version: v8.11.1
npm version: 5.6.0