You are on page 1of 42

A presentation on Online Shopping Carts: How Does the Web Site Get the Data? Data?

Presented By: Mehul. D. Patel

Contents
Nitty-gritty of the Internet
WWW, Browser, Types of browsers, Browser compatibility URL, HTML, Static Web Page, Dynamic Web Page, HTTP, HTTPS, ISP, 24x7, Domain Name, TCP/IP IIS, Web Server, Database Server

How does the data travel on the internet? Are database driven websites a good idea? How do the websites use data sources? How does the website get the data? Online Shopping Cart: Building an E-Commerce Application
User Interface: Product Catalogue Application User Interface: Shopping Cart Application Sample database structure of a shopping cart application Diagram: Actual functioning of a shopping cart application

Questions? Appendices

What is WWW?
The World Wide Web (commonly abbreviated as the "Web") is a system of interlinked hypertext documents accessed via the Internet. The network of information found on the Internet in the form of web sites. Each site contains multiple pages of information and may include text, sound, pictures, images, and even video. The terms Internet and World Wide Web are often used in every-day speech without much distinction. However, the Internet and the World Wide Web are not one and the same. The Internet is a global data communications system. It is a hardware and software infrastructure that provides connectivity between computers. In contrast, the Web is one of the services communicated via the Internet. It is a collection of interconnected documents and other resources, linked by hyperlinks and URLs. In short, the Web is an application running on the Internet. Many Web addresses begin with www, because of the long-standing practice of naming Internet hosts (servers) according to the services they provide. So, the host name for a web server is often www as it is ftp for an FTP server, and news or nntp for a USENET news server etc. These host names then appear as DNS subdomain names, as in "www.example.com".

What is Web Browser?


A Web browser is a software program that interprets the coding language of the World Wide Web in graphic form, displaying the translation rather than the coding. This allows anyone to browse the Web by simple point and click navigation, bypassing the need to know commands used in software languages. A Web browser is software used to cruise the World Wide Web. Various types of web browsers:
Microsoft Internet Explorer Mozilla Firefox Opera Netscape Navigator Mosaic Safari Flock

What is Browser Compatibility?


Browser compatibility is the ability of the Web browser to properly interpret the hypertext markup language (HTML) that renders Web pages. HTML is a coding language that is understood a little differently by each Web browser. Most sites are designed to look correct in Microsoft s Internet Explorer, because it is believed to be the most ubiquitous browser. However, if you are a Web designer, your task is to code a site for maximum browser compatibility so that the pages look correct in other popular browsers as well, such as FireFox, Netscape, Opera and text-based browsers. Aside from the difference in browsers, another factor that plays into browser compatibility is whether the surfer is using a standard PC and Windows, Linux, or a Mac computer. The same browser will render the pages a little differently from each of these platforms. If you have to design a site, you might have to design a site for maximum browser compatibility. While many hardcore surfers keep two browsers loaded and switch between them, it s probably safe to assume that the majority of people simply click away from a site that has poor browser compatibility.

What is HTML?
HTML stands for Hyper Text Markup Language. It is a type of computer language that is primarily used for files that are posted on the internet and viewed by web browsers. HTML files can also be sent via email. Although it may seem complex to the uninitiated, HTML is relatively simple. All text, graphics and design elements of a web page are "tagged" with codes that instruct the web browser how to display the files. Such files are easy to recognize because they contain the file extension of 'html' or 'htm'. In addition to the page content itself, HTML files provide layout and formatting information. HTML is not case sensitive and can be easily updated after the file is created. For the novice web designer, there are many different software utilities and programs available to assist in generating HTML pages.

Static and Dynamic Web Pages


The internet used to consist solely of HTML or static web pages, i.e., web pages that are not changed before being displayed in a web browser. Static HTML is rendered once in the browser and never changed. Static HTML simply is what it is. The page is displayed and that's it. Dynamic HTML (DHTML) may change as a result of conditions in a browser (e.g. a mouse click or pointer movement) without needing to fetch additional data from the server. For example, elements on the page may move or appear/disappear. Dynamic HTML uses a scripting language (like JavaScript, ASP, PHP) to change the HTML based on input or events. Example: roll-over graphics or buttons. In short, DHTML eliminates the shortcomings of static pages. You can create innovative Web sites, on the Internet or on an intranet, without having to sacrifice performance for interactivity.

What is URL?
Since websites are considered resources, and every website the world over has a unique address per a uniform addressing scheme, Uniform Resource Locator (formerly Universal Resource Locator) or URL, is a fancy name for website address. A synonym that is actually more precise but less well-known is URI, or Uniform Resource Identifier. The term URI developed after URL had already gained widespread public use; hence URI is used by those involved in Internet development, standards and protocols, while URL is the prevalent term outside those circles. A URL can be composed of words, such as google.com or the corresponding Internet Protocol (IP) address: for eg. 69.93.118.236. Either address will take the surfer to the Google site. The vast majority of surfing is done by entering the name of the website, as names are easier to remember than numbers. Most people never even know the IP addresses of the websites they visit, but every name maps back to a unique, numerical address.

Various Protocols: HTTP, TCP/IP, HTTPS


HTTP: The Hypertext Transfer Protocol (HTTP) is the set of rules for exchanging files (text, graphic images, sound, video, and other multimedia files) on the World Wide Web. HTTP is a formal communication method that transmits requests and data between web browsers and Web servers. TCP/IP: Transfer Protocol Control/Internet Protocol. TCP/IP is a set of protocols developed to allow co-operating computers to share resources across a network. Its main purpose is to get data from one network device to another. HTTPS: HTTPS (Hypertext Transfer Protocol over Secure Socket Layer, or HTTP over SSL) is a Web protocol developed by Netscape and built into its browser that encrypts and decrypts user page requests as well as the pages that are returned by the Web server. Also referred to as HTTP Secure, it is an encrypted form of information transfer on the internet.

What is a Domain Name?


The domain name is the official name of computer (host) connected to the Internet. A sign post on the Internet, it is a unique name that identifies an Internet site. An important purpose of domain names is to provide easily recognizable and memorizable names to numerically addressed Internet resources. The following example illustrates the difference between a URL (Uniform Resource Locator) and a domain name: URL: http://www.example.net/index.html Domain name: www.example.net Registered domain name: example.net

What is a Web Server?


The term web server or webserver can mean one of two things: 1. A computer program that is responsible for accepting HTTP requests from clients (user agents such as web browsers), and serving them HTTP responses along with optional data contents, which usually are web pages such as HTML documents and linked objects (images, etc.). 2. A computer that runs a computer program as described above.

List of Various Web Servers Available


Given below is a list of top Web server software vendors published in a Netcraft survey in January 2009:

Vendor Apache Microsoft Google nginx lighttpd Oversee Others Total

Product Apache IIS GWS nginx lighttpd Oversee -

Web Sites Hosted 96,531,033 61,023,474 9,864,303 3,462,551 2,989,416 1,847,039 9,756,650 185,474,466

Percent 52.05% 32.90% 5.32% 1.87% 1.61% 1.00% 5.26% 100.00%

What is a Database Server?


A database server is a computer program that provides database services to other computer programs or computers, as defined by the client-server model. The term may also refer to a computer dedicated to running such a program. Database management systems frequently provide database server functionality, and some DBMSs (e.g., MySQL) rely exclusively on the client-server model for database access. A computer that stores data centrally for network users & managers & often uses client-server software to distribute the processing of that data between itself & nodes requesting information.

What is an ISP?
An ISP (Internet Service Provider) is a company that collects a monthly or yearly fee in exchange for providing the subscriber with Internet access. List of Internet Service Providers: Reliance Tata Airtel BSNL Bharti Sify etc.,

What is Web Hosting?


The service of hosting a site on the Internet making it viewable for other users on the net. A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web.

What is 24x7 Support?


24/7 is an abbreviation which stands for "24 hours a day, 7 days a week", usually referring to a business or service available at all times without interruption. Dedicated Hosting or Managed Hosting
A dedicated hosting service, dedicated server, or managed hosting service is a type of Internet hosting in which the client leases an entire server not shared with anyone. This is more flexible than shared hosting, as organizations have full control over the server(s), including choice of operating system, hardware, etc. Server administration can usually be provided by the hosting company as an add-on service. In some cases a dedicated server can offer less overhead and a larger return on investment. Dedicated servers are most often housed in data centers, similar to colocation facilities, providing redundant power sources and HVAC systems. In contrast to collocation, the server hardware is owned by the provider and in some cases they will provide support for your operating system or applications. 24/7 support means providing support for above mentioned services at all times without the paying company having to worry about anything.

How does the data travel on the internet?


Viewing a Web page on the World Wide Web normally begins either by typing the URL of the page into a Web browser, or by following a hyperlink to that page or resource. The Web browser then initiates a series of communication messages, behind the scenes, in order to fetch and display it. First, the server-name portion of the URL is resolved into an IP address using the global, distributed Internet database known as the domain name system, or DNS. This IP address is necessary to contact the Web server. The browser then requests the resource by sending an HTTP request to the Web server at that particular address. In the case of a typical Web page, the HTML text of the page is requested first and parsed immediately by the Web browser, which then makes additional requests for images and any other files that form parts of the page. Statistics measuring a website's popularity are usually based either on the number of 'page views' or associated server 'hits' (file requests) that take place. Having received the required files from the Web server, the browser then renders the page onto the screen as specified by its HTML, CSS, and other Web languages. Any images and other resources are incorporated to produce the on-screen Web page that the user sees.

How does the data travel on the internet?

How does the data travel on the internet?

Are Data-Driven DataWeb Sites a Good Idea?

Are Data-Driven Web Sites a Good Idea?


Should you even bother with hooking a data source to your Web site? That s the Rs. 1,00,000 question, isn t it really? If you re attending this seminar, I ll assume you ve already come to the conclusion that using databases and other sources of data to turn static Web sites into dynamic data-driven Web sites is a good thing. However, I would be lying if I said there weren t any disadvantages to using data sources there are. All in all, the decision comes down to how big your Web site is likely to be and whether you would be happy tweaking HTML all day for the rest of your life, rather than putting the effort in initially, letting the database do most of the tweaking for you, and generally enjoying the social scene. You re still a database fan, aren t you? I thought so.

How Do Web Sites Use Data Sources?


So then, you have a database or some other data source, and you have an ASP.NET page. What does the page do to use the data source? As you know, a static page doesn t do a great deal. It s static. It has a pretty simple structure: a <head>, a <body>, and probably some headings and paragraphs. When you add ASP.NET, that page becomes dynamic and can be generated in many ways, depending on the code you add. However, it still ends up with the same basic HTML structure displayed by the Web browser. The difference is generally the content.

Amazon.co.uk uses one template page and many product pages.

Slashdot uses a database to display its pages according to your preferences.

How Does the Web Site Get the Data?


Its time to get a little more technical. What actually happens when a data-driven page is requested by a browser? Does the code need to pray to the database gods for enlightenment and a source of knowledge? Of course not. Aside from anything else that ASP.NET may be doing in a page, the task of communicating with a data source takes just three steps, as shown in the next slide.

Online Shopping Cart: Building E-Commerce Applications

In this part, I ll show you two ASP.NET 2.0 applications that help you sell products in an online store. The first is a product catalogue that lets Web users see what products you have for sale; the second is a shopping-cart application that lets users purchase items from your catalogue. It s a fairly standard practice to combine these applications so users can both browse through the product catalogue and (ideally) buy your products.

User-Interface: Product Catalogue Application

User-Interface: Shopping Cart Application

If everything was that simple...


Its not that easy. The pages go through a lot of background processing when the application is used at real-time. Check the figure on the next slide:

Actual functioning of the Shopping Cart Application

SAMPLE: Shopping Cart Application s Database

User Requests Page

Default.aspx Product List Page

Product Data Fetched From DB being sent to Product List Page

Request sent to DB to fetch Product Related Records Continue Shopping

View Details Product.aspx Data for specific Product Requested Product Detail Page
Product Data Fetched For Particular Product

Data Request/ Response Add to Cart Cart.aspx


Product Id stored as Session Variable

Cart Page
Products retrieved from shopping cart

Items stored In shopping cart

Web Server

Database Server

Checkout.aspx

Checkout

Checkout Page Continue

Submit Order Completed.aspx Order Completed Page


Other user details requested like Shipping address, Billing address, and request to calculate delivery date

Billing details, shipping address and delivery information will be displayed to the user

The actual working of a shopping cart application

The End

Thank you.

Questions?

Appendices: Product Database

Appendices: Choosing an online payment option

Appendices: A simple architecture for a managed web application

Appendices: Typical architecture of E-commerce Application

Appendices: How web browsers evolved?

The first successful graphical Web browser, Mosaic, was written by Marc Andreessen and Eric Bina in 1992 and released in 1993. At that time, the only popular graphical online services were offered by Prodigy, America Online (AOL), and Compuserv. These companies were closed networks that provided their own proprietary content, message boards, email programs, and interfaces, and did not provide access to the Internet. The Mosaic Web browser opened the Internet to the general public. It provided a pleasurable means to navigate the World Wide Web and was free for personal use. To compete with the appeal of the Internet s worldwide network, closed networks had to introduce a pipeline to the Internet and supply a graphic Web browser to interpret HTML. By the time this occurred in the mid 1990s, Andreessen had partnered with Jim Clark, former founder of Silicon Graphics, to create a new flagship Web browser called Netscape. Netscape remained the Web browser of choice until Microsoft began pre-packaging their own Web browser into the Windows operating system. Internet Explorer (IE) was inferior to Netscape in many ways, particularly criticized for ongoing security issues, numerous bugs, and a lack of conformity to Web standard protocols. While this turned off many in the online community, the flood of new computer users knew too little to be aware or concerned. By 1998, Internet Explorer dominated as the most ubiquitous Web browser, due in large part to Microsoft s ability to pre-load it into new computer systems. At the same time, Netscape, then known as Netscape Communicator, released its source code to the public. The Web browser went through a massive rewrite over the next few years. It emerged as the open source Web browser known as Mozilla, under the Mozilla Organization, then owned by AOL. By 2003, AOL passed off oversight to the newly formed Mozilla Foundation, which renamed the Web browser to Phoenix and later to FireFox. While the Microsoft Web browser held the market unchallenged in any great measure from 1998 to 2003, production to further improve IE effectively stalled. Meanwhile Mozilla/Phoenix/FireFox became the Web browser of choice among savvy computer users. Its expanded feature set, improved functionality, increased adherence to standards, and higher security make it superior in many ways to IE 6.0. Some believe that the growing public market share in FireFox influenced the development of Windows Internet Explorer (WIE) version 7.0, to be released in fall 2006. The new Microsoft Web browser will incorporate some of the features that have made FireFox so popular among its users, and it will also be compliant with Microsoft s new operating system, Vista. Due to the proprietary extensions that Microsoft builds into its Web browser, some webpages do not display correctly in other Web browsers. This occurs when webmasters design websites using IE s proprietary Web browser coding rather than standard Internet conventions and protocols. What some see as Microsoft s passive-aggressive effort to encourage the Internet to become a proprietary environment where only Microsoft products function correctly is, from an economic standpoint, an unhealthy path for consumers and a source of great criticism. Conversely, the appeal of FireFox is that it is an open source project that conforms to Internet standards and protocols. This not only invites fair competition, but the coding can be examined by anyone, which also benefits the public. Programmers located worldwide can communicate in online, public forums to discuss loopholes, back doors, bugs, and other vulnerabilities that Mozilla regularly patches in a timely fashion. A proprietary Web browser like IE, not examined by anyone but Microsoft coders, can hide vulnerabilities that can go unaddressed for extended periods of time, potentially putting millions of users at risk. Microsoft has also been criticized for being slow to provide patches for vulnerabilities, even after they have been publicly exposed. For these and other reasons, many savvy users prefer open source programs when given the choice, including an open source Web browser. Microsoft s Internet Explorer is free to download from Microsoft.com. The Mozilla FireFox Web browser is free from Mozilla.org. Some users keep both Web browsers installed and only use Internet Explorer when a page requires it. Although IE and FireFox are not the only Web browsers, they are the two most popular. As a third alternative, Opera Software, located in Oslo, Norway, offers the Opera Web browser, a proprietary browser released in 1996. Opera was originally offered as shareware, then adware, and finally, as of September 2005, freeware. Opera has maintained a small market share, and as of 2006, it is partnering with Nintendo to provide an Internet Web browser for the Dual Screen, Developers System (DS) game console. There are also various other Web browsers available through search engines.

Appendices: Web 2.0

"Web 2.0" refers to what is perceived as a second generation of web development and web design. It is characterized as facilitating communication, information sharing, interoperability, user-centered design and collaboration on the World Wide Web. It has led to the development and evolution of web-based communities, hosted services, and web applications. Examples include social-networking sites, video-sharing sites, wikis, blogs, mashups and folksonomies. The term "Web 2.0" was coined by Darcy DiNucci in 1999. In her article "Fragmented Future," she writes The Web we know now, which loads into a browser window in essentially static screenfuls, is only an embryo of the Web to come. The first glimmerings of Web 2.0 are beginning to appear, and we are just starting to see how that embryo might develop. ... The Web will be understood not as screenfuls of text and graphics but as a transport mechanism, the ether through which interactivity happens. It will [...] appear on your computer screen, [...] on your TV set [...] your car dashboard [...] your cell phone [...] hand-held game machines [...] and maybe even your microwave.

Her arguments about Web 2.0 are nascent yet hint at the meaning that is associated with it today. The term is now closely associated with Tim O'Reilly because of the O'Reilly Media Web 2.0 conference in 2004. Although the term suggests a new version of the World Wide Web, it does not refer to an update to any technical specifications, but rather to cumulative changes in the ways software developers and end-users utilize the Web. According to Tim O'Reilly: Web 2.0 is the business revolution in the computer industry caused by the move to the Internet as a platform, and an attempt to understand the rules for success on that new platform.

However, whether it is qualitatively different from prior web technologies has been challenged. For example, World Wide Web inventor Tim Berners-Lee called the term a "piece of jargon".

Appendices: WWW Prefixes in Web Addresses

Many Web addresses begin with www, because of the long-standing practice of naming Internet hosts (servers) according to the services they provide. So, the host name for a web server is often www as it is ftp for an FTP server, and news or nntp for a USENET news server etc. These host names then appear as DNS subdomain names, as in "www.example.com". The use of such subdomain names is not required by any technical or policy standard; indeed, the first ever web server was called "nxoc01.cern.ch", and many web sites exist without a www subdomain prefix, or with some other prefix such as "www2", "secure" etc. These subdomain prefixes have no consequence; they are simply chosen names. Many web servers are set up such that both the domain by itself (e.g., example.com) and the www subdomain (e.g., www.example.com) refer to the same site, others require one form or the other, or they may map to different web sites. When a single word is typed into the address bar and the return key is pressed, some web browsers automatically try adding "www." to the beginning of it and possibly ".com", ".org" and ".net" at the end. For example, typing 'microsoft<return>' may resolve to http://www.microsoft.com and 'openoffice<return>' to http://www.openoffice.org. This feature was beginning to be included in early versions of Mozilla Firefox (when it still had the working title 'Firebird') in early 2003. It is reported that Microsoft was granted a US patent for the same idea in 2008, but only with regard to mobile devices.