+ All Categories
Home > Documents > second review doc

second review doc

Date post: 08-Apr-2018
Category:
Upload: padmakarvana
View: 221 times
Download: 0 times
Share this document with a friend

of 29

Transcript
  • 8/7/2019 second review doc

    1/29

    1. INTRODUCTION

    1.1 OVERVIEW

    The main purpose of the project is to develop an application called Non Visual

    Search Engine for Visually Challenged is a need for web based application where we provide a

    user friendly application for visually impaired people. This application works just like Google

    search engine but with a new feature for visually challenged. The data entered anywhere on the

    screen is taken into to a textbox with focus in it. So it gives all the results of it in a systematic

    manner. When the user clicks the right mouse the first result is read heard. For next result, left

    mouse is pressed. In this way the user can listen all the results of the required data.In the flexibility of the uses the interface has been developed a graphics concept in

    mind, associated through a browses interface. The GUIS at the top level have been categorized

    as Administrative user interface and the operational or generic user interface.

    The administrative user interface concentrates on the consistent information that is

    practically, part of the organizational activities and which needs proper authentication for the

    data collection. The interfaces help the administrations with all the transactional states like Data

    insertion, Data deletion and Date updation along with the extensive data search capabilities.

    The operational or generic user interface helps the users upon the system in transactions

    through the existing data and required services. The operational user interface also helps the

    ordinary users in managing their own information helps the ordinary users in managing their

    own information in a customized manner as per the assisted flexibilities.

  • 8/7/2019 second review doc

    2/29

    2. ANALYSIS

    2.1 EXISTING SYSTEM

    The Word Wide Web has come to take an important part in our lives: it has become

    indispensable for finding information, communicating with others, and performing daily tasks

    for work, banking, and shopping. Web sites are designed mostly for graphical interaction,

    limiting access for an entire community of people with visual disabilities. According to the

    WHOs World Health Report, there are approximately 45 million people without sight

    worldwide. These people dont have proper tool to get the information they want.

    2.1.1 PROBLEMS IN THE EXISTING SYSTEM

    Visually challenged people dont have proper tool to get the information they want

    Fewer Users Friendly.

    2.2 PROPOSED SYSTEM

    A web based application is needed where we provide a user friendly application for

    visually impaired people. This application works just like Google search engine but with a new

    feature for visually challenged. The data entered anywhere on the screen is taken into to a

    textbox with focus in it. So it gives all the results of it in a systematic manner. When the user

    clicks the right mouse the first result is read heard. For next result, left mouse is pressed. In this

    way the user can listen all the results of the required data.

  • 8/7/2019 second review doc

    3/29

    3. IMPLEMENTATION

    Implementation literally means to put into effect or to carryout. 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

    HARDWARE & SOFTWARE REQUIRMENTS

    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:

    Hardware Requirements

    Software Requirements

    HARDWARE REQUIREMENTS:

    The selection of hardware is very important in the existence and proper working of any

    software. In the selection of hardware, the size and the capacity requirements are also

    important.

  • 8/7/2019 second review doc

    4/29

    Content Description

    Min Max

    HardDiskDrive 20GB 40GB

    RAM 500MB 1GB

    SOFTWARE REQUIREMENTS:

    The software requirements specification is produces at the culmination of the analysis

    tasks. One of the most difficult tasks is that, the selection of the software, once system

    requirement is known by determining whether a particular software package fits the

    requirements.

    Content Description

    OS Windows XP with SP2 or Windows Vista

    Database MS-SQL server 2005

    Technologies ASP.NET with C#.NET

    IDE MS-Visual Studio .Net 2008

    Browser Mozilla Firefox, IE 6.

  • 8/7/2019 second review doc

    5/29

    3.1 SAMPLE CODE

    using System;

    using System.Collections;

    using System.Configuration;

    using System.Data;

    using System.Linq;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;using System.Web.UI.HtmlControls;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Xml.Linq;

    using System.Xml;

    using net.bing.api;

    using SpeechLib;

    using System.Data.SqlClient;

    public partial class user : System.Web.UI.Page

    {

    SqlConnection con = new SqlConnection("Data Source=.;Initial

    Catalog=NVSVC1;Integrated Security=True");

    SqlDataAdapter da, daa1;

    DataSet ds;

    static DataSet dss1;

    SpVoice sp = new SpVoice();

    static int i = 0;

    static int c = 0;

    static int c1 = 0;

  • 8/7/2019 second review doc

    6/29

    static int d = 0;

    static int m = 1;

    const string AppId = "B8CDE31DA96488FD6D69458090800A50BF8E3502";

    //s for result setstatic string s;

    static int r = 0;

    //request for requesting query

    static string request1;

    static string title1;

    static string title2;

    protected void Page_Load(object sender, EventArgs e)

    {

    if (!IsPostBack)

    {

    c = 0;

    }

    i = 0;

    s = " ";

    TextBox1.Focus();request1 = TextBox1.Text;

    }

    protected void Button1_Click(object sender, EventArgs e)

    {

    da = new SqlDataAdapter("insert into usersearches(searchstring,timestamp,status)

    values('" + TextBox1.Text + "','" + DateTime.Now.ToString() + "','True')", con);

    ds = new DataSet();

    da.Fill(ds);

    using (BingService service = new BingService())

    {

    try

    {

  • 8/7/2019 second review doc

    7/29

    SearchRequest request = BuildRequest();

    // Send the request; display the response.

    SearchResponse response = service.Search(request);DisplayResponse(response);

    TextBox2.Text = s;

    }

    catch (System.Web.Services.Protocols.SoapException ex)

    {

    // A SOAP Exception was thrown. Display error details.

    DisplayErrors(ex.Detail);

    }

    catch (System.Net.WebException ex)

    {

    // An exception occurred while accessing the network.

    Console.WriteLine(ex.Message);

    }

    }

    da = new SqlDataAdapter("select sequenceid,resulturl,resultsummary from searchresultswhere searchid= (select max(searchid)from usersearches) ", con);

    ds = new DataSet();

    da.Fill(ds);

    GridView1.DataSource = ds;

    GridView1.DataBind();

    Button4.Focus();

    }

    static SearchRequest BuildRequest()

    {

    SearchRequest request = new SearchRequest();

    // Common request fields (required)

    request.AppId = AppId;

  • 8/7/2019 second review doc

    8/29

    request.Query = request1;

    request1 = string.Empty;

    request.Sources = new SourceType[] { SourceType.Web };

    // Common request fields (optional)

    request.Version = "2.0";

    request.Market = "en-us";

    request.Adult = AdultOption.Moderate;

    request.AdultSpecified = true;

    request.Options = new SearchOption[]

    {

    SearchOption.EnableHighlighting

    };

    // Web-specific request fields (optional)

    request.Web = new WebRequest();

    request.Web.Count = 3;

    request.Web.CountSpecified = true;

    request.Web.Offset = 0;request.Web.OffsetSpecified = true;

    request.Web.Options = new WebSearchOption[]

    {

    WebSearchOption.DisableHostCollapsing,

    WebSearchOption.DisableQueryAlterations

    };

    return request;

    }

    static void DisplayResponse(SearchResponse response)

    {

    System.Text.StringBuilder builder = new System.Text.StringBuilder();

  • 8/7/2019 second review doc

    9/29

    foreach (WebResult result in response.Web.Results)

    {

    i++;

    builder.Length = 0;builder.AppendLine(result.Title);

    builder.AppendLine(result.Description);

    builder.AppendLine(result.Url);

    builder.Append("Last Crawled: ");

    builder.AppendLine(result.DateTime);

    DisplayTextWithHighlighting(builder.ToString());

    s = builder.ToString() + "\n" + s;

    title1 = result.Title;

    SqlConnection con = new SqlConnection("Data Source=.;Initial

    Catalog=NVSVC1;Integrated Security=True");

    SqlDataAdapter da1, da;

    da1 = new SqlDataAdapter("select max(searchid) from usersearches", con);

    DataSet ds1, ds;ds1 = new DataSet();

    da1.Fill(ds1);

    int k = int.Parse(ds1.Tables[0].Rows[0][0].ToString());

    da = new SqlDataAdapter("insert into

    searchresults(searchid,sequenceid,resulturl,resultsummary,status) values(" + k + "," + i + ",'" +

    result.Url + "','" + result.Description.Replace('\'',' ') + "','True')", con);

    ds = new DataSet();

    da.Fill(ds);

    Console.WriteLine();

    }

  • 8/7/2019 second review doc

    10/29

    i = 0;

    }

    static void DisplayTextWithHighlighting(string text){

    // Write text to the standard output stream, changing the console

    // foreground color as highlighting characters are encountered.

    foreach (char c in text.ToCharArray())

    {

    if (c == '\uE000')

    {

    // If the current character is the begin highlighting

    // character (U+E000), change the console foreground color

    // to green.

    Console.ForegroundColor = ConsoleColor.Green;

    }

    else if (c == '\uE001')

    {

    // If the current character is the end highlighting// character (U+E001), revert the console foreground color

    // to gray.

    Console.ForegroundColor = ConsoleColor.Gray;

    }

    else

    {

    Console.Write(c);

    }

    }

    }

    static void DisplayErrors(XmlNode errorDetails)

  • 8/7/2019 second review doc

    11/29

    {

    // Add the default namespace to the namespace manager.

    XmlNamespaceManager nsmgr = new

    XmlNamespaceManager(errorDetails.OwnerDocument.NameTable);nsmgr.AddNamespace("api",

    "http://schemas.microsoft.com/LiveSearch/2008/03/Search");

    XmlNodeList errors = errorDetails.SelectNodes(

    "./api:Errors/api:Error",

    nsmgr);

    if (errors != null)

    {

    // Iterate over the list of errors and display error details.

    Console.WriteLine("Errors:");

    Console.WriteLine();

    foreach (XmlNode error in errors)

    {

    foreach (XmlNode detail in error.ChildNodes){

    Console.WriteLine(detail.Name + ": " + detail.InnerText);

    }

    Console.WriteLine();

    }

    }

    }

    protected void Button3_Click(object sender, EventArgs e)//leftbutton

    {

    if (m >= 3)

  • 8/7/2019 second review doc

    12/29

    {

    m = 1;

    r = 0;

    c = 0;sp.Speak("you choose the firstrecord",SpeechVoiceSpeakFlags.SVSFDefault);

    }

    else

    {

    m = m + 1;

    r = 0; c = 0;

    sp.Speak("you choose next record", SpeechVoiceSpeakFlags.SVSFDefault);

    }

    }

    protected void Button4_Click(object sender, EventArgs e)//rightbutton

    {

    daa1 = new SqlDataAdapter("select sequenceid,resulturl,resultsummary from

    searchresults where sequenceid='" + m + "' and searchid = (select max(searchid) from

    usersearches)", con);

    dss1 = new DataSet();daa1.Fill(dss1);

    if (c == 0)

    {

    try

    {

    foreach (DataRow dr in dss1.Tables[0].Rows)

    {

    d = r + 1;

    sp.Speak(d + "record is " + dr[r].ToString(),

    SpeechVoiceSpeakFlags.SVSFDefault);

    //Label1.Text = dr[r].ToString();

    c = 1;

  • 8/7/2019 second review doc

    13/29

    break;

    }

    }

    catch{

    r = 0;

    m = m + 1;

    }

    }

    else if (c == 1)

    {

    try

    {

    foreach (DataRow dr in dss1.Tables[0].Rows)

    {

    r = r + 1;

    d = r + 1;

    sp.Speak(d + "record is " + dr[r].ToString(),

    SpeechVoiceSpeakFlags.SVSFDefault);//Label1.Text = dr[r].ToString();

    break;

    }

    }

    catch

    {

    sp.Speak("last", SpeechVoiceSpeakFlags.SVSFDefault);

    //Label1.Text = "last";

    //r = 0;

    c = 0;

    m = m + 1;

    r = 0;

  • 8/7/2019 second review doc

    14/29

    }

    }

    TextBox1.Focus();

    }protected void TextBox1_TextChanged(object sender, EventArgs e)

    {

    sp.Speak(TextBox1.Text,SpeechVoiceSpeakFlags.SVSFDefault );

    }

    protected void btnmail_Click(object sender, EventArgs e)

    {

    foreach (DataRow dr in dss1.Tables[0].Rows)

    {

    Response.Cookies["mydes"].Value = dr[r].ToString();

    }

    Response.Redirect("~/user/usermail.aspx");

    }

    }

    This is the code for connecting to the bing search engine, storing the data content displayed into

    the database. Retrieving the result from the database and converting them to speech. The code

    also contains mouse click events.

    using System;

    using System.Collections;

    using System.Configuration;

    using System.Data;

    using System.Linq;

  • 8/7/2019 second review doc

    15/29

  • 8/7/2019 second review doc

    16/29

    omall.To.Add(txtto.Text); //to whom you are sending the mail

    //subject for the mail

    omall.From = new MailAddress("[email protected]", "h",

    System.Text.Encoding.UTF32);//while we are working the message should be in encrypted format.for that we have to give

    the encrypted format

    omall.IsBodyHtml = true;

    //we are sending text or any html page..by using this we can send html pages also

    omall.Body = txtbody.Text + "gmail";

    //Attachment atch = new Attachment(FileUpload1.FileContent,

    FileUpload1.FileName); //here we have to send file,carry its content and file name

    //omall.Attachments.Add(atch);

    cln.Send(omall);

    //now mail is ready to send.bt have to send by usinh smtp

    txtto.Text = " ";

    txtbody.Text = " ";

    }protected void TextBox1_TextChanged(object sender, EventArgs e)

    {

    sp.Speak(txtto.Text, 0);

    btnsend.Focus();

    }

    }

    This code is used for sending the mail to a particular email id entered into the to column. The

    selected result will be sent as mail to the email id provided.

    using System;

    using System.Collections;

  • 8/7/2019 second review doc

    17/29

    using System.Configuration;

    using System.Data;

    using System.Linq;

    using System.Web;using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.HtmlControls;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Xml.Linq;

    using System.Data.SqlClient;

    public partial class UserSearch : System.Web.UI.Page

    {

    SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=NVSVC1;User

    ID=sa;Password=sa123");

    SqlDataAdapter da;

    DataSet ds;

    protected void Page_Load(object sender, EventArgs e){

    if (!IsPostBack)

    {

    gvfill();

    }

    }

    void gvfill()

    {

    da = new SqlDataAdapter("select searchid,searchstring,timestamp,status from

    usersearches", con);

    ds = new DataSet();

  • 8/7/2019 second review doc

    18/29

    da.Fill(ds);

    GridView1.DataSource = ds;

    GridView1.DataBind();

    }}

    This code is used for displaying the search results in a grid.

  • 8/7/2019 second review doc

    19/29

    4. TEST CASES

    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; thedeveloped 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.

    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. Here different modules are tested against the

    specifications produced during design for the modules. In case of integration testing differenttested 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

    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.

  • 8/7/2019 second review doc

    20/29

    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 bedone, 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:

    o 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

    o

    Project plano Requirements document

    o System design

    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.

    UNIT TESTING:

    Unit testing mainly focused first in the smallest and low level modules,

    proceeding one at a time. Bottom-up testing was performed on each module. As developing

    a driver program, that tests modules by developed or used. But for the purpose of testing,

    modules themselves were used as stubs, to print verification of the actions performed. After

    the lower level modules were tested, the modules that in the next higher level those make

    use of the lower modules were tested. Each module was tested against required functionally

    and test cases were developed to test the boundary values.

  • 8/7/2019 second review doc

    21/29

    INTEGRATION TESTING:

    Integration testing is a systematic technique for constructing the program structure,

    while at the same time conducting tests to uncover errors associated with interfacing. As the

    system consists of the number of modules the interfaces to be tested were between theedges of the two modules. The software tested under this was incremental bottom-up

    approach. Bottom-up approach integration strategy was implemented with the following

    steps. Low level modules were combined into clusters that perform specific software sub

    functions. The clusters were then tested.

    SYSTEM TESTING:

    System testing is a series of different tests whose primary purpose is to fully exercisethe computer-based system. It also tests to find discrepancies between the system and its

    original objective, current specifications.

  • 8/7/2019 second review doc

    22/29

    5.OUTPUT SCREENS

    Search engine

  • 8/7/2019 second review doc

    23/29

    Default Preferences

    User preferences

  • 8/7/2019 second review doc

    24/29

    Master Preferences

    Search Results: displays the searched result.

  • 8/7/2019 second review doc

    25/29

    Action types

    Action prompt

  • 8/7/2019 second review doc

    26/29

    Logout Screen

  • 8/7/2019 second review doc

    27/29

    6. CONCLUSION

    It has been a great pleasure for me to work on this exciting and challenging project.

    This project proved good for me as it provided practical knowledge of not only programming in

    ASP.NET and C#.NET Frameworks web based application and no some extent Windows

    Application but also about all handling procedure related with Non Visual Search Engine for

    Visually Challenged. It also provides knowledge about the latest technology used in

    developing web enabled application and client server technology that will be great demand in

    future. This will provide better opportunities and guidance in future in developing projects

    independently.

  • 8/7/2019 second review doc

    28/29

    7. FUTURE ENHANCEMENTS

    The entire actions performed by the user are stored in the database i.e the right click and

    the left click whenever they are clicked.

    Preference types are given to the user so that he can search it with more ease.

  • 8/7/2019 second review doc

    29/29


Recommended