Shopping Cart Application Main

download Shopping Cart Application Main

of 42

Transcript of Shopping Cart Application Main

  • 8/3/2019 Shopping Cart Application Main

    1/42

    A presentation onOnline Shopping Carts: How DoesHow Does

    the Web Site Get the Datathe Web Site Get the Data??

    Presented By:Presented By:

    Mehul. D. PatelMehul. D. Patel

  • 8/3/2019 Shopping Cart Application Main

    2/42

    ContentsContents

    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

  • 8/3/2019 Shopping Cart Application Main

    3/42

    What is WWW?

    The World Wide Web (commonly abbreviated as the "Web") is a system ofinterlinked hypertext documents accessed via the Internet.

    The network of information found on the Internet in the form of web sites. Eachsite 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 speechwithout much distinction. However, the Internet and the World Wide Web are notone and the same. The Internet is a global data communications system. It is ahardware and software infrastructure that provides connectivity betweencomputers. In contrast, the Web is one of the services communicated via theInternet. It is a collection of interconnected documents and other resources, linkedby hyperlinks and URLs. In short, the Web is an application running on theInternet.

    Many Web addresses begin with www, because of the long-standing practice ofnaming Internet hosts (servers) according to the services they provide. So, the hostname for a web server is often wwwas it is ftp for an FTP server, and news or nntpfor a USENET news server etc. These host names then appear as DNS subdomainnames, as in "www.example.com".

  • 8/3/2019 Shopping Cart Application Main

    4/42

    What is Web Browser?

    A Web browser is a software program that interprets the codinglanguage of the World Wide Web in graphic form, displaying thetranslation rather than the coding. This allows anyone to browsethe Web by simple point and click navigation, bypassing the needto 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

  • 8/3/2019 Shopping Cart Application Main

    5/42

  • 8/3/2019 Shopping Cart Application Main

    6/42

    What is HTML?

    HTML stands for Hyper Text Markup Language. It is a type of computerlanguage that is primarily used for files that are posted on the internet andviewed 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. Suchfiles 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 easilyupdated after the file is created. For the novice web designer, there aremany different software utilities and programs available to assist ingenerating HTML pages.

  • 8/3/2019 Shopping Cart Application Main

    7/42

    Static and DynamicWeb Pages

    The internet used to consist solely ofHTML 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 clickor 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.

  • 8/3/2019 Shopping Cart Application Main

    8/42

    What is URL?

    Since websites are considered resources, and every website the worldover has a unique address per a uniform addressing scheme, UniformResource Locator (formerly Universal Resource Locator) or URL, is a fancyname for website address. A synonym that is actually more precise butless well-known is URI, or Uniform Resource Identifier. The term URIdeveloped after URL had already gained widespread public use; hence URIis used by those involved in Internet development, standards andprotocols, while URL is the prevalent term outside those circles.

    A URL can be composed of words, such as google.com or thecorresponding Internet Protocol (IP) address: for eg. 69.93.118.236. Eitheraddress will take the surfer to the Google site. The vast majority of surfingis done by entering the name of the website, as names are easier to

    remember than numbers. Most people never even know the IP addressesof the websites they visit, but every name maps back to a unique,numerical address.

  • 8/3/2019 Shopping Cart Application Main

    9/42

    Various Protocols: HTTP, TCP/IP, HTTPS

    HTTP: The Hypertext Transfer Protocol (HTTP) is the set of rules forexchanging files (text, graphic images, sound, video, and other multimediafiles) on the World Wide Web. HTTP is a formal communication methodthat transmits requests and data between web browsers and Web servers.

    TCP/IP: Transfer Protocol Control/Internet Protocol. TCP/IP is a set ofprotocols developed to allow co-operating computers to share resourcesacross a network. Its main purpose is to get data from one network deviceto another.

    HTTPS: HTTPS (Hypertext Transfer Protocol over Secure Socket Layer, or

    HTTP over SSL) is a Web protocol developed by Netscape and built into itsbrowser that encrypts and decrypts user page requests as well as thepages that are returned by the Web server. Also referred to as HTTPSecure, it is an encrypted form of information transfer on the internet.

  • 8/3/2019 Shopping Cart Application Main

    10/42

    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 anInternet site.

    An important purpose of domain names is to provide easilyrecognizable and memorizable names to numerically addressedInternet 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

  • 8/3/2019 Shopping Cart Application Main

    11/42

    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 webbrowsers), 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.

  • 8/3/2019 Shopping Cart Application Main

    12/42

    List ofVarious Web Servers Available

    Given below is a list of top Web server software vendors published in a Netcraft

    survey in January 2009:

    Vendor ProductWeb Sites

    Hosted Percent

    Apache Apache 96,531,033 52.05%

    Microsoft IIS 61,023,474 32.90%

    Google GWS 9,864,303 5.32%

    nginx nginx 3,462,551 1.87%lighttpd lighttpd 2,989,416 1.61%

    Oversee Oversee 1,847,039 1.00%

    Others - 9,756,650 5.26%

    Total - 185,474,466 100.00%

  • 8/3/2019 Shopping Cart Application Main

    13/42

    What is a Database Server?

    A database server is a computer program that providesdatabase services to other computer programs orcomputers, as defined by the client-server model. Theterm may also refer to a computer dedicated to

    running such a program. Database managementsystems frequently provide database serverfunctionality, and some DBMSs (e.g., MySQL) relyexclusively on the client-server model for databaseaccess.

    A computer that stores data centrally for network users& managers & often uses client-server software todistribute the processing of that data between itself &nodes requesting information.

  • 8/3/2019 Shopping Cart Application Main

    14/42

    What is an ISP?

    An ISP (Internet Service Provider) is a company that collects amonthly or yearly fee in exchange for providing the subscriberwith Internet access.

    List ofInternet Service Providers:

    Reliance

    Tata

    Airtel

    BSNL

    Bharti

    Sify etc.,

  • 8/3/2019 Shopping Cart Application Main

    15/42

    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 Internethosting service that allows individuals and

    organizations to provide their own website

    accessible via the World Wide Web.

  • 8/3/2019 Shopping Cart Application Main

    16/42

    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 withoutinterruption.

    Dedicated Hosting or Managed Hosting A dedicated hosting service, dedicated server, or managed hosting service is a

    type ofInternet hosting in which the client leases an entire server not sharedwith anyone. This is more flexible than shared hosting, as organizations havefull control over the server(s), including choice of operating system, hardware,etc. Server administration can usually be provided by the hosting company asan add-on service. In some cases a dedicated server can offer less overheadand a larger return on investment. Dedicated servers are most often housed indata centers, similar to colocation facilities, providing redundant powersources and HVAC systems. In contrast to collocation, the server hardware is

    owned by the provider and in some cases they will provide support for youroperating system or applications.

    24/7 support means providing support for above mentioned services at all timeswithout the paying company having to worry about anything.

  • 8/3/2019 Shopping Cart Application Main

    17/42

    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 thepage into a Web browser, or by following a hyperlink to that page or resource. The Webbrowser then initiates a series of communication messages, behind the scenes, in order tofetch 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 isnecessary to contact the Web server. The browser then requests the resource by sending anHTTP 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 thepage. 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 andother resources are incorporated to produce the on-screen Web page that the user sees.

  • 8/3/2019 Shopping Cart Application Main

    18/42

    How does the data travel on the internet?

  • 8/3/2019 Shopping Cart Application Main

    19/42

    How does the data travel on the internet?

  • 8/3/2019 Shopping Cart Application Main

    20/42

    Are DataAre Data--DrivenDriven

    Web Sites a GoodWeb Sites a Good

    Idea?Idea?

  • 8/3/2019 Shopping Cart Application Main

    21/42

    Are Data-Driven Web Sites a Good Idea?

    Should you even bother with hooking a data source to yourWeb site? Thats the Rs. 1,00,000 question, isnt it really? Ifyoure attending this seminar, Ill assume youve already cometo the conclusion that using databases and other sources ofdata to turn static Web sites into dynamic data-driven Websites is a good thing. However, I would be lying ifI said therewerent any disadvantages to using data sourcesthere are.

    All in all, the decision comes down to how big your Web site islikely to be and whether you would be happy tweaking HTMLall day for the rest ofyour life, rather than putting the effort in

    initially, letting the database do most of the tweaking for you,and generally enjoying the social scene. Youre still a databasefan, arent you? I thought so.

  • 8/3/2019 Shopping Cart Application Main

    22/42

    How Do Web Sites Use Data Sources?

    So then, you have a database or some other datasource, and you have an ASP.NET page. What doesthe page do to use the data source? As you know, astatic page doesnt do a great deal. Its static. It has a

    pretty simple structure: a , a , andprobably some headings and paragraphs. When youadd ASP.NET, that page becomes dynamic and can begenerated in many ways, depending on the code youadd. However, it still ends up with the same basic

    HTML structure displayed by the Web browser. Thedifference is generally the content.

  • 8/3/2019 Shopping Cart Application Main

    23/42

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

  • 8/3/2019 Shopping Cart Application Main

    24/42

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

  • 8/3/2019 Shopping Cart Application Main

    25/42

    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 ofknowledge? 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.

  • 8/3/2019 Shopping Cart Application Main

    26/42

  • 8/3/2019 Shopping Cart Application Main

    27/42

    Online Shopping Cart: Building E-Commerce Applications

    In this part,Ill show you two ASP.NET2.0applications that help you sell products in anonline store. The first is a product catalogue that

    lets Web users see what products you have forsale; the second is a shopping-cart applicationthat lets users purchase items from yourcatalogue. Its a fairly standard practice to

    combine these applications so users can bothbrowse through the product catalogue and(ideally) buyyour products.

  • 8/3/2019 Shopping Cart Application Main

    28/42

    User-Interface: Product Catalogue Application

  • 8/3/2019 Shopping Cart Application Main

    29/42

    User-Interface: Shopping Cart Application

  • 8/3/2019 Shopping Cart Application Main

    30/42

    If everything was that simple...

    Its not that easy.

    The pages go through a lot of backgroundprocessing when the application is used at

    real-time.

    Check the figure on the next slide:

  • 8/3/2019 Shopping Cart Application Main

    31/42

    Actual functioning of the Shopping Cart Application

  • 8/3/2019 Shopping Cart Application Main

    32/42

    SAMPLE: Shopping Cart Applications Database

  • 8/3/2019 Shopping Cart Application Main

    33/42

    Web

    Server

    DatabaseServer

    Data Request/

    Response

    Request sent to DB to fetch Product Related Records

    Product Data Fetched From DB being sent to Product List PageDefault.aspx

    User Requests

    Page

    Product List

    Page

    Product Detail

    Page

    Cart Page

    Checkout Page

    Order

    Completed

    Page

    View Details

    Product.aspx

    Add to Cart

    Cart.aspx

    CheckoutCheckout.aspx

    Submit Order

    Completed.aspx

    Continue

    Sho

    pping

    Continue

    Data for specific Product Requested

    Product Data Fetched For Particular

    Product

    Product Id stored as Session Variable

    Products retrieved

    from shopping cart

    Items stored

    In shopping

    cart

    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 applicationThe actual working of a shopping cart application

  • 8/3/2019 Shopping Cart Application Main

    34/42

    The End

    Thank you.

  • 8/3/2019 Shopping Cart Application Main

    35/42

    Questions?

  • 8/3/2019 Shopping Cart Application Main

    36/42

    Appendices: Product Database

  • 8/3/2019 Shopping Cart Application Main

    37/42

    Appendices: Choosing an online payment option

  • 8/3/2019 Shopping Cart Application Main

    38/42

    Appendices: A simple architecture for a managed web

    application

  • 8/3/2019 Shopping Cart Application Main

    39/42

    Appendices: Typical architecture of E-commerce Application

  • 8/3/2019 Shopping Cart Application Main

    40/42

    Appendices: How web browsers evolved?

    The first successful graphical Web browser, M osaic, 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 Internets 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, I nternet Explorer dominated as the most ubiquitous Web browser, due in large part to Microsofts

    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 FireFo x influenced the development ofWindows 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 FireFo x so popular among its users, and it will also be

    compliant with Microsofts 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 IEs proprietary Web browser coding rather than standard Internet conventions and protocols. What some see as

    Microsofts 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 W eb 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.

    Microsofts 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 onlyuse 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 originall y offered as shareware, then adware, and finally, as of September 2005, freeware. Opera has maintained a small market share ,

    and as of2006, 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.

  • 8/3/2019 Shopping Cart Application Main

    41/42

    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 willbe understood not as screenfuls of text and graphics but as a transport mechanism, the ether through which interactivityhappens. 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

    understandthe 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".

  • 8/3/2019 Shopping Cart Application Main

    42/42

    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' may resolve to http://www.microsoft.com and

    'openoffice' 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.