This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA
,
,
NATIONAL DEGREE COLLEGE, NANDYAL
Page 11
GROCERIES ONLINE WORLD
Structure of an HTML Document To create a HTML document a text editor can be used such as notepad ++ or notepad or Word pad or Microsoft WORD. After coding in HTML the file must be saved with extension .html or .htm . A HTML document has two parts namely (i) head and (ii) body The head part will be enclosed in and tags. The body part will be enclosed in and tags. The head part consist a tag called <TITLE> where the title of the web page can be mentioned. The closing of this tag is The body part consist the code of the web page to be displayed with various tags. Ex:
<TITLE> Welcome to the website of National Degree College
Groceries Online World, Rayalaseema Address: Sanjeeva Nagar, Nandyal, Kurnool District, A.P [State] Commenting web pages: Programming languages include a mechanism called the comment that lets developers write plain text inside their code files. This plain text is used to describe what the program does and how it works. In HTML, for comment also a tag is to be used. The comment is to be enclosed between the delimiters . Comments can be placed in either the head or body of document.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 12
GROCERIES ONLINE WORLD A good practice to use commands is to describe what the code does rather than how it works. In the head of the document some simple version control information can be included which consists of the name of the application description of the purpose of the code in the file the name of the author the original creation data a version umber copyright information. The Document Head: The document head holds control information to be used by browsers and servers. Head does not contain any attributes. Instead, in will consists of other tags as part. TITLE is used to display the title of the web page in title bar of browser <TITLE> tag Welcome to the website of national degree college FONT Tag: This tag is used to set the size color etc front using SIZE, COLOR attributes closing tag is required for this tag. TEXT <1font> META TAG: This tag is used to include additional information about a document and can be used to pass additional information to a browser. There is no ending tag for <META> and a document can multiple <META> tags. It has the attributes NAME< CONTENT. When someone is searching for a particular topic, the page is returned if one or more of keywords match search request. <META NAME=”Keywords” CONTENT=”College, degree, National,”> Cascading Style Sheets Introduction An important aspect of HTML is the capability to separate presentation and content. But when a web page is being created the author or designer of a web page has no way of knowing NATIONAL DEGREE COLLEGE, NANDYAL
Page 13
GROCERIES ONLINE WORLD how it will be accessed. The page may be viewed on television screen, a computer screen of mobile phone, any of which may show images, text, tables or a mixture of them all. HTML does not have the facilities that are needed to deal with this diversity. A solution to this problem is style sheets. A style is simply a set of formatting instructions that can be applied to a piece of text. There are three mechanisms by which we can apply styles to our HTML documents. Style can be defined in external files called style sheets which can then be used in any document by including the style sheets via a URL External Cascading Style Sheets It is not only possible to use a single set of styles inside a document but also can import as many style sheets required. The only difficulty with importing multiple style sheets is that they can cascade. This means that the first is overridden by the second, the second by third, and so on. The overriding happens if later style sheet contains a definition of a style that is already defined. Rules A style rule has two parts, a selector and a set of declarations. The selector is used to create a link between the rule and the HTML tag. The declaration has two parts: a property and a value. Selectors can be placed into classes so that a tag can be formatted in a variety of ways. Declarations must be separated using colons and terminated using semicolons. Selector {property : value; Property : value; ……..} The above form is used for all style declarations in style sheets. The declaration has three items namely, the property, a colon, and the value. If the coon or semicolon was missed the style cannot be processed. H1 { Color:”red”; Border: “thin groove”; }
NATIONAL DEGREE COLLEGE, NANDYAL
Page 14
GROCERIES ONLINE WORLD Classes A class can be used to apply a style to some paragraphs instead of entire text. Its syntax is as follows: Selector.Classname{ property: value: property:value} <selector class= classname> A class can be created by slightly modifying the style sheet, a unique name which is appended to the selector using a dot. In the HTML document to use a named style the tag is extended by including the class= and the unique name. Example: H1.fred { Color:#eeebd2; Background-color:#d8a29b; Font-family:”Book Antiqua”, Times. Serif: Border: thin grooved: } A Simple Heading
Including style sheets The syntax for including a style sheet in part of HTML page is
The href is a hyperlink to stylesheet The rel tells the browser what type of link is being used The type statement gives the relevant MIME type
Finally it is useful, although not compulsory, to tell the browser how the document will be used. HTML specifies a variety of ways of using a document, including screen viewing, printing, and as presentations. The media attribute is used to describe the type of use.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 15
GROCERIES ONLINE WORLD Example: Java Script Java script is a language which was originated from a language called live script. Many features of java are useful with java script also. In web, it is necessary to have a language which could be used to provide client-side in-browser applications, which can be easily operated. Java script is a language which is must less complex language when compared to java. Java script is a fairly simple and suitable for simple tasks. This language is best suited to tasks which run for a short time and is most commonly used to manipulate the pieces of the document based model. Benefits of java script
Java script has a number of benefits to make website dynamic. These are, It is widely supported in websites It gives easy access to the document objects and can manipulate most of them It can give interest animations without the long download times associated with many multimedia data types There is no need of a separate plug-in to use scripts It is relatively secure. It can neither read content from hard drive nor write to it. Virus infection cannot get directly from java script
The front end is an interface between the user and the back end. The front and back ends may be distributed amongst one or more systems. In network computing, front end can refer to any hardware that optimizes or protects networks traffic. It is called application front-end hardware because it is placed on the network’s outward-facing front end or boundary. Network traffic through the front-end hardware before entering the network. In compilers, the front end translates a computer programming source code into an intermediate representation, and the back end works with the intermediate representation to produce code in a computer output language. The back end usually optimizes to produce code NATIONAL DEGREE COLLEGE, NANDYAL
Page 16
GROCERIES ONLINE WORLD that runs faster. The front-end/back-end distinction can separate the parser section that deals with source code and the back end that generates code and optimizes. These days, front-end development refers to the part of the web users interact with. In the past, web development consists of people who worked with photo shop and those who could code HTML and CSS. Now, developers need a handle of programs like photo shop and be able to code not only in HTML and CSS, but also java script or query, which is a compiled library of java script. Most of everything you see on any website is a mixture of HTML, CSS, and java script, which are all controlled by the browser. For example, if you’re using google chrome or firefox, the browser is what translates all of the code in a manner for you to see and with which to interact, such as fonts, colors, drop-down means, sliders, forms, etc. in order for all of this to work, through, there has to be something to support the front-end; this is where the backend comes into play.
Architecture of Front End user Architecture and Concepts The query cache plug in is implemented as a PHP extension. It is written in C and operates under the hood of PHP. During the startup of the PHP interpreter, it gets registered as a my sqlnd plug in to replace selected mysqland C methods. Here by, it can change the behavior of any PHP MySQL extension (mysqli, PDO_MYSQL, mysql)compiled to use the mysqlnd library without changing the extensions API. This makes the plug in compatible with each and every PHP MySQL application. Because existing APIs are not changed, it is almost transparent to use. Please, see the mysqlnd plug in API description for a discussion of the advantages of the plug in architecture and a comparison with proxy based solutions.
Transparent to use At PHP run time PECL/mysqlnd qc can proxy queries send from PHP (mysqlnd) to the MySQL server. It then inspects the statement string to find whether it shall cache its result. The time to live (TTL) of the cache entry can either be set globally or on a per statement basis. A statement is either cached if the plugin is int=structed to cache all statements globally using a or, if the query string starts with the SQL hint (/*qu=on*/). The plugin is capable of caching any query issued by calling appropriate API calls of any of the existing PHP MySQL extensions.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 17
GROCERIES ONLINE WORLD
Flexible storage: various storage handler Various storage handler are supported to offer different scopes for cache entries. Different scopes allow for different degrees in sharing cache entries among clients.
Default (built-in): process memory, scope: process, one or more web requests depending on PHP deployment model used APC: shared memory, scope: single server, multiple web requests SQLite: memory or file, scope: single server, multiple web requests MENCACHE: main memory, scope: single or multiple server, multiple web requests User (built-in): user-defined – any, scope: user-defined – any
Support for the APC, SQLite and MEMCACHE storage handler has to be enabled at compile time. The default and user handler are built-in. it is possible to switch between compiled-in storage handlers on a per query basis at run time. However, it is recommended to pick one storage handler and use it for all cache entries.
Built-in slam defense to avoid overloading To avoid overload situations the cache plugin has a built-in slam defense mechanism. If a popular cache entries expires many clients using the cache entries will try to refresh the cache entry. For the duration of the refresh many clients may access the database server concurrently. In the worst case, the database server becomes overloaded and it takes more and more time to refresh the cache entry, which in turn lets more and more clients try to refresh the cache entry. To prevent this from happening the plugin has a slam defense mechanism. If slam defense is enable and the plugin detects an expired cache entry it extends the life time of cache entry before it refreshes the cache entry. This way other concurrent accesses to the expired cache entry are still served from the cache for certain time. The other concurrent accesses to not trigger a concurrent refresh. Ideally, the cache entry gets refreshed by the client which extended the cache entries lifespan before other clients try to refresh the cache and potentially cause an overload situation.
Unique approach to caching PECL/mysqlnd_qc has a unique approach to caching result sets that is superior to applications based cache solutions. Applications based solutions first fetch a result set into PHP variables. Then, the PHP variables are serialized for storage in a persistent cache, and then unserialized when fetching. The mysqlnd query cache stores the raw wire protocol data sent from MySQL to PHP in its cache and replays it, if still valid, on a cache hit. This way, it saves an extra serialization step for a cache put that all application based solutions have to do. NATIONAL DEGREE COLLEGE, NANDYAL
Page 18
GROCERIES ONLINE WORLD
PHP – Introduction PHP is now officially known as “PHP: Hypertext Preprocessor”. It is a server-side scripting language usually written in an HTML context. Unlike an ordinary HTML page, a PHP script is not sent directly to a client by the server; instead, it is parsed by the PHP binary or module, which is server-side installed. HTML elements in the script are left alone, but PHP code is interpreted and executed. PHP code in a script – the possibilities is endless. The output from PHP code is combined with the HTML in the script and the result sent to the user’s webbrowser, therefore it can never tell the user whether the web-server users PHP or not, because the entire browser sees is HTML. PHP’s support for Apache and MySQL further increases its popularity. Apache is noe the most-used web-server in the world, and PHP can be compiled as an Apache module. MySQL is a free SQL database, and PHP provides a comprehensive set of functions for working with it. The combination of Apache, MySQL and PHP is all but unbeatable. That doesn’t mean that PHP cannot work in other environments or with other tools. In fact, PHP supports an extensive list of databases and web-servers. While in the mid-1990s it was ok to build sites, even relatively large sites, with hundreds of individual hard-coded HTML pages, today’s webmasters are making the most of the power of databases to manage their content more effectively and to personalize their sites according to individual user preferences. Reasons for using PHP There are some indisputable great reasons to work with PHP. As an open source product, PHP is well supported by a talented production team and a committed user community. Furthermore, PHP can be run on all the major operating systems with most servers. a) Learning PHP is easy Basic is easy any interpreted language should be easy to learn. Since you are isolated from the system (no pointers to use, no memory to allocate). The other advantage that all modern interpreted languages share is good associative array constructs. b) Its Performance While we can build an application that serves millions of pages a day on a server, when we really look at the performance of the language it sucks. We are still orders of magnitude from real performance. Not only that, but since PHP is designed around a single process model our ability to share data structures or connection pool resources is left to native code libraries.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 19
GROCERIES ONLINE WORLD c) The low cost There are many languages which are available at very less cost. There are some languages which are available at very less cost like below: PHP C C++ etc d) Its open source, we can modify it We can modify it if you need a hole in your head! Technically the point is that its an open source project and they release patches often. You’re point is that the community is actively working out the bugs. So, what any active language is doing this… Unfortunately C, C++ and Perl have all “died” at this point and will pretty much remain static at their current functionality. e) It’s Portability C is portable; it’s just the OS bits that aren’t. A lot PHP isn’t portable to Windows since people don’t use the OS abstractions to avoid some problems. It has interfaces to a large variety of database systems PHP supports a large variety of the database. f) Support available Online Support is available for using PHP. PHP Syntax You cannot view the PHP source code by selecting “View source” in the browser-you will only see the output from the PHP file, which is plain HTML. This is because the scripts are executed on the server before the result is sent back to the browser. Basic PHP Syntax A PHP scripting block always starts with . A PHP scripting block can be placed anywhere in the document. On servers with shorthand support enabled you can start a scripting block with . And end with?>. However, for maximum compatibility, we recommend that you use the standard from (
Page 20
GROCERIES ONLINE WORLD and libraries are three examples of organizations that depend heavily on some sort of database system. On the internet, search engines, online shopping, and even the website naming convention would be impossible without the use of a database. A database that is implemented and interfaced on a computer is often termed a database server. One of the fastest sql database servers currently on the market is the myself server developed by tax datakonsultAb. Mysql, available for download at www.mysql.com, offers the database programmer with an array of options and capabilities rarely seen in other database servers. Mysql is free of charge for those wishing to use it for private and commercial use. Those wishing to develop applications specifically using mysql should consult mysqls licensing section, as there is charge for licensing the product. These capabilities range a number of topics, including the following: a) b) c) d)
Ability to handle an unlimited number of simultaneous users. Capacity to handle 50,000,000+ records. Very fast command execution, perhaps the fastest to be found on the market. Easy and efficient user previlege system.
However perhaps the most interesting characteristic of all is the fact that it's free. Thats right, offers MySQL as a free product to the general public. Reasons to use MySQL a) Scalability and Flexibility The mysql database server provides the ultimate in scalability, sporting the capacity to handle deeply embedded applications with a footprint of only 1MB to running massive data warehouse holding terabytes of information. Platform flexibility is a stalwart feature of MySQL with all flavors of Linux, UNIX and Windows being supported.
b)High Performance A unique storage engine architecture allows database professionals to configure the mysql database server specifically for particular applications, with the end of the result being amazing performance results c) High availability Rock solid reliability and constant availability are hallmarks of mysql, with customers relying on mysql to guarantee around the clock uptime. Mysql offers a variety of high availability options from high speed master/slave replicate configurations, to specialized clusters servers offering instant failover, to third party vendors offering unique high availability solutions for the MySQL database server. NATIONAL DEGREE COLLEGE, NANDYAL
Page 21
GROCERIES ONLINE WORLD d) Robust Transactional Support Mysql offers of one of the most powerful transactional database engines on the market. Features include complete ACID support, unlimited row level locking, distributed transactional capability, and multi-version transaction support where readers never block writers and vice-versa. e)Web and Data Warehouse Strengths Mysql is the de-facto standard for high traffic web sites because of its high-performance query engine, tremendously fast data inserts capability, and strong support for specialized web functions like fast full text searches. f) Strong data protection Because guarding the data Assets of corporations is the number one job of database professionals, MySQL offers exceptional security features that ensure absolute data protection. In terms of database authentication my SQL provides powerful mechanism for ensuring only authorized users have entry to the database server with ability to block users down to client machine level being possible. g) Management Ease My SQL offers exceptional quick-start capability with the average time from software download to installation completion being less than 15 minutes. This rule holds true whether the platform is Microsoft Windows, Linux, Macintosh, or Unix. PHP Main Features of my SQL
Tested with a broad range of different compilers. Works on many different platforms. Tamil SQL server design is multilayered with independent models. Fully multithreaded using kernel threads. It can easily use multiple cpus if they are available. Provides transactional and non transactional storage engines. Uses very fast beat read disc tables with index compression. Relatively easy to add other storage engines. This is useful if you want to provide an SQL interface for an in-house database. A very fastest memory allocation system. Very fast joints using an optimized one sleep multi join. In memory hash tables which are used as temporary tables. SQL functions are implemented using a highly optimized class library and should be as fast as possible. Usually there is no memory allocation or tall after query initialization.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 22
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 23
GROCERIES ONLINE WORLD
SYSTEM DESIGN Introduction Software design sheets of the technical Kernel of software engineering process and is applied regardless of the development paradigm and of application. Designing is the first step in the development phase for any Engineering Product for system. The designer’s goal is to produce a model or representation of an entity that will later be built. Beginning, once system requirement have been specified analyzed, system design is the first of three technical activities design, code and test that is required to build and verify software. The importance can be stated with a single word quality. Design is the place where quality is fostered in software development. Design provides us with representation of software that can access for quality. Design is the only way that we can accurately translate a customer’s you into a finished software product or system. Software design serves as a foundation for all the software engineering steps that follow. Without a strong design various building an unstable system one that will be difficult to test, one whose quality cannot be assessed until the last stage. During design progressive refinement of data structure, program structure, and procedural details are developed reviewed and documented. system design can be viewed from either technical or project management perspective. From the technical point of view, design is comprised of four activities architectural design data structure design, interface design and procedural design. Data flow diagram A picture is worth a Thousand Words. A data flow diagram is traditional visual representation of the information flows within a system. A neat and clear DFD can detect a good amount of system requirements graphically. It can be manual, automatic, or combination of both. It shows how Information enters and leaves the system what changes the information and where information is stored. The purpose of a DFD is to show the scope and boundaries of a system as a whole. It may be used as a communication stool between a system analyst and any person who plays a part in the system that acts as the starting point of redesigning a system. It is usually beginning with A context diagram as the level 0 of DFD diagram, a simple representation of the whole system. To elaborate further from that, we drill down to a level one diagram with lower level functions decomposed from major functions of the system. This could continue to evolve to become a level 2 diagram when further analysis is required. Progression to level 3, 4 and so on as possible but anything beyond level 3 is not very common.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 24
GROCERIES ONLINE WORLD Please bear in mind that the level of details for decomposing particular functions really depending on the complexity of that functions. Customer-New User registration DFD
Customer
username, password
New User Registration
username, password
Customer
Use Case Diagram Signup
Login
View Item
Add to Cart
User
Ordered Items
Total Price of Cart
Remove items from cart
NATIONAL DEGREE COLLEGE, NANDYAL
Page 25
GROCERIES ONLINE WORLD
ER Diagram username id
password
Customer
Gives Online Shopping
Orders
Has
id
Products Add to cart id name
price
total name
price
quantity
quantity
NATIONAL DEGREE COLLEGE, NANDYAL
Page 26
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 27
GROCERIES ONLINE WORLD
DATA DICTIONARY Signinusers SNO 1 2 3
NAME Id Username Password
TYPE Int Varchar Varchar
DESCRIPTION Primary key for customer identification Security for user
Loginusers SNO 1
NAME id
TYPE Int
2 3
username password
Varchar Varchar
DESCRIPTION Primary key for customer identification Security for user
Products SNO 1
NAME id
TYPE Int
2 3 4
name image Price
Varchar Varchar Varchar
DESCRIPTION Primary key for identification of a product
Order Details SNO 1 2 3 4
NAME Item name Quantity Price Total
TYPE Varchar Int Int Int
NATIONAL DEGREE COLLEGE, NANDYAL
Page 28
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 29
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 30
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 31
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 32
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 33
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 34
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 35
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 36
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 37
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 38
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 39
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 40
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 41
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 42
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 43
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 44
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 45
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 46
GROCERIES ONLINE WORLD
CONCLUSION The internet has become a major resource in modern business, electronic shopping has gained significance not only from entrepreneurs but also from the customer’s point of view. For the entrepreneur electronic shopping generates new business opportunities and Ford customer it makes comparative shopping possible. As per a survey, most consumers of online stores are impulsive and usually make a decision to stay on a site within the first few seconds. “Website design is like a shop interior. If the shop looks poor or like hundreds of other shops the customer is most likely to skip to the other. Hence we have designed the project to provide the user with easy navigation, retrieval of data and necessary feedback as much as possible. In this project, the user is provided with an E-commerce website that can be used to buy books online. To implement this as a web application be used PHP, HTML, my SQL, JavaScript, CSS as the technology has several advantages such as enhance the performance, scalability, built in security and simplicity. We need a programming language such as PHP, HTML, CSS, and JavaScript was the language used to build this application. For the client browser to connect to the XAMPP engine we used as the web server. My SQL was used as backend database since it is one of the most popular open source data bases, and it provides fast data access, easy installation and simplicity. A good Shopping Cart design must be accompanied with user friendly shopping card application logic. It should be convenient for the customer to view the contents of the car and to be able to remove or add items to their cart. The shopping card application describe in this project provides a number of features that are designed to make the customer more comfortable.
NATIONAL DEGREE COLLEGE, NANDYAL
Page 47
GROCERIES ONLINE WORLD
NATIONAL DEGREE COLLEGE, NANDYAL
Page 48
GROCERIES ONLINE WORLD
BIBLIOGRAPHY HTML https://www.khanacademy.org/ https://www.youtube.com HTML: the complete reference Author: Thomas A. Powell Osborne/McGraw-Hill, 2001 – HTML (document markup language) CSS3 https://www.codecademy.com/ https://www.w3schools.com/ The book of CSS3 Author: Peter Gasston Php and MySQL
www.php.net/ https://www.google.com https://ww.mysql.com http://www.indianbloodgroup.com
XAMPP http://localhost:81/phpmyadmin http://localhost:81/book_store/
NATIONAL DEGREE COLLEGE, NANDYAL
Page 49