You are on page 1of 42

Introduction

1.1 About project


Web hosts will provide us a web user interface through which we can upload files and gives
us a provision to run commands. Usually the files are uploaded to the server. The host also
provides the user to edit a page in the web itself and save the modified file. In addition to edit
in the server the application also maintains versions for files in the server. This is done for
better user controlling in his files in the server.
Firstly, admin registers the users to maintain the web pages. When the user logs in to his
account he will be given access to his space in the server. The server lists down all the files
and directories in his space along with their sizes. User can upload new files to that space,
edit a file or delete a file. After making any change in the server this change will be updated
to the admin for verification. The modified contents are uploaded in the server only after
admin verification.The application also maintains version controlling for user files in the
server automatically. Whenever a change is made or the same file is uploaded the application
automatically maintains versions for files. If it identifies any change in the uploaded file and
existing file content then it will create a new version for that file. And these changes will be
saved to database for future reference
1.2 Objective
There are some applications where they are used to upload files to the hosting server and
download from the server. But there is no such application where user can edit files from the
server space, modify the file. In addition there is no such application which maintains version
control. We wanted to build an application that will provide all the above features on the user
space. Web hosts will provide us a web user interface through which we can upload files and
gives us a provision to run commands. The host also provides the user to edit a page in the
web itself and save the modified file. Along with the above mentioned functionalities we
wanted to extend this service a bit by providing few advanced features like, version
controlling, User based authenticated space.

1.3 Scope
This system helps the user to edit the files in the server space, by reducing the time and
manual work. By using this system we can also maintain versions of the modified files which
help the user in retrieving the previous files whenever required and as well as to track the
changes whatever applied throughout this application

2. LITERATURE SURVEY REPORT


2.1 Existing System

There are some applications where they are used to upload files to the hosting server and
download from the server. But there is no such application where user can edit files from the
server space, modify the file and test that file. In addition there is no such application which
maintains version control with file comparison. We wanted to build an application that will
provide all the above features on the user space
Web hosting is the process of uploading a web page or service to the web server to make it
available on the web. The present hosting service offers users to upload their files to the server.
Now if the user wants to edit/change a file then he should download it, change it and finally
upload the modified file.

2.2 Proposed System


The project is a web application where it presents an interface for the user to avail space in the
web server. The user can upload files from this interface or download a group of selected files a
compressed zip file. The following are the features in the project.
To avoid all these round trips the proposed system provides the user to edit a page in the server
itself. In addition to edit in the server the application also maintains versions for files in the
server. This is done for better user controlling in his files in the server.

3. REQUIREMENT SPECIFICATION
3.1 Functional Requirements
Security:

New developer has to register in the website to avail the service. This registration will be
approved by the admin to activate the account. Activated users can login to avail the service.
Hosting:

Uploading User can upload file through web interface.


Create User can create a new file in the server directly.
Editing User can edit a selected in the browser itself.
Delete User can delete selected files.

Versioning:

Version files Save the content of the file to maintain version.

3.2 Non-Functional Requirements


Security:
Data security is provided as we are providing access only to the intended users by giving user id
and passwords. This verification procedure is done by the admin.
Reliability:
Reliability is provided as admin verification is provided at each step like creating, deletingand
modification of web pages and by maintaining versions we can rely on them.

Performances:

Storages of repeated versions degrades the system performances, hence we are providing an
option to store required versions only.

3.3 Software and hardware requirements:


Hardware Requirements:
Processor

Intel core

Hard Disk

40 GB (min).

RAM
Clock Speed

1 GB (min).
:

1 GHz.

Software Requirements:
Operating system

Windows XP

Languages

Java (JDK 1.8)

Database

MySQL 5.5

Web Technologies

JSP, SERVLET.

Server

IDE

Apache Tomcat 7.0.


NetBeans 8.0

4. TECHNOLOGIES USED
4.1 JAVA
Java is a high-level, third generation programming language, like C, FORTRAN, Smalltalk,
Perl, and many others. You can use Java to write computer applications that play games, store
data or do any of the thousands of other things computer software can do. Compared to other
programming languages, Java is most similar to C. However although Java shares much of C's
syntax, it is not C. Knowing how to program in C or, better yet, C++, will certainly help you to
learn Java more quickly, but you don't need to know C to learn Java. A Java compiler won't
compile C code, and most large C programs need to be changed substantially before they can
become Java programs. What's most special about Java in relation to other programming
languages is that it lets you write special programs called applets that can be downloaded from
the Internet and played safely within a web browser. Java language is called as an ObjectOriented Programming language and before beginning for Java, we have to learn the concept of
OOPs (Object-Oriented Programming).
Basic Concept of OOP (Object-Oriented Programming):
There are some basic concepts of object oriented programming as follows:
1. Object
2. Class
3. Data abstraction
4. Data encapsulation
5. Inheritance
6. Polymorphism
7. Dynamic binding

Object
Objects are important runtime entities in object oriented method. They may characterize a
location, a bank account, and a table of data or any entry that the program must handle.
Each object holds data and code to operate the data. Object can interact without having to
identify the details of each others data or code. It is sufficient to identify the type of message
received and the type of reply returned by the objects.
Classes
A class is a set of objects with similar properties (attributes), common behavior (operations), and
common link to other objects. The complete set of data and code of an object can be made a user
defined data type with the help of class.
The objects are variable of type class. A class is a collection of objects of similar type. Classes
are user defined data types and work like the build in type of the programming language. Once
the class has been defined, we can make any number of objectsbelonging to that class. Each
object is related with the data of type class with which they are formed.
Data Abstraction
Data abstraction refers to the act of representing important description without including the
background details or explanations. Classes use the concept of abstraction and are defined as a
list of abstract attributes such as size, cost and functions operate on these attributes. They
summarize all the important properties of the objects that are to be created. Classes use the
concepts of data abstraction and it is called as Abstract Data Type (ADT).
Data Encapsulation
Data Encapsulation means wrapping of data and functions into a single unit (i.e. class). It is most
useful feature of class. The data is not easy to get to the outside world and only those functions
which are enclosed in the class can access it. These functions provide the boundary between
Objects data and program. This insulation of data from direct access by the program is called as
Data hiding.

Inheritance
Inheritance is the process by which objects of one class can get the properties of objects of
another class. Inheritance means one class of objects inherits the data and behaviors from another
class. Inheritance maintains the hierarchical classification in which a class inherits from its
parents. Inheritance provides the important feature of OOP that is reusability. That means we can
include additional characteristics to an existing class without modification. This is possible
deriving a new class from existing one. In other words, it is property of object-oriented systems
that allow objects to be built from other objects. Inheritance allows openly taking help of the
commonality of objects when constructing new classes. Inheritance is a relationship between
classes where one class is the parent class of another (derived) class. The derived class holds the
properties and behavior of base class in addition to the properties and behavior of derived class6.
Polymorphism
Polymorphism means the ability to take more than one form. Polymorphism plays a main role in
allocate objects having different internal structures to share the same external interface. This
means that a general class of operations may be accessed in the same manner even though
specific activities associated with each operation may differ. Polymorphism is broadly used in
implementing inheritance.
It means objects that can take on or assume many different forms. Polymorphism means that the
same operations may behave differently on different classes. Booch defines polymorphism as the
relationship of objects many different classes by some common super class. Polymorphism
allows us to write generic, reusable code more easily, because we can specify general
instructions and delegate the implementation detail to the objects involved.
Dynamic Binding
Binding refers to the linking of a procedure call to the code to be executed in response to the call.
Dynamic binding means that the code related with a given procedure call is not known until the
time of the call at run time. Dynamic binding is associated polymorphism and inheritance.

4.2 JAVA SERVER PAGES (JSP)


Introduction:
Java Server Pages (JSP) technology enables you to mix regular, static HTML with dynamically
generated content. You simply write the regular HTML in the normal manner, using familiar
Web-page-building tools. You then enclose the code for the dynamic parts in special tags, most
of which start with <% and end with %>.
The Needfor JSP:
Servlets are indeed useful, and JSP by no means makes them obsolete. However,

It is hard to write and maintain the HTML.

You cannot use standard HTML tools.

The HTML is inaccessible to non-Java developers.

Benefitsof JSP:
JSP provides the following benefits over servlets alone:

It is easier to write and maintain the HTML: In this no extra backslashes, no double
quotes, and no lurking Java syntax.

You can use standard Web-site development tools:

We use Macromedia Dreamweaver for most of the JSP pages. Even HTML tools that know
nothing about JSP can used because they simply ignore the JSP tags.

You can divide up your development team:

The Java programmers can work on the dynamic code. The Web developers can concatenate
on the representation layer. On large projects, this division is very important. Depending on
the size of your team and the complexity of your project, you can enforce a weaker or
stronger separation between the static HTML and the dynamic content.

4.3 ODBC
In

computing,

ODBC

(Open

Database

Connectivity)

is

standard

programming

languagemiddlewareAPI for accessing database management systems (DBMS). The designers of


ODBC aimed to make it independent of database systems and operating systems. An application
written using ODBC can be ported to other platforms, both on the client and server side, with
few changes to the data access code.
ODBC accomplishes DBMS independence by using an ODBC driver as a translation layer
between the application and the DBMS. The application uses ODBC functions through an
ODBC driver manager with which it is linked, and the driver passes the query to the DBMS. An
ODBC driver can be thought of as analogous to a printer or other driver, providing a standard set
of functions for the application to use, and implementing DBMS-specific functionality. An
application that can use ODBC is referred to as "ODBC-compliant". Any ODBC-compliant
application can access any DBMS for which a driver is installed. Drivers exist for all major
DBMSs, many other data sources like address book systems and Microsoft Excel, and even for
text or CSV files.
ODBC was originally developed by Microsoft during the early 1990s, and became the basis for
the Call Level Interface (CLI) standardized by SQL Access Group in the Unix and mainframe
world. ODBC retained a number of features that were removed as part of the CLI effort. Full
ODBC was later ported back to those platforms, and became a de facto standard considerably
better known than CLI. The CLI remains similar to ODBC, and applications can be ported from
one platform to the other with few changes.

10

4.4 JDBC
The JDBC API defines the Java interfaces and classes that programmers use to connect to
databases and send queries. A JDBC driver implements these interfaces and classes for a
particular DBMS vendor.
A Java program that uses the JDBC API loads the specified driver for a particular DBMS before
it actually connects to a database. The JDBC DriverManager class then sends all JDBC API calls
to the loaded driver.
The four types of JDBC drivers are:
JDBC-ODBC bridge plus ODBC driver, also called Type 1
Translates JDBC API calls into Microsoft Open Database Connectivity (ODBC) calls that are
then passed to the ODBC driver. The ODBC binary code must be loaded on every client
computer that uses this type of driver.
Native-API, partly Java driver, also called Type 2
Converts JDBC API calls into DBMS-specific client API calls. Like the bridge driver, this type
of driver requires that some binary code be loaded on each client computer.
JDBC-Net, pure Java driver, also called Type 3
Sends JDBC API calls to a middle-tier net server that translates the calls into the DBMS-specific
network protocol. The translated calls are then sent to a particular DBMS.
Native-protocol, pure Java driver, also called Type 4
Converts JDBC API calls directly into the DBMS-specific network protocol without a middle
tier. This allows the client applications to connect directly to the database server.

11

4.5 SERVLET:
The servlet is a Java programming languageclass used to extend the capabilities of a server.
Although servlets can respond to any types of requests, they are commonly used to extend the
applications hosted by web servers, so they can be thought of as Java applets that run on servers
instead of in web browsers.These kinds of servlets are the Java counterpart to other dynamic Web
content technologies such as PHP and ASP.NET.

Servlets are most often used to:

Process or store data that was submitted from an HTML form.


Provide dynamic content such as the results of a database query
Manage state information that does not exist in the stateless HTTP protocol, such as
filling the articles into the shopping cart of the appropriate customer

Life cycle of a servlet:


Three methods are central to the life cycle of a servlet. These are init(), service(), and destroy().
They are implemented by every servlet and are invoked at specific times by the server.During
initialization stage of the servlet life cycle, the web container initializes the servlet instance by
calling the init() method, passing an object implementing the javax.servlet.ServletConfig
interface. This configuration object allows the servlet to access name-value initialization
parameters from the web application.

12

After initialization, the servlet instance can service client requests. Each request is serviced in its
own separate thread. The web container calls the service() method of the servlet for every
request. The service() method determines the kind of request being made and dispatches it to an
appropriate method to handle the request. The developer of the servlet must provide an
implementation for these methods. If a request is made for a method that is not implemented by
the servlet, the method of the parent class is called, typically resulting in an error being returned
to the requester.
Finally, the web container calls the destroy() method that takes the servlet out of service. The
destroy() method, like init(), is called only once in the lifecycle of a servlet.
4.6 NETBEANS:
Net Beans is an integrated development environment (IDE) for developing primarily with Java,
but also with other languages, in particular PHP, C/C++, and HTML5. It is also an application
platform framework for Java desktop applications and others.
The Net Beans IDE is written in Java and can run on Windows, OS X, Linux, Solaris and other
platforms supporting a compatible JVM.
The Net Beans Platform allows applications to be developed from a set of modular software
components called modules. Applications based on the Net Beans Platform (including the Net
Beans IDE itself) can be extended by third party developers.
The Net Beans Team actively support the product and seek feature suggestions from the wider
community. Every release is preceded by a time for Community testing and feedback.
Net Beans IDE:
NetBeans IDE is an open-source integrated development environment. NetBeans IDE supports
development of all Java application types (Java SE (including JavaFX), Java ME, web, EJB and
mobile applications) out of the box. Among other features are an Ant-based project system,
Maven support, refactorings, version control (supporting CVS, Subversion, Git, Mercurial and
Clearcase).

13

Modularity: All the functions of the IDE are provided by modules. Each module provides a well
defined function, such as support for the Java language, editing, or support for the CVS
versioning system, and SVN. NetBeans contains all the modules needed for Java development in
a single download, allowing the user to start working immediately. Modules also allow NetBeans
to be extended. New features, such as support for other programming languages, can be added by
installing additional modules. For instance, Sun Studio, Sun Java Studio Enterprise, and Sun
Java Studio Creator from Sun Microsystems are all based on the NetBeans IDE.
License: From July 2006 through 2007, NetBeans IDE was licensed under Sun's Common
Development and Distribution License (CDDL), a license based on the Mozilla Public License
(MPL). In October 2007, Sun announced that NetBeans would henceforth be offered under a
dual license of the CDDL and the GPL version 2 licenses, with the GPL linking exception for
GNU Classpath
4.7 XAMPP
XAMPPis a free and open sourcecross-platformweb serversolution stack package, consisting
mainly of the Apache HTTP Server, MySQLdatabase, and interpreters for scripts written in the
PHP and Perlprogramming languages.
Etymology:
XAMPP's name is an acronym for:

X (to be read as "cross", meaning cross-platform)

Apache HTTP Server

MySQL

PHP

Perl

14

Requirements and features:


XAMPP requires only one zip, tar, 7z, or exe file to be downloaded and run, and little or no
configuration of the various components that make up the web server is required. XAMPP is
regularly updated to incorporate the latest releases of Apache, MySQL, PHP and Perl. It also
comes with a number of other modules including OpenSSL and phpMyAdmin.
Self-contained, multiple instances of XAMPP can exist on a single computer, and any given
instance can be copied from one computer to another.
It is offered in both a full, standard version and a smaller version.
Use:
Officially, XAMPP's designers intended it for use only as a development tool, to allow website
designers and programmers to test their work on their own computers without any access to the
Internet. To make this as easy as possible, many important security features are disabled by
default.In practice; however, XAMPP is sometimes used to actually serve web pages on the
World Wide Web. A special tool is provided to password-protect the most important parts of the
package.
XAMPP also provides support for creating and manipulating databases in MySQL and SQLite
among others.
Once XAMPP is installed, it is possible to treat a localhost like a remote host by connecting
using an FTP client. Using a program like FileZilla has many advantages when installing a
content management system (CMS) like Joomla or WordPress. It is also possible to connect to
localhost via FTP with an HTML editor.
The default FTP user is "newuser", the default FTP password is "wampp". The default MySQL
user is "root" while there is no default MySQL password.

15

Components:
XAMPP 1.8.3-5 for Windows, including:

Apache 2.4.10

MySQL 5.6.20

PHP 5.5.15

phpMyAdmin 4.2.7.1

FileZilla FTP Server 0.9.41

Tomcat 7.0.42 (with mod_proxy_ajp as connector)

Strawberry Perl 5.16.3.1 Portable

XAMPP Control Panel 3.2.1 (from hackattack142)

XAMPP 1.8.3-5 for Linux, including:

Apache 2.4.10

MySQL 5.6.20

PHP 5.5.15

phpMyAdmin 4.2.7.1

OpenSSL 1.0.1i

16

5. SYSTEM ARCHIUTECHTURE DESIGN


5.1 System Architecture

17

5.2 UML
UNIFIED MODELLING LANGUAGE (UML) CONCEPTS
The Unified Modelling Language (UML) is a standard language for writing software blue prints.
The UML is a language for

18

Visualizing
Specifying
Constructing
Documenting the artifacts of a software intensive system.
The UML is a language which provides vocabulary and the rules for combining words in that
vocabulary for the purpose of communication. A modeling language is a language whose
vocabulary and the rules focus on the conceptual and physical representation of a system.
Modeling yields an understanding of a system.
Building Blocks of the UML:
The vocabulary of the UML encompasses three kinds of building blocks:
Things
Relationships
Diagrams
Things are the abstractions that are first-class citizens in a model; relationships tie these things
together; diagrams group interesting collections of things.

19

CLASS DIAGRAM
Class diagrams identify the class structure of a system, including the properties and methods of
each class. Also depicted are the various relationships that can exist between classes, such as an
inheritance relationship. The Class diagram is one of the most widely used diagrams from the
UML specification.
Fig:5.2.1

20

OBJECT DIAGRAM

It shows a set of objects and their relationships. An object diagram in the Unified Modeling
Language (UML), is a diagram that shows a complete or partial view of the structure of a
modeled system at a specific time.
Fig:5.2.2

21

USECASE DIAGRAM
It shows a set of usecases and actor (special kind of class) and their relationships.A use case in a
use case diagram is a visual representation of distinct business functionality in a system. The key
term here is "distinct business functionality." To choose a business process as a likely candidate
for modelling as a use case, you need to ensure that the business process is discrete in nature.
Fig:5.2.3

22

ACTIVITY DIAGRAM
It is special kind of a state chart diagram that shows the flow from activity to activity within a
system. It is also a dynamic view of a system.Activity diagrams represent the business and
operational workflows of a system. An Activity diagram is a dynamic diagram that shows the
activity and the event that causes the object to be in the particular state.
Fig:5.2.4

23

SEQUENCE DIAGRAM
The sequence diagram is a interaction diagram that emphasizes the time ordering of
messages.Sequence Diagrams are used primarily to design, document and validate the
architecture, interfaces and logic of the system by describing the sequence of actions that need to
be performed to complete a task or scenario.
Fig:5.2.5

24

25

COLLABORATION DIAGRAM
Collaboration defines an interaction and is a society of roles and other elements that work
together to provide some cooperative behavior that's bigger than the sum of all the elements.
Therefore, collaborations have structural, as well as behavioral, dimensions. A given class might
participate in several collaborations.
Fig:5.2.6

26

STATECHART DIAGRAM
27

A Statechart diagram shows a state machine, consisting of states, transitions, events, and
activities. Statechart diagrams address the dynamic view of a system. They are especially
important in modeling the behavior of an interface, class, or collaboration and emphasize the
event-ordered behavior of an object.
Fig:5.2.7

28

DEPLOYMENT DIAGRAM
A deployment diagram shows the configuration of run-time processing nodes and the
components that live on them.Deployment diagrams address the static deployment view of an
architecture.
Fig:5.2.8

29

COMPONENT DIAGRAM
A component diagram shows the organizations and dependencies among a set of
components.Component diagrams address the static implementation view of a system. They are
related to class diagrams in that a component typically maps to one or more classes, interfaces, or
collaborations.
Fig: 5.2.9

30

6. TESTING
6.1 Testing Methods
White box testing:
White box testing is a testing case design method that uses the control structure of the procedure
design to derive test cases. All independents path in a module are exercised at least once, all
logical decisions are exercised at once, execute all loops at boundaries and within their
operational bounds exercise internal data structure to ensure their validity. Here the customer
isgiven three chances to enter a valid choice out of the given menu. After which the control exits
the current menu.
Black Box Testing:
Black Box Testing attempts to find errors in following areas or categories, incorrect or missing
functions, interface error, errors in data structures, performance error and initialization and
termination error. Here all the input data must match the data type to become a valid entry.
The following are the different tests at various levels:
Unit Testing:
Unit testing is essentially for the verification of the code produced during the coding phase
and the goal is test the internal logic of the module/program. In the Generic code project,
the unit testing is done during coding phase of data entry forms whether the functions are
working properly or not. In this phase all the drivers are tested they are rightly connected or
not.
Integration Testing:
All the tested modules are combined into sub systems, which are then tested. The goal is to
see if the modules are properly integrated, and the emphasis being on the testing interfaces
between the modules. In the generic code integration testing is done mainly on table
creation module and insertion module.

31

Validation Testing:
This testing concentrates on confirming that the software is error-free in all respects. All the
specified validations are verified and the software is subjected to hard-core testing. It also
aims at determining the degree of deviation that exists in the software designed from the
specification; they are listed out and are corrected.
System Testing:
This testing is a series of different tests whose primary is to fully exercise the computerbased system. This involves:

Implementing the system in a simulated production environment and testing it.

Introducing errors and testing for error handling.

32

6.2 TEST CASES: For the Overview of Application

Test
Case

Check Item

Test
objective

case Test Data Expected Result

Actual

Results

Result
TC-001

Registration

Enter developers
details

The
developers
should get registered

PASS

TC-002

Login

Enter username
and password

If the registered user


logs in then he
should be able to
access the account

PASS

If any person who is


unregistered logs in
then he cant access
the account

PASS

Registered users
create a new web
page.

The newely web


page should get
displayed in the
server

PASS

Registered users
can modify the
existing
web
page.

The modified web


page should get
displayed in the
server

PASS

Usernam
e : meg
Password
: anu

TC-003

Login

Enter username
and password

Usernam
e : meg
Password
: anu

Create
TC-004

TC-005

Modify

33

TC-006

Delete

Registered users
can delete the
web pages.

The web pages


shouldnt be
displayed in server

PASS

TC-007

Version
Controlling

The
modified
webpages should
be saved as
different
versions

This versions should


be accessible by the
user

PASS

Table:6.1.1

7.SCREENSHOTS

Fig:7.1

34

Fig:7.2

Fig:7.3

35

Fig:7.4

36

Fig:7.5

Fig: 7.6

37

Fig:7.7

Fig:7.8

38

Fig:7.9

39

Fig:7.10

40

Fig:7.11

Fig:7.12

8.CONCLUSION
8.1 Conclusion
In this project we developed an application which helps in online editing of web pages by which
manual work of the developer and time consumption will be reduced. This provides services like
creating, modifying and deleting of web pages. Only authenticated users registered by the admin
can access the server.
8.2 Future scope:
There is a facility of providing OTP (Onetime Password) to the developers which helps in
providing more security and this project can be extended by providing the feature of editing
videos online.

41

9. BIBILOGRAPHY

1) http://books.google.co.in/books?id=qIucp61eqAwC&pg=PA1&l
2) http://en.wikipedia.org/wiki/Revision_control
3) http://betterexplained.com/articles/a-visual-guide-to-version-control/

42

You might also like