online shopping mall management 1

126
Online Shopping Mall Management 1 Introduction Introduction

Upload: santoshk31

Post on 02-Dec-2014

1.037 views

Category:

Documents


16 download

TRANSCRIPT

Page 1: Online Shopping Mall Management 1

Online Shopping Mall Management

1

I n t r o d u c t i o nI n t r o d u c t i o n

Page 2: Online Shopping Mall Management 1

Online Shopping Mall Management

INTRODUCTION:-

The project “Online Shopping Mall Management” is a web based application which makes shopping possible sitting at home. The website deals with different companies and displays out various products of the company which makes possible for the consumers to choose various items. It not only produces the description of the product but also provides the rate chart with specifications by which one can compare the product of one company to the same product of another company. By this process one can have the advantage for value of money along with the value of time.

In simple words the website acts as an interface between the company and the customers. The website also holds the responsibilities to advertise and give publicity and ratings to each of the products by which it acts as a mediator to prioritize the companies as well as the customers. The customer also can order his requirements by shape of demand draft, cash or credit card to buy the products sitting at home. At last the website enables the process of E-Commerce and E-Business.

OBJECTIVE:-

In today’s fast moving world, the most precious thing is time. Nowadays people don’t have time for themselves. On one hand they may have the purchasing power but on the other they don’t have the time to go out to choose their favorite commodities or things from place to place because transportation time, traffic and distance don’t allow people to take out time from their busy schedule and go out and buy their favorite things. To solve this problem we have come out with an idea i.e. Online Shopping.

This project holds the responsibility for shopping of different items on internet within minutes. The scope of this project starts with the varities of products available, differentiating a product of one company to another company and also makes it possible to know the prices of the items. It helps a customer to buy different items without any stress of marketing in shopping malls.

The advantages are:-

Easy shopping Wide range of items. Value for money of different items. Publicity of different companies and their products. Easy to purchase.

Need of the application:-

There are large numbers of commercial Online Shopping websites offering large number of products tailored to meet the shopping interests of large number of customers. These online marketplaces have thousands of products listed under various categories.

Problem:

2

Page 3: Online Shopping Mall Management 1

Online Shopping Mall Management

The basic problems with the existing systems are the non-interactive environment they provide to the users.

The use of traditional user interfaces which make continuous post backs to the server; each post back makes a call to the server, gets the response and then refreshes the entire web form to display the result. This scenario adds an extra trade off causing a delay in displaying the results.

Use of traditional and non user friendly interfaces that are hard to use. A search engine that would display the results without allowing the users to further

filter the results based on various parameters.

Solution: The motive of this Online Shopping Web Application is to allow the user to play with the

search tool and create different combinatorial search criterion to perform exhaustive search.

Provide Interactive interface through which a user can interact with different areas of application easily.

A search engine that provides an easy and convenient way to search for products specific to their needs. The search engine would list a set of products based on the search term and the user can further filter the list based on various parameters.

Provide a feature thereby allowing the user to add products to or remove products from the shopping cart.

Scope: The current system can be extended to allow the user to create accounts and save products

in to wish list. The current system is confined only to the shopping cart process. It can be extended to

have an easy to use check out process.

Platform Specifications:-

Hardware Specification:-

Pentium4-2.26Ghz.

40 GB hard disk.

256 MB RAM

Key board.

SVGA Monitor

Mouse

Software Specification:-

Windows XP

3

Page 4: Online Shopping Mall Management 1

Online Shopping Mall Management

Platform .Net Framework & IIS, Visual Studio 2010 SQL Server 2008

Module Description:-

The module description of the project can be divided into two parts i.e the Administrator and the user.

So this project has two modules

Administrator Module User Module

Administrator Module :-

This module is responsible for maintaining all the administrative part.

User Module:-

This module is responsible for viewing the site, selecting the product, entering user information as well as doing the transaction.

4

Page 5: Online Shopping Mall Management 1

Online Shopping Mall Management

5

System AnalysisSystem Analysis

Page 6: Online Shopping Mall Management 1

Online Shopping Mall Management

What is system?

System Analysis refers to the process of examining a business situation with the intent of improving it through better procedures and methods Requirement analysis is the first technical step in this process. It is a process of discovery, refinement, modelling and specification. It is the systematic use of proven principles, techniques, languages and tools for the cost-effective analysis, documentation and on-going evolution of user needs and the specification of external behaviour of a system to satisfy those user needs.

The very first thing is the problem recognition. After the need of the project is identified the implementation of the project is identified – who is going to use the website, what all are the points needed in modeling the design of the website.

In the broad sense, a system is simply a set of components that interact to accomplish some purpose. Systems are all around us. As computers are used more and more by persons who are not computer professionals, the face of systems development is taking on an additional dimension. Users themselves are undertaking development of some of the systems they use, as the executive in the vignette emphasized. These different situations are represented by three distinct approaches to the development of computer information systems: -

Systems Development Life Cycle. Structured Analysis Development Method. Systems Prototype Method.

Systems development, a process consisting of two major steps of systems analysis and design, starts when management of sometimes systems development personnel realizes that a particular business system needs improvement. Systems development is classically thought of as the set of activities that analysts, designers and users carry out to develop and implement an information system.

6

Page 7: Online Shopping Mall Management 1

Online Shopping Mall Management

Identification of Need

The existing system work manually. The existing system has got lot of intricacies within itself and need lot of human effort and paper works. All above the data need to be maintained on ledgers and maintaining this is a tedious and risky process. As the transactions increases, so the data too. So the task of maintaining them increases exponentially. To view a data may need lot of paper to be searched.

Some of the negative aspects of the existing system are as follows:

1) Course of action is time consuming. Wherever a need for search arises, the process evolves search through paper records.

2) Readability of records is constrained. All the records may not be handled or written by the same person. So the format and style of records differ and hence it is difficult to understand.

3) Paper records are easily damaged in course of time. The life time of paper record is unreliable less that it easily gets spoiled.

4) Expenditure is high. Manual system needs added man power.5) Prone to corruption by unauthorized users. Securing of manual system is not fully

guaranteed. Inaccuracy can be expected. Data can get easily scratched. Techniques used are more complicated. Proper techniques are not exposed, so the functioning is intricate.

7

Page 8: Online Shopping Mall Management 1

Online Shopping Mall Management

Feasibility Report

System Feasibility:-

Feasibility is an important phase in the software development process it enables the developers to have an assessment of the product being developed. It refers to the feasibility study of the product in terms of outcomes of the product, operational use and technical support required for implementing it. Feasibility study should be performed on the basis of various criteria and parameters. The system feasibility can be divided into the following sections:

Economic Feasibility Operational Feasibility

Technical Feasibility

Resource Feasibility

Economic Feasibility:-

It refers to the benefits or outcomes we are deriving from the product as compared to the total cost we are spending for developing the product. If the benefits are more or less the same as the older system then it is not feasible to develop the product.

The project is economically feasible as the only cost involved is having a computer with the minimum requirements mentioned earlier. For the users to access the application, the only cost involved will be in getting access to the Internet.

Operational Feasibility:-

It refers to the feasibility of the product to be operational. Some products may work very well at the design and implementation but many fail in the real time environment. It introduces the study of human resources required and their technical expertise.

This product is operationally feasible as it is designed specifically for Destination Orissa project name. This provides consistent and integrated data management.

It also provides information at all levels of people.

Technical Feasibility:-

8

Page 9: Online Shopping Mall Management 1

Online Shopping Mall Management

The system is self-explanting and does not need any entire sophisticated training. A system has been built by concentrating on the graphical uses interface concepts, the application can also be handled very easily with a novice uses. The overall time that a uses needs to get trained is less than 15 minutes.

The system has been added with features of menu device and button interaction methods, which makes him the master as he starts working through the environment. As the software that were used as developing this application are very economical and are readily available is the market the only time that is lost by the customer is just installation time.

To deploy the application, the only technical aspects needed are mentioned below:

Operating Environment: Win 2000/XPPlatform : .Net Framework & IIS, Visual Studio 2010Database : SQL Server 2008

For Users:

Internet BrowserInternet Connection

Resource Feasibility:-

This involves questions such as how much time is available to build the new website, when it can be built, whether it interferes with normal operations, type and amount of resources required, dependencies, etc. Contingency and mitigation plans should also be stated here so that if the website does over run the web-browser is ready for this eventuality.

9

Page 10: Online Shopping Mall Management 1

Online Shopping Mall Management

Project Planning

I took assignment for developing a website for ‘Online Shopping Mall Management’ to carry out its business transaction from remote location. The Planning of this project will include following things:

Team Structure. Topic understanding. Modular break-up of the system Processor logic for each module Database requirements

Team Structure:-

The project team comprises of three members who worked as developers and a project leader who assigned the whole task and provided the finest details of the problem. The project coordinator supervises the whole project work and sort out the problems occurred during the development phase.

Topic Understanding:-

It is vital that the field of application as introduced in the project may be totally a new field. So as soon as I took this project, I carefully went through the project to identify the requirements of the project.

Modular break-up of the System:-

It consists of following phases:

Identify the various modules in the system List them in the right hierarchy Identify their priority of development

10

Page 11: Online Shopping Mall Management 1

Online Shopping Mall Management

Project Scheduling

Sl.No Activity Description Planned Date of Completion

Start Date Completion Date

Remarks

1. Analyzing project 15 Jan 2011 19 Jan 2011 25 Jan 2011 OK

2. Feasibility Study

26 Jan 2011 26 Jan 2011 31 Jan 2011 OK

3. Creating the database and database objects And Review.

1 Feb 2011 1 Feb 2011 15 Feb 2011 OK

4. rough sketch of screen design and Deciding on Naming Conventions

16 Feb 2011 16 Feb 2011 28 Feb 2011 OK

5. Design Review 1 March 2011 1 March 2011 8 March 2011 OK

6. Coding of individual modules

9 March 2011 9 March 2011 4 April 2011 OK

7. Review and debugging errors

5 April 2011 5 April 2011 10 April 2011 OK

8. Testing of individual modules and integrating

11 April 2011 11 April 2011 17 April 2011 OK

9. Debugging errors after integration and final testing.

18 April 2011 18 April 2011 21 April 2011 OK

10. Filling up project document formats.(Data Dictionary, DFD’s, E-R Diagrams, Screen Shots etc)

22 April, 2011 22 April, 2011 23 April 2011 OK

11

Page 12: Online Shopping Mall Management 1

Online Shopping Mall Management

12

Software requirement specifications

Page 13: Online Shopping Mall Management 1

Online Shopping Mall Management

What is SRS?

Software requirement specification (SRS) is the starting point of the software development activity. Little importance was given to this phase in the early days of software development. The emphasis was first on coding and then shifted to design.

As systems grew more complex, it became evident that the goals of the entire system cannot be easily comprehended. Hence the need for the requirement analysis phase arose. Now, for large software systems, requirements analysis is perhaps the most difficult activity and also the most error prone.

Some of the difficulty is due to the scope of this phase. The software project is initiated by the client’s needs. In the beginning these needs are in the minds of various people in the client organization. The requirement analyst has to identify the requirements by talking to these people and understanding their needs. In situations where the software is to automate a currently manual process, most of the needs can be understood by observing the current practice.

The SRS is a means of translating the ideas in the minds of the clients (the input), into formal document (the output of the requirements phase). Thus, the output of the phase is a set of formally specified requirements, which hopefully are complete and consistent, while the input has none of these properties.

Purpose and Scope:-

Purpose: The main purpose for preparing this document is to give a general insight into the analysis and requirements of the existing system or situation and for determining the operating characteristics of the system.

Scope: This Document plays a vital role in the development life cycle (SDLC) .As it describes the complete requirement of the system. It is meant for use by the developers and will be the basic during testing phase. Any changes made to the requirements in the future will have to go through formal change approval process.

Developers Responsibilities Overview:-

The developer is responsible for:

1) Developing the system, which meets the SRS and solving all the requirements of the system?

2) Demonstrating the system and installing the system at client's location after the acceptance testing successful.

3) Submitting the required user manual describing the system interfaces to work on it and also the documents of the system.

4) Conducting any user training that might be needed for using the system.

13

Page 14: Online Shopping Mall Management 1

Online Shopping Mall Management

5) Maintaining the system for a period of one year after installation.

Functional Requirements:-

Output Design:-

Outputs from computer systems are required primarily to communicate the results of processing to users. They are also used to provide a permanent copy of the results for later consultation. The various types of outputs in general are:

External Outputs, whose destination is outside the organization, Internal Outputs whose destination is within organization and they are the User’s main

interface with the computer. Operational outputs whose use is purely within the computer department. Interface outputs, which involve the user in communicating directly with

Output Definition:-

The outputs should be defined in terms of the following points:

Type of the output Content of the output Format of the output Location of the output Frequency of the output Volume of the output Sequence of the output

It is not always desirable to print or display data as it is held on a computer. It should be decided as which form of the output is the most suitable.

For Example

Will decimal points need to be inserted Should leading zeros be suppressed.

Output Media:-

In the next stage it is to be decided that which medium is the most appropriate for the output. The main considerations when deciding about the output media are:

The suitability for the device to the particular application. The need for a hard copy. The response time required. The location of the users The software and hardware available.

14

Page 15: Online Shopping Mall Management 1

Online Shopping Mall Management

Keeping in view the above description the project is to have outputs mainly coming under the category of internal outputs. The main outputs desired according to the requirement specification are:

The outputs were needed to be generated as a hot copy and as well as queries to be viewed on the screen. Keeping in view these outputs, the format for the output is taken from the outputs, which are currently being obtained after manual processing. The standard printer is to be used as output media for hard copies.

Input Design:-

Input design is a part of overall system design. The main objective during the input designs is as given below:

To produce a cost-effective method of input.

To achieve the highest possible level of accuracy. To ensure that the input is acceptable and understood by the user.

Input Stages:-

The main input stages can be listed as below:

Data recording Data transcription Data conversion Data verification Data control Data transmission Data validation Data correction

Input Types:-

It is necessary to determine the various types of inputs. Inputs can be categorized as follows:

External inputs, which are prime inputs for the system. Internal inputs, which are user communications with the system. Operational, which are computer department’s communications to the system? Interactive, which are inputs entered during a dialogue.

Input Media:-

15

Page 16: Online Shopping Mall Management 1

Online Shopping Mall Management

At this stage choice has to be made about the input media. To conclude about the input media consideration has to be given to;

Type of input Flexibility of format Speed Accuracy Verification methods Rejection rates Ease of correction Storage and handling requirements Security Easy to use Portabilility

Keeping in view the above description of the input types and input media, it can be said that most of the inputs are of the form of internal and interactive. As Input data is to be the directly keyed in by the user, the keyboard can be considered to be the most suitable input device.

Error Avoidance:-

At this stage care is to be taken to ensure that input data remains accurate form the stage at which it is recorded up to the stage in which the data is accepted by the system. This can be achieved only by means of careful control each time the data is handled.

Error Detection:-

Even though every effort is make to avoid the occurrence of errors, still a small proportion of errors is always likely to occur, these types of errors can be discovered by using validations to check the input data.

Data Validation:-

Procedures are designed to detect errors in data at a lower level of detail. Data validations have been included in the system in almost every area where there is a possibility for the user to commit errors. The system will not accept invalid data. Whenever an invalid data is keyed in, the system immediately prompts the user and the user has to again key in the data and the system will accept the data only if the data is correct. Validations have been included where necessary.

The system is designed to be a user friendly one. In other words the system has been designed to communicate effectively with the user. The system has been designed with pop-up menus.

User Interface Design:-

It is essential to consult the system users and discuss their needs while designing the user interface:

USER INTERFACE SYSTEMS CAN BE BROADLY CLASIFIED AS:

16

Page 17: Online Shopping Mall Management 1

Online Shopping Mall Management

1. User initiated interface the user is in charge, controlling the progress of the user/computer dialogue. In the computer-initiated interface, the computer selects the next stage in the interaction.

2. Computer initiated interfaces

In the computer initiated interfaces the computer guides the progress of the user/computer dialogue. Information is displayed and the user response of the computer takes action or displays further information

User Initiated Interfaces:-

User initiated interfaces fall into tow approximate classes:

1. Command driven interfaces: In this type of interface the user inputs commands or queries which are interpreted by the computer.

2. Forms oriented interface: The user calls up an image of the form to his/her screen and fills in the form. The forms oriented interface is chosen because it is the best choice.

Computer-Initiated Interfaces:-

The following computer – initiated interfaces were used:

1. The menu system for the user is presented with a list of alternatives and the user chooses one; of alternatives.

2. Questions – answer type dialog system where the computer asks question and takes action based on the basis of the users reply.

Right from the start the system is going to be menu driven, the opening menu displays the available options. Choosing one option gives another popup menu with more options. In this way every option leads the users to data entry form where the user can key in the data.

Error Message Design:-

The design of error messages is an important part of the user interface design. As user is bound to commit some errors or other while designing a system the system should be designed to be helpful by providing the user with information regarding the error he/she has committed.

This application must be able to produce output at different modules for different inputs.

Performance Requirements:-

Performance is measured in terms of the output provided by the application.

17

Page 18: Online Shopping Mall Management 1

Online Shopping Mall Management

Requirement specification plays an important part in the analysis of a system. Only when the requirement specifications are properly given, it is possible to design a system, which will fit into required environment. It rests largely in the part of the users of the existing system to give the requirement specifications because they are the people who finally use the system. This is because the requirements have to be known during the initial stages so that the system can be designed according to those requirements. It is very difficult to change the system once it has been designed and on the other hand designing a system, which does not cater to the requirements of the user, is of no use.

The requirement specification for any system can be broadly stated as given below:

The system should be able to interface with the existing system

The system should be accurate The system should be better than the existing system

The existing system is completely dependent on the user to perform all the duties.

SPECIFICATIONS:-

The website Requirements Specification is produced at the culmination of the analysis task. The function and performance allocated to website as part of system engineering are refined by establishing a complete information description, a detailed functional description, a representation of system behaviour, an indication of performance requirements and design constraints, appropriate validation criteria, and other information pertinent to requirements.

The Introduction of the website requirement specification states the goals and objectives of the website, describing it in the context of the computer-based system. Actually the introduction may be nothing more than the software scope of the planning document. The information description provides a detailed description of the problem that the website must solve. Information content, flow, and structure are documented. Hardware, Software and human interfaces are described for external system elements and internal software functions. For this project we need some special type of environment for setup. This is as follows:

Software Interfaces

Following software are required for developing Web based application:

I. Operating System Windows XP Professional

II. Environment VisualStudio.Net 2010

III. Frontend Tool C#

IV. Technology ASP.NET

18

Page 19: Online Shopping Mall Management 1

Online Shopping Mall Management

V. Versioning Tools IIS 5.0.

VI. Backend Tool SqlServer2008

VII. Data Access Tool ADO.NET.

VIII. Reports Crystal Report.

Hardware Interfaces

It's a web – based project, so a robust hardware configuration is required. The hardware requirements are:

The Client Machines:

Processor : Intel Pentium IV

Speed : 1.4GHz

RAM : 512 MB

Hard Disk : 40 GB

Key Board (104 keys) : Standard

Screen resolution : 800 x 600 or higher

The Server Machines:

Processor : Intel Pentium IV

Speed : 1.4GHz

RAM : 512MB

Hard Disk : 60 to 80 GB

Screen resolution : 800 x 600 or higher

19

Page 20: Online Shopping Mall Management 1

Online Shopping Mall Management

20

Programming Language & Development Tools

Page 21: Online Shopping Mall Management 1

Online Shopping Mall Management

ENVIRONMENT: Introducing the .NET Platform:-

The .NET Framework is a managed type-safe environment for application development and execution. The .NET Framework manages all aspects of your program’s execution. It allocates memory for the storage of data and instructions, grants or denies the appropriate permissions to your application, initiates and manages application execution, and manages the reallocation of memory from resources that are no longer needed. The .NET Framework consists of two main components: the common language runtime and the .NET Framework class library.

The common language runtime can be thought of as the environment that manages code execution. It provides core services, such as code compilation, memory allocation, thread management, and garbage collection. Through the common type system (CTS), it enforces strict type-safety and ensures that code is executed in a safe environment by also enforcing code access security.

The .NET Framework class library provides a collection of useful and reusable types that are designed to integrate with the common language runtime. The types provided by the .NET Framework are object-oriented and fully extensible, and they allow you to seamlessly integrate your applications with the .NET Framework. The .NET Framework is designed for cross-language compatibility, which means, simply, that .NET components can interact with each other no matter what supported language they were written in originally. So, an application written in Microsoft Visual Basic .NET might reference a dynamic-link library (DLL) file written in Microsoft Visual C#, which in turn might access a resource written in managed Microsoft Visual C++ or any other .NET language. This language interoperability extends to full object-oriented inheritance. A Visual Basic .NET class might be derived from a C# class, for example, or vice versa.

This level of cross-language compatibility is possible because of the common language runtime. When a .NET application is compiled, it is converted from the language in which it was written (Visual Basic .NET, C#, or any other .NET-compliant language) to Microsoft Intermediate Language (MSIL or IL). MSIL is a low-level language that the common language runtime can read and understand. Because all .NET executables and DLLs exist as MSIL, they can freely interoperate. The Common Language Specification (CLS) defines the minimum standards to which .NET language compilers must conform. Thus, the CLS ensures that any source code successfully compiled by a .NET compiler can interoperate with the .NET Framework.

The CTS ensures type compatibility between .NET components. Because .NET applications are converted to IL prior to deployment and execution, all primitive data types are represented as .NET types. Thus, a Visual Basic Integer and a C# into are both represented in IL code as a System.Int32. Because both languages use a common type system, it is possible to transfer data between components and avoid time-consuming conversions or hard-to-find errors.

Visual Studio .NET ships with languages such as Visual Basic .NET, Visual C#, and Visual C++ with managed extensions, as well as the JScript scripting language. You can also

21

Page 22: Online Shopping Mall Management 1

Online Shopping Mall Management

write managed code for the .NET Framework in other languages. Third-party tools and compilers exist for FORTRAN, COBOL, Perl, and a host of other languages. All of these languages share the same cross-language compatibility and inheritability. Thus, you can write code for the .NET Framework in the language of your choice, and it will be able to interact with code written for the .NET Framework in any other language.

Microsoft .NET Architecture Hierarchy

Features of the .NET Platform Multilanguage Development Platform and Processor Independence Versioning Support Security

Components of the .NET Architecture

As we mentioned earlier, there is a lot to the .NET Framework. In this section, we identify the individual components and describe their features and how they fit into the overall picture.

. NET Runtime

The heart of the .NET Framework is the CLR. Similar in concept to the Java Virtual Machine, it is a runtime environment that executes MSIL code. Unlike the Java environment, which is the concept of one language for all purposes, the .NET platform supports multiple programming

22

COM+ ServicesWindows

Common Language Specification (CLS)

.Net Framework Classes

ADO.Net and XML

Common Language Runtime

Windows Forms

C# Jscript.Vb.net …V

I

S

U

A

L

S

T

Web Form Web Service

Page 23: Online Shopping Mall Management 1

Online Shopping Mall Management

languages through the use of the Common Language Specification, which defines the output required of compilers that want to target the CLR.

Managed/Unmanaged Code

Because all code targeted at the .NET platform runs with the CLR environment, it is referred to as managed code. This simply means that the execution of the code and its behavior is managed by the CLR. The metadata available with managed code contains the information required to allow the CLR to manage its safe execution. By safe execution we mean memory and security management, type safety, and inter-language interoperability. Unmanaged code can write to areas of memory it does not own, execute instructions at arbitrary locations in memory, and exhibit any number of other bad behaviors that cannot be managed or prevented by the CLR. Most of the applications running on Windows today are unmanaged.

Intermediate Language

The .NET intermediate language, MSIL, is defined in the Common Language Specification. It is an amalgam of a low-level language similar in many ways to a Machine language and a higher object language. You can write applications directly In MSIL, much as you can write directly in assembly language. Thankfully, this is Not necessary for most purposes.

Compiling

Running your C# code through the C# compiler produces two important pieces of Information: code and metadata. The following sections describe these two items and then finish up by examining the binary building block of .NET code: the assembly.

Microsoft Intermediate Language (MSIL)

The code that is output by the C# compiler is written in a language called Microsoft Intermediate Language or MSIL. MSIL is made up of a specific set of instructions that Specify how your code should be executed. It contains instructions for operations such as variable initialization, calling object methods, and error handling, just to name a few. C# is not the only language in which source code changes into MSIL during the compilation process. All .NET-compatible languages, including Visual Basic .NET and Managed C++, produce MSIL when their source code is compiled. Because all of the .NET languages compile to the same MSIL instruction set, and because all of the .NET languages use the same runtime, code from different languages and different compilers can work together easily.

MSIL is not a specific instruction set for a physical CPU. It knows nothing about the CPU in your machine, and your machine knows nothing about MSIL. How, then, does your .NET code run at all, if your CPU can't read MSIL? The answer is that the MSIL code is turned into CPU-specific code when the code is run for the first time. This process is called "just-in-time" compilation, or JIT. The job of a JIT compiler is to translate your generic MSIL code into machine code that can be executed by your CPU. You may be wondering about what seems like an extra step in the process. Why generate MSIL when a compiler could generate CPU-specific code directly? After all, compilers have always done this in the past. There are a couple of reasons for this.

23

Page 24: Online Shopping Mall Management 1

Online Shopping Mall Management

First, MSIL enables your compiled code to be easily moved to different hardware. Suppose you've written some C# code and you'd like it to run on both your desktop and a handheld device. It's very likely that those two devices have different types of CPUs. If you only had a C# compiler that targeted a specific CPU, then you'd need two C# compilers: one that targeted your desktop CPU and another that targeted your handheld CPU. You'd have to compile your code twice, ensuring that you put the right code on the right device. With MSIL, you compile once. Installing the .NET Framework on your desktop machine includes a JIT compiler that translates your MSIL into CPU-specific code for your desktop.

Installing the .NET Framework on your handheld includes a JIT compiler that translates that same MSIL into CPU-specific code for your handheld. You now have a single MSIL code base that can run on any device that has a .NET JIT compiler. The JIT compiler on that device takes care of making your code run on the device. Another reason for the compiler's use of MSIL is that the instruction set can be easily read by a verification process. Part of the job of the JIT compiler is to verify your code to ensure that it is as clean as possible. The verification process ensures that your code is accessing memory properly and that it is using the correct variable types when calling methods that expect a specific type. These checks ensure that your code doesn't execute any instructions that could make the code crash.

The MSIL instruction set was designed to make this verification process relatively straightforward. CPU-specific instruction sets are optimized for quick execution of the code, but they produce code that can be hard to read and, therefore, hard to verify. Having a C# compiler that directly outputs CPU-specific code can make code verification difficult or even impossible. Allowing the .NET Framework JIT compiler to verify your code ensures that your code accesses memory in a bug-free way and those variable types are properly used.

24

Page 25: Online Shopping Mall Management 1

Online Shopping Mall Management

The Execution Flow In .Net

25

Page 26: Online Shopping Mall Management 1

Online Shopping Mall Management

Common Type System

The .NET applications, regardless of their source languages all share a common type system. What this means is that you no longer have to worry when doing development in multiple languages about how a data type declared in one language needs to be declared in another. Any .NET type has the same attributes regardless of the language it is used in. Furthermore, all .NET data types are objects, derived from System. Object. Because all data types derive from a common base class, they all share some basic functionality, for example the ability to be converted to a string, serialized, or stored in a collection.

. NET Base Class Library (BCL)

If I could have bought a library that offered everything the .NET Base Class Library offers when I started programming, a year’s salary would have seemed reasonable—there really is that much to it. Almost everything in the .NET environment is contained within the BCL. Let’s look at a “Hello World” example:

Using System;

Class Hello

{Public static void Main ()

{Console.WriteLine ("Hello World");}

}

The only function contained in this simple program is a call to the Write Line method of the Console class. What is really unique about the .NET environment is that .NET languages don’t have to implement even the most basic functions; they are available in the BCL. Because all .NET languages share the same common set of libraries, the code being executed by your C# program is the same code being executed by a program written in another language. This means that all languages that target the .NET environment essentially share the same capabilities, except they have different syntax.

Assemblies

Assemblies are the means of packaging and deploying applications and components.

In .NET. Just like a compiled application or component today, assemblies can be made up of either single or multiple files. An assembly contains metadata information (covered in the next section), which is used by the CLR for everything from type checking and security to actually invoking the components methods. All of this means that you don’t need to register .NET components, unlike COM objects.

Sometimes, you will use C# to build an end-user application. These applications are packaged as executable files with an extension of .EXE. Windows has always worked with .EXE files as application programs, and C# fully supports building .EXE files.

26

Page 27: Online Shopping Mall Management 1

Online Shopping Mall Management

However, there may be times when you don't want to build an entire application. Instead, you may want to build a code library that can be used by others. You may also want to build some utility classes in C#, for example, and then hand the code off to a Visual Basic .NET developer, who will use your classes in a Visual Basic .NET application. In cases like this, you won't be building an application. Instead, you'll be building an assembly. An assembly is a package of code and metadata. When you deploy a set of classes in an assembly, you are deploying the classes as a unit; and those classes share the same level of version control, security information, and activation requirements. Think of an assembly as a "logical DLL." If you're familiar with Microsoft Transaction Server or COM+, you can think of an assembly as the .NET equivalent of a package. There is two types of assemblies: private assemblies and global assemblies. When you build your assembly, you don't need to specify whether you want to build a private or a global assembly. The difference is apparent when you deploy your assembly. With a private assembly, you make your code available to a single application. Your assembly is packaged as a DLL, and is installed into the same directory as the application using it. With a deployment of a private assembly, the only application that can use your code is the executable that lives in the same directory as your assembly. If you want to share your code among many applications, you might want to consider deploying your code as a global assembly. Global assemblies can be used by any .NET application on the system, regardless of the directory in which it is installed. Microsoft ships assemblies as a part of the .NET Framework, and each of the Microsoft assemblies is installed as a global assembly. The .NET Framework contains a list of global assemblies in a facility called the global assembly cache, and the .NET Microsoft Framework SDK includes utilities to both install and remove assemblies from the global assembly cache.

Metadata

The compilation process also outputs metadata, which is an important piece of the .NET code sharing story. Whether you use C# to build an end-user application or you use C# to build a class library to be used by someone else's application, you're going to want to make use of some already-compiled .NET code. That code may be supplied by Microsoft as a part of the .NET Framework, or it may be supplied by a user over the Internet. The key to using this external code is letting the C# compiler know what classes and variables are in the other code base so that it can match up the source code you write with the code found in the precompiled code base that you're working with. Think of metadata as a "table of contents" for your compiled code. The C# compiler places metadata in the compiled code along with the generated MSIL. This metadata accurately describes all the classes you wrote and how they are structured. All of the classes' methods and variable information is fully described in the metadata, ready to be read by other applications. Visual Basic .NET, for example, may read the metadata for a .NET library to provide the IntelliSense capability of listing all of the methods available for a particular class. If you've ever worked with COM (Component Object Model), you may be familiar with type libraries. Type libraries aimed to provide similar "table of contents" functionality for COM objects. However, type libraries suffered from some limitations, not the least of which was the fact that not all of the data relevant to the object was put into the type library. Metadata in .NET does not have this shortcoming. All of the information needed to describe a class in code is placed into the metadata. You can think of metadata as having all of the benefits of COM type libraries without the limitations.

27

Page 28: Online Shopping Mall Management 1

Online Shopping Mall Management

Just In Time Compilation

The .NET CLR utilizes Just In Time (JIT) compilation technology to convert the IL code back to a platform/device–specific code. In .NET, you currently have three types of JIT compilers: ss.com

Pre-JIT: This JIT compiles an assembly’s entire code into native code at one stretch. You would normally use this at installation time.

Economy-JIT: You would use this JIT on devices with limited resources. It compiles the IL code bit-by-bit, freeing resources used by the cached native code when required.

Normal JIT: The default JIT compiles code only as it is called and places the resulting native code in the cache. In essence, the purpose of a JIT compiler is to bring higher performance to interpreted code by placing the compiled native code in a cache, so that when the next call is made to the same method/procedure, the cached code is executed, resulting in an increase in application speed.

Garbage Collection

Memory management is one of those housekeeping duties that take a lot of programming time away from developing new code while you track down memory leaks. A day spent hunting for an elusive memory problem usually isn’t a productive day.

The .NET hopes to do away with all of that within the managed environment with the garbage collection system. Garbage collection runs when your application is apparently out of free memory, or when it is implicitly called but its exact time of execution cannot be determined. Let’s examine how the system works. When your application requests more memory, and the memory allocator reports that there is no more memory on the managed heap, garbage collection is called. The garbage collector starts by assuming everything in memory is trash that can be freed. It then walks though your application’s memory, building a graph of all memory that is currently referenced by the application. Once it has a complete graph, it compacts the heap by moving all the memory that is genuinely in use together at the start of the free memory heap. After this is complete, it moves the pointer that the memory allocator uses to determine where to start allocating memory from the top of this new heap. It also updates all of your application’s references to point to their new locations in memory. This approach is commonly called a mark and sweep implementation. The exception to this is with individual objects over 20,000 bytes. Very large objects are allocated from a different heap, and when this heap is garbage collected,

They are not moved, because moving memory in this size chunks would have an adverse effect on application performance.

28

Page 29: Online Shopping Mall Management 1

Online Shopping Mall Management

TECNOLOGY: The ASP.NET :-

ASP.NET adds many features to and enhances many of the capabilities in classic ASP. ASP.NET isn’t merely an incremental improvement to ASP; it’s really a completely new product, albeit a new product designed to allow the same development experience that ASP developers have enjoyed. ASP.NET is a set of components that provide developers with a framework with which to implement complex functionality. Two of the major improvements of ASP.NET over traditional ASP are scalability and availability. ASP.NET is scalable in that it provides state

Services that can be utilized to manage session variables across multiple Web servers in a server farm. Additionally, ASP.NET possesses a high performance process model that can detect application failures and recover from them. Along with improved availability and scalability, ASP.NET provides the following additional benefits:

Simplified development: ASP.NET offers a very rich object model that developers can use to reduce the amount of code they need to write.

Language independence: ASP pages must be written with scripting. In other words, ASP pages must be written in a language that is interpreted rather than compiled. ASP.NET allows compiled languages to be used, providing better performance and cross-language compatibility.

Simplified deployment: With .NET components, deployment is as easy as copying a component assembly to its desired location.

Cross-client capability: One of the foremost problems facing developers today is writing code that can be rendered correctly on multiple client types. For example, writing one script that will render correctly in Internet Explorer 5.5 and Netscape Navigator 4.7, and on a PDA and a mobile phone is very difficult, if not impossible, and time consuming. ASP.NET provides rich server-side components that can automatically produce output specifically targeted at each type of client.

Web services: ASP.NET provides features that allow ASP.NET developers to effortlessly create Web services that can be consumed by any client that understands HTTP and XML, the de facto language for inter-device communication.

Performance: ASP.NET pages are compiled whereas ASP pages are interpreted. When an ASP.NET page is first requested, it is compiled and cached, or saved in memory, by the .NET Common Language Runtime (CLR). This cached copy can then be re-used for each subsequent request for the page. Performance is thereby improved because after the first request, the code can run from a much faster compiled version.

29

Page 30: Online Shopping Mall Management 1

Online Shopping Mall Management

PROGRAMMMING LANUAGE: C#.Net:-

Introducing C#

C#, the new language introduced in the .NET Framework, is derived from C++. However, C# is a modern, objected-oriented (from the ground up) type-safe language.

Language features

The following sections take a quick look at some of the features of the C# language

Classes

All code and data in C# must be enclosed in a class. You can't define a variable outside of a class, and you can't write any code that's not in a class. Classes can have constructors, which execute when an object of the class is created, and a destructor, which executes when an object of the class is destroyed. Classes support single inheritance, and all classes ultimately derive from a base class called object. C# supports versioning techniques to help your classes evolve over time while maintaining compatibility with code that uses earlier versions of your classes. As an example, take a look at a class called Family. This class contains the two static fields that hold the first and last name of a family member as well as a method that returns the full name of the family member.

Class Class1

{

Public string First Name;

Public string Last Name;

Public string Full Name ()

{

Return First Name + Last Name;

}

}

Note Single inheritance means that a C# class can inherit from only one base class.

C# enables you to group your classes into a collection of classes called a namespace.

Namespaces have names, and can help organize collections of classes into logical groupings. These classes are contained within the Microsoft namespace.

30

Page 31: Online Shopping Mall Management 1

Online Shopping Mall Management

Data types

C# lets you work with two types of data: value types and reference types. Value types hold actual values. Reference types hold references to values stored elsewhere in memory. Primitive types such as char, int and float, as well as enumerated values and structures, are value types. Reference types hold variables that deal with objects and arrays. C# comes with predefined reference types (object and string), as well as predefined value types (byte, short, int, long, byte, ushort, uint, ulong, float, double, bool, char, and decimal). You can also define your own value and reference types in your code. All value and reference types ultimately derive from a base type called object.

C# allows you to convert a value of one type into a value of another type. You can work with both implicit conversions and explicit conversions. Implicit conversions always succeed and don't lose any information (for example, you can convert an int to a long without losing any data because a long is larger than an int). Explicit conversions may cause you to lose data (for example, converting a long into an int may result in a loss of data because a long can hold larger values than an int). You must write a cast operator into your code to make an explicit conversion happen.

You can work with both one-dimensional and multidimensional arrays in C#.

Multidimensional arrays can be rectangular, in which each of the arrays has the same

Dimensions, or jagged, in which each of the arrays has different dimensions. Classes and structures can have data members called properties and fields. Fields are variables that are associated with the enclosing class or structure. Properties are like fields, but enable you to write code to specify what should happen when code accesses the value. If the employee's name must be read from a database, for example, you can write code that says, "When someone asks for the value of the Name property, read the name from the database and return the name as a string."

Functions

A function is a callable piece of code that may or may not return a value to the code that originally called it. An example of a function would be the Full Name function shown earlier, in this chapter, in the Family class. A function is generally associated to pieces of code that return information whereas a method generally does not return information. For our purposes however, we generalize and refer to them both as functions.

C# and the CLR work together to provide automatic memory management. You don't need to write code that says "allocate enough memory for an integer" or "free the memory that this object was using." The CLR monitors your memory usage and automatically retrieves more when you need it. It also frees memory automatically when it detects that it is no longer being used (this is also known as Garbage Collection).C# provides a variety of operators that enable you to write mathematical and bitwise expressions. Many (but not all) of these operators can be redefined, enabling you to change how the operators work. Classes can contain code and data. Each class member has something called an accessibility scope, which defines the member's visibility to other objects.

31

Page 32: Online Shopping Mall Management 1

Online Shopping Mall Management

Variables

Variables can be defined as constants. Constants have values that cannot change during the execution of your code. The value of pi, for instance, is a good example of a constant, because its value won't be changing as your code runs. Enum type declarations specify a type name for a related group of constants. C# provides a built-in mechanism for defining and handling events. If you write a class that performs a lengthy operation, you may want to invoke an event when the operation is completed. Clients can subscribe to that event and catch the event in their code, which enables them to be notified when you have completed your lengthy operation. The event handling mechanism in C# uses delegates, which are variables that reference a function. Note an event handler is a procedure in your code that determines the actions to be performed when an event occurs, such as the user clicking a button. If your class holds a set of values, clients may want to access the values as if your class were an array. You can write a piece of code called an indexer to enable your class to be accessed as if it were an array. Suppose you write a class called Rainbow, for example, that contains a set of the colours in the rainbow. Callers may want to write My Rainbow [0] to retrieve the first color in the rainbow. You can write an indexer into your Rainbow class to define what should be returned when the caller accesses your class, as if it were an array of values.

Interfaces

C# supports interfaces, which are groups of properties, methods, and events that specify a set of functionality. C# classes can implement interfaces, which tell users that the class supports the set of functionality documented by the interface. You can develop implementations of interfaces without interfering with any existing code, which minimizes compatibility problems. Once an interface has been published, it cannot be changed, but it can evolve through inheritance. C# classes can implement many interfaces, although the classes can only inherit from a single base class.

Attributes

Attributes declare additional information about your class to the CLR. In the past, if you

Wanted to make your class self-describing, you had to take a disconnected approach in which the documentation was stored in external files such as IDL or even HTML files. Attributes solve this problem by enabling you, the developer, to bind information to classes — any kind of information. For example, you can use an attribute to embed documentation information into a class. Attributes can also be used to bind runtime information to a class, defining how it should act when used. The possibilities are endless, which is why Microsoft includes many predefined attributes within the .NET Framework.

32

Page 33: Online Shopping Mall Management 1

Online Shopping Mall Management

DATABASE:SQL SERVER 2008:-

In the business world, everything is about being "better, faster and cheaper" than the competition -- and SQL Server 2008 offers many new features to save energy, time and money. From programming to administrative capabilities, this version of SQL Server tops all others and it enhances many existing SQL Server 2000 features. Here I'll outline the few most significant new features in order of importance:

1. T-SQL (Transaction SQL) enhancements

T-SQL is the native set-based RDBMS programming language offering high-performance data access. It now incorporates many new features including error handling via the TRY and CATCH paradigm, Common Table Expressions (CTEs), which return a record set in a statement, and the ability to shift columns to rows and vice versa with the PIVOT and UNPIVOT commands.

2. CLR (Common Language Runtime)

The next major enhancement in SQL Server 2008 is the integration of a .NET compliant language such as C#, ASP.NET or VB.NET to build objects (stored procedures, triggers, functions, etc.). This enables you to execute .NET code in the DBMS to take advantage of the .NET functionality. It is expected to replace extended stored procedures in the SQL Server 2000 environment as well as expand the traditional relational engine capabilities.

3. Service Broker

The Service Broker handles messaging between a sender and receiver in a loosely coupled manner. A message is sent, processed and responded to, completing the transaction. This greatly expands the capabilities of data-driven applications to meet workflow or custom business needs.

4. Data encryption

SQL Server 2000 had no documented or publicly supported functions to encrypt data in a table natively. Organizations had to rely on third-party products to address this need. SQL Server 2008 has native.

Database applications can now be deployed widely due to intelligent, automated storage engine operations. Sophisticated yet simplified architecture improves performance, reliability, and scalability.

Feature Description and Benefits

Reliability Concurrency, scalability, and reliability are improved with simplified data structures and algorithms. Run-time checks of critical data structures make

33

Page 34: Online Shopping Mall Management 1

Online Shopping Mall Management

the database much more robust, minimizing the need for consistency checks.

Scalability The new disk format and storage subsystem provide storage that is scalable from very small to very large databases. Specific changes include:

Simplified mapping of database objects to files eases management and enables tuning flexibility. DB objects can be mapped to specific disks for load balancing.

More efficient space management including increasing page size from 2 KB to 8 KB, 64 KB I/O, variable length character fields up to 8 KB, and the ability to delete columns from existing tables without an unload/reload of the data.

Redesigned utilities support terabyte-sized databases efficiently.

Ease of Use DBA intervention is eliminated for standard operations—enabling branch office automation and desktop and mobile database applications. Many complex server operations are automated.

Storage Engine Features:-

Feature Description and Benefits

Data Type Sizes Maximum size of character and binary data types is dramatically increased.

Databases and File Databases creation is simplified, now residing on operating system files instead of logical devices.

Dynamic Memory Improves performance by optimizing memory allocation and usage. Simplified design minimizes contention with other resource managers.

Dynamic Row-Level Locking

Full row-level locking is implemented for both data rows and index entries. Dynamic locking automatically chooses the optimal level of lock (row, page, multiple page, table) for all database operations. This feature provides improved concurrency with no tuning. The database also supports the use of "hints" to force a particular level of locking.

34

Page 35: Online Shopping Mall Management 1

Online Shopping Mall Management

Dynamic Space Management

A database can automatically grow and shrink within configurable limits, minimizing the need for DBA intervention. It is no longer necessary to pre allocate space and manage data structures.

Evolution The new architecture is designed for extensibility, with a foundation for object-relational features.

Large Memory Support

SQL Server 8 Enterprise Edition will support memory addressing greater than 4 GB.

Unicode Native Unicode, with ODBC and OLE DB Unicode APIs, improves multilingual support.

35

Page 36: Online Shopping Mall Management 1

Online Shopping Mall Management

SQL SERVER

DATABASE

A database management, or DBMS, gives the user access to their data and helps them transform the data into information. Such database management systems include dBase, paradox, IMS, SQL Server and SQL Server. These systems allow users to create, update and extract information from their database.

A database is a structured collection of data. Data refers to the characteristics of people, things and events. SQL Server stores each data item in its own fields. In SQL Server, the fields relating to a particular person, thing or event are bundled together to form a single complete unit of data, called a record (it can also be referred to as raw or an occurrence). Each record is made up of a number of fields. No two fields in a record can have the same field name.

During an SQL Server Database design project, the analysis of your business needs identifies all the fields or attributes of interest. If your business needs change over time, you define any additional fields or change the definition of existing fields.

SQL Server Tables

SQL Server stores records relating to each other in a table. Different tables are created for the various groups of information. Related tables are grouped together to form a database.

Primary Key

Every table in SQL Server has a field or a combination of fields that uniquely identifies each record in the table. The Unique identifier is called the Primary Key, or simply the Key. The primary key provides the means to distinguish one record from all other in a table. It allows the user and the database system to identify, locate and refer to one particular record in the database.

Relational Database

Sometimes all the information of interest to a business operation can be stored in one table. SQL Server makes it very easy to link the data in multiple tables. Matching an employee to the department in which they work is one example. This is what makes SQL Server a relational database management system, or RDBMS. It stores data in two or more tables and enables you to define relationships between the table and enables you to define relationships between the tables.

Foreign Key

When a field is one table matches the primary key of another field is referred to as a foreign key. A foreign key is a field or a group of fields in one table whose values match those of the primary key of another table.

36

Page 37: Online Shopping Mall Management 1

Online Shopping Mall Management

Referential Integrity

Not only does SQL Server allow you to link multiple tables, it also maintains consistency between them. Ensuring that the data among related tables is correctly matched is referred to as maintaining referential integrity.

Data Abstraction

A major purpose of a database system is to provide users with an abstract view of the data. This system hides certain details of how the data is stored and maintained. Data abstraction is divided into three levels.

Physical level :

This is the lowest level of abstraction at which one describes how the data are actually stored.

Conceptual Level :

At this level of database abstraction all the attributed and what data are actually stored is described and entries and relationship among them.

View level:

This is the highest level of abstraction at which one describes only part of the database.

Advantages of RDBMS

Redundancy can be avoided Inconsistency can be eliminated Data can be Shared Standards can be enforced Security restrictions ca be applied Integrity can be maintained Conflicting requirements can be balanced Data independence can be achieved.

Disadvantages of DBMS

A significant disadvantage of the DBMS system is cost. In addition to the cost of purchasing of developing the software, the hardware has to be upgraded to allow for the extensive programs and the workspace required for their execution and storage. While centralization reduces duplication, the lack of duplication requires that the database be adequately backed up so that in case of failure the data can be recovered.

FEATURES OF SQL SERVER (RDBMS )

SQL SERVER is one of the leading database management systems (DBMS) because it is the only Database that meets the uncompromising requirements of today’s most demanding information systems. From complex decision support systems (DSS) to the most rigorous online transaction processing (OLTP) application, even application that require simultaneous DSS and

37

Page 38: Online Shopping Mall Management 1

Online Shopping Mall Management

OLTP access to the same critical data, SQL Server leads the industry in both performance and capability

SQL SERVER is a truly portable, distributed, and open DBMS that delivers unmatched performance, continuous operation and support for every database.

SQL SERVER RDBMS is high performance fault tolerant DBMS which is specially designed for online transactions processing and for handling large database application.

SQL SERVER with transactions processing option offers two features which contribute to very high level of transaction processing throughput, which are

The row level lock manager

Enterprise wide Data Sharing

The unrivaled portability and connectivity of the SQL SERVER DBMS enables all the systems in the organization to be linked into a singular, integrated computing resource.

Portability

SQL SERVER is fully portable to more than 80 distinct hardware and operating systems platforms, including UNIX, MSDOS, OS/2, Macintosh and dozens of proprietary platforms. This portability gives complete freedom to choose the database sever platform that meets the system requirements.

Open Systems

SQL SERVER offers a leading implementation of industry –standard SQL. SQL Server’s open architecture integrates SQL SERVER and non –SQL SERVER DBMS with industries most comprehensive collection of tools, application, and third party software products SQL Server’s Open architecture provides transparent access to data from other relational database and even non-relational database.

Distributed Data Sharing

SQL Server’s networking and distributed database capabilities to access data stored on remote server with the same ease as if the information was stored on a single local computer. A single SQL statement can access data at multiple sites. You can store data where system requirements such as performance, security or availability dictate.

Unmatched Performance

The most advanced architecture in the industry allows the SQL SERVER DBMS to deliver unmatched performance.

Sophisticated Concurrency Control

Real World applications demand access to critical data. With most database Systems application becomes “contention bound” – which performance is limited not by the CPU power or by disk I/O, but user waiting on one another for data access . SQL Server employs full, unrestricted row-

38

Page 39: Online Shopping Mall Management 1

Online Shopping Mall Management

level locking and contention free queries to minimize and in many cases entirely eliminates contention wait times.

No I/O Bottlenecks

SQL Server’s fast commit groups commit and deferred write technologies dramatically reduce disk I/O bottlenecks. While some database write whole data block to disk at commit time, SQL Server commits transactions with at most sequential log file on disk at commit time, On high throughput systems, one sequential writes typically group commit multiple transactions. Data read by the transaction remains as shared memory so that other transactions may access that data without reading it again from disk. Since fast commits write all data necessary to the recovery to the log file, modified blocks are written back to the database independently of the transaction commit, when written from memory to disk.

39

Page 40: Online Shopping Mall Management 1

Online Shopping Mall Management

40

System Development Life Cycle

Page 41: Online Shopping Mall Management 1

Online Shopping Mall Management

PHASES:  

 1.  Initiation Phase

The initiation of a system (or project) begins when a business need or opportunity is identified. A Project Manager should be appointed to manage the project. This business need is documented in a Concept Proposal. After the Concept Proposal is approved, the System Concept Development Phase begins.

2. System Concept Development Phase

Once a business need is approved, the approaches for accomplishing the concept are reviewed for feasibility and appropriateness. The Systems Boundary Document identifies the scope of the system and requires Senior Official approval and funding before beginning the Planning Phase.

3. Planning phase

The concept is further developed to describe how the business will operate once the approved system is implemented, and to assess how the system will impact employee and customer privacy. To ensure the products and /or services provide the required capability on-time and within budget, project resources, activities, schedules, tools, and reviews are defined. Additionally, security certification and accreditation activities begin with the identification of system security requirements and the completion of a high level vulnerability assessment.

4. Requirements Analysis Phase

Functional user requirements are formally defined and delineate the requirements in terms of data, system performance, security, and maintainability requirements for the system. All requirements are defined to a level of detail sufficient for systems design to proceed. All requirements need to be measurable and testable and relate to the business need or opportunity identified in the Initiation Phase.

5. Design Phase

The physical characteristics of the system are designed during this phase. The operating environment is established, major subsystems and their inputs and outputs are defined, and processes are allocated to resources. Everything requiring user input or approval must be documented and reviewed by the user. The physical characteristics of the system are specified and a detailed design is prepared. Subsystems identified during design are used to create a detailed structure of the system. Each subsystem is partitioned into one or more design units or modules. Detailed logic specifications are prepared for each software module.

6. Development Phase

41

Page 42: Online Shopping Mall Management 1

Online Shopping Mall Management

The detailed specifications produced during the design phase are translated into hardware, communications, and executable software. Software shall be unit tested, integrated, and retested in a systematic manner. Hardware is assembled and tested.

7.  Integration and Test Phase

The various components of the system are integrated and systematically tested. The user tests the system to ensure that the functional requirements, as defined in the functional requirements document, are satisfied by the developed or modified system. Prior to installing and operating the system in a production environment, the system must undergo certification and accreditation activities.

8.  Implementation Phase

The system or system modifications are installed and made operational in a production environment. The phase is initiated after the system has been tested and accepted by the user. This phase continues until the system is operating in production in accordance with the defined user requirements.

9.  Operations and Maintenance Phase

The system operation is ongoing. The system is monitored for continued performance in accordance with user requirements, and needed system modifications are incorporated. The operational system is periodically assessed through In-Process Reviews to determine how the system can be made more efficient and effective. Operations continue as long as the system can be effectively adapted to respond to an organization’s needs. When modifications or changes are identified as necessary, the system may reenter the planning phase.

SDLC Objectives:-

This guide was developed to disseminate proven practices to system developers, project managers, program/account analysts and system owners/users throughout the DOJ. The specific objectives expected include the following:

To reduce the risk of project failure To consider system and data requirements throughout the entire life of the system

To identify technical and management issues early

To disclose all life cycle costs to guide business decisions

To foster realistic expectations of what the systems will and will not provide

To provide information to better balance programmatic, technical, management, and cost aspects of proposed system development or modification

To encourage periodic evaluations to identify systems that are no longer effective

42

Page 43: Online Shopping Mall Management 1

Online Shopping Mall Management

To measure progress and status for effective corrective action

To support effective resource management and budget planning

To consider meeting current and future business requirements

Key Principles:-

This guidance document refines traditional information system life cycle management approaches to reflect the principles outlined in the following subsections. These are the foundations for life cycle management.

43

Page 44: Online Shopping Mall Management 1

Online Shopping Mall Management

44

Design Document

Page 45: Online Shopping Mall Management 1

Online Shopping Mall Management

PROBLEM STATEMENTS FOR ONLINE SHOPPING MALL MANAGEMENT

Software has to be developed for automating the manual shopping system. The system should be distributed in nature. It should be designed to provide functionalities as explained below:

1) Login: - For the security reason Administrator of the system are given a user Id and a Password. Only If the Id and Password are correct is the administrator allowed entry to the system and maintain records in the system.

2) Do transaction:-A customer should be able to pay in the eshop. For the traction customer has so many options such as credit card, debit card, check. Customer has to choose one potion from given options and pay for his purchased products. If the value of the purchased product is same as the value of payment then the traction will be valid. Else the traction is invalid.

3) Maintain Record: - Administrator has to maintain records. Before that, Administrator has to enter by logging in to the system. He has to maintain all company details ,category details and product details .He has to update stock .so that customer could get current products in a current value.

4) View shopping:-Here the customer has to visit the site and could see all the products available in the eshop. He have to choose products .Then he goes to the payment procedure. After the payment customer has to enter all his information so that the customer could get his product easily. At last customer gets a control no which is unique. Before customer gets his product, he may check the status by putting a control no.

The general flow of any analysis and design process is to begin with the identification of the functionalities of the system and the actor associated with the system. I depict the overview of the system to be developed by a use case diagram. After analyzing the above problem I have to identify the following use case and actors of the system.

Actors associated with the system are:

1) Administrator

2) Customer

Use cases for the system are:

1) Login

2) Maintain Record

3) Do traction

45

Page 46: Online Shopping Mall Management 1

Online Shopping Mall Management

4) View shopping

USECASE DIAGRAM

46

Login

Do Transaction

T

TransactionMaintain Record

View Product Details

Administrator

Customer

Customer

Do Transation

Transaction

Credit Card

Cheque

Debit Card

Page 47: Online Shopping Mall Management 1

Online Shopping Mall Management

47

Administrator

Maintain Record

Product DetailsCompany details

Purchase details

Customer

PaymentSelect

Product

View Status

View Products Details

Page 48: Online Shopping Mall Management 1

Online Shopping Mall Management

Use Case Name: Login

Brief description: this use case is used by the administrator in order to make the eshop secure from outsiders.

Pre-condition: to hide data from outsiders administrator has to remember username and password .He should not leak out to outsiders.

Primary Action: Administrator

Secondary Action: None.

Flow of events:

1) As the administrator want to activate the administrator module, steps are started.

2) The administrator has to enter username and password.

3) Click Login button to enter into the administrator module

Alternate flow: None.

Special Requirement:

1) Database has to be available all time

2) Correct data has to be input

3) Network has to be perfect

Post condition: The username and password should be match with the login table when he click login button.

Business rule: None

Relationship: this use is related to the login until the administrator is entered.

The administrator will be able to enter if and only if he logged in.

Use Case Name: Do Transaction

Brief description: this use case is used by customers to do transaction.

Pre-condition: In order to perform transaction customer has to select item first.

Primary Action: customer.

Secondary Action: None.

Flow of events:

1) As the customer chooses to buy products, steps are started.

48

Page 49: Online Shopping Mall Management 1

Online Shopping Mall Management

2) The customer chooses all type of products randomly.

3) After the products selected payment procedure will be started.

4) The customer has to select from type of payment from the given payment options.

5) Customer has to enter the card number and all the required information.

.Alternate flow: None.

Special Requirement:

1) Database has to be available as all times.

2) Correct data has to input.

3) Network has to be perfect.

Post condition: None.

Business rule: this procedure gives correct output to the customer in a few times.

Relationship: This use is related to the accountant until the customer has select items.

The customer has to purchase items if and only if the customer is paid.

Use case Name: Maintain Record.

Brief description: This use case is used by the administrator to maintain the proper sales record of eshop.

Pre-condition: In order to maintain record the administrator has to login the system.

Primary action: Administrator

Secondary action: None.

Flow of events:

1) As the administrator attained to maintain record, steps are started.

2) Administrator always checks items which is available in eshop and which is not available in the eshop by company details , category details & product details.

3) Administrator permits the customer to purchase available items in the eshop.

4) Administrator always updates stock after the customer has purchased.

Alternate Flow: None.

Special Requirement:

1) Database has to be available as all times.

49

Page 50: Online Shopping Mall Management 1

Online Shopping Mall Management

2) Correct data has to input.

3) Network has to be perfect so that the customer could get perfect information.

Post condition: None.

Relationship: this use is related to the check the eshop after the customer purchase products.

Use case Name: View Product Details.

Brief description: this use case is used by the customer to view all the available objects, shopping status and purchase their necessary items in a very little amount of time.

Pre-condition: In order to purchase, customer has to view the eshop site.

Primary action: before purchase customer has to enter all the required information correctly which is suitable for eshop to interact.

Secondary action: The customer has to verify information properly .

Flow of events:

1) As the customer want to visit this site , steps are started.

2) Customer has to enter the URL address and see the available product.

3) Choose items which are available to purchase.

4) Attained the payment procedure.

5) Enter total information correctly which is suitable to get the item in a proper way and click ok button to save the data in database.

6) Customer may view the status by entering his username and password.

Alternate flow: None.

Special Requirements:1) database has to be available at all time.

2) Correct data has to be input

3) Network has to be perfect.

Post-Condition: The customer has to be remembering his control no. after the information is stored into the database.

Business Rule: Right information gets right item to the customer with in little time.

Relationship: This use is related to shopping with the customer. The customer will be able to shopping if and only if he maintains the transaction properly.

50

Page 51: Online Shopping Mall Management 1

Online Shopping Mall Management

E-R Diagram

An entity-relationship (ER) diagram is a specialized graphic that illustrates the interrelationships between entities in a database. ER diagrams often use symbols to represent three different types of information.

Boxes are commonly used to represent entities.

Diamonds are normally used to represent relationships.

Ovals are used to represent attributes.

51

Page 52: Online Shopping Mall Management 1

Online Shopping Mall Management

Entity Relation Ship Diagram

52

Product

Product Id

Ptype

ProductName

ProductType

Image

Price

Product Type

TypeId

TypeName

Customer

Customer Id

CustomerName Addres

s

MobNo.

Search

Cart

CartId

AddToCart

Page 53: Online Shopping Mall Management 1

Online Shopping Mall Management

DATA FLOW DIAGRAM

A data flow diagram is graphical tool used to describe and analyze movement of data through a system. These are the central tool and the basis from which the other components are developed. The transformation of data from input to output, through processed, may be described logically and independently of physical components associated with the system. These are known as the logical data flow diagrams. The physical data flow diagrams show the actual implements and movement of data between people, departments and workstations. A full description of a system actually consists of a set of data flow diagrams. Using two familiar notations Yourdon, Gane and Sarson notation develops the data flow diagrams. Each component in a DFD is labeled with a descriptive name. Process is further identified with a number that will be used for identification purpose. The development of DFD’s is done in several levels. Each process in lower level diagrams can be broken down into a more detailed DFD in the next level. The lop-level diagram is often called context diagram. It consists a single process bit, which plays vital role in studying the current system. The process in the context level diagram is exploded into other process at the first level DFD.

The idea behind the explosion of a process into more process is that understanding at one level of detail is exploded into greater detail at the next level. This is done until further explosion is necessary and an adequate amount of detail is described for analyst to understand the process.

Larry Constantine first developed the DFD as a way of expressing system requirements in a graphical from, this lead to the modular design.

A DFD is also known as a “bubble Chart” has the purpose of clarifying system requirements and identifying major transformations that will become programs in system design. So it is the starting point of the design to the lowest level of detail. A DFD consists of a series of bubbles joined by data flows in the system.

53

Page 54: Online Shopping Mall Management 1

Online Shopping Mall Management

DFD SYMBOLS

In the DFD, there are four symbols

1. A square defines a source(originator) or destination of system data2. An arrow identifies data flow. It is the pipeline through which the information flows3. A circle or a bubble represents a process that transforms incoming data flow into outgoing

data flows.4. An open rectangle is a data store, data at rest or a temporary repository of data

54

Circle depicts a process.

Arrows depict data flow

Rectangle depicts an external entity

Open rectangle depicts a data store

Page 55: Online Shopping Mall Management 1

Online Shopping Mall Management

CONSTRUCTING A DFD

Several rules of thumb are used in drawing DFD’s:

1. Process should be named and numbered for an easy reference. Each name should be representative of the process.

2. The direction of flow is from top to bottom and from left to right. Data Traditionally flow from source to the destination although they may flow back to the source. One way to indicate this is to draw long flow line back to a source. An alternative way is to repeat the source symbol as a destination. Since it is used more than once in the DFD it is marked with a short diagonal.

3. When a process is exploded into lower level details, they are numbered.4. The names of data stores and destinations are written in capital letters. Process and dataflow

names have the first letter of each work capitalized

A DFD typically shows the minimum contents of data store. Each data store should contain all the data elements that flow in and out.

Questionnaires should contain all the data elements that flow in and out. Missing interfaces redundancies and like is then accounted for often through interviews.

SAILENT FEATURES OF DFD’s

1. The DFD shows flow of data, not of control loops and decision are controlled considerations do not appear on a DFD.

2. The DFD does not indicate the time factor involved in any process whether the dataflows take place daily, weekly, monthly or yearly.

3. The sequence of events is not brought out on the DFD.

RULES GOVERNING THE DFD’S

PROCESS1) No process can have only outputs.2) No process can have only inputs. If an object has only inputs than it must be a sink.3) A process has a verb phrase label.

DATA STORE

1) Data cannot move directly from one data store to another data store, a process must move data.

2) Data cannot move directly from an outside source to a data store, a process, which receives, must move data from the source and place the data into data store

3) A data store has a noun phrase label.

55

Page 56: Online Shopping Mall Management 1

Online Shopping Mall Management

SOURCE OR SINK

The origin and /or destination of data.

1) Data cannot move direly from a source to sink it must be moved by a process2) A source and /or sink has a noun phrase land

DATA FLOW

1) A Data Flow has only one direction of flow between symbols. It may flow in both directions between a process and a data store to show a read before an update. The later is usually indicated however by two separate arrows since these happen at different type.

2) A join in DFD means that exactly the same data comes from any of two or more different processes data store or sink to a common location.

3) A data flow cannot go directly back to the same process it leads. There must be at least one other process that handles the data flow produce some other data flow returns the original data into the beginning process.

4) A Data flow to a data store means update (delete or change).5) A data Flow from a data store means retrieve or use.

56

Page 57: Online Shopping Mall Management 1

Online Shopping Mall Management

Context Level Diagram

First Level Diagram

57

USER

0.0

Online Shopping

Products

USER

1.0

Search Products

2.0

Buy

3.0

Add To Cart

Page 58: Online Shopping Mall Management 1

Online Shopping Mall Management

Module Details

The module description of the project can be divided into two parts i.e the Administrator and the user.

So this project has two modules

Administrator Module User Module

Administrator Module :-

This module is responsible for maintaining all the administrative part and has sub-modules such as

i) Company:-

This module is responsible for entering the company details where we need to keep the information of name, location, mission, vision established here as well as type of the company.

ii) Product:-

This module is dependent on the category and a category is under company. So indirectly a product is dependent on the company. We need to keep the full information of the product because this has direct dealings with the customer.

iii) Purchase:-

This module is responsible maintain price, type, product code, date etc of a particular product.

User Module:-

This module is responsible for viewing the site, selecting the product, entering user information as well as doing the transaction and having several sub-modules such as

i)Front Page:-

This is the basic module of each site because every web application has a front page for giving information about the sites and to motivate the user by which he will have interest to visit the site.

ii)Viewing details:-

The information entered by the admin such as company details, category details, product details can be viewed by the user which helps to select any item as per his requirement.

iii)Transaction:-

58

Page 59: Online Shopping Mall Management 1

Online Shopping Mall Management

After selecting items of different category of different company the user can submit to the transaction where he needs to give the personal information and the financial information to proceed further.

iv) Cart Module:-

This module starts when the user views the shopping cart. All the products that have been added to the shopping cart by the user are listed along with their price and the quantity.

59

Page 60: Online Shopping Mall Management 1

Online Shopping Mall Management

Database Design

Data Integrity:-

It is an important feature in SQL Server. When used properly, it ensures that data is accurate, correct, and valid. It also acts as a trap for otherwise undetectable bugs within applications. A constraint is a property assigned to a column or the set of columns in a table that prevents certain types of inconsistent data values from being placed in the column (s). Constraints are used to enforce the data integrity. This ensures the accuracy and reliability of the data in the database. The following categories of the data integrity exist: -

1. Entity Integrity: - Entity Integrity ensures that there are no duplicate rows in a table.2. Domain Integrity: - Domain Integrity enforces valid entries for a given column by

restricting the type, the format, or the range of possible values.3. Referential integrity: - Referential integrity ensures that rows cannot be deleted, which

are used by other records (for example, corresponding data values between tables will be vital).

4. User-Defined Integrity: - User-Defined Integrity enforces some specific business rules that do not fall into entity, domain, or referential integrity categories.

Each of these categories of the data integrity can be enforced by the appropriate constraints. Microsoft SQL Server supports the following constraints: -

1. Primary key : - Primary key constraint is a unique identifier for a row within a database table. Every table should have a primary key constraint to uniquely identify each row and only one primary key constraint can be created for each table. The primary key constraints are used to enforce entity integrity.

2. Unique : - Unique constraint enforces the uniqueness of the values in a set of columns, so no duplicate values are entered. The unique key constraints are used to enforce entity integrity as the primary key constraints.

3. Foreign key : - Foreign key constraint prevents any actions that would destroy links between tables with the corresponding data values. A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity.

4. Check : - Check constraint is used to limit the values that can be placed in a column. The check constraints are used to enforce domain integrity.

5. Not null: - Not null constraint enforces that the column will not accept null values. The not null constraints are used to enforce domain integrity, as the check constraints.

Data Dictionary:-

After carefully understanding the requirements of the client the entire data storage requirements are divided into tables. The below tables are normalized to avoid any anomalies during the course of data entry.

60

Page 61: Online Shopping Mall Management 1

Online Shopping Mall Management

Admin Table

Admin_Regd

Column Name Data Type Data Length ConstraintUserId Varchar 50Password Varchar 50Email Varchar 50securityQuestion Varchar MAXAnswer Varchar 50

City

Column Name Data Type Data Length ConstraintCountry Varchar 50State Varchar 50CityId Varchar 50 Not NullcityName Varchar 50

Country

Column Name Data Type Data Length ConstraintcountryId Varchar 50 Not NullcountryName Varchar 50

ProductDetails

Column Name Data Type Data Length ConstraintproductCode Varchar 50 Not NullproductName Varchar 50productType Varchar 50Price numeric (18,0)Image NtextDescription varchar MAX

ProductType

Column Name Data Type Data Length ConstrainttypeId varchar 50 Not NulltypeName varchar 50

61

Page 62: Online Shopping Mall Management 1

Online Shopping Mall Management

Purchase

Column Name Data Type Data Length ConstraintproductCode Varchar 50 Not NullproductName Varchar 50productType Varchar 50receiptNo bigintQuantity bigintPrice numeric (18,0)Image NtextDescription varchar MAX

State

Column Name Data Type Data Length ConstraintCountry varchar 50Stated varchar 50stateName varchar 50

User Table

User_regd

Column Name Data Type Data Length ConstraintUserId Varchar 50Password Varchar 50Email Varchar 50securityQuestion Varchar MAXAnswer Varchar 50

PaymentDetails

Column Name Data Type Data Length ConstraintpaymentMode Varchar 50Amount Varchar 50productCode Varchar 50chequeOrDraftNo Varchar 50bankName Varchar 50Date datetime

62

Page 63: Online Shopping Mall Management 1

Online Shopping Mall Management

Feedback

Column Name Data Type Data Length ConstraintSubject Varchar 50Feedback Varchar MAX

Cart

Column Name Data Type Data Length ConstraintcartId Int Not NullProductCode varchar 50ProductType varchar 50ProductName varchar 50Price numeric (18,0)

63

Page 64: Online Shopping Mall Management 1

Online Shopping Mall Management

64

Screen Layout

Page 65: Online Shopping Mall Management 1

Online Shopping Mall Management

Home Page

Admin Login

65

Page 66: Online Shopping Mall Management 1

Online Shopping Mall Management

Admin Registration

Admin Change Password

66

Page 67: Online Shopping Mall Management 1

Online Shopping Mall Management

City

Country

67

Page 68: Online Shopping Mall Management 1

Online Shopping Mall Management

State

Product Details

68

Page 69: Online Shopping Mall Management 1

Online Shopping Mall Management

Product Type

Purchase

69

Page 70: Online Shopping Mall Management 1

Online Shopping Mall Management

Sale

UserView

70

Page 71: Online Shopping Mall Management 1

Online Shopping Mall Management

User Login

User Registration

71

Page 72: Online Shopping Mall Management 1

Online Shopping Mall Management

User Home

Change Password

72

Page 73: Online Shopping Mall Management 1

Online Shopping Mall Management

Search Product

Payment

73

Page 74: Online Shopping Mall Management 1

Online Shopping Mall Management

Receipt

Cart View

74

Page 75: Online Shopping Mall Management 1

Online Shopping Mall Management

Feedback

75

Page 76: Online Shopping Mall Management 1

Online Shopping Mall Management

76

Coding

Page 77: Online Shopping Mall Management 1

Online Shopping Mall Management

Admin Registration

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack == true) { clear(); } } protected void btnSubmit_Click(object sender, EventArgs e) { if (txtUserId.Text == "") { lblMsg.Text = "User Id should not be blank"; return; } if (txtPassword.Text == "") { lblMsg.Text = "Password should not be blank"; return; } if (txtConfirmPassword.Text == "") { lblMsg.Text = "Confirm Password should not be blank"; return; } if (txtEmail.Text == "") { lblMsg.Text = "Email Id should not be blank"; return; } if (ddlSecurityQuestion.SelectedIndex == 0) { lblMsg.Text = "security Question should not be blank"; return; } if (txtAnswer.Text == "") { lblMsg.Text = "Answer should not be blank"; return; } if (ob.insert_adminRegistration(txtUserId.Text.Trim(), txtPassword.Text.Trim(), txtEmail.Text.Trim(), ddlSecurityQuestion.SelectedValue.Trim(), txtAnswer.Text.Trim()) > 0) { lblMsg.Text = "Data Submitted Successfully";

77

Page 78: Online Shopping Mall Management 1

Online Shopping Mall Management

} clear(); } public void clear() { txtUserId.Text = ""; txtPassword.Text = ""; txtConfirmPassword.Text = ""; txtEmail.Text = ""; ddlSecurityQuestion.SelectedIndex = 0; txtAnswer.Text = ""; txtUserId.Focus(); }}

Admin Login

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class Default2 : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) { } protected void btnLogin_Click(object sender, EventArgs e) { if (txtUserId.Text == "") { lblMsg.Text = "User id should not be blank"; return; } if (txtPassword.Text == "") { lblMsg.Text = "Password should not be blank"; return; } ob.admin_login(txtUserId.Text.Trim()); if (ob.ds.Tables[0].Rows.Count > 0) { if (txtPassword.Text.Trim() == ob.ds.Tables[0].Rows[0].ItemArray[0].ToString()) { Session["uid"] = txtUserId.Text.Trim(); Response.Redirect("AdminChangePassword.aspx"); } else { lblMsg.Text = "invalid password";

78

Page 79: Online Shopping Mall Management 1

Online Shopping Mall Management

} } else { lblMsg.Text = "Invalid UserId"; } }}

Product Details

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack == true) { grdv(); clear(); } } protected void btnSubmit_Click(object sender, EventArgs e) { if (txtProductCode.Text == "") { lblMsg.Text = "Plz enter Product Code"; return; } if (txtProductName.Text == "") { lblMsg.Text = "Plz enter Product Name"; return; } if (ddlProductType.SelectedIndex == 0) { lblMsg.Text = "Plz select Product Type"; return; } if (txtPrice.Text == "") { lblMsg.Text = "Plz enter Price"; } if (txtDescription.Text == "") { lblMsg.Text = "Plz enter Description"; return; }

79

Page 80: Online Shopping Mall Management 1

Online Shopping Mall Management

if (ob.insert_productdetails(txtProductCode.Text.Trim(), txtProductName.Text.Trim(), ddlProductType.SelectedValue.Trim(),txtPrice.Text.Trim(), fuImgProductDetail.FileName, txtDescription.Text.Trim()) > 0) { lblMsg.Text = "data submitted successfully"; } grdv(); clear(); } public void grdv() { ob.fetch_productdetail(); grdvProductDetail.DataSource = ob.ds.Tables[0]; grdvProductDetail.DataBind(); } protected void grdvProductDetail_RowDeleting(object sender, GridViewDeleteEventArgs e) { if (ob.delete_productdetails(grdvProductDetail.Rows[e.RowIndex].Cells[0].Text) > 0) { lblMsg.Text = "Data deleted Successfully"; } grdv(); clear(); } protected void grdvProductDetail_SelectedIndexChanged(object sender, EventArgs e) { txtProductCode.Text = grdvProductDetail.Rows[grdvProductDetail.SelectedIndex].Cells[0].Text; txtProductName.Text = grdvProductDetail.Rows[grdvProductDetail.SelectedIndex].Cells[1].Text; ddlProductType.SelectedValue = grdvProductDetail.Rows[grdvProductDetail.SelectedIndex].Cells[2].Text; txtPrice.Text = grdvProductDetail.Rows[grdvProductDetail.SelectedIndex].Cells[3].Text; txtDescription.Text = grdvProductDetail.Rows[grdvProductDetail.SelectedIndex].Cells[5].Text; } protected void btnUpdate_Click(object sender, EventArgs e) { if (ob.update_productdetails(txtProductCode.Text.Trim(), txtProductName.Text.Trim(), ddlProductType.SelectedValue.Trim(),txtPrice.Text.Trim(), fuImgProductDetail.FileName, txtDescription.Text.Trim()) > 0) { lblMsg.Text = "data Updated successfully"; } grdv(); clear(); } public void clear() { txtProductCode.Text = autoid().ToString();

80

Page 81: Online Shopping Mall Management 1

Online Shopping Mall Management

txtProductName.Text = ""; ddlProductType.SelectedIndex = 0; txtDescription.Text = ""; txtProductName.Focus(); } static int id; public int autoid() { ob.fetch_productdetail(); if (ob.ds.Tables[0].Rows.Count == 0) { id = 1; return id; } id = Convert.ToInt32(ob.ds.Tables[0].Rows[ob.ds.Tables[0].Rows.Count - 1].ItemArray[0].ToString()) + 1; return id; }}

Purchase

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class Purchase : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack == true) { grdv(); clear(); } } protected void btnSubmit_Click(object sender, EventArgs e) { if (txtProductCode.Text == "") { lblMsg.Text = "Plz enter Product Code"; return; } if (txtProductName.Text == "") { lblMsg.Text = "Plz enter Product Name"; return; } if (ddlProductType.SelectedIndex == 0) { lblMsg.Text = "Plz select Product Type";

81

Page 82: Online Shopping Mall Management 1

Online Shopping Mall Management

return; } if (txtReceiptNo.Text == "") { lblMsg.Text = "Plz enter Receipt no."; return; } if (txtQuantity.Text == "") { lblMsg.Text = "Plz enter Quantity"; return; } if (txtPrice.Text == "") { lblMsg.Text = "Plz enter price"; } if (txtDescription.Text == "") { lblMsg.Text = "Plz enter Description"; return; } int x = Convert.ToInt32(txtReceiptNo.Text); int y = Convert.ToInt32(txtQuantity.Text); if (ob.insert_purchase(txtProductCode.Text.Trim(), txtProductName.Text.Trim(), ddlProductType.SelectedValue.Trim(), x, y,txtPrice.Text.Trim(), fuImage.FileName, txtDescription.Text.Trim()) > 0) { lblMsg.Text = "data submitted successfully"; } ob.insert_stock(x,txtProductCode.Text.Trim(),y,txtPrice.Text.Trim()); grdv(); clear(); } public void grdv() { ob.fetch_purchase(); grdvPurchase.DataSource = ob.ds.Tables[0]; grdvPurchase.DataBind(); } protected void grdvPurchase_RowDeleting(object sender, GridViewDeleteEventArgs e) { if (ob.delete_purchase(grdvPurchase.Rows[e.RowIndex].Cells[0].Text) > 0) { lblMsg.Text = "Data deleted Successfully"; } grdv(); clear(); } protected void grdvPurchase_SelectedIndexChanged(object sender, EventArgs e) { txtProductCode.Text = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[0].Text; txtProductName.Text = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[1].Text;

82

Page 83: Online Shopping Mall Management 1

Online Shopping Mall Management

ddlProductType.SelectedValue = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[2].Text; txtReceiptNo.Text = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[3].Text; txtQuantity.Text = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[4].Text; txtPrice.Text = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[5].Text; txtDescription.Text = grdvPurchase.Rows[grdvPurchase.SelectedIndex].Cells[7].Text; } protected void btnUpdate_Click(object sender, EventArgs e) { int x = Convert.ToInt32(txtReceiptNo.Text); int y = Convert.ToInt32(txtQuantity.Text); if (ob.insert_purchase(txtProductCode.Text.Trim(), txtProductName.Text.Trim(), ddlProductType.SelectedValue.Trim(), x, y,txtPrice.Text.Trim(), fuImage.FileName, txtDescription.Text.Trim()) > 0) { lblMsg.Text = "data Updated successfully"; } ob.update_stock(x, txtProductCode.Text.Trim(), y, txtPrice.Text.Trim()); grdv(); clear(); } static int id; public int autoid() { ob.fetch_purchase(); if (ob.ds.Tables[0].Rows.Count == 0) { id = 1; return id; } id = Convert.ToInt32(ob.ds.Tables[0].Rows[ob.ds.Tables[0].Rows.Count - 1].ItemArray[0].ToString()) + 1; return id; } public void clear() { txtProductCode.Text = autoid().ToString(); txtProductName.Text = ""; txtReceiptNo.Text = ""; txtQuantity.Text = ""; txtPrice.Text = ""; txtDescription.Text = ""; ddlProductType.SelectedIndex = 0; txtProductName.Focus(); }}

83

Page 84: Online Shopping Mall Management 1

Online Shopping Mall Management

User Registration

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class UserRegd : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack == true) { clear(); } } protected void btnSubmit_Click(object sender, EventArgs e) { if (txtUserId.Text == "") { lblMsg.Text = "User Id should not be blank"; return; } if (txtPassword.Text == "") { lblMsg.Text = "Password should not be blank"; return; } if (txtConfirmPassword.Text == "") { lblMsg.Text = "Confirm Password should not be blank"; return; } if (txtEmailId.Text == "") { lblMsg.Text = "Email Id should not be blank"; return; } if (ddlSecurityQuestion.SelectedIndex == 0) { lblMsg.Text = "Security Question should not be blank"; return; } if (txtAnswer.Text == "") { lblMsg.Text = "Asnwer should not be blank"; return; } if (ob.insert_UserRegistration(txtUserId.Text.Trim(), txtPassword.Text.Trim(), txtEmailId.Text.Trim(), ddlSecurityQuestion.SelectedValue.Trim(), txtAnswer.Text.Trim()) > 0) { lblMsg.Text = "Data Submitted Successfully";

84

Page 85: Online Shopping Mall Management 1

Online Shopping Mall Management

} clear(); } public void clear() { txtUserId.Text = ""; txtPassword.Text = ""; txtConfirmPassword.Text = ""; txtEmailId.Text = ""; ddlSecurityQuestion.SelectedIndex = 0; txtAnswer.Text = ""; txtUserId.Focus(); }}

User Login

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class UserLogin : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) {

} protected void btnLogin_Click(object sender, EventArgs e) { if (txtUserId.Text == "") { lblMsg.Text = "User Id should not be blank"; return; } if (txtPassword.Text == "") { lblMsg.Text = "Password should not be blank"; return; } ob.user_login(txtUserId.Text.Trim()); if (ob.ds.Tables[0].Rows.Count > 0) { if (txtPassword.Text.Trim() == ob.ds.Tables[0].Rows[0].ItemArray[0].ToString()) { Session["uid"] = txtUserId.Text.Trim(); Response.Redirect("Default.aspx"); } else { lblMsg.Text = "Invalid Password";

85

Page 86: Online Shopping Mall Management 1

Online Shopping Mall Management

} } else { lblMsg.Text="Invalid UserId"; } }}

Search Product

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class Search_Product : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) {

} protected void drpsearchby_SelectedIndexChanged(object sender, EventArgs e) { if (ddlsearchby.SelectedIndex == 1) { txtName.Visible = true; ddlName.Visible = false; } if (ddlsearchby.SelectedIndex == 2) { txtName.Visible = false; ddlName.Visible = true; } } protected void btnSearch_Click(object sender, EventArgs e) { if (ddlsearchby.SelectedIndex == 1) { ob.searchProductByName(txtName.Text.Trim()); GridView1.DataSource = ob.ds.Tables[0]; GridView1.DataBind(); } if (ddlsearchby.SelectedIndex == 2) { ob.searchProductByType(ddlName.SelectedValue.Trim()); GridView1.DataSource = ob.ds.Tables[0]; GridView1.DataBind(); }

86

Page 87: Online Shopping Mall Management 1

Online Shopping Mall Management

}

protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) { Response.Redirect("Payment Details.aspx"); } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { if (ob.insert_cart(GridView1.Rows[e.RowIndex].Cells[0].Text.Trim(), GridView1.Rows[e.RowIndex].Cells[1].Text.Trim(), GridView1.Rows[e.RowIndex].Cells[2].Text.Trim(), GridView1.Rows[e.RowIndex].Cells[3].Text.Trim()) > 0) { lblMsg.Text="Data Added to cart successfully"; } }}

Payment Detail

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class Payment_Details : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) {

}

protected void Submit_Click(object sender, EventArgs e) {

if (ob.insert_paymentDetails(ddlPaymentMode.SelectedValue.Trim(), txtAmount.Text.Trim(), txtProductCode.Text.Trim(), txtCheckOrDraftNo.Text.Trim(), txtBank.Text.Trim(), txtDate.Text.Trim())>0) { Session["pmode"] = ddlPaymentMode.SelectedItem.Text; Session["amount"] = txtAmount.Text.Trim(); Session["pcode"] = txtProductCode.Text.Trim(); Session["cdno"] = txtCheckOrDraftNo.Text.Trim(); Session["bank"] = txtBank.Text.Trim(); Session["sdate"] = txtDate.Text.Trim();

Response.Redirect("Receipt.aspx"); }

87

Page 88: Online Shopping Mall Management 1

Online Shopping Mall Management

clear(); } public void clear() { ddlPaymentMode.SelectedIndex = 0; txtAmount.Text = ""; txtProductCode.Text = ""; txtCheckOrDraftNo.Text = ""; txtBank.Text = ""; txtDate.Text = ""; ddlPaymentMode.Focus(); }}

View Cart

using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;

public partial class User_View_Cart : System.Web.UI.Page{ Class1 ob = new Class1(); protected void Page_Load(object sender, EventArgs e) { grdv(); } public void grdv() { ob.fetch_cart(); GridView1.DataSource = ob.ds.Tables[0]; GridView1.DataBind(); }}

88

Page 89: Online Shopping Mall Management 1

Online Shopping Mall Management

89

Testing

Page 90: Online Shopping Mall Management 1

Online Shopping Mall Management

Testing

Testing is the process of detecting errors. Testing performs a very critical role for quality assurance and for ensuring the reliability of software. The results of testing are used later on during maintenance also.

Thus a software product goes through three level of testing:

Unit Testing Integration Testing System Testing

Testing Objectives

The main objective of testing is to uncover a host of errors, systematically and with minimum effort and time. Stating formally, we can say,

Testing is a process of executing a program with the intent of finding an error. A successful test is one that uncovers an as yet undiscovered error. A good test case is one that has a high probability of finding error, if it exists. The tests are inadequate to detect possibly present errors.

Levels of Testing

In order to uncover the errors present in different phases we have the concept of levels of testing. The basic levels of testing are as shown below…

Client Needs

Requirements

Design

Code

90

Acceptance Testing

System Testing

Integration Testing

Unit Testing

Page 91: Online Shopping Mall Management 1

Online Shopping Mall Management

Type of Testing

There are following type of testing:

Unit testing

Unit testing focuses verification effort on the smallest unit of software i.e. the module. Using the detailed design and the process specifications, testing is done to uncover errors within the boundary of the module. All modules must be successful in the unit test before the start of the integration testing begins

The purpose of the coding and unit testing phase of software development is to translate the software design into source code. Each component of the design is implemented as a program module. The end-product of this phase is a set of program modules that have been individually tested. To enable the engineers to write good quality programs, every software development organization normally formulates its own coding.

A coding standard addresses issues such as the standard ways of laying out the program codes, the template for laying out the function and module headers, commenting guidelines, variable and function naming conventions, the maximum no of source lines permitted in each module, and so forth.

During this phase, each module is unit tested to determine the correct working of all the individual modules. It involves testing each module in isolation as this is the most efficient way to debug the errors identified at this stage. Another reason behind testing a module in isolation is that the other modules, with which this module has to be interfaced, may not be ready.

Integration Testing

After unit testing, we have to perform integration testing. The primary objective of this is to test the module interface in order to ensure that there are no errors in the parameter passing when one module invokes another module. During this testing different modules of a system are integrated in a planned manner using an integration plan. The integration plan specifies the steps and the order in which modules are combined to realize the full system. After each integration step, the partially integrated system is tested.

Here we followed up bottom-up integration testing. In bottom –up integration testing, each subsystem is tested separately and then the full system is tested. A subsystem might consist of many module which communicate among each other through well-defined interfaces among various modules making up the subsystem.

91

Page 92: Online Shopping Mall Management 1

Online Shopping Mall Management

System testing

Finally, when all the modules have been successfully integrated and tested, system testing is carried out. The goal of system testing is to ensure that the developed system conforms to its requirements laid out in the SRS document. System testing is the overall testing of the system in the laboratory with its whole environment. System testing types are:

ALPHA TESTING :- The first test of newly developed hardware or software in a laboratory setting. When the first round of bugs has been fixed, the product goes into beta test with actual users. For custom software, the customer may be invited into the vendor’s facilities for an alpha test to ensure the client’s vision has been interpreted properly by the developer.

BETA TESTING:- Test new or revised hardware or software that is performed by users at their facilities under normal operating conditions. Beta testing follows alpha testing. Vendors of packaged software often offer their customers the opportunity of beta testing new release or versions, and the beta testing of elaborate products such as operating systems can take months.

USER ACCEPTANCE TESTING:- Final testing cycle usually performed by end users to make sure that the developed system will support their business need and will be as per the agreed upon requirements.

There are two types of testing based on the output:

WHITE BOX:- Testing software with a complete knowledge of its logic and code.

I tested step wise every piece of code, taking care that every statement in the code is executed at least once. The white box testing is also called Glass Box Testing.

I have generated a list of test cases, sample data, which is used to check all possible combinations of execution paths through the code at every module level.

BLACK BOX :- Testing software based on output only without any knowledge of its code and logic. This testing method considers a module as a single unit and checks the unit at interface and communication with other modules rather getting into details at statement level. Here the module will be treated as a block that will take some input and generate output. Output for a given set of input combinations are forwarded to other modules.

92

Page 93: Online Shopping Mall Management 1

Online Shopping Mall Management

Black-box test are designed to uncover errors functional requirement without regard to the internal workings of a program. Black-box testing techniques focus on the information domain of the software, deriving test cases by partitioning the input and output domain of a program in manner that provides through test coverage. The black-box test is used to demonstrate that software functions are operational, that input is properly produced, and that the integrity of external information are maintained. A black-box test examines some fundamental aspect of a system with little or no regard for the integral logical structure of the software.

Acceptance Testing

Acceptance Test is performed with realistic data of the client to demonstrate that the software is working satisfactorily. Testing here is focused on external behavior of the system; the internal logic of program is not emphasized.

In this project ‘Online Shopping Mall Management’ I have collected some data and tested whether project is working correctly or not.

Test cases should be selected so that the largest number of attributes of an equivalence class is exercised at once. The testing phase is an important part of software development. It is the process of finding errors and missing operations and also a complete verification to determine whether the objectives are met and the user requirements are satisfied.

93

Page 94: Online Shopping Mall Management 1

Online Shopping Mall Management

94

Conclusion

Page 95: Online Shopping Mall Management 1

Online Shopping Mall Management

Conclusion

The ‘Online Shopping Mall Management’ is designed to provide a web based application that would make searching, viewing and selection of a product easier. The search engine provides an easy and convenient way to search for products where a user can Search for a product interactively and the search engine would refine the products available based on the interactively and the search engine would refine the products available based on the user’s input. The user can then view the complete specification of each product. They can also view the product reviews and also write their own reviews. Use of Ajax components would make the application interactive and prevents annoying post backs.

The advantages are:-

Easy shopping Wide range of items. Value for money of different items. Publicity of different companies and their products. Easy to purchase.

Project Summary

This application has been computed successfully and was also tested successfully by taking “test cases”. It is user friendly, and has required options, which can be utilized by the user to perform the desired operations.

The software is developed using Dot Net Technology, C# as front end and MS-SQL Server as back end in Windows environment. The goals that are achieved by the software are:

Optimum utilization of resources. Efficient management of records. Simplification of the operations. Less processing time and getting required information. User friendly.

Scope for Future WorkThe following things can be done in future.

The current system can be extended to allow the users to create accounts and save products in to wish list.

The users could subscribe for price alerts which would enable them to receive messages when price for products fall below a particular level.

The current system is confined only to the shopping cart process. It can be extended to have an easy to use check out process.

Users can have multiple shipping and billing information saved. During checkout they can use the drag and drop feature to select shipping and billing information.

95

Page 96: Online Shopping Mall Management 1

Online Shopping Mall Management

BIBLIOGRAPHY

BooksSR NO. Book name Author name

1. Modern System Analysis & Design Jeffery A Hoffer

2. Analysis and Design of Information System V. Rajaraman

3. Fundamentals of Software Engineering Rajeev Mall

4. Pro ASP.NET 4 in C# 2010 Matthew MacDonald, Adam Freeman and Mario Szpuszta

5. Beginning ASP.NE T 4 in C# and VB Imar Spaanjaars

6. Programming C#, 2nd Edition Jesse Liberty

7. Microsoft® SQL Server® 2008 T-SQL Fundamentals

Itzik Ben-Gan

WebsitesSR NO. Description Website

1. The official Microsoft site for asp.net http://www.asp.net/

2. Site to learn website design http://www.sitepoint.com/

3 Details of VS2010http://msdn.microsoft.com/en-us/vstudio

4. Project Managementhttp://www.startwright.com/project.htm

5. Fundamentals about ASP .Net, SQL http://www.w3schools.com

96