Introduction to World Wide Web (W3 internet) Development

W3 DEVELOPMENT

Introduction

HTML5 & CSS
JavaScript
HTML5 Tags
Previous slide
Next slide

The web technologies that are being taught in this course are designed to be portable through an enormous range of internet-enabled devices. In Example your smartphone,PC(laptop,desktop), tablet and so on. There are two variations of web building technologies. These two variants are Client sided & Server sided programming. Client Side Programming (CSP): This variation of programming is used to build web pages and applications that run on the client. An example of such is; A browser such as Mozilla FireFox, Microsoft Edge, Any Chromium Browser(Google Chrome included). Server Side Programming (SSP): This variant responds to requests from the client. Examples of such is searching the internet, checking your balance in your bank account via logging into the website, ordering anything from Amazon, bidding on eBay’s auctions and ordering tickets to a public event(conventions,concerts,etc).(Above are images of each example.) Another thing to take note of is Moore’s Law in which every year or two, the capacities of computers will have doubled inexpensively. Some Examples of where Moore’s Law applies to are; the amount of memory a Computer has for programs, the amount of secondary storage(disk storage) a Computer has to keep programs and data for longer periods of time & processing speed. Another example is growths in the field of communication. Learning Objectives Web Basics HTML5, CSS3, and Javascript Data Hierarchy

General Browser Basics

As the Internet is populated with many different browsers, including outdated, less capable versions, it makes it difficult for developers to create any universal solutions. As stated earlier about how it is difficult for developers to create any universal solutions, this too applies to support for HTML5,CSS3, and Javascript features for browsers. Another key factor is to make sure you have proper syntax in all 3 languages covered for your web documents. Please View the image above to see some links that will help you maintain proper syntax.

Internet Basics

Company Description
Company Description 2
Company Description 3
Web Service Source
Web Service Source
Three-Tier Architecture
Client receiving a response from the web server.
.
Client receiving a response from the web server
Cite: Deitel, Paul J. Internet and world wide web : how to program / Paul Deitel, Harvey Deitel, Abbey Deitel. -- 5th ed..
Previous slide
Next slide

Learning objectives:

  • Packet Switching
  • TCP/IP Protocol
  • Bandwidth,WorldWideWeb & HTTP introduction 
  • Hyperlink,URL|HTTP(S), Cache
  • Multi-tier Application (P66,P67)
  • WEB2

        Packet Switching allows multiple users to send & receive information simultaneously over the same network. This technique sends the information in small bundles called packets. Some details about packets are as of follows: Address(Destination),Error-Control, Sequencing.

      TCP Protocol is a set of rules that ensures messages are properly intact when sent properly from sender to receiver. IP Protocol was a set of rules that created a network of networks. In other words, IP Protocol allowed different networks to communicate to each other.  One fact about IP is that each computer has its own unique IP address. The current standard is IPv4 but that will run out of addresses eventually. The new standard that is being deployed is IPv6 which has better security and has more addresses to utilize.

        Bandwidth is the data transfer capacity in a given path. The World Wide Web or WWW allows users to execute web applications & locate + view multimedia documents. Tim Berners-Lee, creator of HTML, wrote communication protocols for the WWW, his information system. One of these protocols are known as Hyper Text Transfer Protocol or HTTP.(S = Secure)

        In both HTTP and HTTPS, you will see something called a URL(Uniform Resource Locator) this URL is the unique location(address) of a web page. Most websites dealing with private information use HTTPS. HTTPS is a mix of HTTP, TLS(Transport Layer Security) and SSL(Secure Sockets Layer). HTTPS is the standard for transferring encrypted data on the web. Hyper Links are basically references that you can click that will link you to a web page,e-mail, or file via its URL. Also a key thing to note about browsers is that they send a request to the web server that you posted the URL into the address bar.(Image 1) Once the web server gets the request it will send you a copy of the web page(document) to view.(Image 2). In the case of browsers there is something called cache, this would refer to saving on disk recent web pages to load them up much faster.

     A good sum of web applications are multi-tier applications. These applications divide functionality into tiers. (Image 3 shows a 3 tier web application structure). The tiers can be separated as of follows: Bottom or the data tier maintains the application’s information. The middle or logic tier which implements 3(business[enforces business rules],control[ processes client requests and retrieves data from database],presentation[ processes data from the bottom tier and presents the contents to the client]) different types of logic to control interactions between the clients and application data. The final tier is called the client tier/top tier in which it is the application’s user interface.

       The last topic being covered in internet basics is Web2. Web2 is a name for a trend in 2003 where there was a noticeable shift in how both businesses and people were using the web as well as development of web applications. Some of these shifts would include the use of web services in their web applications such as the services in images 4 and 5.  One such example of a web application would possibly be some social applications such as Facebook and some others in images 6-8.

1 - HTML5

Objectives

  • Learn to Create and Use HTML5 documents from creating the webpage & adding images to creating forms to get user input
  • Learn to Create a Form using input types,specify input elements, self validation and auto complete input elements 

HTML5 Web page Creation

Here is a quick video clip that will quickly cover Web page Creation. 

HTML5 Web page Adding Images

Popular image extensions are png,jpeg,gif. Another aspect of images are alt attributes. This would be used in the case the image failed to render due to file mislocation, or lack of said image file. It can also be used for those with visual impairments to describe the image. You can also use images as a hyperlink.

HTML5 Webpage Creating Lists

Previous slide
Next slide

There are 3 types of lists. The unordered list(ul), ordered list(ol), description(dl).

Both unordered and ordered use List items(li).

While description uses <dt> to list an item and <dd> to describe said item.

Of course there is a “4th variant” but that is called nested list where you put a list inside of another list.

Above is 2 images showing both the code and the result on a browser.

HTML5 Webpage Creating Tables

Table HTML Code
Table Example
Previous slide
Next slide

Tables are frequently used to organize data in columns and rows. One key attribute to note is the summary attribute which summarizes the table contents to those visually impaired. The caption attribute holds the table’s title. In the 2 slides above you can see a table and its code.

HTML5 Webpage Creating Forms

Form html code
Form example
Previous slide
Next slide

Forms are another element of HTML5. It can be broken down into certain attributes such as method,action,input, submit,reset, and text area. Above is a gallery covering some attributes such as method,action,input,submit and the text area.

For Method there is two attributes such as post or get. For Post it converts all form data into https post transaction. While For Get Method, it is normally the default method but will attach the values of the fields onto the action page’s url.

HTML5 Page Structure Elements

HTML5 has introduced other new elements such as page structure elements like Header(can contain both text and graphics),time(both date + time), nav(navigation through a webpage), figure + figcaption[Caption for a figure] + ( A figure could be an image,chart, table that can be moved to another page or to the side of the page it was initially on.) and article.

2 - CSS or Cascading Style Sheets

CSS or Cascading Style Sheets

CSS allows the control of a website’s appearance. They change the look and feel of a web page by giving a style to fonts, font-sizes, size, color, element backgrounds, and many others.

They are three different methods of adding a style sheet on your website and into your web page.

1-Inline styles

 individual element’s format using the HTML5 attribute style.

Inline styles override any other styles applied to the page.

2-Embedded style sheets

which enables you to embed a CSS3 document in an HTML5 document’s head section.

3- Linking External Style Sheets – Style sheets are a convenient way to create a document with a consistent theme. (Deitel)

Animate CSS

Animate Css

CSS allows the control of a website’s appearance.

Animate.css is a library of ready-to-use, cross-browser animations for use in your web projects. Great for emphasis, home pages, sliders, and attention-guiding hints.

3 - JavaScript

Objectives

  • Learn to Create and Use Javascript documents
  • Develop the use of algorithms 
  •  utilize if|else|while statements
  • Functions & Arrays

Before you attempt to run Javascript on your browser. Please check if you need to change some browser security settings.

  1. IE9 Prevents Javascripts from running by default
  2. Firefox,Chrome,Opera,Safari, and the android browsers have it running by default.

Creating your 1st Javascript Document

Milestones to achieve

  • Writing simple programs
  • using input & output
  • using math operators, and which one has priority
  • using relational and equality operators to compare data items.
Starting from writing a simple program like displaying a simple line of text. Please look at the video clip above(Item 1). Fun fact, most browsers have a java script interpreter, this allows them to read java script commands. As this would be a continuation from the HTML aspect of writing a document, just like java with every statement you make you should end it with a semi colon. It is also case sensitive. We will 1st start off with an output method called write(). Another thing you should note is escape sequences(will cause the mouse cursor to move) and comments(the developer’s notes on the document they have written). See the 1st image(Item 2) on this section. Once you’ve mastered the use of comments, sequences and outputs. Please look & try to recreate the video clip above as practice as the web page would then be considered dynamic(Item 3).
Moving onto arithmetic/math operators.See the 2nd image on this section(Item 4)
 Priority starts with multiplication, division and remainder as top priority. If there is multiple operations involving them, priority is from left to right. The next on priority is addition and subtraction with the same rule applying for multiple operations.
The final topic is using R&E operators. Starting off, both equality operators have lower priority than those of relational operators, they also follow the same rule as arithmetic operators. See Item 5 for the list of R&E operators.

Problem Solving & Developing algorithms through Top-Down Approach

Milestones to achieve

  • Understand what are algorithms  & pseudocode
  • Use Flowcharts
  • Understand top down approach

What is algorithms? They are procedures to solve a problem in terms of what actions must be done and in which order. What is pseudocode? It is an informal language that helps you develop algorithms. It isn’t exactly computer language but it helps you get into the mindset for it.

The next topic to discuss is the use of flowcharts which will then proceed into control statements. A flowchart is a graphical representation of an algorithm or a part of one. Some items in a flow chart can be represented by shapes while the arrows(flow lines)connecting them will indicate where the next action will occur. Another thing to note is that in a flow chart:

  • If it represents a full algorithm -> ovals represent the beginning and end of the algorithm.
  • If it represents a part of the  algorithm -> instead of the ovals you will have small circles called connector symbols.
  • The last symbol that you should be aware of is the diamond symbol which indicates that a decision is to be made there.

Control statements can be split into 3 types of execution: Sequence(order in which they appear)-Selection(if,else,switch)-Repetition(while,counter,sentinel). In this course we will focus more on Selection and Repetition variants of control statements.

Selection statements can be split into 3 categories.

  • If -> works if condition is true or skips the action if false
  • IF Else  -> similiar to if but instead of skipping the action it runs an alternative action.
  • Switch Case -> it can perform many more actions depending on the value of an expression(condition).

Repetition statements can be split into 3 categories.

  1. While -> it will keep repeating until the condition is false.
  2. Counter-> it has predetermined number of times it will repeat.
  3. Sentinel -> it is called indefinite repetition due to the fact that it will keep repeating until it hits the unknown end marked by the sentinel value.

Moving onto the last topic…a technique known as top-down approach. It starts off with the top being pseudo code that will tell you the purpose of the script then break it down into smaller pieces this time being actions and their order, with the 2nd break down being the variables needed.

 

Utilization of IF|Else & While statements

Milestones to achieve

  • Utilize for and do while to repeat statements
  • Utilize Switch
  • Utilize Break and Continue

Counter-Controlled repetition needs 

  1. A control variable
  2. initial value for variable
  3. Increment/Decrement to modify value of variable
  4. The final value condition to end the repetition

For Repetition uses everything a counter-control repetition needs. The header of a for loop has 3 expressions: initialization,condition to break the loop and increment/decrement expression.

Switch Case Repetition

This repetition type tests a variable or expression separately for each value and gives it a separate action. It also has a break statement for each action block and a default case. For the default case, it is a series of statements that will execute if no value fills the variable/expression. 

 

Breaks & Continue statements. These two are used to exit the loop(break) and to keep going but skip the condition that is met(continue).

The final repetition being covered is Do-While.This runs the statements/code at least once before testing if the condition is met. If the condition is met, it will stop the infinite repetition.(See Item 3 on this section)

Functions & Arrays

Previous slide
Next slide

Milestones to achieve

  • Utilize functions to build programs
  • Build and pass information to Functions 
  • Build arrays & pass arrays to Functions 

Functions are blocks of reusable code that is used to perform a single action. Functions only run when they are called. Use Return to send the value from the function to the one that called it. There are several reasons why you should use functions in your programs; Divide and Conquer(makes program development more manageable), software re-usability, and the chance to avoid repeating code in a program. 

An example of such is in the 1st image where it shows the code on the right and the result on the left.

Another interesting detail about functions is that there is another brand of functions that can call(run) themselves directly or indirectly through another function. These functions are named recursive functions. An example of such can be seen above(Image 2).

Iteration v.s. Recursion

  • Iteration utilizes repetition through a statement while Recursion does so by doing repeated function calls.
  • For Termination, Iteration stops when the loop continuation condition fails while Recursion stops when the base case is recognized.

Arrays are Data structures consisting of items of the same type. In java script they are dynamic entities that can change their size after creation. Each data item in the array is called an element. Arrays always start from 0. Moving onto parameters. We can pass it by value or reference. If done by value, a copy of the values are made and is sent to the function, in the case of java script the values can be numbers,boolean, or string.

If we were to pass by reference, it would mean that the caller’s data is allowed access to the function that was called and allowed to modify its contents. The trade off for this is that it eliminates overhead at the cost of weakened security. As Javascript arrays are objects, it too is passed by reference. To pass the array as an argument you would need to use the array name without brackets.

However you can pass single array elements that are numeric and boolean as pass by value.

Objects

Milestones to achieve

  • Learn object based concepts
  • Learn about Events & handlers

Object based Concepts

The 1st thing to cover about some object based terminology is that for this course we will be covering terms related to Math object, String, Date, Boolean,Number, and Document.

Starting from Math object. It has a variety of methods that will allow you to perform calculations. Some examples are from images 1 & 2 above this section. To use methods from math.methodname(parameter).

Next is the String object. A string is a series of characters treated as a single unit. String literals/constants are written with double or single quotation marks. Combining strings is called concatenation. For a list of method for the string object please refer to image 3,4,5.

In String object there are multiple types of methods related to certain subjects. The 1st group covered are methods related to character processing. These methods are charAt,charCodeAt, fromCharCode, toLowerCase, toUpperCase. Method charAt returns the character at the position you have specified, however do take note that strings start at 0 and if the index number is outside the string’s boundary you will get an empty value. Method charCodeAt returns the unicode value at the index number and will return NaN if outside the boundary. Method fromCharCode will return a string created from unicode values. ToLowerCase&UpperCase will lowercase/uppercase the string. Please refer to image 6 to see how each method described will result.

The 2nd group of methods are related to searching. These methods are indexOf & lastindexOf. Method indexOf finds the location of the first occurrence of its argument(parameter) in the string used to call the method. If there is no value it returns -1, else you will get the 1st index number for the substring. Method lastindexOf is the same except it searches for the last occurrence.

The 3rd group of methods in the string object are split  & substring. Split breaks the string into tokens, the argument parameter is the delimiter string and it returns an array of strings containing the tokens. Substring on the other hand returns a substring from the initial index up to but not including the end. If the end of the substring is longer than the original string you will only get up to the end of the original string. Also a delimiter is a string that determines the end of each token in the original string.

Moving onto Date object now. This object provides methods related to date and time. Most of these methods have a UTC application and a local time zone variation. Using empty parentheses will indicate to the constructor to use no arguments. See image 7-10 for the list of data object methods. There is only two methods that will be covered for this object. These methods are Parse & UTC. Parse receives as its argument a string representing the date & time and returns in milliseconds between midnight Jan 1 1970 and the specific date + time. UTC is also in the same position as Parse. However the arguments need a required year, month,date and for optional parameters hours,minutes, seconds & milliseconds. if no argument is supplied everything else is supplied with a 0 in its place.

The object & numeric objects are object wrappers for true/false and number values. See image 11 and 12 for methods & properties.The final object being covered is document. This is already provided to you by the browser and allows the document to be manipulated by javascript.

Javascript events allows the scripts to respond to user interactions and modify the document accordingly. Events and event handling makes applications more dynamic and interactive. An event handler is a function that responds to an event. To register an event you would have to assign it to an event on a Document Object Model Node. Another option is to use method addEventListener on a DOM Node to register multiple event handlers for an event. To Remove it use remove EventListener with the same arguments as addEventListener. Another thing to take note is that if a script in the header tag attempts to get a DOM node for an html element, get elementbyid will return null due to the fact the body has yet to load in. Moving onto events such as MouseMove,over,out  and event object.

The mousemove event starts when the user moves the mouse over the web document. When you move your mouse over an element, it starts the mouse over/hover element. When it leaves the element the mouseout event begins. See the 13th image for what a mouse out result would look like. See the 14th & 15th images to view a list of events.

Conclusion

Thank you for participating in this introduction to Web Development, as it is just an introduction course it wouldn’t cover everything in Web Development. However if you had some fun with this course… I would recommend you to read the book below and practice more.

Internet & Word Wide Web, How to Program by Deitel

photo_2018-01-17_18-50-01-Copy-oqsk82k5ohqquef5gqmm662kxkn89bxs4eidydures

By Justin Choi Graduate From New York College of Technology

Lightbulb logo
Lecturus

Lecturus is a platform that offers training to individuals interested in developing or enhancing their computer skills, as well as a career change or advancement.

Get In Touch

147 Prince St, Brooklyn, NY 11201

Lightbulb logo
Lecturus

Lecturus is a platform that offers training to individuals interested in developing or enhancing their computer skills, as well as a career change or advancement.

Get In Touch

147 Prince St, Brooklyn, NY 11201

Scroll to Top