javascript - getting started | devcom isitcom

41
Getting Started <Hmidi Hamdi>

Upload: hamdi-hmidi

Post on 11-Apr-2017

460 views

Category:

Internet


0 download

TRANSCRIPT

Page 1: Javascript - Getting started | DevCom ISITCom

Getting Started

<Hmidi Hamdi>

Page 2: Javascript - Getting started | DevCom ISITCom

Agenda

- Basic Notations- Why Javascript - Git basics - Modern JavaScript World

Page 3: Javascript - Getting started | DevCom ISITCom

Basic Notations

Page 4: Javascript - Getting started | DevCom ISITCom

What is Internet ?

The Internet is essentially a global network of computing resources. You can think of the Internet as a physical collection of routers and circuits as a set of shared resources.

Page 5: Javascript - Getting started | DevCom ISITCom

Internet Based-Services● Email − A fast, easy, and inexpensive way to communicate with other Internet

users around the world.

● Telnet − Allows a user to log into a remote computer as though it were a local

system.

● FTP − Allows a user to transfer virtually every kind of file that can be stored on a

computer from one Internet-connected computer to another.

● UseNet news − A distributed bulletin board that offers a combination news and

discussion service on thousands of topics.

● World Wide Web (WWW) − A hypertext interface to Internet information

resources.

Page 6: Javascript - Getting started | DevCom ISITCom

WWW (World Wide Web)

A technical definition of the World Wide Web is − All the resources and users on the Internet that are using the Hypertext Transfer Protocol (HTTP).

Page 7: Javascript - Getting started | DevCom ISITCom

HTTPHTTP stands for Hypertext Transfer Protocol. This is the protocol

being used to transfer hypertext documents that makes the World

Wide Web possible.

A standard web address such as Yahoo.com is called a URL and here

the prefix http indicates its protocol.

Page 8: Javascript - Getting started | DevCom ISITCom

URLURL stands for Uniform Resource Locator, and is

used to specify addresses on the World Wide Web.

A URL is the fundamental network identification for

any resource connected to the web (e.g., hypertext

pages, images, and sound files).

Page 9: Javascript - Getting started | DevCom ISITCom

What is Website ? It is a collection of various pages written in HTML

markup language. Similarly, there are millions of

websites available on the web.

Page 10: Javascript - Getting started | DevCom ISITCom

What is Web Server ? Every Website sits on a computer known as a Web server. This

server is always connected to the internet. Every Web server that is

connected to the Internet is given a unique address made up of a

series of four numbers between 0 and 256 separated by periods. For

example, 68.178.157.132 or 68.122.35.127.

Page 11: Javascript - Getting started | DevCom ISITCom

What is Web Browser ? Web Browsers are software installed on

your PC. To access the Web you need a

web browsers, such as Netscape

Navigator, Microsoft Internet Explorer or

Mozilla Firefox.

Page 12: Javascript - Getting started | DevCom ISITCom

What is SMTP Server ? SMTP stands for Simple Mail Transfer Protocol

Server. This server takes care of delivering emails

from one server to another server. When you send

an email to an email address, it is delivered to its

recipient by a SMTP Server.

Page 13: Javascript - Getting started | DevCom ISITCom

What is ISP ? ISP stands for Internet Service Provider.

They are the companies who provide you

service in terms of internet connection to

connect to the internet.

Page 14: Javascript - Getting started | DevCom ISITCom

What is HTML ? HTML stands for Hyper Text Markup Language. This is the language

in which we write web pages for any Website. Even the page you are

reading right now is written in HTML.

This is a subset of Standard Generalized Mark-Up Language (SGML)

for electronic publishing, the specific standard used for the World

Wide Web.

Page 15: Javascript - Getting started | DevCom ISITCom

What is DNS ? DNS stands for Domain Name System. When someone types in your

domain name, www.example.com, your browser will ask the Domain

Name System to find the IP that hosts your site. When you register

your domain name, your IP address should be put in a DNS along

with your domain name. Without doing it your domain name will not

be functioning properly.

Page 16: Javascript - Getting started | DevCom ISITCom

What is W3C ? W3C stands for World Wide Web Consortium which is an

international consortium of companies involved with the Internet and

the Web.

The W3C was founded in 1994 by Tim Berners-Lee, the original

architect of the World Wide Web. The organization's purpose is to

develop open standards so that the Web evolves in a single direction

rather than being splintered among competing factions. The W3C is

the chief standards body for HTTP and HTML.

Page 17: Javascript - Getting started | DevCom ISITCom

Web Devloper and Web Designer A Web Designer

• Designs the look and feel of a website (creative side of

website)

• Decides the layout, fonts, color, images and overall

branding

• Creates the visual mock-up of the website

• Rarely does the development of a website!

• A Right-brained (Creative) Person

A Web Developer

• Brings the website mock-up to life on the Internet

(development side of website)

• Develops the website and hosts on a web server

• Has Web Development Skills: HTML, CSS, JavaScript,

PHP, Perl, Python, Java, Ruby

• A Left-brained (Logical) Person

Page 18: Javascript - Getting started | DevCom ISITCom

FrontEnd and BackEndFront End Web Development

• Defined components on the page with HTML

• Make them look pleasing with CSS

• Enable interactivity with JavaScript

• Enhance productivity with use of frameworks

Back End Web Development

• Create the page components and content dynamically on

the web server

• Send the HTML + CSS + JavaScript to web browser

(used by a human user)

• Generate pages by programming in Java, JavaScript,

PHP, Perl, Python, Ruby

• Aim to achieve fast response times to end users

Page 19: Javascript - Getting started | DevCom ISITCom

Why Javascript

Page 20: Javascript - Getting started | DevCom ISITCom
Page 21: Javascript - Getting started | DevCom ISITCom
Page 22: Javascript - Getting started | DevCom ISITCom

Why JavaScript

- It's pretty easy to learn. Trust me!- Libraries! Javascript has libraries for everything.- Speed: Javascript is Really fast. - Javascript can also be used to provide offline functionality.- Ajax: Every web developer knows and loves Ajax. No point to be made

on this.

Page 23: Javascript - Getting started | DevCom ISITCom

Git & Github

Page 24: Javascript - Getting started | DevCom ISITCom

Version Controle System !

An Application that allows you to record changes to your codebase in a structured and controlled fashion.

Page 25: Javascript - Getting started | DevCom ISITCom

why do i need that ?

- Undo errors/ roll back to earlier versions of code

- Share Codebases- Deploy Changes

Page 26: Javascript - Getting started | DevCom ISITCom

Popular tools

- SVN - Git

Page 27: Javascript - Getting started | DevCom ISITCom

who it works !

Page 28: Javascript - Getting started | DevCom ISITCom

Some git commands !- $ git init : create a git repository from existing code

source.- $ git clone [url] : get a copy from a project.- $ git add [files/.] : add files to staging area.- $ git commit -[a/m] “text commit” : commit changes to git

local repo- $ git push origin master : push to a branch - $ git pull : pull a repo - $ git branch branchName : create a branch - $ git checkout branchName : switch to a branch- $ git merge branchName : merge branchName repo to

current branch

Page 29: Javascript - Getting started | DevCom ISITCom

What is github !

- a git repo hosting service, while git is a command line tool.

- it provides access to collaboration features- By Default, all projects are public and free, if

you want a privet repo, then you pay- it’s becaming the Facebook’s for devlopers.

Page 30: Javascript - Getting started | DevCom ISITCom

Modern Javascript World

Page 31: Javascript - Getting started | DevCom ISITCom

JavaScript- Script Language

- Interpreted by Browser

- Orientée Objet

- DOM manipulation

- Dynamic UI

- Used in Servers (NodeJS)

Page 32: Javascript - Getting started | DevCom ISITCom

What JavaScript can do with DOM?

- Change an HTML Element

- Change an attribute of an HTML Element

- Change the CSS style of an HTML Element

- Remove an existing HTML element or its attributes

- Add new a HTML Element or a new attribute to an Element

- React to an event associated with an HTML Element

- Create a new event listener and associate with an HTML Element

Page 33: Javascript - Getting started | DevCom ISITCom

JavaScript DataTypesvar length = 16; // Number

var lastName = "Johnson"; // String

var cars = ["Saab", "Volvo", "BMW"]; // Array

var x = {firstName:"John", lastName:"Doe"}; // Object

Page 34: Javascript - Getting started | DevCom ISITCom

JavaScript functionsfunction toCelsius(fahrenheit) {

return (5/9) * (fahrenheit-32);

}

Page 35: Javascript - Getting started | DevCom ISITCom

JavaScript Objects

Page 36: Javascript - Getting started | DevCom ISITCom

JavaScript Objects

var car = {

type:"Fiat",

model:"500",

color:"white"

};

Page 37: Javascript - Getting started | DevCom ISITCom

JavaScript Objects

function Car(type,model,color){

this.type = type;

this.model = model;

this.color = color;

};

var corsa = new Car(‘Opel’,’Corsa’,’Blue’);

console.log(corsa.type);

Page 38: Javascript - Getting started | DevCom ISITCom

JavaScript DOM

The HTML DOM is a standard for how to get, change, add, or delete HTML elements.

Page 39: Javascript - Getting started | DevCom ISITCom

Let’s Build our TodoApp

Page 40: Javascript - Getting started | DevCom ISITCom

For more Informations ...

http://www.w3schools.com/js/

Page 41: Javascript - Getting started | DevCom ISITCom

Thank You !!