Académique Documents
Professionnel Documents
Culture Documents
1. INTRODUCTION
In present day scenario most organization handles text or critical data in databases, excel or text files. They use associated softwares to maintain the data. These data are however not web distributable or previewed across a browser. The application proposes a standard format to represent data that can be previewed across any browser. The format of the text that are used as inputs are databases such as Sql-Server, Oracle and access. Additionally inputs from Excel are used to migrate data and make it available on the web. Hence at the receivers end the system need not have associated softwares. Also text that is delimited can be converted to xml at runtime. The system enhances the facility as the source of data for databases can also be remote systems. The system provides graphical windows interface to accept inputs from the user on the data source. These inputs are validated before establishing connection to the data source. Without knowing the origin or the contents of the data within the application converts the data to an internet standard representation browseable format. The created xml files are transferred to the IIS server for making it available readily to the internet users. The application can also use XML as input and read the contents of it from both the value and attribute perspective. The data can then be available for other applications using XML as input.
Software Requirement
Operating System Language Web Server RDBMS/Back End : Win 2000 or higher : .Net, Vb.Net, Asp.net : IIS Server : Ms-Access, Sql-Server, Oracle, Ms-excel, txt
Hardware Requirement
Processor RAM Hard disk : P4 or higher :512 Mb :10Gb
3. LITERATURE SURVEY
code is stored and executed locally, executed locally but Internet-distributed, or executed remotely.
To provide a code-execution environment that minimizes software deployment and To provide a code-execution environment that promotes safe execution of code, To provide a code-execution environment that eliminates the performance problems To make the developer experience consistent across widely varying types of To build all communication on industry standards to ensure that code based on
versioning conflicts.
Internet Explorer is an example of an unmanaged application that hosts the runtime (in the form of a MIME type extension). Using Internet Explorer to host the runtime enables you to embed managed components or Windows Forms controls in HTML documents. Hosting the runtime in this way makes managed mobile code (similar to Microsoft ActiveX controls) possible, but with significant improvements that only managed code can offer, such as semi-trusted execution and isolated file storage.
The following illustration shows the relationship of the common language runtime and the class library to your applications and to the overall system. The illustration also shows how managed code operates within a larger architecture.
The following sections describe the main components and features of the .NET Framework in greater detail.
The common language runtime manages memory, thread execution, code execution, code safety verification, compilation, and other system services. These features are intrinsic to the managed code that runs on the common language runtime.
With regards to security, managed components are awarded varying degrees of trust, depending on a number of factors that include their origin (such as the Internet, enterprise network, or local computer). This means that a managed component might or might not be able to perform file-access operations, registry-access operations, or other sensitive functions, even if it is being used in the same active application. The runtime enforces code access security. For example, users can trust that an executable embedded in a Web page can play an animation on screen or sing a song, but cannot access their personal data, file system, or network. The security features of the runtime thus enable legitimate Internet-deployed software to be exceptionally feature rich. The runtime also enforces code robustness by implementing a strict type-and-codeverification infrastructure called the common type system (CTS). The CTS ensures that all managed code is self-describing. The various Microsoft and third-party language compilers generate managed code that conforms to the CTS. This means that managed code can consume other managed types and instances, while strictly enforcing type fidelity and type safety. Workflow-enabled applications using Windows Workflow Foundation (WF). See Introduction to Programming Windows Workflow Foundation.
3.4 ADO.NET
ADO.NET is a set of classes that expose data access services to the .NET programmer. ADO.NET provides a rich set of components for creating distributed, datasharing applications. It is an integral part of the .NET Framework, providing access to relational, XML, and application data. ADO.NET supports a variety of development needs, 5
including the creation of front-end database clients and middle-tier business objects used by applications, tools, languages, or Internet browsers.
ADO.NET provides consistent access to data sources such as SQL Server and XML and to data sources exposed through OLE DB and ODBC. Data-sharing consumer applications can use ADO.NET to connect to these data sources and retrieve, handle, and update the data that they contain. The ADO.NET classes are found in System.Data.dll, and are integrated with the XML classes found in System.Xml.dll.
A .NET Framework data provider is used for connecting to a database, executing commands, and retrieving results. Those results are either processed directly, placed in a Dataset in order to be exposed to the user as needed, combined with data from multiple sources, or remote between tiers. .NET Framework data providers are lightweight, creating a minimal layer between the data source and code, increasing performance without sacrificing functionality. The following table lists the data providers that are included in the .NET Framework. .NET Framework data provider .NET Framework Data Provider for SQL Server .NET Framework Data Provider for OLE DB For data sources exposed by using OLE DB. Uses the System.Data.OleDb namespace. Provides data access for Microsoft SQL Server version 7.0 or later versions. Uses the System.Data.SqlClient namespace. Description
.NET Framework Data Provider for ODBC .NET Framework Data Provider for Oracle
For data sources exposed by using ODBC. Uses the System.Data.Odbc namespace.
For Oracle data sources. The .NET Framework Data Provider for Oracle supports Oracle client software version 8.1.7 and later, and uses the System.Data.OracleClient namespace.
ADO.NET leverages the power of XML to provide disconnected access to data. ADO.NET was designed hand-in-hand with the XML classes in the .NET Framework; both are components of a single architecture.
ADO.NET and the XML classes in the .NET Framework converge in the DataSet object. The DataSet can be populated with data from an XML source, whether it is a file or an XML stream. The DataSet can be written as World-Wide Web Consortium (W3C) compliant XML that includes its schema as XML schema definition language (XSD) schema, regardless of the source of the data in the DataSet. Because of the native serialization format of the DataSet is XML, it is an excellent medium for moving data between tiers, making the DataSet an optimal choice for remote data and schema context to and from an XML Web service.
1 ) .
4.2. MODULES
4.2.1. Login & Security
The module allows only authorized users to use the application. The application comes with a default administrator account. This account has a user id Admin and password Admin by default. This user can change his password as and when necessary. The system also identifies staff of the company who makes request for xml files.
10
generated from the dataset. The query can contain nested sub-queries. The query can contain columns from one or more tables as well.
4.2.6. OracletoXML converter The module uses the system name, database name, user id and password to communicate with the oracle database. The system allows both local and remote database connectivity. The table name and query is used to retrieve the data from the backend to generate the dataset. The xml file is then generated from the dataset. The ODBC or Oracle Client Connection is used to establish database connectivity.
11
5. SYSTEM DESIGN
5.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.
12
A UML system is represented using five different views that describe the system from distinctly different perspective. Each view is defined by a set of diagram, which is as follows.
This view represents the system from the users perspective. The analysis representation describes a usage scenario from the end-
users perspective.
13
In this the structural and behavioral aspects of the environment in which the system is to be implemented are represented.
UML Analysis modeling, which focuses on the user model and structural model views of the system
UML design modeling, which focuses on the behavioral modeling, implementation modeling and environmental model views.
essential for communication among project teams. As the complexity of the systems increases, so does the importance of good modeling techniques. A modeling language must include: Model elements- fundamentally modeling concepts and semantics. Notation-visual rendering of model elements Guidelines-expression of usage within trade The use of visual notation to represent or model a problem can provide us several benefits relating to clarity, familiarity, maintenance, and simplification. The main reason for modeling is the reduction of complexity. The Unified Modeling Language (UML) is a
14
set of notations and conventions used to describe and model an application. The UML is intended to be a universal language for modeling systems, meaning that it can express models of many different kinds and purposes, just as a programming language or a natural language can be used in different ways. A model is an abstract representation of a system , constructed to understand the system prior to building or modifying it. The term system is used here in a broad sense to include any process or structure. For example, the organizational structure of a corporation , health services, computer software, instruction of any sort (including computers) , the national economy, and so forth all would be termed systems. The unified modeling language is a language for specifying, constructing, visualizing, and documenting the software system and its components. The UML is a graphical language with sets of rules and semantics. The rules and semantics of a model are expressed in English, in a form known as object constraint language(OCL).OCL is a specification language that uses simple logic for specifying the properties of a system. The UML is not intended to be a visual programming language in the sense of having all the necessary visual and semantic support to replace programming languages. However, the UML does have a tight mapping to a family of object-oriented languages, so that you can get the best of both worlds. The primary goals in the design of the UML were as follows: 1. Provide users ready-to-use, expensive visual modeling languages so they can develop and exchange meaningful models. 2. Provide extendibility and specialization mechanisms to extend the core concepts. 3. Be independent of particular programming languages and development process. 4. Provide a formal basis for understanding the modeling language. 5. Encourage the growth of the OO tools market. 6. Support higher level development concepts. 7. Integrate best practices and methodologies.
15
UML is a language used to: Visualize the software system well-defined symbols. Thus a developer or tool can unambiguously interpret a model written by another developer, using UML stages. Specify the software system and help building precise, unambiguous and Construct the models of the software system that can directly Document models of the software system during its development complete models. communicate with a variety of programming languages.
16
Datamigration 1 + uid + pwd + utype + signin ( ) + about ( ) 1..* 1 Adminopn + aid + apwd + request + xmlfile + convert ( ) Staffopn + sid + spwd + request + xmlfile + reqconv ( ) + viewxml ( )
1..* Xm lConverter + text + datasrc + uid + pwd + sysname + dbname + xmlfile + Attribute1 + text2xml ( ) + xls2xml ( ) + mdb2xml ( ) + ora2xml ( ) + sql2xml ( )
17
Login
Staff Reg
Admin
XML Request
Staff
Tags
18
19
login
Admin
Staff
Registration
Requestxml
Reusexml
Viewxml Converter
Text2xml
20
user
data m igration
1 : request login()
2 : prom uid,pwd() pt
5 : success/failed()
21
user
converter
3 : data source()
7 : pending status()
22
adm in
converter
text to xm l
3 : show request()
8 : convert xm file() l
23
ad in m
c ve on rsion
xls to xm l
5 : sh t,d ee ata()
7 : c n t to xls() on ec
24
am di n
c n eso ov ri n
mbt x l d o m
1: r q e t a c s t x l ) e u s ces o m ( 2: po p a c s ( r mt c e s) 3: d n m a dd p t ( b a e n b ah)
4: c e ke i t ( h c xss )
5: po p t b ,q ey) r mt a l u r ( e 6: t b ,q ey) al ur ( e
7: r t i v d t a dg n r t d t s t ) ere e aa n e eae aa e(
25
am di n
cne o ovr r t
o c t xl r l om ae
1 r qe o c t x l) : eus r l o m t ae (
2 p mdt su e : r p a or ( o t a c)
3 sse nm : yt m e a ( )
4 p mD u ri f ( : r p Bs n ) o t , e o 5 D u ri f ( : Bs n ) , e o
7 ce cne i n : hc onco( k t ) 8 p mt b , ur ( : r p al qe ) o t e y
9 t b , ur ( : al qe ) e y
1 :r ti v ad ee t dt st) 0 e ee n gnr e a e r a a (
1 :gnr t x l) 1 ee e m a (
1 :x l) 2 m ( 1 :x l) 3 m (
26
am di n 1 r qets lt x l ) : eus q o m (
c net r ov r e
s lt x l qom
2 p m dt s uc ( : r p aa or e) o t 3 s se nm) : yt ma e (
4 p m D,ue i f ( : r p B srn ) o t o
5 D,ue i f ( : B srn ) o
7 c ek onci n) : hc c neto(
8 p m t b ,qey) : r p al ur ( o t e
9 t b ,qey) : al ur ( e
1 : gnr t x l ) 1 eeae m (
1 :x l) 2 m (
1 :x l ) 3 m (
27
28
TABLE: REQUESTS s.no 1 2 3 4 5 6 7 8 9 10 Data field Src Dbname Tbname Sysname Uid Pwd Tid Status Xmlfile Sid Data type Text Text Text Text Text Text Number Text Text Number constraint Not null Null Not Null Null Null Null Primary key Not null Null Not null
TABLE: STAFF s.no 1 2 3 4 TABLE: USERS s.no 1 2 Data field Uid Pwd Data type Text Text Constraints Primary key Not null Data field Sid Sname Spwd Addr Data type Number Text Text Text Constraint Primary key Not null Not null Not null
29
6. CODING
6.1 Code for SQL server to XML conversion
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try con.Open() Dim cmd As New SqlCommand("select * from " & gtbname, con) Dim da As New SqlDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) ds.WriteXml("d:\migweb\xmlfiles\" & TextBox6.Text) MsgBox("XML File Generated Successfully") Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() Dim cmd3 As New OleDbCommand("update requests set status='Complete',xmlfile='" & TextBox6.Text & "' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() Catch ex As Exception Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End Try con.Close() End Sub
30
Dim cmd As New OdbcCommand("select * from " & gtbname, con) Dim da As New OdbcDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) DataGridView1.DataSource = ds.Tables(0) ds.WriteXml("d:\migweb\xmlfiles\" & TextBox6.Text) MsgBox("XML File Generated Successfully") Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() Dim cmd3 As New OleDbCommand("update requests set status='Complete',xmlfile='" & TextBox6.Text & "' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() Catch ex As Exception Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End Try con.Close() End Sub
32
33
Dim con1 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con1.Open() MsgBox("Check Parameters! XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con1) cmd3.ExecuteNonQuery() con1.Close() End Try End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Path.GetExtension(TextBox3.Text).ToLower().Equals(".xml") Then Dim con As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=" & gdbname) con.Open() Dim cmd As New OleDbCommand("select * from " & TextBox2.Text, con) Dim da As New OleDbDataAdapter(cmd) Dim ds As New DataSet() da.Fill(ds) ds.WriteXml("d:\migweb\xmlfiles\" & TextBox3.Text) Dim con2 As New OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=common.mdb") con2.Open() Dim cmd2 As New OleDbCommand("update requests set xmlfile='" & TextBox3.Text & "',status='Complete' where tid=" & gtid, con2) Dim stat As Integer = cmd2.ExecuteNonQuery() If stat > 0 Then MsgBox("XML Generation successfull.") Else MsgBox("XML Generation Failed.") Dim cmd3 As New OleDbCommand("update requests set status='Check Database Parameters' where tid=" & gtid, con2) cmd3.ExecuteNonQuery() End If Else MsgBox("Provide filename with extension .XML") End If End Sub
34
7. TESTING
7.1 PURPOSE
The purpose of testing is to assess product quality. It helps to strengthen and stabilize the architecture early in the development cycle. We can verify through testing, the various interactions, integration of components and the requirements which were implemented. It provides timely feedback to resolve the quality issues, in a timely and cost effective manner. The test workflow involves the following: Verifying the interactions of components. Verifying the proper integration of components. Verifying that all requirements have been implemented correctly. Identifying and ensuring that all discovered defects are addressed before the software is deployed.
7.2 QUALITY
The common usage of the term quality refers to a number of things: principally it means the absence of defects, but more importantly, a fitness for a desired purpose. The ultimate goal of testing is to assess the quality of the end product. Quality assessments often consider process quality and organizational factors as well as direct product quality.
35
36
7.5.1.1 Unit test: The smallest testable elements of the system are tested individually; typically at the same time those elements are implemented. 7.5.1.2 Integration test: The integrated units (or components or subsystems) are tested. 7.5.1.3 System test: the complete application and system (one or more applications) are tested. 7.5.1.4 Acceptance test: The complete application (or system) is tested by end users (or representatives) for the purpose of determining readiness for deployment. These stages occur throughout the lifecycle, with varying emphasis. An early conceptual prototype user in the inception phase to assess the viability of the product vision will be subjected to acceptance tests. Architectural prototype developed during the elaboration phase is subjected to integration and system tests to validate architectural integrity and performance of key architectural elements.
7.5.2 TYPES OF TESTING: After a test plan has been developed, system testing begins by testing program modules separately, followed by testing bundled modules as a unit. A program module may function perfectly in isolation but fail when interfaced with other modules. The approach is to test each entity with successively larger ones, up to the system test level. System testing consists of the following steps: 7.5.2.1 Program(s) testing. 7.5.2.2 String testing. 7.5.2.3 System testing. 7.5.2.4 User acceptance testing.
37
7.5.2.1 Program testing: A program represents the logical elements of system. programs. For a program to run satisfactorily, it must compile and test data correctly and tie in properly with other Achieving an error-free program is the responsibility of the programmer. Program testing checks for two types of errors: syntax and logic. A syntax error is a program statement that violates one or more rules of the language in which it is written. An improperly defined field dimension or omitted key words are common syntax errors. These errors are shown through error messages generated by syntax errors. These errors are shown through error messages generated by the computer. A logic error, on the other hand, deals with incorrect data fields, out-of range items, and invalid combinations. Since diagnostics do not detect logic errors, the programmer must examine the output carefully for them. When a program is tested, the actual output is compared with the expected output. When there is a discrepancy, the sequence of instructions must be traced to determine the problem. The process is facilitated by breaking the program down into self-contained portions, each of which can be checked at certain key points. The idea is to compare program values against desk-calculated values to isolate the problem. 7.5.2.2 String Testing Programs are invariably related to one another and interact in a total system. Each program is tested to see whether it conforms to related programs in the system. Each portion of the system is tested against the entire module with both test and live data before the entire system is ready to be tested. 7.5.2.3 System Testing System testing is designed to uncover weaknesses that were not found in earlier tests. This includes forced system failure and validation of the total system as it will be 38
implemented by its user(s) in the operational environment. Generally, it begins with low volumes of transactions based on live data. The volume is increased until the maximum level for each transaction type is reached. The total system is also tested for recovery and fallback after various major failures to ensure that no data are lost during the emergency. All this is done with the old system still in operation. After the candidate system passes the test, the old system is discontinued.
7.5.2.4 User Acceptance Testing: An acceptance test has the objective of selling the user on the validity and reliability of the system. It verifies that the systems procedures operate to system Performance of an specifications and that the integrity of vital data is maintained.
acceptance test is actually the users show. User motivation and knowledge are critical for the successful performance of the system. Then a comprehensive test report is prepared. The report indicates the systems tolerance, performance range, error rate, and accuracy. 7.6 System Documentation All design and test documentation should be finalized and entered in the library for future reference. The library is the central location for maintenance of the new system. The format, organization, and language of each documentation should be in line with system standards.
39
7.7. TEST CASES Module: Login Filename: form1.vb Test Valid Login Input User Id, Password Recvd Output Login Success Act Output Login Success Desc Test Passed! Control Transferred to Menu
Invalid Login
Login Failed
Login Failed
Invalid Login
Null, Null
Login Failed
Login Failed
Fig.7.1
40
Module: Access to xml Filename: access2xml.vb Test Case Access to XML Input Dbname, path and Tablename Actual Output Success Obtained Output Success Desc Test Passed. XML generated & redirected to web server. Access to XML Dbname, path and Tablename Fig.7.2 Module: Oracle to xml Filename: oracle2xml.vb Test Case Input Actual Output Success Obtained Output Success Desc Test Passed. XML generated & redirected to web server. Failed Failed Status updated. Test Passed. Invalid or incomplete data. Status updated. Try again. Fig.7.3 Failed Failed Status updated. Test Passed. Invalid or incomplete data. Status updated. Try again.
Oracle to XML Servername, DSN, user id, password and Tablename Oracle to XML Servername, DSN, user id, password and Tablename
Desc Test Passed. XML generated & redirected to web server. Status updated. Test Passed. Invalid or incomplete data. Status updated. Try again.
and Tablename Servername, Failed DBname, user id, password and Tablename Fig.7.4
Failed
Module: Xls to xml Filename: xls2xml.vb Test Case XLS to XML Input XLS filename and sheet number XLS to XML XLS filename and sheet number Fig.7.5 Failed Failed Actual Output Success Obtained Output Success Desc Test Passed. XML generated & redirected to web server. Status updated. Test Passed. File not found or invalid data. Status updated. Try again.
Module: Text to xml Filename: text2xml.vb Test Case Input Actual 42 Obtained Desc
Text to XML
Text filename
Output Success
Output Success
Test Passed. XML generated & redirected to web server. Status updated. Test Passed. File not found or invalid data. Status updated. Try again.
Text to XML
Text filename
Failed
Failed
Fig.7.6
43
8. SCREEN SHOTS
8.1 Admin Login
44
45
46
47
48
49
50
51
52
8.3.Text File
53
54
8.4.Excel File
55
56
8.5.Access File
57
8.6.SQL Database
58
59
8.7.Oracle Database
60
8.8.Processing Requests
61
62
8.10.Text2Xml Created
63
64
65
66
67
68
69
70
71
72
73
74
8.14.Oracle2Xml Created
75
76
77
78
8.16.Reset Password
79
80
9. CONCLUSION
The application proposes a standard format in XML to represent data that can be previewed across any browser. The format of the text that are used as inputs are databases such as Sql-Server, Oracle and access. Inputs from Excel are used to migrate data and make it available on the web. Hence at the receivers end the system need not have associated softwares. Also text that is delimited can be converted to XML at runtime. The system enhances the facility as the source of data for databases can also be remote systems in case of Sqlserver and Oracle. The system provides graphical windows interface to accept inputs from the user on the data source. These inputs are validated before establishing connection to the data source. Without knowing the origin or the contents of the data within, the application converts the data to an internet standard representation browsable format. The created XML files are transferred to the IIS server for making it available readily to the internet users. These files are stored in virtual directory and has a URL assigned
81
Conversion of data from the XML format to any other format is possible. We make the XML data downloadable. Minimizing the involvement of the administrator in data conversion is possible. Visibility of what kind of data is present in the remote databases is also possible in the future enhancements.
82
11. BIBLIOGRAPHY
David Chappell, Understanding .NET, (2nd Edition) Jesse Liberty and Alex Horovitz, Programming .NET 3.5 Fergal Grimes, Microsoft .NET for Programmers Imar spaanjaars, Beginning ASP.NET 3.5: In C# and VB (Programmer to Programmer) Matthew MacDonald, Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional (Beginning from Novice to Professional), (Second Edition) David S. Platt, Introducing Microsoft .NET (Pro-Developer) Stephen Walther, ASP.NET 3.5 Unleash Websites: www.w3schools.com msdn.microsoft.com visualbasic.about.com www.learnvisualstudio.net www.learnthenet.com
83
84