Course Material
Course Material
Dnaaya Team
Coding Requirement
Tools
Dnaaya Team
Coding Requirement Tools
VS Code: https://code.visualstudio.com/
WebStorm: https://www.jetbrains.com/webstorm/download/
1.Text Editor
2.Github Brackets: http://brackets.io/
Sublime: https://www.sublimetext.com/
Coding Requirement Tools
Git: https://git-scm.com/downloads
1.Text Editor
GitHub: https://github.com/
2.Github
GitHub Desktop: https://desktop.github.com/
What Is Git, GitHub and
GitHub Desktop
Dnaaya Team
What is Git, GitHub and GitHub
Desktop
GitHub
Git GitHub Desktop
• Version control of System • Repository hosting service for Git is a tool that allows you to interact
with GitHub from the desktop.
• Revert files to an earlier state • social platform to share With this new application, you can
knowledge and work.
• Compare changes over time work easier without having to
• provides access control and depend on your browser.
• See who modified what? several collaboration features
• Control modifications using • Manage Team Task and Projects
presmissions • provides a web-based graphical
interface
Web Design
vs
Web Development
Dnaaya Team
Web Designer VS Web Developer
Dnaaya Team
The Syntax
1.The DOCTYPE
2.Elements
3.Attributes
<!DOCTYPE html>
4.Comments
The Syntax
Dnaaya Team
Html Syntax
• two-sided tag
• one-sided tag: content appears in
webpage. It could be
empty
Starting Tag Closing Tag
</tag>
• two-sided tag Examples:
• one-sided tag: Breaking line tag: <br/>
Dnaaya Team
Structure of the Web Page
<html>
Everything about the
....
web page should be
enclosed here
</html>
Structure of the Web Page
<html>
<head>
• Each web page has a head part <title>web diploma</title>
</head>
</html>
Structure of the Web Page
<html>
The title of the web <head>
page should be put <title>web diploma</title>
here </head>
</html>
Structure of the Web Page
Dnaaya Team
HTML Common Tags
• Paragraph Tag
• List Tag <p>
• Hyperlink Tag Lorem ipsum dolor sit amet consectetur
adipisicing elit.
• Image Tag Explicabo est velbeatae,necessitatibus
vitae recusandae
• Table Tag unde aut itaque aliquam in officiis nu
quam deleniti iusto sed minima.
• Form Tag </p>
• Button Tag
HTML Common Tags
• Paragraph Tag
• List Tag <ul>
• Hyperlink Tag <li>Coffee</li>
• Image Tag <li>Tea</li>
<li>Milk</li>
• Table Tag <li>Orange</li>
• Form Tag </ul>
• Button Tag
HTML Common Tags
• Paragraph Tag
• List Tag
<a href="url">link text</a>
• Hyperlink Tag
• Image Tag <a href="https://www.dnaaya.com/">
Visit our Dnaaya Website
• Table Tag </a>
• Form Tag
• Button Tag
HTML Common Tags
• List Tag
• Hyperlink Tag <img src=“http://dnaaya.com/assets/img/logo.png” />
• Image Tag
<img src=“Images/Dnaayalogo.png” alt =“Dnaaya Logo”/>
• Table Tag
• Form Tag Local
• Button Tag Source
HTML Common Tags
• Paragraph Tag
<table style="width:100%“ border=“2" >
<tr>
<th>First name</th>
• List Tag <th>Last name</th>
<th>Age</th>
• Hyperlink Tag </tr>
<tr>
• Image Tag <td>Jill</td>
<td>Smith</td>
• Paragraph Tag
• List Tag <form>
First name:
Dnaaya Team
Try To Make Page Like This
Good Luck
THANKS
Dnaaya Team
Revision #
HTML With CSS
Dnaaya Team
What Is CSS?
NO CSS
WITH CSS
Types Of CSS
Dnaaya Team
CSS Types
Result:
CSS Types
<head>
1. Inline Style <title> Acc Web Diploma </title>
2. Internal Start Style Tag <style>
Open CSS Selector h1 {
3. External color: red;
Close CSS Selector }
End Style Tag </style>
</head>
CSS
Value
Property
CSS Types
Dnaaya Team
CSS Selectors
.html Page
<tag id=“myID"> content </tag>
1. HTML Tags
2. IDs HTML Tag HTML attribute ID Name
(ID)
3. Class
.CSS Page
#myDiv { property: value }
.html Page
<tag class=“className"> content </tag>
1. HTML Tags
2. IDs HTML Tag HTML attribute Class Name
(Class)
3. Class
.CSS Page
.className { property: value }
5. Images
6. Buttons
Result
Concept Of Containing Elements
<div class="container-fluid">
<h1>My First Website</h1>
<img src="images/cover.jfif"/>
1. container <p>Lorem ipsum dolor sit amet consectetur adipisicing el
it. Est alias neque architecto illum.</p>
2. container-fluid </div>
3. Grid
5. Images
6. Buttons
Result
Bootstrap Grid System
1. container
2. container-fluid
3. Grid
<div class="container-fluid">
5. Images
<div class="row">
6. Buttons <div class="col-4"> .col-4 </div>
<div class="col-4"> .col-4 </div>
<div class="col-4"> .col-4 </div>
</div>
</div>
Bootstrap Images
1. container
2. container-fluid
3. Grid <div class="container-fluid">
5. Images <div class="row">
<div class="col-md-4">
6. Buttons <img src="images/bg.jpg" class="img-fluid"/>
</div>
<div class="col-md-4">
<img src="images/bg.jpg" class="img-thumbnail"/>
</div>
</div>
</div>
Bootstrap Buttons
<div class="container">
1. container <h1>Bootstrap Buttons</h1>
Sides: Size:
•t - for classes that set margin-top or padding-top 0 - for classes that eliminate
•b - for classes that set margin-bottom or padding- the margin or padding by setting it to 0
bottom 1 - (by default) for classes that set
•l - for classes that set margin-left or padding-left the margin or padding to $spacer * .25
•r - for classes that set margin-right or padding- 2 - (by default) for classes that set
right the margin or padding to $spacer * .5
•x - for classes that set both *-left and *-right 3 - (by default) for classes that set
•y - for classes that set both *-top and *-bottom the margin or padding to $spacer
•blank - for classes that set a margin 4 - (by default) for classes that set
or padding on all 4 sides of the element the margin or padding to $spacer * 1.5
5 - (by default) for classes that set
Property : the margin or padding to $spacer * 3
•m - for classes that
auto - for classes that set the margin to auto
set margin
•p - for classes that
set padding
Bootstrap
Task
Dnaaya Team
Revision JavaScript
#3
Dnaaya Team
What is JavaScript?
Frontend, Backend… Which End Do I Choose?
If you are interested in creating websites,
Frontend including user interfaces (UI) with interactive
elements on web pages, you may want to learn
more about “front-end” technologies like HTML
and CSS, and front-end JavaScript frameworks.
Backend Unfortunately, there are sooooo
many frameworks to choose from.
For Example:
Desktop
Desktop
Mobile
Frontend, Backend… Which End Do I Choose?
Frontend
Want to build a mobile application?
Use one of This frameworks to build ANDROID
Backend and IOS application
Desktop
Mobile
Hmmm
Which End Do You
Choose Now ?
I Think You Choose All
Dnaaya Team
Getting started
with JavaScript
Dnaaya Team
JavaScript Types
<div class="container-fluid">
1. Internal JS <h1 class="pb-5 ml-4">Hello world</h1>
2. External JS </div>
<script type="text/javascript">
alert('Hello');
</script>
</body>
</html>
JavaScript Types
<div class="container-fluid">
1. Internal JS <h1 class="pb-5 ml-4">Hello world</h1>
2. External JS </div>
<script src="javascript/script.js“
type="text/javascript">
</script>
</body>
Comments In JavaScript
// alert('Hello World');
Line Comment // console.log('Hello World')
/*
alert('Hello World');
Block Comment console.log('Hello World')
*/
Comments In JavaScript
// alert('Hello World');
// console.log('Hello World')
Line Comment
/*
alert('Hello World');
Block Comment console.log('Hello World')
*/
Print On Screen
Examples:
1. Console console.log("Hello, World!");
2. Alert
3. Promote
Logging Variable:
var x = 'hello';
console.log(x);
Print On Screen
Examples:
1. Console
alert("Hello World");
2. Alert
3. Promote
Confirm Message:
1. Console
2. Alert prompt( Message , Default Value);
3. Promote
Examples:
Dnaaya Team
JavaScript Variable Declaration
1. Declare Variables
How To Declare Variables
2. Variables Type
3. Data Types var <variable-name>;
4. Variables Mutation var <variable-name> = <value>;
& Coercion
5. Basic Operators Example:
6. Assignment &
Logical Operators var x = 4;
var y = 6;
7. Comparison Operators
var z = x + y
8. The typeof Operator
JavaScript Variables Types
1. Declare Variables
2. Variables Type var firstName = 'Sara';
3. Data Types var age = 27;
// Variable Coercion
4. Variables Mutation console.log('Coercion:', firstName + ' ' + age);
& Coercion console.log (firstName, age); //printing variables
5. Basic Operators // Variable Mutation
firstName = 'Mohammed';
6. Assignment & age = '25';
Logical Operators console.log ('Mutation:', firstName, age);
7. Comparison Operators
8. The typeof Operator
JavaScript Operators
* Given that y = 5
1. Declare Variables
2. Variables Type
3. Data Types
4. Variables Mutation
& Coercion
5. Basic Operators
6. Assignment &
Logical Operators
7. Comparison Operators
8. The typeof Operator
JavaScript Operators
Assignment: * Given that x = 10 and y = 5
1. Declare Variables
2. Variables Type
3. Data Types
4. Variables Mutation
& Coercion
5. Basic Operators
6. Assignment &
Logical Operators Logical: * x = 6 and y = 3
7. Comparison Operators
8. The typeof Operator
JavaScript Operators
* Given that x = 5
1. Declare Variables
2. Variables Type
3. Data Types
4. Variables Mutation
& Coercion
5. Basic Operators
6. Assignment &
Logical Operators
7. Comparison Operators
8. The typeof Operator
JavaScript Operators
1. Declare Variables
2. Variables Type typeof “Sara" // Returns string
typeof 3.14 // Returns number
3. Data Types
typeof NaN // Returns number
4. Variables Mutation typeof false // Returns boolean
& Coercion typeof [1, 2, 3, 4] // Returns object
typeof {name:’Sara', age:34} // Returns object
5. Basic Operators typeof new Date() // Returns object
6. Assignment & typeof function () {} // Returns function
Logical Operators typeof myCar // Returns undefined (if m
yCar is not declared)
7. Comparison Operators typeof null // Returns object
8. The typeof Operator
JavaScript IF Statement
How to Write If Statement:
if (condition) {
// block of code to be executed if the condition is true
} else {
// block of code to be executed if the condition is false
1. The If Statement }
userName('sara','soliman')
JavaScript Functions
Syntax #1:
Syntax #2:
Syntax :
Syntax :
Syntax :
Before After
console.log("Hello World"); for (var i = 0; i < 6 ; i++)
console.log("Hello World"); {
console.log("Hello World"); console.log("Hello World")
console.log("Hello World"); }
console.log("Hello World");
JavaScript Types of Loops
Syntax :
while (boolean condition)
{
loop statements...
}
Example:
Example:
}
JavaScript Types of Loops
Syntax :
do
{
statements.. Loop In Array Example:
}
var users = ["ssoliman", "abotaleb",
while (condition);
"osabry"];
1. While loop Example: var x = 0;
2. For loop var x = 0;
do {
console.log("User Name =", users[i]);
3. Do while loop do { x++
console.log("Hello World"); }
x++ while(x < users.length)
}
while(x < 6);
Breaks and Continue in Loops
Break Continue
The break statement breaks (stops) The continue statement terminates
the execution of a loop entirely. execution of the current iteration
in a loop.
var theValue = 4 var theValue = 3;
for (let i = 0; i < 6; i++) { for (let i = 0; i < 6; i++) {
if (i === theValue) { if (i === theValue) {
break; continue;
} }
console.log(i) console.log(i)
} }
//Result: 0 1 2 3 //Result: 0 1 2 4 5
Advanced
JavaScript
Sara Soliman
Software Developer
Everything is an object
…. IS An Object
THE OBJECT-ORIENTED PARADIGM
Parent Class
Prototypal Object
1. Classical Inheritance
(non-JS)
2. Prototypal
Inheritance
Object.create(prototype_object, propertiesObject)
Example:
var person = {
name: “Sara Soliman",
1. Function Constructor age: 27,
2. Prototyping printIntroduction: function () {
3. Creating Object console.log(`My name is ${this.name},
Iam ${this.age} Years Old`);}
};
var ahmedObj = Object.create(person, {
name: {value: 'Ahmed'},
age: {value: '25'}
})
Inheritance and the Prototype Chain
Implementing Inheritance
function greating(fname) {
1. Passing function as
argument return function(lName) {
2. Function Return Function console.log('WELCOME . . . ', fname, lName)
3. IIFES }
}
greating('Sara')('Soliman')
Function Factory
“This”
Keyword
Promises
Spread operator
&
Rest Parameters Arrays
Mapping
variable with (var, let, const)
ES6 ES5
let firstName = 'Sara'; let firstName = 'Sara';
let lastName = 'Soliman'; let lastName = 'Soliman';
const yearOfBirth = 1993; const yearOfBirth = 1993;
function calcAge(year) { function calcAge(year) {
return 2020 - year; return 2020 - year;
} }
// ES6 // ES5
console.log( console.log('This is ' + firstName +
' ' + lastName +
`This is ${firstName} ${lastName}.
He was born in ${yearOfBirth}. Today, '. He was born in ' + yearOfBirth + '
. Today, he is '
he is ${calcAge(yearOfBirth)} years o
ld.`); + calcAge(yearOfBirth) + ' years old.
');
Arrow Functions
ES6 ES5
greeting = (name) => { greeting = function(name) {
console.log('WELCOME . . . ', name); console.log('WELCOME . . . ', name);
} }
greeting('Sara’); greeting('Sara’);
ES6 ES5
// EXAMPLE #1: // EXAMPLE #1:
const [name, age] = ['Sara', 27]; var ssoliman = ['Sara', 27];
var name = ssoliman[0];
console.log(name);
var age = ssoliman[1];
console.log(age); console.log('name :', name)
// EXAMPLE #2:
const obj = {
firstName: 'Sara',
lastName: 'Soliman'
};
console.log(contacts.findIndex(contact =>
contact.name === 'Mohamed'));
console.log(contacts.find(contact =>
contact.name === ’Israa'));
Spread operator
ES6 ES5
function addFourAges (a, b, c, d) { function addFourAges (a, b, c, d) {
return a + b + c + d; return a + b + c + d;
} }
var sum1 = addFourAges(18, 30, 12, 21); var sum1 = addFourAges(18, 30, 12, 21);
console.log(sum1); console.log(sum1);
//ES6 //ES5
const sum3 = addFourAges(...ages); var ages = [18, 30, 12, 21];
console.log(sum3); var sum2 = addFourAges.apply(null, ages);
console.log(sum2);
Rest parameters
ES6 ES5
function isAdult(...years) { function isAdult() {
console.log('years es6', years) console.log(arguments);
years.forEach(cur => var argsArr =
console.log( (2020 - cur) >= 18)); Array.prototype.slice.call(arguments);
} console.log(argsArr);
isAdult(1993, 2015, 1992, 2019) argsArr.forEach(function(cur) {
console.log((2020 - cur) >= 18);
})
}
isAdult(1993, 2015, 1992, 2019)
Maps In JavaScript
console.log(convertString(stringArray))
Classes
ES6 ES5
class Person6 { var Person5 = function(name, yearOfBirth, job)
constructor (name, yearOfBirth, job) { {
this.name = name; this.name = name;
this.yearOfBirth = yearOfBirth;
this.yearOfBirth = yearOfBirth;
this.job = job;
} this.job = job;
calculateAge() { }
var age = new Date().getFullYear() Person5.prototype.calculateAge = function() {
- this.yearOfBirth;
var age =
console.log(age);
} new Date().getFullYear() - this.yearOfBirth;
} console.log(age);
const saraES6 = new Person6('Sara', 1993, 'softwar }
e developer');
var sara = new Person5('Sara', 1993, 'software
Person6.greeting();
developer');
saraES6.calculateAge();
sara.calculateAge();
Asynchronous JavaScript:
Promises, ASYNC/AWAIT
Sara Soliman
Software Developer
Basic example of async
Synchrouns Asynchrouns
Example 1:
first();
Basic example of async
Example 1:
function getEmployee() {
setTimeout(() => {
const employeeId = [29099, 87675, 54674, 2233];
console.log(employeeId);
setTimeout((id) => {
const employee = {
name: 'Sara Soliman',
1. Basic async job: 'Software Developer'
}
2. The old way Asynchrouns console.log(`ID: ${id}, Name:${employee.name}`);
Callbacks setTimeout(job => {
3. Callback Hell to Promises const employee2 = {
name: 'Ahmed Farag',
4. From Promises to job: 'Graphic Designer'
ASync/Await }
console.log(aemployee)
},1500, employee.jop)
}, 1500 , employeeId[2])
}, 1500);
getEmployee();
}
Basic example of async
Example 1:
function getEmployee() {
setTimeout(() => {
const employeeId = [29099, 87675, 54674, 2233];
console.log(employeeId);
setTimeout((id) => {
const employee = {
name: 'Sara Soliman',
1. Basic async job: 'Software Developer'
}
2. The old way Asynchrouns console.log(`ID: ${id}, Name:${employee.name}`);
Callbacks setTimeout(job => {
3. Callback Hell to Promises const employee2 = {
name: 'Ahmed Farag',
4. From Promises to job: 'Graphic Designer'
ASync/Await }
console.log(aemployee)
},1500, employee.jop)
}, 1500 , employeeId[2])
}, 1500);
getEmployee();
}
AngularJS - Tutorial
Sara Soliman
Software Developer
#1 Introduction & Install Requirements
• What is AngularJS:
AngularJS is a structural framework for dynamic web apps powered by Google. It lets you use HTML as your template
language and lets you extend HTML's syntax to express your application's components clearly and
succinctly. AngularJS's data binding and dependency injection eliminate much of the code you would otherwise have to
write.