You are on page 1of 60

1.

INTRODUCTION
Book Reading System for blind people" is a system using personal computer (PC) as the platform. It is a tactile reading system used by the blind and the visually impaired, and found in books. There are various ways in which blind and partially sighted people access information. For example, some use large or modified print materials, some use Braille and some use audio information. Traditionally, audio information has consisted of having information read out by another person - either live, or on a recording - but developments in technology have led to an alternative. Synthetic speech - which is artificial human speech - can be produced in a number of ways and used for a wide range of applications. These range from talking devices which use simple pre-recordings of a limited range of human speech to "text-to-speech" (TTS) synthesizers which use algorithms to convert any text input into a speech waveform, therefore have an unlimited vocabulary. Speech synthesizers and text-to-speech conversion programs make it possible for computers to pronounce any word.

1.1 PURPOSE
The main purpose of the project is to develop an application called Book Reading System for Blind People, To make usage of PCs more user friendly by developing text to speech synthesizer and to meet needs of visually impaired people. It can help blind people enjoy the experience of reading books. Years ago, people predicted that the end of the paper books is near due to new technologies. However, the popularity of books keeps increasing. It can take blind peoples education one step forward. Learning foreign languages, poetry, literature, English grammar etc. could be optimized using TTS. Blind people can

develop habits and hobbies using audio books. One could find audio books about every subject from fishing to knitting guides. It helps a lot of self creation, self confidence and awareness audio book guides which can help them.

1 Book Reading System For BlindPeople

1.2 SCOPE
To make usage of PCs more user friendly by developing text to speech synthesizer and to meet needs of visually impaired people in different languages. There is a great need to develop a text to speech converter tool with simple human computer interface in local language to meet needs of visually impaired people and to put foundation for side applications. To design and develop a computer interface for a person who cannot see what computer displays, is the most challenging task for many software developers. (1) To develop and implement the text to speech synthesizer. (2) Simple TTS interface for the blind people.

1.3 OVERVIEW
There is a great need to develop a text to speech converter tool with simple human computer interface in local language to meet needs of visually impaired people due to current market needs they do not recognize the needs of text to speech (TTS) converter. Synthetic speech is used by blind and partially sighted people in a range of applications, ranging from leisure activities to devices which support independent living. It highlights the importance of audio information as an alternative to print for blind and partially sighted people, and reveals a wide range of applications of text-to-speech (TTS) synthesis. These include educational tools (talking dictionaries, quick access to textbooks through TTS).

2 Book Reading System For BlindPeople

2. SYSTEM ANALYSIS
2.1. STUDY OF THE EXISTING SYSTEM
Braille is writing system which enables blind and partially sighted people to read and write through touch. It was invented by Louis Braille (1809-1852), who was blind and became a teacher of the blind. It consists of patterns of raised dots arranged in cells of up to six dots in a 3 x 2 configuration. Each cell represents a letter, numeral or punctuation mark.

2.1.1 Disadvantages
Unfortunately there is no systematic way of providing this information to the blind people today. Some of the means that are used today are Braille system, blind people depending on others to read books, audio books. No use of Web Services. No proper coordination between computer system and Users.

2.2. PROBLEM STATEMENT


The main purpose of the project is to develop an application called Book Reading System For Blind People Many people have changed the way to read books which are displayed over the monitor in the last 10 years. In a world which is becoming more and more people dependent on reading books over the monitor, but visually challenged people would have a huge disadvantage as they are unable to read text which is displayed over the monitor.

2.3. PROPOSED SOLUTION


A text-to-speech (TTS) system converts normal language text into speech .Speech can be created by joining pieces of recorded speech that are stored in a word file . Storing entire words or sentences gives high-quality output. The voice-over would help the user to navigate between pages or make decisions like open file, speak, pause, stop and save

3 Book Reading System For BlindPeople

audio files and etc. The application would have minimum operations on a single page reducing the complexity of use.

2.3.1 Advantages
The project is identified by the merits of the system offered to the user. The merits of this project are as follows: Many educational programs could be used by blind people if the computer spoke what appears on the display screen. Staff members at Sensory Aids are revising some popular programs so that blind people can use them. Talking terminals make almost all the capabilities of a computer accessible to blind people. At Sensory Aids, blind people learn to use talking terminals for data entry, information retrieval, word processing, and programming. Blind people are able to navigate quickly on the screen and find information as they need it. The blind user of the talking terminal has a control that lets him move a pointer to any line on the display screen. It includes educational tools such as talking dictionaries, quick access to textbooks through TTS. It also helps in making decisions like open file, speak, pause, stop and save audio files and etc. In education or professional use - consideration should also be given to more objective measures, such as how synthetic speech may affect intelligibility, comprehension and reading speed of the spoken word.

4 Book Reading System For BlindPeople

3. REQUIREMENT SPECIFICATION
3.1 HARDWARE AND SOFTWARE REQUIREMENTS:
Requirement Specification plays an important role to create quality software solution; Requirements are refined and analyzed to assess the clarity. Requirements are represented in a manner that ultimately leads to successful software implementation. Each requirement must be consistent with the overall objective. The development of this project deals with the following requirements: Software Requirements Hardware Requirements

3.1.1 .SOFTWARE REQUIREMENTS:


Software specifications are used designing the systems and to manage the time complexity. New tools and techniques are announced in quick succession. This has forced the software engineers and industry to continuously look for new approaches to software design and development. For this project we use the software requirements are as follows: a. WINDOWS Operating system b. J2EE5.0 or higher c. SERVLETS, JDBC d. HTML for front-end e. ORACLE10g for back-end f. JDBC for connecting front-end and back-end

3.1.2 HARDWARE REQUIREMENTS:


The selection of hardware is very important in the existence and proper working of any software. The hardware specifications are used providing the efficiency and responsiveness. By using these we can install the instructions and certificate of authenticity. In the selection of hardware, the size and the capacity requirements are important.

5 Book Reading System For BlindPeople

A network of computer each with configurations of

Client:
Processor RAM Hard Disk : Pentium Processor : 1 GB (Min) : 80GB (Min)

Server:
Processor RAM Hard Disk : Pentium Processor : 3 GB (Min) : 160GB (Min)

3.1.3 Software Specifications:


Front End Back End Web Server : SERVLETS : MySQL : Apache tomcat

3.1.4 Working Platform


Operating System : WINDOWS XP

6 Book Reading System For BlindPeople

FUNCTIONAL REQUIREMENTS:

System must be provided complete access to the administrator. Administrator must be able to register a user if he is not registered yet. System must provide a facility to add marks, attendance details of Student by the Administrator.

System must allow a user to view the student marks. System must allow a user to send the mails. System must allow a user to view the mails.

Business Rules / Validations


A user should be added by the administrator. A user should log in into his account to download any book. System should verify user category & should authenticate the user.

Security Requirements
User Management and Authentication:

The application must be accessed by valid user. The Updating of all the details are done by the Administrator.

Non-functional requirements:

The application should support interruptions for regular web browsers tasks i.e. work any web application Mozilla or Internet explorer (Supportability)

The form should load within 2 seconds. (Performance) Flexible service based architecture will be highly desirable for future extension (Supportability)

The system should be available 24 X 7. (Reliability/ availability)

7 Book Reading System For BlindPeople

3.2 EXTERNALINTERFACEREQUIREMENTS:

This is a window based

application; through this we can design a system that requires knowledge and effort. And there by reducing the risk involved to a great extent, with the help of the specialized window like dialog box. The user is wanted highlighted if he is at fault with appropriate message.

3.3 PERFORMANCE REQUIREMENTS:


The system should provide feedback to the user in a short period of time. This system should be available to the user maximum time. This system should provide help for the user to navigate through the system efficiently. The system should be well protected from unauthorized access. For this, user can enter or utilize the system by authentication himself through password. The system should be protected from external threats and intrusions by keeping the system in such a place where only authorized user can gain entry. The system should consume resources in conservative manner. The system should respond to the user quickly thereby saving time.

8 Book Reading System For BlindPeople

4. SYSTEM DESIGN
4.1. INTRODUCTION
Software design sits at the technical kernel of the software engineering process and is applied regardless of the development paradigm and area of application. Design is the first step in the development phase for any engineered product or system. The designers goal is to produce a model or representation of an entity that will later be built. Beginning, once system requirement have been specified and analyzed, system design is the first of the three technical activities -design, code and test that is required to build and verify software. The importance can be stated with a single word Quality. Design is the place where quality is fostered in software development. Design provides us with representations of software that can assess for quality. Design is the only way that we can accurately translate a customers view into a finished software product or system. Software design serves as a foundation for all the software engineering steps that follow. Without a strong design we risk building an unstable system one that will be difficult to test, one whose quality cannot be assessed until the last stage. During design, progressive refinement of data structure, program structure, and procedural details are developed reviewed and documented. System design can be viewed from either technical or project management perspective. From the technical point of view, design is comprised of four activities architectural design, data structure design, interface design and procedural design.

4.2. SYSTEM SPECIFICATIONS


4.2.1 Processes Involved
Access Management process to allow access to download the files. Book download information setup and maintenance process Data archiving and backup process

9 Book Reading System For BlindPeople

4.3. SYSTEM COMPONENTS


4.3.1 Modules Involved: There are seven modules in the project. The modules which are being dealt in the project are given below: 1) File Upload Module: In this module the user open a specific format files like word files, text, files and etc. 2) Speak Module: In this module users can select or click on start, stop, pause and speak. 3) Volume Module: This Module allows the visually handicapped user to control volume 4) Wav (Waveform Audio File Format) Module: This module allows the user to save opening file to audio format. 5) Voice Selection Module: This module allows the user to select different type of voice. 6) Mouth Selection Module: This module implements speaking object visualization.

4.4 UML DIAGRAMS


Basically unified modeling language (UML) is a standard language for writing software blueprints. The UML may be used to visualized, specify, construct, and document the artifacts of the software intensive system.

4.6.1 Relationships in the UML: There are four kinds of relationships in the UML.
a) Dependency: Dependency is a semantic relationship between two things in which a change to one thing may affect the semantic of the other thing. Dependency is rendered as dashed lines.

10 Book Reading System For BlindPeople

b) Association: An association is a structural relationship that describes a set of links, a link being a connection among objects. An association is rendered as a solid line.

c) Generalization: A generalization is a specialization/generalization relationship in which objects of the specialized element are substitutable for objects of the generalized element. Graphically a generalization relationship is rendered as a solid line with hallow arrow head pointing to the parent. d) Realization: A realization is a semantic relationship between classifiers. Wherein one classifier specifies a contract that another classifier guarantees to carry out. A realization relationship is rendered as a cross between a generalization and a dependency relationship.

11 Book Reading System For BlindPeople

4.4.1 UML DIAGRAMS

Fig 4.1.Class diagram

12 Book Reading System For BlindPeople

Fig 4.2.Usecase diagram for admin

13 Book Reading System For BlindPeople

Fig 4.3.Usecase diagram for user

14 Book Reading System For BlindPeople

Fig 4.4.Sequence diagram for admin

15 Book Reading System For BlindPeople

Fig 4.5.Sequence diagram for user

16 Book Reading System For BlindPeople

Fig 4.6.Colloboration diagram for admin

17 Book Reading System For BlindPeople

Fig 4.7.Colloboration diagram for user

18 Book Reading System For BlindPeople

Fig 4.8 Activity diagram

19 Book Reading System For BlindPeople

4.5. DATA DICTIONARY

TABLE 4.1. Masterusers table:

TABLE 4.2. Fileupload table:

20 Book Reading System For BlindPeople

TABLE 4.3. Speakdetails table:

TABLE 4.4. Volumedetails table:

TABLE 4.5. Voiceselection table:

21 Book Reading System For BlindPeople

TABLE 4.6. Waveformats table:

TABLE 4.7. Textfile table:

22 Book Reading System For BlindPeople

5. IMPLEMENTATION

5.1 INTRODUCTION
Implementation literally means to put into effect or to carry out. The system implementation phase if the software deals with the translation of the design specifications into the source code. The ultimate goal of the implementation is to write the source code and the internal documentation so that it can be verified easily. The code and documentation should be written in a manner that eases debugging, testing and modification. System flow charts, sample run on packages, sample output etc., is part of the implementation. An effort was made to satisfy the following goals in order Clarity and simplicity of the code. Minimization of hard coding. Minimization of the amount of memory used. Through phased implementation we can use our proposed system.

5.2 TECHNOLOGIES USED


5.2.1 JAVA (FRONT END)
Initially the language was called as oak but it was renamed as Java in 1995. The primary motivation of this language was the need for a platform-independent (i.e., architecture neutral) language that could be used to create software to be embedded in various consumer electronic devices. Java is a programmers language. Java is cohesive and consistent. Except for those constraint imposed by the Internet environment, Java gives the programmer, full control. Finally, Java is to Internet programming where C was to system programming.
23 Book Reading System For BlindPeople

5.2.2 Importance of java to the internet


Java has had a profound effect on the Internet. This is because; Java expands the Universe of objects that can move about freely in Cyberspace. In a network, two categories of objects are transmitted between the Server and the Personal computer. They are: Passive information and Dynamic active programs. The Dynamic, Self-executing programs cause serious problems in the areas of Security and probability. But, Java addresses those concerns and by doing so, has opened the door to an exciting new form of program. Java can be used to create two types of programs: Applications and Applets: An application is a program that runs on our Computer under the operating system of that computer. It is more or less like one creating using C or C++. Javas ability to create Applets makes it important. An Applet is an application designed to be transmitted over the Internet and executed by a Java compatible web browser. An applet is actually a tiny Java program, dynamically downloaded across the network, just like an image. But the difference is, it is an intelligent program, not just a media file. It can react to the user input and dynamically change.

5.2.3 Features of Java Security


Every time you that you download a normal program, you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those who did scan them for viruses prior to execution. Most users still worried about the possibility of infecting their systems with a virus. In addition, another type of malicious program exists that must be guarded against. This type of program can gather private information, such as credit card numbers, bank account balances, and passwords. Java answers both these concerns by providing a firewall between a network application and your computer. When you use a Java-compatible Web browser, you can safely download Java applets without fear of virus infection or malicious intent.

24 Book Reading System For BlindPeople

A) Portability: For programs to be dynamically downloaded to all the various types of platforms connected to the Internet, some means of generating portable executable code is needed .As you will see, the same mechanism that helps ensure security also helps create portability. Indeed, Javas solution to these two problems is both elegant and efficient. B) The Byte code The key that allows the Java to solve the security and portability problems is that the output of Java compiler is Byte code. Byte code is a highly optimized set of instructions designed to be executed by the Java run-time system, which is called the Java Virtual Machine (JVM). That is, in its standard form, the JVM is an interpreter for byte code. Translating a Java program into byte code helps makes it much easier to run a program in a wide variety of environments. The reason is, once the run-time package exists for a given system, any Java program can run on it. Although Java was designed for interpretation, there is technically nothing about Java that prevents on-the-fly compilation of byte code into native code. Sun has just completed its Just In Time (JIT) compiler for byte code. When the JIT compiler is a part of JVM, it compiles byte code into executable code in real time, on a piece-by-piece, demand basis. It is not possible to compile an entire Java program into executable code all at once, because Java performs various run-time checks that can be done only at run time. The JIT compiles code, as it is needed, during execution. C) Java Virtual Machine (JVM) Beyond the language, there is the Java virtual machine. The Java virtual machine is an important element of the Java technology. The virtual machine can be embedded within a web browser or an operating system. Once a piece of Java code is loaded onto a machine, it is verified. As part of the loading process, a class loader is invoked and does byte code verification makes sure that the code thats has been generated by the compiler will not corrupt the machine that its loaded on. Byte code verification takes place at the end of the compilation process to make sure that is all accurate and correct. So byte code verification is integral to the compiling and executing of Java code. Java programming uses to produce byte codes and executes them. The first box indicates that the Java source code is located in a. Java file that is processed with a Java

25 Book Reading System For BlindPeople

compiler called javac. The Java compiler produces a file called a. class file, which contains the byte code. The Class file is then loaded across the network or loaded locally on your machine into the execution environment is the Java virtual machine, which interprets and executes the byte code. D) Java Architecture Java architecture provides a portable, robust, high performing environment for development. Java provides portability by compiling the byte codes for the Java Virtual Machine, which is then interpreted on each platform by the run-time environment. Java is a dynamic system, able to load code when needed from a machine in the same room or across the planet. E) Compilation of code When you compile the code, the Java compiler creates machine code (called byte code) for a hypothetical machine called Java Virtual Machine (JVM). The JVM is supposed to execute the byte code. The JVM is created for overcoming the issue of portability. The code is written and compiled for one machine and interpreted on all machines. This machine is called Java Virtual Machine. Compiling and interpreting Java Source Code

Java PC Compiler Java

Source Code .. ..
Macintosh Byte code Compiler SPARC (Platform

Interpreter (PC) Java Interpreter (Macintosh) Java Interpreter (Spare)

..

Compile r

Independe nt)

Fig 5.1 Compiling and interpreting Java source code

26 Book Reading System For BlindPeople

During run-time the Java interpreter tricks the byte code file into thinking that it is running on a Java Virtual Machine. In reality this could be a Intel Pentium Windows 95 or Sun SARC station running Solaris or Apple Macintosh running system and all could receive code from any computer through Internet and run the Applets. F) Simple Java was designed to be easy for the Professional programmer to learn and to use effectively. If you are an experienced C++ programmer, learning Java will be even easier. Because Java inherits the C/C++ syntax and many of the objects oriented features of C++. Most of the confusing concepts from C++ are either left out of Java or implemented in a cleaner, more approachable manner. In Java there are a small number of clearly defined ways to accomplish a given task. G) Object-Oriented Java was not designed to be source-code compatible with any other language. This allowed the Java team the freedom to design with a blank slate. One outcome of this was a clean usable, pragmatic approach to objects. The object model in Java is simple and easy to extend, while simple types, such as integers, are kept as high-performance non-objects. H) Robust The multi-platform environment of the Web places extraordinary demands on a program, because the program must execute reliably in a variety of systems. The ability to create robust programs was given a high priority in the design of Java. Java is strictly typed language; it checks your code at compile time and run time. Java virtually eliminates the problems of memory management and de allocation, which is completely automatic. In a well-written Java program, all run time errors can and should be managed by your program.

27 Book Reading System For BlindPeople

5.3 HYPERTEXT MARKUP LANGUAGE


Hypertext Markup Language (HTML), the languages of the World Wide Web (WWW), allows users to produces Web pages that include text, graphics and pointer to other Web pages (Hyperlinks). HTML is not a programming language but it is an application of ISO Standard 8879, SGML (Standard Generalized Markup Language), but specialized to hypertext and adapted to the Web. The idea behind Hypertext is that instead of reading text in rigid linear structure, we can easily jump from one point to another point. We can navigate through the information based on our interest and preference. A markup language is simply a series of elements, each delimited with special characters that define how text or other items enclosed within the elements should be displayed. Hyperlinks are underlined or emphasized works that load to other documents or some portions of the same document. HTML can be used to display any type of document on the host computer, which can be geographically at a different location. It is a versatile language and can be used on any platform or desktop. HTML provides tags (special codes) to make the document look attractive. HTML tags are not case-sensitive. Using graphics, fonts, different sizes, color, etc., can enhance the presentation of the document. Anything that is not a tag is part of the document itself. Basic HTML Tags: <! ---> specifies comments Creates hypertext links Formats text as bold Formats text in large font. Contains all tags and text in the HTML document Creates text Definition of a term Creates definition list Formats text with a particular font Encloses a fill-out form
28 Book Reading System For BlindPeople

<A>. </A> <B>. </B> <BIG>. </BIG> <BODY></BODY> <CENTER>...</CENTER> <DD></DD> <DL>...</DL> <FONT></FONT> <FORM>...</FORM>

<FRAME>...</FRAME> <H#></H#> <HEAD>...</HEAD>

Defines a particular frame in a set of frames Creates headings of different levels Contains tags that specify information about a document Creates a horizontal rule Contains all other HTML tags Provides meta-information about a document Contains client-side or server-side script Creates a table Indicates table data in a table Designates a table row Creates a heading in a table

<HR>...</HR> <HTML></HTML> <META>...</META> <SCRIPT></SCRIPT> <TABLE></TABLE> <TD></TD> <TR></TR> <TH></TH>

5.3.1 Advantages
A HTML document is small and hence easy to send over the net. It is small because it does not include formatted information. HTML is platform independent and HTML tags are not case-sensitive.

5.4 JAVASCRIPT
JavaScript is a script-based programming language that was developed by Netscape Communication Corporation. JavaScript was originally called Live Script and renamed as JavaScript to indicate its relationship with Java. JavaScript supports the development of both client and server components of Web-based applications. On the client side, it can be used to write programs that are executed by a Web browser within the context of a Web page. On the server side, it can be used to write Web server programs that can process information submitted by a Web browser and then update the browsers display accordingly

29 Book Reading System For BlindPeople

Even though JavaScript supports both client and server Web programming, we prefer JavaScript at Client side programming since most of the browsers supports it. JavaScript is almost as easy to learn as HTML, and JavaScript statements can be included in HTML documents by enclosing the statements between a pair of scripting tags <SCRIPTS>... </SCRIPT>. <SCRIPT LANGUAGE = JavaScript> </SCRIPT> Here are a few things we can do with JavaScript: Validate the contents of a form and make calculations. Add scrolling or changing messages to the Browsers status line. Animate images or rotate images that change when we move the mouse over them. Detect the browser in use and display different content for different browsers. Detect installed plug-ins and notify the user if a plug-in is required.

We can do much more with JavaScript, including creating entire application.

5.4.1 JavaScript Vs Java


JavaScript and Java are entirely different languages. A few of the most glaring differences are: Java applets are generally displayed in a box within the web document; JavaScript can affect any part of the Web document itself. While JavaScript is best suited to simple applications and adding interactive features to Web pages; Java can be used for incredibly complex applications. There are many other differences but the important thing to remember is that JavaScript and Java are separate languages. They are both useful for different things; in fact they can be used together to combine their advantages.

5.4.2 Advantages
JavaScript can be used for Sever-side and Client-side scripting. It is more flexible than VBScript. JavaScript is the default scripting languages at Client-side since all the browsers supports it.

30 Book Reading System For BlindPeople

5.5 JDBC
Java Database Connectivity or in short JDBC is a technology that enables the java program to manipulate data stored into the database. Here is the complete tutorial on JDBC technology.
What is JDBC?

JDBC is Java application programming interface that allows the Java programmers to access database management system from Java code. It was developed by Java Soft, a subsidiary of Sun Microsystems. JDBC has four Components: i. ii. iii. iv. The JDBC API. The JDBC Driver Manager. The JDBC Test Suite. The JDBC-ODBC Bridge.

i)The JDBC API:

The JDBC application programming interface provides the facility for accessing the relational database from the Java programming language. The API technology provides the industrial standard for independently connecting Java programming language and a wide range of databases. The user not only execute the SQL statements, retrieve results, and update the data but can also access it anywhere within a network because of its "Write Once, Run Anywhere" (WORA) capabilities. Due to JDBC API technology, user can also access other tabular data sources like spreadsheets or flat files even in the heterogeneous environment. JDBC application programming interface is a part of the Java platform that has included Java Standard Edition (Java SE) and the Java Enterprise Edition (Java EE) in itself. The JDBC API has four main interfaces: The latest version of JDBC 4.0 application programming interface is divided into two packages. Java.sql
31 Book Reading System For BlindPeople

Javax.sql.

Java SE and Java EE platforms are included in both the packages. ii) The JDBC Driver manager The JDBC Driver Manager is a very important class that defines objects which connect Java applications to a JDBC driver. Usually Driver Manager is the backbone of the JDBC architecture. It's very simple and small that is used to provide a means of managing the different types of JDBC database driver running on an application. The main responsibility of JDBC database driver is to load all the drivers found in the system properly as well as to select the most appropriate driver from opening a connection to a database. The Driver Manager also helps to select the most appropriate driver from the previously loaded drivers when a new open database is connected. iii) The JDBC Test suite The function of JDBC driver test suite is to make ensure that the JDBC drivers will run user's program or not. The test suite of JDBC application program interface is very useful for testing a driver based on JDBC technology during testing period. It ensures the requirement of java platform enterprise edition (J2EE). iv) The JDBC-ODBC Bridge The JDBC-ODBC Bridge, also known as JDBC type 1 driver is a database driver that utilizes the ODBC driver to connect the database. This driver translates JDBC method calls into ODBC function calls. The Bridge implements JDBC for any database for which an ODBC driver is available. The Bridge is always implemented as the sun.jdbc.odbc Java package. This first two component of JDBC, the JDBC API and the JDBC Driver Manager manages to connect to the database and then build a java program that utilizes SQL commands to communicate with any RDBMS. On the other hand, the last two components are used to communicate with ODBC or to test web application in the

specialized environment.

32 Book Reading System For BlindPeople

5.5.1 JDBC Architecture


i. ii. iii. iv. v. vi. vii. viii. ix. x. Database connections SQL statements Result Set Database metadata Prepared statements Binary Large Objects (BLOBs) Character Large Objects (CLOBs) Callable statements Database drivers Driver manager The JDBC API uses a Driver Manager and database-specific drivers to provide transparent connectivity to heterogeneous databases. The JDBC driver manager ensures that the correct driver is used to access each data source. The Driver Manager is capable of supporting multiple concurrent drivers connected to multiple heterogeneous databases.

Fig 5.2 JDBC Architecture

A JDBC driver translates standard calls JDBC into a network or database protocol or into a database library API call that facilitates communication with the database. This translation layer provides JDBC applications with database independence. If the back-end

33 Book Reading System For BlindPeople

database changes, only the JDBC driver need be replaced with few code modifications required. There are four distinct types of JDBC drivers.

5.5.2 JDBC Driver and Its Types


Type 1 JDBC-ODBC Bridge: Type 1 drivers act as a driver between JDBC and another database connectivity mechanism such as ODBC. The JDBC-ODBC bridge provides JDBC access using most standard ODBC drivers. This driver is included in the Java 2 SDK within the sun.jdbc.odbc package. In this driver the java statements are converted to JDBC statements. A JDBC statement calls the ODBC by using the JDBC-ODBC Bridge. And finally the query is executed by the database. This driver has serious limitation for many applications.

Fig 5.3 Type 1 JDBC Architecture

Type 2 Java to Native API: Type 2 drivers use the Java Native Interface (JNI) to make calls to a local database library API. This driver converts the JDBC calls into a database specific call for databases such as SQL, ORACLE etc. This driver communicates directly with the database server. It requires some native code to connect to the database. Type 2 drivers are usually faster than Type 1 drivers. Like Type 1 drivers, Type 2 drivers require native database client libraries to be installed.

34 Book Reading System For BlindPeople

Fig 5.4 Type 2 JDBC Architecture Type 3 Java to Network Protocol or All- Java Driver: Type 3 drivers are pure Java drivers that use a proprietary network protocol to communicate with JDBC middleware on the server. The middleware then translates the network protocol to database-specific function calls. Type 3 drivers are the most flexible JDBC solution because they do not require native database libraries on the client and can connect to many different databases on the back end.

Fig 5.5 Type 3 JDBC Architecture

35 Book Reading System For BlindPeople

Type 4 Java to Database Protocol: Type 4 drivers are pure Java drivers that implement a proprietary database protocol (like Oracle's SQL*Net) to communicate directly with the database. Like Type 3 drivers, they do not require native database libraries and can be deployed over the Internet without client installation. One drawback to Type 4 drivers is that they are database specific. Unlike Type 3 drivers, if your back-end database changes, you may save to purchase and deploy a new Type 4 driver (some Type 4 drivers are available free of charge from the database manufacturer). However, because Type drivers communicate directly with the database engine rather than through middleware or a native library, they are usually the fastest JDBC drivers available. This driver directly converts the java statements to SQL statements.

Fig 5.6 Type 4 JDBC Architecture


So, you may be asking yourself, "Which is the right type of driver for your application?" Well, that depends on the requirements of your particular project. If you do not have the opportunity or inclination to install and configure software on each client. However, if the cost of Type 3 or Type 4 drivers is prohibitive, Type 1 and type 2 drivers may become more attractive because they are usually available free of charge. Price aside, the debate will often boils down to whether to use Type 3 or Type 4 driver for a particular application. In this case, you may need to weigh the benefits of flexibility and interoperability against performance. Type 3 drivers offer your application the ability to transparently access different types of databases, while Type 4 drivers usually exhibit better performance and, like Type 1 and Type 2 drivers, may be available free if charge from the database manufacturer.

36 Book Reading System For BlindPeople

5.6 JAVA SERVER PAGES (JSP)


Java server Pages is a simple, yet powerful technology for creating and maintaining dynamic-content web pages. Based on the Java programming language, Java Server Pages offers proven portability, open standards, and a mature re-usable component model. The Java Server Pages architecture enables the separation of content generation from content presentation. This separation not eases maintenance headaches; it also allows web team members to focus on their areas of expertise. Now, web page designer can concentrate on layout, and web application designers on programming, with minimal concern about impacting each others work.

5.6.1 Features of JSP


A) Portability Java Server Pages files can be run on any web server or web-enabled application server that provides support for them. Dubbed the JSP engine, this support involves recognition, translation, and management of the Java Server Page lifecycle and its interaction components. B) Components It was mentioned earlier that the Java Server Pages architecture can include reusable Java components. The architecture also allows for the embedding of a scripting language directly into the Java Server Pages file. The components current supported include Java Beans, and Servlets. C) Processing A Java Server Pages file is essentially an HTML document with JSP scripting or tags. The Java Server Pages file has a JSP extension to the server as a Java Server Pages file. Before the page is served, the Java Server Pages syntax is parsed and processed into a Servlet on the server side. The Servlet that is generated outputs real content in straight HTML for responding to the client. D) Access Models A Java Server Pages file may be accessed in at least two different ways. A clients request comes directly into a Java Server Page. In this scenario, suppose the page accesses
37 Book Reading System For BlindPeople

reusable Java Bean components that perform particular well-defined computations like accessing a database. The result of the Beans computations, called result sets is stored within the Bean as properties. The page uses such Beans to generate dynamic content and present it back to the client. In both of the above cases, the page could also contain any valid Java code. Java Server Pages architecture encourages separation of content from presentation.

5.6.2 Java Beans


We can assemble a computer or fan very easily by choosing different components manufactured by different vendors. We can take a screw from company one and use it to fit the Mother board to cabinet as they are manufactured according to a standard. Observing to this point to simplify the process of developing software, different software companies have proposed different component technologies. Ex: java soft java bean component tech, EJB component tech, Microsoft COM, BONOBO component model. Java Bean and EJB are two different specifications from java soft. EJB can be used to implement business logic on the server side. Most of the developers uses to assume Java Bean components are for developing GUI components and they can be used only on the client side but we can develop any kind of software using Java Bean standard (GUI/ non GUI). Java Bean can be used either on the client side or on the server side. AWT, JFC components are implemented according to Java Bean standard. According to Java Bean standard a Bean component can support a set of properties, set of events, any number of additional methods. A property can be read-write or it can be just read only property. For read write property we need to provide setXXX and getXXX methods (isXXX if the property is Boolean) To support the following properties (i) uname (ii) email (iii) age according to Java bean standard we need to write the code as, public class User Bean {String uname; String email; int age;

38 Book Reading System For BlindPeople

public void setUsername( String value ) {uname = value; } public void setEmail( String value ) { email = value; } public void setAge( int value ) { age = value; } public String getUsername() { return uname; } public String getEmail() { return email; } public int getAge() { return age; } } Java Beans like JButton supports the events by providing the methods with Naming patterns (i) addXXXListener (ii) removeXXXListener Apart from developing Java bean class we can also provide Bean Info class. In this class we can provide (i) Information about properties (ii) Information About the events and (iii) Information about the icon that represents our Bean. According to JSP model1 we can develop the application as,

Fig 5.7 developing the application with java beans

According to above model the presentation logic has to be implemented in JSP page and the business logic has to be implemented as part of Java bean This model help us in separating the presentation and business logic. For a large scale projects instead of using model1 it is better to use model2 (MVC). Struts frame work is based on model 2.
39 Book Reading System For BlindPeople

5.7 MY SQL
My SQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. My SQL was originally founded and developed in Sweden by two Swedes and a Finn: David Ax mark, Allan Larsson and Michael Monty Widen us, who had worked together since 1980s.

5.7.1 Management and Graphical Front Ends


My SQL Workbench in Windows, displaying the Home Screen which streamlines use of its full capabilities. My SQL is primarily an RDBMS and therefore ships with no GUI tools to administer My SQL databases or manage data contained within .Users may use the included command-line tools, or download My SQL frontends from various parties that have developed desktop software and web applications to manage My SQL data bases, build database structures, and work with data records. My SQL Workbench lets users manage the following Database design & Modeling SQL development Replacing My SQL Query Browse Database Administration- Replacing My SQL Administrator My SQL Workbench is available in two editions, the regular free and open source Community Edition which may be downloaded from the My SQL website, and the proprietary Standard Edition which extends and improves the feature set of the Community Edition.

40 Book Reading System For BlindPeople

5.8. SAMPLE CODE


5.8.1 Login.jsp:
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%> <%String path = request.getContextPath (); StringbasePath=request.getScheme ()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head> <base href="<%=basePath%>"> <title>My JSP 'Login.jsp' starting page</title> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> <!--<link rel="stylesheet" type="text/css" href="styles.css">--> </head><form action="LoginPage" method="post"> <center><h1><font color="pink"><i>LOGIN PAGE</i></font></h1> <img src="./images/book1.jpg" width="700" height="400"/> <table align="center" border="3" bgcolor="pink" width="20" height="20"> <tr><td>LoginId</td><td><input type="text" name="login"></td></tr> <tr><td>Password</td><td><input type="Password" name="pwd"></td></tr> <tr><td><input type="submit" value="Signin"></td></tr></table></center></form> </body></html>

41 Book Reading System For BlindPeople

5.8.2.Login.java:
package com.servlet.bookreading; import java.io.IOException; import java.io.PrintWriter; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.dbconn.bookreading.Dbconnection; public class LoginPage extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { Connection con; ResultSet rs; PreparedStatement ps; try { con=Dbconnection.getConnection(); ps=con.prepareStatement("select UserType from masterusers where LoginID=? and PWD=?"); ps.setString(1, request.getParameter("login")); ps.setString(2, request.getParameter("pwd")); rs=ps.executeQuery(); if (rs.next()) { String utype=rs.getString (1); if (utype.equalsIgnoreCase("Adm")) {
42 Book Reading System For BlindPeople

RequestDispatcher rd=request.getRequestDispatcher ("jsp/admin.jsp"); rd.forward(request, response); } else { Request Dispatcher rd=request.getRequestDispatcher ("jsp/user.jsp"); rd.forward(request, response); } } } catch (Exception e) { e.printStackTrace (); }} }

43 Book Reading System For BlindPeople

6. SYSTEM TESTING
6.1 INTRODUCTION
Testing is one of the most important phases in the software development activity. In software development life cycle (SDLC), the main aim of testing process is the quality; the developed software is tested against attaining the required functionality and performance. During the testing process the software is worked with some particular test cases and the output of the test cases are analyzed whether the software is working according to the expectations or not. The success of the testing process in determining the errors is mostly depends upon the test case criteria, for testing any software we need to have a description of the expected behavior of the system and method of determining whether the observed behavior confirmed to the expected behavior.

6.2 LEVELS OF TESTING


Since the errors in the software can be injured at any stage. So, we have to carry out the testing process at different levels during the development. The basic levels of testing are Unit, Integration, System and Acceptance Testing. The Unit Testing is carried out on coding. In case of integration testing different tested modules are combined into sub systems and tested. In case of the system testing the full software is tested and in the next level of testing the system is tested with user requirement document prepared during SRS. There are two basic approaches for testing. They are
Functional Testing . In Functional Testing test cases are decided solely on the basis of requirements of

the program or module and the internals of the program or modules are not considered for selection of test cases. This is also called Black Box Testing.

44 Book Reading System For BlindPeople

Structural Testing In Structural Testing test cases are generated on actual code of the program or module to be tested. This is called White Box Testing.

6.3. TESTING PROCESS


A number of activities must be performed for testing software. Testing starts with test plan. Test plan identifies all testing related activities that need to be performed along with the schedule and guide lines for testing. The plan also specifies the levels of testing that need to be done, by identifying the different testing units. For each unit specified in the plan first the test cases and reports are produced. These reports are analyzed. Test Plan: Test plan is a general document for entire project, which defines the scope, approach to be taken and the personal responsible for different activities of testing. The inputs for forming test plans are System design Project plan Requirements document

Test Case Specification: Although there is one test plan for entire project test cases have to be specified separately for each test case. Test case specification gives for each item to be tested. All test cases and outputs expected for those test cases. Test Case Execution And Analysis: The steps to be performed for executing the test cases are specified in separate document called test procedure specification. This document specify any specify requirements that exist for setting the test environment and describes the methods and formats for reporting the results of testing.

45 Book Reading System For BlindPeople

6.4 TESTCASES
6.4.1 Login form Login id and password:
Test case ID OBS_TC01 Input Login Id blank Password blank Description A blank Login id and password given by the admin/user. Expected result Invalid Login id Pass/Fail Pass

OBS_TC02

Valid Login id Password blank

A valid Login id and blank Password given by the admin/user. A blank Login id and valid Password are given by the admin/user. A valid Login id and valid Password are given by the admin/user.

Invalid Password

Pass

OBS_TC03

Blank Login id Valid Password

Invalid Login id

Pass

OBS_TC04

Valid Login id Valid Password

Go to admin/user Home Pass pages ,As per the user id and password

6.4.2. Registration name:


Test case ID OBS_TC01 Input Blank name Description Expected result Pass/Fail Pass

A blank name field Display that invalid name is left by the user Accepted

OBS_TC02

name with letters name with letter without spaces given by user

Pass

46 Book Reading System For BlindPeople

7. SCREENS & REPORTS

Fig 7.1 Login page The above page represents the login page. It requires the login id and password. The user gets login by clicking on the login button after entering the id and password.

47 Book Reading System For BlindPeople

Fig 7.2.Administrator home page

The above page represents the administrator home page. The administrator can have all the accessing rights such as data insertion, deletion, updating.

48 Book Reading System For BlindPeople

Fig 7.3.All Users page

The above page represents the Users page. We can view and the set users of the system with this page.

49 Book Reading System For BlindPeople

Fig 7.4.Admin- User page

The above page represents the Admin - user page. The Admin can enter the user details.

50 Book Reading System For BlindPeople

Fig 7.5.File Upload page

The above page represents the File Upload page. .This is for entering details about file.

51 Book Reading System For BlindPeople

Fig 7.6 Speak Details page

This is the speak details page which requires the speak type and the status fields is to be entered. Click on the submit button for updating after filling in the details. Cancel button is clicked for re-entering incase of entering any wrong details.

52 Book Reading System For BlindPeople

Fig.7.7 Volume Details page

This is the volume details page which requires volume range, volume types and status to be selected. After entering the details click on the submit button. In case of filling any of the fields with wrong information, click on the cancel button so that the fields get cleared and they can be re-entered

53 Book Reading System For BlindPeople

Fig .7.8. Wave formats page This is the wave formats page which requires file size, type of format and status to be selected. After entering the details click on the submit button. In case of filling any of the fields with wrong information, click on the cancel button so that the fields get cleared and they can be re-entered.

54 Book Reading System For BlindPeople

Fig .7.9. Voice selection page

This is voice selection page which requires type of voice and status to be selected. After entering the details click on the submit button. In case of filling any of the fields with wrong information, click on the cancel button so that the fields get cleared and they can be re-entered.

55 Book Reading System For BlindPeople

7.10. User home page

This page represents the user home page. In this page user can upload the books.

56 Book Reading System For BlindPeople

7.11. Text-Speech conversion page

This page represents the text- speech conversion page. In this page user can upload the book and download it. After downloading the text present in the book is converted into speech.

57 Book Reading System For BlindPeople

7.12. SAMPLE OUTPUT

58 Book Reading System For BlindPeople

8. CONCLUSION

8.1. Conclusion:
The Application Book Reading System for Blind People is designed to meet the requirements of visually challenged people. It overcomes the risks and difficulties faced by these people in using the computer. This Project can take blind peoples education one step forward. Learning foreign languages, poetry, literature, English grammar etc. could be optimized using TTS. Blind

people can develop habits and hobbies using audio books. One could find audio books about every subject from fishing to knitting guides. It helps a lot of self creation, self confidence and awareness audio book guides which can help them.

8.1. FUTURE ENHANCEMENTS


This project BOOK READING SYSTEM FOR BLIND PEOPLE is based on the Text- speech conversion technology. The future enhancements which can be made on these systems: The users of this system featuring synthetic speech outputs reported benefits including quicker access to information and increased confidentiality They can be allowed to give feedback regarding anything they feel difficult with the system.

59 Book Reading System For BlindPeople

9. REFERENCES
9.1. Books Referred:

Data base System Concepts, Silberschatz, Korth, McGraw hill, 5th edition. Introduction to Database Systems, C.J.Date Pearson Education. Java; the complete reference, 7th edition, Herbert Scheldt, TMH. Understanding OOP with Java, updated edition, T.Budd, Pearson education.
Web Programming, building internet applications, Chris Bates 2nd edition. Java Server pages-Hans Bergsten.

9.2. Websites: www.w3schools.com www.google.com

60 Book Reading System For BlindPeople

You might also like