2016年5月10日星期二

Introduction to Internet Technology (Tutorial 2)

Tutorial 2


(i). Definition - What does Transmission Control Protocol/Internet Protocol        (TCP/IP) mean?


TCP/IP (Transmission Control Protocol/Internet Protocol) is the basic communication language or protocol of the Internet. It can also be used as a communications protocol in a private network (either an intranet or an extranet). When you are set up with direct access to the Internet, your computer is provided with a copy of the TCP/IP program just as every other computer that you may send messages to or get information from also has a copy of TCP/IP.

TCP/IP is a two-layer program. The higher 
layer, Transmission Control Protocol, manages the assembling of a message or file into smaller packets that are transmitted over the Internet and received by a TCP layer that reassembles the packets into the original message. The lower layer, Internet Protocol, handles the address part of each packet so that it gets to the right destination. Each gateway computer on the network checks this address to see where to forward the message. Even though some packets from the same message are routed differently than others, they'll be reassembled at the destination.
TCP/IP uses the client/server model of communication in which a computer user (a client) requests and is provided a service (such as sending a Web page) by another computer (a server) in the network. TCP/IP communication is primarily point-to-point, meaning each communication is from one point (or host computer) in the network to another point or host computer. TCP/IP and the higher-level applications that use it are collectively said to be "stateless" because each client request is considered a new request unrelated to any previous one (unlike ordinary phone conversations that require a dedicated connection for the call duration). Being stateless frees network paths so that everyone can use them continuously. (Note that the TCP layer itself is not stateless as far as any one message is concerned. Its connection remains in place until all packets in a message have been received.)

Many Internet users are familiar with the even higher layer application protocols that use TCP/IP to get to the Internet. These include the World Wide Web's Hypertext Transfer Protocol (HTTP), the File Transfer Protocol (FTP), Telnet (Telnet) which lets you log on to remote computers, and the Simple Mail Transfer Protocol (SMTP). These and other protocols are often packaged together with TCP/IP as a "suite."
Personal computer users with an analog phone modem connection to the Internet usually get to the Internet through the Serial Line Internet Protocol (SLIP) or the Point-to-Point Protocol (PPP). These protocols encapsulate the IP packets so that they can be sent over the dial-up phone connection to an access provider's modem. 
Protocols related to TCP/IP include the User Datagram Protocol (UDP), which is used instead of TCP for special purposes. Other protocols are used by network host computers for exchanging router information. These include the Internet Control Message Protocol (ICMP), the Interior Gateway Protocol (IGP), the Exterior Gateway Protocol (EGP), and the Border Gateway Protocol (BGP).



(ii). Differentiate server side code and client side code

In web applications, there is the client and the server. The “client” is a web browser, like Internet ExplorerGoogle Chrome,Firefox, etc. The “server” is a web application server at a remote location that will process web requests and send pages to the client. Web applications can contain code that is processed on the client’s browser or on the web server. However, web applications have a disconnected architecture, which means that there is never a live, constant connection between the page displayed in the client’s browser and a web or database server. The majority of the processing will be done at the server and not on the client’s internet browser. When a database needs to be accessed on a server, the web application will post the page back to the web server and server-side code will process the request.
In order to fully understand the web application’s architecture, we must understand postback and the page life cycle, which I have discussed more extensively in previous articles.

Server-Side Code

There are several server-side technologies that can be used when developing web applications. The most popular is Microsoft’s ASP.NET. In ASP.NET, server-side code uses the .NET Framework and is written in languages like C# and VB.NET. Server-side processing is used to interact with permanent storage like databases or files. The server will also render pages to the client and process user input. Server-side processing happens when a page is first requested and when pages are posted back to the server. Examples of server-side processing are user validation, saving and retrieving data, and navigating to other pages.
The disadvantage of server-side processing is the page postback: it can introduce processing overhead that can decrease performance and force the user to wait for the page to be processed and recreated. Once the page is posted back to the server, the client must wait for the server to process the request and send the page back to the client.

Client-Side Code

The benefits of client-side processing in an ASP.NET web application are programming languages like C# and VB.NET along with the .NET Framework. Languages like C# and VB.NET sit on top of the .NET framework and have all the benefits of object oriented architectures like inheritance, implementing interfaces and polymorphism.
In contrast to server-side code, client-side scripts are embedded on the client’s web page and processed on the client’s internet browser. Client-side scripts are written in some type of scripting language like JavaScript and interact directly with the page’s HTML elements like text boxes, buttons, list-boxes and tables. HTML and CSS (cascading style sheets) are also used in the client. In order for client-side code to work, the client’s internet browser must support these languages.
There are many advantages to client-side scripting including faster response times, a more interactive application, and less overhead on the web server. Client-side code is ideal for when the page elements need to be changed without the need to contact the database. A good example would be to dynamically show and hide elements based on user inputs. One of the most common examples is input validation and Microsoft’s Visual Studio includes a set of client-side validation controls.
However, disadvantages of client-side scripting are that scripting languages require more time and effort, while the client’s browser must support that scripting language.


(iii). Differentiate THREE (3) network scopes.
The Internet connects millions of computer networks, from private, public, academic and business establishments, sharing information, resources and services. People all over the world use the Internet to access web pages, send emails, play online games, listen to audio files, watch videos and download data.
An intranet network of computers is used primarily by companies and other private organizations. It behaves just like the Internet but the information shared, the pages, communication and other intranet features are contained within the intranet's firewall, to prevent unauthorized access from external computer networks.
The extranet is basically an intranet that allows access to external computers or computer networks. The type of access given to external computers in an extranet may have varying levels. Extranets are often used by businesses to give access to its costumers, suppliers, partners and vendors.

Chapter 2 (Activity)

Write a post to discuss the THIRTEEN(13) different types of website.

1. Blog or Personal Website

WordPress started out as a simple blogging platform and quickly evolved into a powerful CMS. During the last 12 years, those blogging and personal website components didn’t disappear.
They have become more polished, sophisticated and mature. If you are going to create a blog or personal website, then you will find plenty of tools to manage and grow your WordPress quickly.

2. Business Website


WordPress is the easiest way to build a professional looking business website. It is so powerful that many big name brands are using WordPress to power their websites. It gives you easy tools to quickly launch a website and then extend it as your business grows.

3. eCommerce Website


WordPress is quickly becoming a go to solution for building an eCommerce websites. There are awesome plugins like WooCommerce, Easy Digital Downloads, and WPEcommerce which convert your WordPress website into fully functional eCommerce platform. You can accept payments, manage inventory, shipping, taxes, and users from the same roof.

4. Business Directory Website


Just like job boards, there is increasing demand of niche business directories on the web. There are some great WordPress business directory plugins which allow you to easily create a business directory.
You can even create web directory that is not limited to businesses alone.

5. Question & Answer Website


Want to create your own version of Yahoo Answers, Stack Exchange, or Quora? With WordPress you can easily create a question and answers site. Combine it with other tools, and you can build yourself a thriving online community of your own.

6. Portfolio Websites


Need a place to showcase your work? You can easily add a portfolio to your WordPress site with stunning image galleries, and beautiful sliders. WordPress can be used to provide a very sleek and polished user experience for your portfolio site making it easier for others to browse and learn about your work.

7. Online Communities Websites


WordPress can be used as an online forum using the lightweight bbPress forum. You can even add social features to a WordPress site with plugins like BuddyPress.

8. Coupon Website


Want to earn affiliate commissions from thousands of websites offering special discounts on their products and services? Use WordPress to create a coupon site. It allows you to easily add, manage, and expire coupons. Your users can vote and rate coupons, and it all fits right in your WordPress admin area.

9. Auction Websites


Want to run your own eBay like auctions website? With WordPress, you can create a fully functional auction website. Users can bid online, make payments, and you get to earn by simply providing a platform for your niche industry.

10. Multilingual Websites


You can install WordPress in many languages, but you can also create a multilingual website as well. See how easy it is to create multilingual websites using WordPress.

11. Knowledgebase / Wiki Websites


Want to add a documentation section with a knowledgebase or wiki like articles? WordPress comes with great plugins that quickly turn your website into an easy to browse knowledgebase wiki.

12. Podcasting Websites


WordPress and podcasting go hand in hand. Most popular podcasters on the web are using WordPress for their websites. See our step by step guide on how to start a podcast with WordPress.

13. Photography Websites


Are you a professional or amateur photographer? Want to share your family vacation photos? With WordPress and Envira Gallery, you can create astonishingly beautiful photography websites. You can add galleries, albums, titles, captions, lightbox popups, slideshows, and the bells and whistles.
There are also tons of photography templates available for WordPress.

Chapter 2 (Exercise)

Static vs. Dynamic Website

What are static and dynamic websites?





                        
There are many static websites on the Internet, you may not be able to tell immediately if it is a static or dynamic website, but the chances are, if the site looks basic and is for a smaller company, and simply delivers information without any bells and whistles, it could be a static website. Static websites can only really be updated by someone with a knowledge of website development. Static websites are the cheapest to develop and host, and many smaller companies still use these to get a web presence. Here at EDinteractive web development, we can advise or help to develop both static and dynamic websites.

Advantages of static websites

  • Quick to develop
  • Cheap to develop
  • Cheap to host

Disadvantages of static websites

  • Requires web development expertise to update site
  • Site not as useful for the user
  • Content can get stagnant

               

                        

Dynamic sites on the other hand can be more expensive to develop initially, but the advantages are numerous. At a basic level, a dynamic website can give the website owner the ability to simply update and add new content to the site. For example, news and events could be posted to the site through a simple browser interface. Dynamic features of a site are only limited by imagination. Some examples of dynamic website features could be: content management system, e-commerce system, bulletin / discussion boards, intranet or extranet facilities, ability for clients or users to upload documents, ability for administrators or users to create content or add information to a site (dynamic publishing).

Advantages of dynamic websites

  • Much more functional website
  • Much easier to update
  • New content brings people back to the site and helps in the search engines
  • Can work as a system to allow staff or users to collaborate

Disadvantages of dynamic websites

  • Slower / more expensive to develop
  • Hosting costs a little more

Tutorial 1

Tutorial 1

1. Write a post discussing the following : -

(i) Hypertext Transfer Protocol (Http) and Hypertext Transfer Protocol Secure (Https)
The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia information systems.HTTP is the foundation of data communication for the World Wide Web.
Hypertext is structured text that uses logical links (hyperlinks) between nodes containing text. HTTP is the protocol to exchange or transfer hypertext.
HTTP concepts include (as the Hypertext part of the name implies) the idea that files can contain references to other files whose selection will elicit additional transfer requests. Any Web server machine contains, in addition to the Web page files it can serve, an HTTP daemon, a program that is designed to wait for HTTP requests and handle them when they arrive. Your Web browser is an HTTP client, sending requests to server machines. When the browser user enters file requests by either "opening" a Web file (typing in a Uniform Resource Locator or URL) or clicking on a hypertext link, the browser builds an HTTP request and sends it to the Internet Protocol address (IP address) indicated by the URL. The HTTP daemon in the destination server machine receives the request and sends back the requested file or files associated with the request. (A Web page often consists of more than one file.)


The latest version of HTTP is HTTP 1.1.
The term HTTPS is an acronym for hypertext transfer protocol secure. The acronym precedes the URL in a website address. Few people are aware of its meaning. While HTTPS is almost an exact copy of the normal hypertext transfer protocol, this version of it is different because the “S” at the end identifies it as having a secure HTTP connection. A HTTPS connection is used frequently in businesses where sensitive information, such as social security numbers and credit card numbers, are being passed along at point of purchase sites or bill pay sites. The hypertext transfer protocol secure gives assurance that hackers are not able to intercept the message containing sensitive data as it heads to the server.
To understand the HTTPS protocol, it is important to understand that HTTPS is not a separate protocol from HTTP. It is simply a secure variation. Sending messages via an encrypted Secure Sockets Layer (SSL) or Transport Layer Security (TLS) connection gives users a reasonable amount of protection from eavesdroppers and intermediary attacks that can siphon important information or gain access to particular private servers. The HTTPS URL may specify a TCP port, but if it does not, most HTTPS connections use port 443 while regular HTTP use port 80. To prepare a server for HTTPS commands, the server must have a public key certificate issued for verification of the entity. Organizations may run their own version of certificate authority, to be doubly sure before sending HTTPS commands, especially with very sensitive information. It is then that HTTPS command is sent, so that there is no question as to who is receiving the information.
While HTTPS commands are a good idea for secure transfers, there are also certainly limits to what HTTPS can do. The level of protection that a HTTPS provides is dependent upon correctness of implementation by the web browser, the server software, and the cryptographic algorithms that are supported. HTTPS only provides protection for eavesdropping and man-in-the-middle attacks. When the information reaches the server or computer it is directed to, the information is then only as secure as that particular server or computer. If the implementation by the web browser, server software, and cryptographic algorithms is not correct, it is then possible for the information to be siphoned.
Most casual users of the Internet understand that HTTPS at the beginning of any URL in the address bar means that the connection is secure. This is a practical way for people who are unfamiliar with the dangers of hackers and other problems to be aware that they are using a secure messaging system. It is also frequently recommended, even on web pages, that people who do not see HTTPS at the beginning of the URL in the address bar should not enter any sensitive information, not only to protect the visitor to the website, but to protect the website’s reputation as well.
(ii) Briefly discuss the operation of Packet-Switched Network in your own word. Your discussion must contain AT LEAST 100 words. Please attach with the Packet-Switched Network diagram.
Packet-switched describes the type of network in which relatively small units of data called packets are routed through a network based on the destination address contained within each packet. Breaking communication down into packets allows the same data path to be shared among many users in the network. This type of communication between sender and receiver is known as connection less (rather than dedicated). Most traffic over the Internet uses packet switching and the Internet is basically aconnection less network.
Contrasted with packet-switched is circuit-switched, a type of network such as the regular voice telephone network in which the communication circuit (path) for the call is set up and dedicated to the participants in that call. For the duration of the connection, all resources on that circuit are unavailable for other users. Voice calls using the Internet's packet-switched system are possible. Each end of the conversation is broken down into packets that are reassembled at the other end.
Another type of digital network that uses packet-switching is the X.25 network, a widely-installed commercial wide area network protocol. Internet protocol packets can be carried on an X.25 network. The X.25 network can also support a virtual circuit in which a logical connection is established for two parties on a dedicated basis for some duration. A permanent virtual circuit (PVC) reserves the path on an ongoing basis and is an alternative for corporations to a system of leased lines. A permanent virtual circuit is a dedicated logical connection but the actual physical resources can be shared among multiple logical connections or users.
Packet-Switched Network diagram
(iii) Discuss the differences of cellular transmission General packet radio service (GPRS) and 4G in your own word. Provide with ONE (1) limitation of GPRS.
GPRS stands for General Packet Radio Service and it is the slowest one, it is a data connection standard available in GSM networks - the second generation cellular networks (2G). GSM traditionally work on 900, 1800 and 1900 MHz and they were initially designed for circuit-switched voice service. Channels are spaced 200 kHz, usually several of them per base station, each channel having 8 time-slots. A single voice connection would occupy one time slot, so this is a combination of FDD and TDD - Frequency Division Duplex and Time Division Duplex. Later came HSCSD (circuit switched data) which worked in a similar manner to a dial-in modem connection, but it was GPRS that made the wireless cellular data revolution - in GPRS data is sent in packets, just like on computer networks (as opposed to circuit-switching). This of course required a major redesign of the operator's core network, adding packet-switching nodes to support IP packet data, hence a GSM network with GPRS is sometimes called 2.5G. Expect speeds of several tens of kbps.
`Limitation of GPRS: Speeds Much Lower in Reality
Achieving the theoretical maximum GPRS data transmission speed of 172.2 kbps would require a single user taking over all eight timeslots without any error protection. Clearly, it is unlikely that a network operator will allow all timeslots to be used by a single GPRS user. Additionally, the initial GPRS terminals are expected be severely limited - supporting only one, two or three timeslots. The bandwidth available to a GPRS user will therefore be severely limited. As such, the theoretical maximum GPRS speeds should be checked against the reality of constraints in the networks and terminals. The reality is that mobile networks are always likely to have lower data transmission speeds than fixed networks.
RESULT: Relatively high mobile data speeds may not be available to individual mobile users until Enhanced Data rates for GSM Evolution (EDGE) or Universal Mobile Telephone System (UMTS) are introduced.
4G - 4th generation network called LTE (Long Term Evolution), works in a very different manner than 2nd and 3rd generations. Shared access is done by OFDMA - the available channel is divided into sub channels (also called sub carriers) and each of them is treated separately; groups of those sub carriers are assigned to different mobile phones. Also LTE is designed as a data-only network so all of the traffic is IP-based and there are no more circuit-switched connections. In fact unless the operator has VoLTE service (Voice over LTE), your 4G connection will only handle sending data, and to make/receive a voice call your phone will have to fall back to a 2G or 3G network. Of course the data speeds will be quite higher, you can expect tens of Mbps.
(iv)Attach a video clip discussing about the history of Internet at the end of the post

2016年5月3日星期二

Network Topology

Network topology is the arrangement of the various elements (links, nodes, etc.) of a computer network. Essentially, it is the topological structure of a network and may be depicted physically or logically. Physical topology is the placement of the various components of a network, including device location and cable installation, while logical topology illustrates how data flows within a network, regardless of its physical design. Distances between nodes, physical interconnections, transmission rates, or signal types may differ between two networks, yet their topologies may be identical.


An example is a local area network (LAN): Any given node in the LAN has one or more physical links to other devices in the network; graphically mapping these links results in a geometric shape that can be used to describe the physical topology of the network. Conversely, mapping the data flow between the components determines the logical topology of the network.


Bus Topology: In networking a bus is the central cable -- the main wire -- that connects all devices on a local-area network (LAN). It is also called the backbone. This is often used to describe the main network connections composing the Internet.  Bus networks are relatively inexpensive and easy to install for small networks. Ethernet systems use a bus topology. The advantage is it's easy to connect a computer or device and typically it requires less cable than a star topology. The disadvantage is the entire network shuts down if there is a break in the main wire and it can be difficult to identify the problem if the network shuts down.


Ring TopologyA local-area network (LAN) whose topology is a ring. That is, all of the nodes are connected in a closed loop. Messages travel around the ring, with each node reading those messages addressed to it. One main advantage to a ring network is that it can span larger distances than other types of networks, such as bus networks, because each node regenerates messages as they pass through it.


Star Topology: In a star network devices are connected to a central computer, called a hub. Nodes communicate across the network by passing data through the hub. The advantage is in a star network, one malfunctioning node doesn't affect the rest of the network. But if the central computer fails, the entire network becomes unusable.



Chua Guan Ming      1001540244