Sunteți pe pagina 1din 26

Online Supermarket System

G.D.M.Madushantha.

8690

Purpose:

A report submitted in partial fulfillment of the


requirement for the internship training of the Faculty
of Science, University of Colombo
Acknowledgements
First I would like to thanks Mr. Niranka John Nonnis (Managing Director) EVES IT Lanka
(pvt) Ltd for the supporting me to get the knowledge of software development (software
engineering) during the 6 months of training period. And also thanks for my placement
supervisor Mr. T.G.Asela Bandara (Senior Software Engineer) for his guidance for training
and my project ‘online supermarket system’.

And also like to thanks all the members of EVES IT Lanka (Pvt) Ltd for the heartiest support
for the project.

Finally I would like to thanks for the all the staff of University of Colombo for giving me the
greatest opportunity for industrial training.
Contents
Contents................................................................................................................ 3

Executive Summary...............................................................................................4

Introduction........................................................................................................... 5

Methodology.......................................................................................................... 6

Software Development Life Cycle.......................................................................6

Requirement Analysis.........................................................................................6

2.2.1 Product Feature......................................................................................7

System Feature......................................................................................................9

3.1 Search Products online.................................................................................9

3.2 Specifies the searching criteria.....................................................................9

3.3 Adding product details................................................................................10

3.4 Notify the supermarket admins..................................................................10

3.5 Implement Google map..............................................................................10

Implementation................................................................................................... 12

Technology used...............................................................................................12

Tools................................................................................................................. 12

4.3 Developer Guide.........................................................................................12

Searching Items................................................................................................14

Object Relational Mapping (ORM).....................................................................16

Spring MVC....................................................................................................... 16

Conclusion........................................................................................................... 17

References........................................................................................................... 18

Annexure............................................................................................................. 19
Executive Summary
This project is a web portal that the user can search particular product online in the Sri Lankan
supermarkets. The main functionality of the System is search function. The system is develop
according to the software development life cycle which is the process of creating or altering
systems, and the models and methodologies that people use to develop these systems. The
concept generally refers to computer or information systems. Three users are involved in the
system. They are viewing, feeding data and manage the supermarket system.

In this report I hope to mention the references that help me to get requirement and
development, Technical stuffs that are going to the system implements and methodologies.

As steps in SDLC I designed the object model, data model and UML diagram for the system.
Figures are included in Annex.

And also the technical stuff like programming languages, frameworks, database management
system, third party software libraries are list down in this report. There are lots of
technologies that available for developing software. In this report I mentioned my desired
technologies for my project and advantages of the stuff that used.

In the period of 4 month of my project I have completed most of the functionality of the
project but there are optional functionalities to be implementing.
Introduction
Online Supermarket system is web portal where the customer can search particular product online.
This System is aimed to provide information to the customer about the product and services
of the supermarket of the country. In particular scenario, the customer could have to access
internet. And he can input his/her product details or services according to his/her need. The
web interface is provided some searching criteria and filters (town, substituting product) that
allows user to ease the search process about the searching criteria. When the user finished
input, the system will show the result according to the searching criteria. The result is
ascended according to the nearest supermarkets/pharmacies to the user that specifies the
region/town. And it provides some details about the product/service such as the price,
available stock; discount and etc. there are several types of users that involve with the system.

In regarding sectors, list down the Software Development Life Cycle, Frameworks,
Programming languages, Software libraries and implementation.
Methodology

In this section list down the methodologies and models that are used to
developed the online supermarket system.

Software Development Life Cycle

The Systems Development Life Cycle (SDLC), or Software Development Life Cycle in
systems engineering, information systems and software engineering, is the process of creating
or altering systems, and the models and methodologies that people use to develop these
systems. The concept generally refers to computer or information systems.

A Systems Development Life Cycle (SDLC) adheres to important phases that are essential
for developers, such as planning, analysis, design, and implementation and testing.

Requirement Analysis

According to the existing system analysis, there are online super market systems that the
particular supermarket is implemented their own. They are providing services that online
purchasing, delivering, and searching their products. Some web sites are implementing the
portal by providing list of supermarkets in the country. And they are not implementing the
search facility.

1.0 https://www.keellssuper.com/defaultnew.asp

This site is the First Online supermarket implements in Sri Lanka. The Site is
governed by the terms and conditions of John Keells Holdings Limited.
Nations Trust Bank (NTB) relating to online payments. They implement
features that online purchase facility; implement the shopping cart, user
registration, product search facility.

2.0 http://www.bgdportal.com/

This site is a Bangladesh internet catalogue and information resource. The site
is offered to search list of industries in the country (Bangladesh). The
categories are government and politics, education, business and commerce, IT,
travel and shopping etc.
Functionality of the system that going to implement

• Search particular product.

• Filter the search criteria by selecting different option.

• Compare the prices of product with different supermarkets.

• Register to the system.

• Notify the supermarket admin for product update by email and web service.

• Implement the Google map.

• User Authentification.

Users of the system

There are four type of users are involve with the system.
Online User this user can enter the web site and search particular product
and view the result

Supermarket Admin this user is responsible for providing details of the supermarket
and the products.

SuperAdmin This user is the site administrator. This user is responsible for
site maintenances. This user can view all the status of the
system and change it.

2.2.1 Product Feature

For the online users

• Search product
Details of the product specified.

• Specify the search criteria


User can filter search result by option given in the page.
• Browse the product details
Get the product details, compare prices etc.

• Implement the geographical map


Users can track the supermarket geographical location by map.

For supermarket Admin

• Register on to the system


This is the same as online user but give option to apply as supermarket admin.

• Add their product details


The simple and interactive user interface for add product details.

• Update the product details.


Change the existing details of products.

• Notification
Notify the admins on time basis (weekly, monthly) for details.

For super Admin

• Views the whole system.


He is able view all details about users, supermarkets and their products.

• Modification of some details.


Admin can change particular details like geographical map positions, users but not all.
(Prices of products, supermarkets details.)
System Feature
This section includes the functional requirements.

3.1 Search Products online

Description and Priority


This is main feature of the system. A particular user searches products online by
specifying keyword on to the input box. Priority of this feature is high.
Stimulus/Response Sequences
Online user input their key word for searching and the system retrieve the detail of the
product.
Functional Requirements
Specified mapping technology has to be implemented to get correct details with low
query time. According to the key word the result should be listed by comparing, guessing
the key word. When entering the key word of the products, there is list that generate the
guessing key word that is ease the search of the user.

REQ-1: Map the keyword to the system.


REQ-2: guess the key word when entering and pop up suggestions.
REQ-3: list the search results by keyword ascending by higher priority to the key word.

3.2 Specifies the searching criteria

Description and Priority


User can filter their search by selecting the option given in the user interface. The
locations of the supermarket, product ranges, substituting products etc. priority is high for
this feature.
Stimulus/Response Sequences
Online users input their key word and specify the options.
Functional Requirements
User can select different option in radio buttons, check boxes and combo box and filter
the result.
REQ-1: allow user to specify the criteria by allow them to choosing option and
inputting the options. (By providing radio buttons, check boxes, input boxes, combo
boxes.)

3.3 Adding product details

Description and Priority


Supermarket admin is responsible for adding the product details for the system. Priority is
high.
Stimulus/Response Sequences
Admin can input details of the products by given user interface.
Functional Requirements
Specifies mapping technique for get product details to the system. Inputs validations are
necessary.

REQ-1: Mapping the inputs.


REQ-2: Inputs validation.

3.4 Notify the supermarket admins

Description and Priority


Prices, discount of products are change on times. Therefore details of the products must
update. The system should notify the admins by email or web service. Priority is medium.
Stimulus/Response Sequences
System will notify weekly or monthly by sending emails or web service.
Functional Requirements

Notify admin by sending email.

REQ-1: sending email on time basis automatically.

3.5 Implement Google map

Description and Priority


Users can aware the supermarket’s geographical location online. Priority is low.
Stimulus/Response Sequences
When the user click Map Supermarket button it will display the map by marker
corresponds to the location.
Functional Requirements
Supermarket admin can specify the location and also super admin can specify the
location by details that are given by supermarket. Then latitude and longitude are sending
for database. When user click Map Supermarket button the corresponding latitude and
longitude retrieve from database and display.
REQ-1: list the zip codes, cities and state of the country.
Implementation
In this section the tools, technologies that implement the system are list down.

Technology used

• Java programming language.

• Java enterprise edition(j2ee)

• Spring framework

• Hibernate Framework

• Dojo framework

• Apache lucene search engine library

• Tomcat Container

• Oracle Database Management System

Tools

• MyEclipse Integrated Development Environment

• Oracle DBMS Browser

• FireBug

4.3 Developer Guide


Following projects are used as references to my project.

1 Java Pet store

The Java Pet Store 2.0 Reference Application is a sample application brought to you by
the Java BluePrints program at Sun Microsystems. This application is designed to
illustrate how the Java Enterprise Edition 5 Platform can be used to develop an AJAX-
enabled Web 2.0 application.
The Java Pet Store 2.0 is the reference application for building Ajax web applications on
Java Enterprise Edition 5 platform. It illustrates BluePrints for using Ajax with Java,
building AJAX-enabled JSF component libraries, using Java Persistence APIs, applying
MVC and other design patterns in an Ajax web app, using Mashups such as Google
Maps service for location specific searches of pets and PayPal service for purchases,
using an RSS feed as a data source, and lots more.

http://java.sun.com/developer/releases/petstore/

2 Developing a Spring Framework MVC application step-by-step

This is the tutorials by Thomas Risberg, Rick Evans, and Portia Tung about the
developing Spring mvc application step by step.

http://static.springsource.org/docs/Spring-MVC-step-by-step/

3 Oracle 10g XE

The oracle 10g express edition is used as backend database management system.
http://www.oracle.com/technetwork/database/express-
edition/downloads/102xewinsoft-090667.html

Technologies and frameworks

JDBC Driver

Oracle 10g express edition is used as database. Oracle jdbc driver used as jdbc Driver.

http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-
088211.html

ORM

Hibernate 3.0 is used as Object Relational mapping framework.

http://sourceforge.net/projects/hibernate/files/hibernate3/

Search engine

Apache Lucene is a high-performance, full-featured text search engine library written


entirely in Java. Apache lucene is used as search engine.

http://apache.mirrors.hoobly.com/lucene/java/
DOJO

Dojo is toolkit that featuring DHTML and AJAX function. It supports client side
programming in web site development.

http://www.dojotoolkit.org/download/

Spring MVC

Spring mvc is used as mvc architecture in this project. Spring version 3.03 is used.

http://www.springsource.org/download

Oracle

Oracle 10g express edition is used as Database management system.

http://www.oracle.com/technetwork/database/expressedition/downloads/102xewinsoft-
090667.html

Searching Items

Searching is the main functionality of this system. When user input his keyword about his
product the system will list down the resulting guessing items of the supermarkets on
particular area which defined.
Searching with relational database system is caused few drawbacks.

The first problem is scalability. In today’s application architecture, the database tends to be
the most critical path where scalability cannot be as easily achieved as in other tiers. Full-text
indexing and searching can be quite intensive in terms of CPU, memory, and input/output.
Do we really want to spend database resources on such a feature set as depicted in figure 1.9?
Will it be a problem in the future, and how fast will we reach the scalability limit?

The second problem is portability. Unfortunately, there is no standard today to express a full-
text query. Relational vendors have extended SQL to support the ability to express those
kinds of queries, every single one in its own way. The end result for the user is the inability to
build an application compatible with multiple relational back ends. Even if the user is
committed to a migration effort, the features themselves are not standard, and their behavior
might change from one product to another (if they are even present in both).

The third problem is flexibility. Depending on the relational engine, indexing can be more or
less flexible. Generally speaking, flexibility is not the strong point of such engines. Flexibility
is key to adapting your search engine to your business needs and to fulfilling your user’s
requests. Flexibility is needed both at indexing time (how you want your data to be prepared)
and at searching time (what kind of full-text operations are available).

Figure 4.1 show the normal database search function.

Figure 4.1

When implementing the search function, I chose the apache lucene because Apache Lucene is
a high-performance, full-featured text search engine library written entirely in Java. It is a
technology suitable for nearly any application that requires full-text search, especially cross-
platform. Figure 4.2 shows the functionality of the API.

The advantage over normal database operation when using apache lucene is as follow.

• It provides full scalability, portability and flexibility over normal database queries.

• It use fast indexing, ranked searching, Boolean phrase, span queries, date-range
searching and many more.

• It is written in java.
Figure 4.2

Object Relational Mapping (ORM)


Object relational mapping are the automated persistence of objects in a Java application to the
tables in a relational database, using metadata that describes the mapping between the objects
and the database. ORM, in essence, works by transforming data from one representation to
another.
In this project, I select Hibernate framework as ORM.

Advantage of using Hibernate ORM

• Productivity
Hibernate eliminates the most grunt work and let developer concentrates on the
business problem.

• Maintainability
Fewer lines of code (LOC) make the system more understandable since it emphasizes
business logic rather than plumbing.

• Performance
Most optimizations, however, are much easier to achieve with automated ORM
because hibernate implements the optimization algorithms.

• Vendor Independence
An ORM abstracts your application away from the underlying SQL database and SQL
dialect. If the tool supports a number of different databases (most do), then this
confers a certain level of portability on your application.

Spring MVC

Model–View–Controller (MVC) is a software architecture, currently considered an


architectural pattern used in software engineering. The pattern isolates "domain logic" (the
application logic for the user) from input and presentation (UI), permitting independent
development, testing and maintenance of each.
I chose spring framework because of its inversion of control and dependency injection
functionality.

Conclusion
• Most of the requirements of the system have been completed during the period of six
months.

• There are issues and bugs that are still to fix.

• Some functionality of the system should improve for optimized functionality.

• The system works according to the requirement specification.

• There are some issues to implement the system in real world application in Sri
Lanaka.
References
1. These sites help to get idea and requirements of system.

https://www.keellssuper.com/defaultnew.asp

http://www.bgdportal.com/

2. Java pet store application helps to Develop the application using j2ee standards
http://java.sun.com/developer/releases/petstore/

3. These sites help to get resources and knowledge.


• http://static.springsource.org/docs/Spring-MVC-step-by-step/

• http://www.oracle.com/technetwork/database/express-
edition/downloads/102xewinsoft-090667.html

• http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-
088211.html

• http://sourceforge.net/projects/hibernate/files/hibernate3/

• http://apache.mirrors.hoobly.com/lucene/java/

• http://www.dojotoolkit.org/download/

• http://www.springsource.org/download

• http://www.oracle.com/technetwork/database/expressedition/downloads/102xewinsoft
-090667.html

Annexure
Modeling Language (UML) is a standardized general-purpose modeling language in the field
of software engineering. As in this phase I design Use case Diagrams, Activity Diagrams,
Class Diagrams and Sequence Diagrams. And prepared document for the UML Diagrams.
Use case Diagram

Figure 1
Figure 2
Figure 3

Figure 4
Activity Diagram

Figure 5

Sequence Diagram
Figure 6

Figure 7
Figure 8

Figure9
Figure 10

S-ar putea să vă placă și