Docsity

Virtual lab management system, Thesis of Computer Science

Partial preview of the text

Download Virtual lab management system and more Thesis Computer Science in PDF only on Docsity!

Master’s Thesis 2014

Laboratory Inventory System

Design and Implementation

Candidate:

Dona Nathasha Nakandalage

Telemark University College Faculty of Technology Kjølnes ring 56 3918 Porsgrunn

http://www.hit.no

Telemark University College

Faculty of Technology M.Sc. Programme MASTER’S THESIS, COURSE CODE FMH

Student: Dona Nathasha Nakandalage

Thesis title: Design and Implementation of Laboratory Inventory System

Signature:.................................

Number of pages: <#>

Keywords: Web Programming, ASP.NET, Database Systems, SQL Server, OOP, Equipment

Supervisor: Hans Petter Halvorsen sign.:...........................

2 nd^ Supervisor: sign.:.................................

Censor: sign.:.................................

External partner: sign.:.................................

Availability: Open

Archive approval (supervisor signature) : sign.:........................ Date :.............

Abstract:

Lab Inventory System is a resource management system for a laboratory for handling loans and reservations, managing user profiles and allowing search facilities for users to find out information of equipment in detail. It is a better solution with many flexible and convenient features, allowing lab administrators and users to maximize efficiency while reducing time wastage. It gives detailed information about users and equipment with vendor and salesman details and keeps track of available equipment and issued equipment. Lab Inventory System contains a relational database, a website, a web service and two desktop applications (“LabelWriter” application and “Loan/Return Equipment” application). “Loan/Return Equipment” application is supposed to install and configure in each lab for loaning and returning equipment. “LabelWriter” application which is going to install in administrator’s computer, is for printing out labels for registered equipment. A web service is for storing and retrieving data from the database when using desktop applications and “Lab Inventory System” web site is for handling loans and reservations, managing user profiles and registering equipment. The thesis report describes software development life cycle of Lab Inventory System (Analysis, Design, Implementation, Testing and Deployment phases) with Use Case, class and database design diagrams. Further it details the system overview, detailed system description with its architecture.

Telemark University College accepts no responsibility for results and conclusions presented in this report.

  • Contents
  • Abbreviation
  • Part 1: Introduction
    • 1 Introduction.........................................................................................................................................
      • 1.1 Task Description and Task Background
      • 1.2 Aim and Scope of the Work.......................................................................................................
        • 1.2.1 Why Lab Inventory System..............................................................................
      • 1.3 The structure of the report
  • Part 2: Theory and Background
    • 2 Programming Concepts
      • 2.1 Object Oriented Programming Concepts.................................................................................
        • 2.1.1 Encapsulation
        • 2.1.2 Inheritance
        • 2.1.3 Polymorphism
        • 2.1.4 Advantages of Object Oriented Programming
        • 2.1.5 Disadvantages of Object Oriented Programming.............................................
      • 2.2 Web Services
      • 2.3 Visual Studio
        • 2.3.1 Windows Forms
        • 2.3.2 ASP.NET
        • 2.3.3 Team Foundation Server (TFS)........................................................................
    • 3 Database Design Concepts
      • 3.1 Relational Database Model
      • 3.2 Database Diagram
        • 3.2.1 ERWin
      • 3.3 SQL Server 2012.........................................................................................................................
        • 3.3.1 Data Retrieval and Manipulation in SQL Server
        • 3.3.2 Concurrency and Locking
        • 3.3.3 SQL Server Management Studio......................................................................
  • Part 3: Analysis and Design...............................................................................................
    • 4 Analysis
      • 4.1 System Overview
        • 4.1.1 Database
        • 4.1.2 “Lab Inventory System” Website.....................................................................
        • 4.1.3 “LabelWriter” Application
        • 4.1.4 “Loan/Return Equipment” Application
        • 4.1.5 Web Service
      • 4.2 Requirements for “Lab Inventory System” Website...............................................................
      • 4.3 Requirements for “LabelWriter” Application
      • 4.4 Requirements for “Loan/Return Equipment” Application
    • 5 Design
      • 5.1 Application Design
        • 5.1.1 System Architecture
      • 5.2 Database Design..........................................................................................................................
  • Part 4: Implementation, Testing and Deployment
    • 6 Implementation
      • 6.1 Implementation of “Lab Inventory System” Website
      • 6.2 Implementation of Web Service
      • 6.3 Implementation of “LabelWriter” and “Loan/Return Equipment” Applications
      • 6.4 Database Scripts, Stored Procedures and Views
      • 6.5 Source Code Control
      • 6.6 Best Coding Practices
        • 6.6.1 Commenting
        • 6.6.2 Exception Handling
    • 7 Testing
      • 7.1 Testing of Lab Inventory System
        • 7.1.1 Bugs/Tasks Tracking with Team Foundation Server
    • 8 Deployment
      • 8.1 Deploy “Lab Inventory System” Website and Web Service
        • 8.1.1 IIS Configuration..............................................................................................
        • 8.1.2 Deploy Database Scripts
    • 8.2 Deploy “Loan/Return Equipment” Application and “”LabelWriter” Application
  • 9 Conclusion and Future Work
    • 9.1 Suggestions for future work
  • References
  • Appendix 1: Task Description
  • Appendix 2: Fully Dressed Use Case Documents for “Lab Inventory System” Website
  • Appendix 3: User Interface Sketches for “Lab Inventory System” Website
  • Appendix 4: Fully Dressed Use Case Documents for “LabelWriter” Application
  • Appendix 5: Fully Dressed Use Case Documents for “Loan/Return Equipment” Application
  • Appendix 6: SQL Server Database Diagrams
  • Appendix 7: Class Diagram......................................................................................................................
  • Appendix 8: Screen dumps of “Lab Inventory System” Website
  • Appendix 9: Web Methods of “Lab Inventory System” Web Service

Abbreviation

API Application Programming Interface

CLR Common Language Runtime

CSS Cascading Style Sheet

DB Database

DBMS Database Management System

ETL Extract, Transform, Load

FTP File Transfer Protocol

GUI Graphical User Interface

HTML HyperText Markup Language

HTTP HyperText Transfer Protocol

HTTPS Hypertext Transfer Protocol Secure

IIS Internet Information Services

OLAP Online Analytical Processing

OOP Object Oriented Programming

RFID Radio Frequency Identification

SMTP Simple Mail Transfer Protocol

SOAP Simple Object Access Protocol

SQL Structured Query Language

TFS Team Foundation Server

T-SQL Transact-Structured Query Language

UDDI Universal Description, Discovery and Integration

UI User Interface

UML Unified Modeling Language

VB Visual Basic

XHTML Extensible HyperText Markup Language

XML Extensible Markup Language

XSLT EXtensible Stylesheet Language Transformations

1 Introduction

This chapter explains the tasks given for the master thesis titled, “Design and Implementation of Laboratory Inventory System” in spring semester at Telemark University College 2014. It also includes the tasks description and background with aim and scope of the work. Furthermore, it includes an explanation of different chapters in the report.

1.1 Task Description and Task Background

See Appendix 1 for task description and background given by the supervisor.

1.2 Aim and Scope of the Work

This section explains the aim of the thesis with describing necessity of such a system and specifies the scope of each task.

Presently an enormous amount of lab equipment (some equipment are very expensive) have been used by students and staff from Faculty of Technology, Telemark University college during their day to day study/teaching activities like research and developments, lab assignments, projects, thesis and lectures. The records of lab equipment (borrower name, reason for borrowing, borrowed date, student number/staff number) are maintained in a written form by lab administrators or owners of the equipment. This takes lots of time of both lab administrators and borrowers as borrower has to go to the office of lab administrator and has to write the details in a form when borrowing or returning the equipment. In the meantime it is the responsibility of lab administrator to find the appropriate form when borrowing or returning equipment, to check deadlines of each record, to maintain the records (may be at the end of each semester to check whether all the equipment are available in the lab or not), to get corrective actions when missing/damaging equipment. Therefore it is obvious that it is a long, time consuming process and the existing system is not so efficient.

“Design and Implementation of Laboratory Inventory System” comes as a better solution with many flexible and convenient features, allowing lab administrators and users to maximize efficiency while reducing time wastage. It gives detailed information about users and equipment with vendor and salesman details and will keep track of available equipment and

issued equipment. It will definitely minimize errors and will be a very good replacement to existing repetitive manual process.

1.2.1 Why Lab Inventory System

Several benefits of Lab Inventory System over the manual process can be listed as follows:

  • Reduce errors and eliminate long and repetitive manual processing
  • Improved efficiency and effectiveness in administration and management of records
  • More economical as it minimizes the time usage
  • Easy to take corrective actions in a timelier manner
  • Easy access to equipment details as it has search functionality
  • Increased productivity

The whole thesis has been divided into five main tasks as follows:

Task 1

The very first task is to design a database for Lab Inventory System using SQL server and ERWin software applications. The database should include tables for storing information about different lab equipment and equipment categories, handling reservations and loans, storing user information, login details and access level information. Moreover, the database should be designed according to database concepts and rules to reduce data redundancy.

Task 2

Task two is to design and implement a “LabelWriter” application for printing out barcode labels that can be attached to different equipment and user identity card. This is a standalone application, so that lab administrators can install and configure it in their personal computers. “LabelWriter” application allows searching users or equipment through a web service, selecting an appropriate users or equipment and printing a label with a barcode and other specific data. This allows selecting a default label template or to upload and use their own label template. DYMO Label Writer should be connected and drivers should be installed in the computer for printing labels.

Task 3

In task three, a web application has been created for managing and tracking lab equipment data. This allows creating/updating/deleting user profiles, reserving lab equipment, borrowing or returning equipment, granting different access levels, registering/modifying equipment,

Chapter 4: Analysis

This chapter details system overview, user categories and functional requirements of “Lab Inventory System” website, “Loan/Return Equipment” application and “LabelWriter” application with Use Case diagrams.

Chapter 5: Design

Design chapter describes detailed system description, system architecture and database design with database diagram and class diagram.

Chapter 6: Implementation

This chapter discusses implementation of Lab Inventory System with technical information of the system.

Chapter 7: Testing

Chapter seven describes testing methods used for Lab Inventory System and bug tracking with TFS during implementation and testing phases.

Chapter 8: Deployment

This chapter describes deployment methods and steps used for “Lab Inventory System” website, web service, “Loan/Return Equipment” application and “LabelWriter” application.

Chapter 9: Conclusion and Future Works

The last section is the conclusion. It also gives suggestions for improvements of the system and proposals for future work.

Part 2: Theory and

Background

Part 2 contains “Programming Concepts” and “Database Design Concepts” chapters. It details concepts and theories behind programming and database design with software development tools.

Object

An object consists of attributes and methods. Attributes define the properties of the object while methods define its behavior. In OOP, object is considered as an instance of a class. Considering Lab Inventory System, “Equipment” and “Customer” can be considered as objects and “Equipment Name” and “Customer Name” can be considered as their attributes.

Class

A class is simply a representation of a type of object. Using the blueprint analogy, a class is a blueprint of an object, and an object is a building made from that blueprint [1]. It consists of a name, attributes and methods.

Encapsulation, inheritance and polymorphism are the main fundamental concepts in OOP.

2.1.1 Encapsulation

Encapsulation normally refers to information hiding or treating a group of related properties, methods, and other members as a single unit or object [1]. Hence encapsulation guarantees integrity of object data and uses methods to access information as shown in Figure 2-2.

Figure 2-2 Encapsulation [2]

Encapsulation can be achieved using “private”, “public” and “protected” access modifiers.

“public” – access is not restricted

“private” – access limited to members of same class

“protected” – access limited to members of same class or descendants

2.1.2 Inheritance

Inheritance describes the ability to create new classes based on an existing class. So the object can inherit properties from another object while defining common codes only one place with enhancing maintainability of the software^1. Figure 2-3 shows an example of inheritance. According to the Figure 2-3 “Customer” is the parent class. Both “Student” and “Staff” inherit all the fields and methods of the parent class “Customer”. Hence inheritance guarantees code reusability.

Figure 2-3 An example of Inheritance

2.1.3 Polymorphism

Polymorphism is the ability to take more than one forms depending on data type or class, so that multiple classes can be used interchangeably, even though each class implements the same properties or methods in different ways. Hence polymorphism guarantees maintainability of the software. Interface introduces polymorphism. It contains only definition of methods, properties and events, so the class that implements the interface, has the implementation or declaration to achieve polymorphism.

2.1.4 Advantages of Object Oriented Programming

  • Easy to maintain and extend existing code
  • Enhanced code reusability
  • Object hiding can be achieved

(^1) Referred from “Object-Oriented Analysis, Design, and Programming using UML and C#” lecture notes 2012 made by Nils Olav at Telemark University College

Figure 2-5 shows a logical view of web services architecture which is based on three primary roles, service requester, service provider and service registry. Providers of the web services are known as service providers, users of the web services are known as clients or service requester. The essential part of web services is the interact relationship between a service provider and a service requester. These three roles interact using publish, find and bind operations. The service provider publishes the service description in a service registry. The service requester finds the service description in a service registry and uses the information in the description to bind to a service. The service registry provides a centralized location for storing service descriptions. They will become interface to a huge world of data and query services. UDDI, a platform independent, XML based registry is an example of service registry.

Figure 2-5 Web Services Architecture [3]

2.3 Visual Studio 2013 As per the task description, Lab inventory System is implemented using Visual Studio 2013. Visual Studio is a comprehensive collection of tools and services to help developers to create a wide variety of apps, both for the Microsoft platform and beyond [4]. It was developed by Microsoft. Microsoft has released several versions of Visual Studio as Visual Studio 2005, Visual Studio 2008, Visual Studio 2010, Visual Studio 2012 and the latest version is Visual

Studio 2013. It is also available in several editions as Visual Studio Express, Visual Studio Professional and Visual Studio Ultimate and is used to develop standalone applications, mobile applications, web sites, web applications and web services.

Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code. It supports different programming languages such as C, C++, C#.net, VB.net and F#. It also supports XML/XSLT, HTML/XHTML, JavaScript and CSS.

Code editor in Visual Studio supports syntax highlighting and code completion (using IntelliSense) as well as code refactoring. The integrated debugger works both as a source- level debugger and a machine-level debugger and allows stepping through the application line by line while executing. Visual Studio includes designers for windows applications, web applications and mobile applications.

2.3.1 Windows Forms

“LabelWriter” and “Loan/Return Equipment” applications are implemented using Windows Forms (WinForms). WinForms is the graphical application programming interface included as a part of Microsoft Visual Studio. It can display data, handle user input and deploy applications easily and with enhanced security. In Windows Forms, a form is a visual surface which displays information to the user. A control is a user interface element that displays data or accepts data input. A form can be enhanced with controls to create the appropriate user interface while adding code to manipulate data.

WinForms contains variety of controls such as TextBoxes, Radio Buttons, Buttons, ComboBoxes, GridViews, etc. It supports creating custom controls as well. It has rich user interface components to interact with high end applications like Microsoft Office.

2.3.2 ASP.NET

“Lab Inventory System” website and web service are implemented using ASP.NET. ASP.NET is a server-side web application framework developed by Microsoft. It is mainly designed for developing dynamic web sites, web applications and web services and is included as part of Visual Studio. ASP.NET takes the best from Active Server Pages as well as the rich services and features provided by the CLR [5]. The result is a robust, scalable, and