Advanced database development application

Document Sample
Advanced database development application Powered By Docstoc
					Advanced Database Application Development
Diploma Final-Year Project 2007/2008
Jeremy Foo Jie You (S10023782H) Project Report • School of InfoComm Technology • January 14, 2008

Lum Chee Fong, Victor

Supervisor

2nd Marker
Chang Bin Haw

Trenz Pruca • email: no_reply@apple.com • Elementary School!

1

Table of Contents

Acknowledgement! Company’s Business!
Introduction! Company Structure! Location!

5 6
6 7 7

Tasks, Roles and Technologies!
Introduction! Systems Builder (Hardware)!
Knowledge and Skill Requirement! Problems and Management!

8
8 8
9 9

Project Manager!
Knowledge and Skills Requirement! Problems Encountered and Management!

9
10 10

System Analyst!
Knowledge and Skills Requirement! Problems Encountered and Management!

11
11 12

Principal Software Developer!
Knowledge and Skills Requirements! Problems Encountered and Management! Trenz Pruca • email: no_reply@apple.com • Elementary School!

12
12 13 1

Documentation writer!
Knowledge and Skills Requirement! Problems Encountered and Management!

13
13 13

Trainer!
Knowledge and Skills Requirement! Problems Encountered and Management!

14
14 14

People and Communication Issues!
Introduction! Work Affected! Management! Reflection!

15
15 15 15 16

Professional and Legal Issues!
Introduction! Views! Management! Reflection!

17
17 17 17 18

Organisational and External Party Requirements! Database Transfer!
Introduction! Requirements!
Background! Project Specification! Approach! Tools and Techniques used! Problems or Challenges Encountered!

19 20
20 20
20 20 21 21 21

Design!
Features! Interface! Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

21
22 23 2

Evaluation!
Future!

23
23

Nishino Product Database!
Introduction! Requirements Specification!
Background Information! Client Requirements! Objectives! Functional Requirements! Non-Functional Requirements!

24
24 24
24 25 26 26 26

Development!
Tools! Component-based Scalable Logical Architecture! Label printing! User Interface!

27
27 27 28 29

Deployment! Testing! Evaluation!
Future!

30 30 30
31

Subsumption Architecture!
Introduction! Software Robots! Framework! Evaluation!

32
32 32 32 33

Conclusion!
Learning Experience! Conclusion!

34
34 35

References!
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

36
3

Appendix!
Use Case Diagram for Nishino Product Database! ER Diagram for Nishino Product Database! Label Printing Class Diagram for Nishino Product Database! Companies Class Diagram for Nishino Product Database! Ingredients Class Diagram for Nishino Product Database! Products Class Diagram for Nishino Product Database!

38
39 40 41 42 43 44

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

4

Acknowledgement
Thank you for the fish
The internet is a wonderful place for information. Nothing of this project would be possible without the contributions from the great minds of the subject matter experts in the areas of the following, • Object Orientated and design pattern methodologies • C# Development in .Net technologies • Business Objects • Component Based Scalable Architecture • Subsumption Architecture • Microsoft SQL technologies In particular, the publishers of the wonderful books on the topics that were essential to making this internship interesting and a fruitful one. I would like to especially thank my supervisor, Mr Yasuhiro Kawada for everything he has done to help me adjust to the company and the work that I am to do for my internship. Also his invaluable knowledge and insights into the industry has been wonderful advice in carving out a career for myself. Lastly, I would like to thank Mr Victor Lum for contacting me and convincing me to work on this internship opportunity. It has been a most refreshing, surprising and rewarding experience thus far.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

5

Company’s Business
Its all about the ways to make the money INTRODUCTION
Located in the heart of the CBD at Telok Ayer Street, Huminte is a small IT solutions business that caters to the needs of her clients by providing a one stop shop for consulting, implementation, execution and training for whatever IT services that the client needs.

The stairs to the office

Services provide can include and are not limited to the following, • Custom software development work • Maintenance and Repair • Infrastructure planning and implementation • Systems building • Network administration
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 6

• Training • Upgrades and updates

COMPANY STRUCTURE
The company currently employs 2 other employees along with one intern from a polytechnic, this consists of the company accountant and the managing director who is also my supervisor. As such this firm is very agile and able to handle clients with a single mindedness and focus that larger companies lack. However, the number of projects can be undertaken would considerably be lesser than larger companies but not at a risk to the revenue stream due to proper project management.

LOCATION
Due to her location at the heart of the CBD, Huminte is well poised to handle the requests of her clients as they are mostly located within the vicinity of the company. The actual office is a rented space from FLP Singapore Pte Ltd, a one stop creative marketing company. FLP occasionally outsources backend development of their web and interactive design projects to Huminte.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

7

Tasks, Roles and Technologies
Everything that happened during this short time INTRODUCTION
Due to the versatility and the size of the company, no specific role was given. However, the individual projects that were undertaken required different roles due to project requirements. The following are a list of roles that arose from the different projects that were undertaken, • Systems Builder (Hardware) • Project Manager • System Analyst • Principal Software Developer • Documentation Writer • Trainer The fact that all these roles were performed by the same individual, it is safe to assume that there was no assumptions being made when certain roles had to transition between each other. This made for a very agile development process.

SYSTEMS BUILDER (HARDWARE)
The task was to assemble a complete PC from the components that were purchased off the shelf. This included assembling the different parts into the chassis of the new computer as well as sorting out which wires where to go to which connectors on the motherboard of the computer. Further work was needed to ensure the system would have optimum airflow and ventilation due to its ATX form factor1 that was to fit in a mini casing. This was to be achieved by proper planning for cable management.

1

Advanced Technology Extended form factor is a standard in computer case and motherboard design that

was developed by Intel in 1995. Wikipedia, (2008, January 11). ATX. Retrieved January 11, 2008, Web site: http://en.wikipedia.org/wiki/ATX

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

8

Knowledge and Skill Requirement This role and its associated tasks required knowledge in the assembly of PCs from their individual components. Also the ability to interpret manuals and follow instructions are a vital skill. Additionally, experience helps a lot as there are certain nuances to system building that cannot be learnt by just reading up or following manuals. Most importantly would be the understanding of the individual components and how they fit within the context of a computer system. Take for example the differences between SATA and PATA interfaces and their required settings for Master or Slave modes for the individual devices (Hard drives). Knowing the differences and being able to set the proper hardware settings via the jumpers of the components would speed up the assembly time. In addition, setup of the low level hardware via the BIOS2 settings to accommodate the technicalities of the operating system to be installed required prior knowledge of the internals of that operating system. All in all, the knowledge and skill requirements for the assembly of a computer system relies largely on the understanding of how hardware and software (operating system) work and coexist together. Problems and Management The only problem encountered was a computer casing design that was different from traditional casings. Instead of having the power supply unit mounted at the top back corner of the casing, it is mounted at the front and flush with the bottom of the system. Management of such an interesting case design just warranted more careful cable management to ensure the cables that are routed throughout the casing would not interfere with airflow and ventilation of the system.

PROJECT MANAGER
Due to the structure of the company, there is no provision for individual roles for each employee. As such, each employee handled every aspect of whichever project that they were assigned. The project manager’s role that each employee plays for their own projects basically requires them to work on the following,
2

BIOS stands for Basic Input/Output System and refers to firmware code that starts the individual

components of a computer at low level when the computer system is first booted. Wikipedia, (2008, January 12), BIOS. Retrieved January 11, 2008. Web site: http://en.wikipedia.org/wiki/BIOS.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

9

1. Prepare timeline for client and billing. 2. Ensuring milestones are reached. 3. Arrangement of meetings with clients. 4. Ensure deliverables are of quality and to client’s satisfaction. Knowledge and Skills Requirement Due once again to the structure of the company, the full knowledge and skills of a project manager was not really required. This contributes greatly to how agile the company is as there are not many processes to go through that might otherwise slow down a bigger company with more human resources. For the perusal of the person in charge of billing as well as for the client and the developer’s reference, the only process and document really required would be the development of the work breakdown structure. Even in this case, not the full features of the work breakdown structure was to be used. In essence, the WBS’ use was to calculate roughly how much time was needed to develop the project. Broken down into individual components or milestones, it was then possible to calculate how much time was exactly needed and what components were really large enough to deem as milestones. The billing department will then used the time taken to calculate a rate to bill the client. The developer will also then have the timetable and the deadlines for each component. For the purpose of fulfilling the school’s requirements of the internship, knowledge to create the Terms of Reference and Project Proposal is also required. Problems Encountered and Management Having been educated that project management by a project manager was a certain way, it took some time to get used to the style that the company worked. In particular, planning how much time was needed within the work breakdown structure was different as all that the client needed to know was how much time is needed to complete the development. The person handling billing was the one that was concerned about the amount of time per milestone as was the developer, but all these are internal to the company.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

10

It took some getting used to but eventually the idea to present the work breakdown structure as a to do list with a time required for each item that was a major component of the project that either required learning, research or even actual development helped immensely. It was an unorthodox approach compared to the one that was taught in school, but it got the job done.

SYSTEM ANALYST
Proper planning for any project is essential to ensure that development work can be done as efficiently as possible. This also helps to ensure that problems and changes can be easily tracked down and managed. It also helps the people involved with the project to be able to understand the processes that are related to the various aspects of the end product. The task of the system analyst on this front is to do the initial planning and brainstorming of the project. This includes coming up with documents to support the software developer. For example, • Use case • Use case diagrams • Objet relationships • Database models • Initial design sketches Knowledge and Skills Requirement The knowledge of the system analyst largely relate to the ability to understand the abstract problem that the client has and translate it into something that software developers can work on. In the case of this role during the internship, knowledge of the ways to translate what the client wants from interviews into plausible use cases was very vital as the clients were mostly not technical people. Skill in understanding and getting people to put their requirements into a concrete form was also highly vital. From there, translating those requirements into use cases and than into even more technical data like object relationships or even database models was needed such that the software developers could easily build a product. Some knowledge in how relational databases work is also required as the projects that were being handled all deal with databases on some level. Developing a database model from such
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 11

knowledge using information from the project requirements the clients specified is inclusive of the role of the system analyst in this case. Problems Encountered and Management Not many problems were encountered as prior usage of these knowledge and skills in personal projects and school work helped. In addition, because the system analyst and the software developer are the same person, it made the translation from abstract emotive data to technical data related to development was not really a problem.

PRINCIPAL SOFTWARE DEVELOPER
The task of the software developer is simple. To create something out of nothing using his skills at writing code and interpreting the information that the system analyst provides. This includes building the prerequisites to the system. Knowledge and Skills Requirements The requirements for this role is rather technical and extensive due to the nature of the role. As such, a list of the knowledge and skill requirements are as follows, • Object Orientated Programming Methodologies • C# Development Language • Relational Databases • Microsoft SQL Server 2005 • CSLA.Net (Component-based Scalable Logical Architecture) Framework • .Net Technologies • Rapid Application Development • User Interface Design • Windows Graphics Engine • Print SDKs • Visual Studio 2005 Enterprise Architect In addition to the above, general knowledge in the following will also be helpful although it is not required of the software developer,
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 12

• VB.Net • C++ • Regular Expressions Problems Encountered and Management There were initial problems as prior knowledge requirements were not at a proficient enough level that would warrant easy development of the projects. Some time had to be spent learning and trying out the various aspects of the languages. However, after much trying and extensive references to help files, examples and manuals, these problems were fast over.

DOCUMENTATION WRITER
The task of the documentation writer is to create documentation for the projects. This includes information not limited to the setup, usage and troubleshooting of the end product. Updates to the documentation would also have to be made should the end product be updated as well. Knowledge and Skills Requirement Understanding of the project as well as the features the software developer incorporated into the end product is essential. A good command of english as well as a good eye for presentation of information is important to ensure that the documentation is easily understood. The ability to translate hard technical data into something laymen can understand is highly important as well. Problems Encountered and Management Most of the problems with the documentation arose from the ever changing nature of the product being developed as additions to the requirements were made. As such, some features and the relevant screenshots would keep changing and thus would require rewrites. In addition, the design of the manual also created initial problems as one that was intuitive to use was not a blank template of any word processor. Selection of the template was highly important. All these were manageable just that it took time to deal with them.
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 13

TRAINER
Not everyone likes to read manuals and documentation. So it was essential that training in usage of the end product for the clients was conducted such that they understood the end product and its usage. Knowledge and Skills Requirement Extensive knowledge in the documentation and the project is highly important. A skill in helping people understand complex technicalities as well as an ability to use analogies to explain them is essential as well. Problems Encountered and Management Time was the major problem. From the time taken to setup the end product on the client’s systems to the actual testing, there was very little time as these people also had their jobs to do. In order to deal with this problem, a run through of the end product’s features by virtue of actually using it in a real life situation as an example was conducted to allow the client to familiarise themselves.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

14

People and Communication Issues
Social aspects of the job INTRODUCTION
Huminte as her name suggest is a Japanese company. As such her employees are all Japanese as well as her clients. This makes for a very interesting experience when dealing with them due to the language barrier.

WORK AFFECTED
Initially, understanding what was to be done was a huge problem as the supervisor spoke in heavily Japanese accented english. A consequence of this would be that for about the first 3 weeks, I did not know what time was my lunch break supposed to be. In order to be polite, I did not venture out for lunch. However it was much later that I realised that my supervisor was very liberal with the times that I actually went out to eat. This was about 2 months in to the internship and by then I have made not having lunch a habit. Consequently, I also could not answer the company phone as most of his clients were Japanese.

MANAGEMENT
Eventually, I got used to his accent and would often ask my supervisor to repeat himself if I did not understand what he was saying. This became most helpful as I would rely on him to translate what his clients would say. Should my supervisor not be around and I had to deal with his clients alone, I would often try to understand what the client wanted by cues from their Singaporean colleagues. Most of the time a lot of guesswork would be involved in figuring out what my supervisor was trying to convey, but when things got really complicated, he would usually write down what he wanted in english on a piece of paper. Post It notes became the real helper to managing the language barrier from the start of the internship.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

15

REFLECTION
On hindsight, not much of my work was affected due to the working style I’m accustom to. My supervisor will give me a general idea of what the solution should be like and I will figure out the rest on my own through research as well as trial and error. There is perhaps no other way to handle this language barrier than polite clarification on the subject that is being discussed. Usage of language neutral medium to communicate would be another alternative to handling this issue. Perhaps the best solution would be to actually pick up the Japanese language. Given a chance, this would have made a big difference as the barrier of communication will be removed from the passage of learning. I would be able to learn more and understand immediately what was requested of me.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

16

Professional and Legal Issues
To do with the law and ethics INTRODUCTION

Most of the professional and legal concerns for this internship mostly centered around the software and other intellectual property that was used for the various projects that was worked on during the internship period.

VIEWS
Work done during the internship period was mostly for clients and thus it was not proper to use products that the company or the client did not have a license for. The legal ramifications was too great no matter how obscure the eventual product’s usage would be. Most of these intellectual property were actually controls and libraries that could be used to assist in easing the development of the project.

MANAGEMENT
Initially, many problems were faced with trying to achieve certain design goals of the project as the components that were available were written by other developers and sold as licensed products. This included presentation of data in the user interface via a list view that was similar to the one that Microsoft Outlook employs. A free print engine capable of printing labels of a certain size with formatting capabilities was also lacking. By dealing with the problem in an alternative way, sometimes by keeping it as simple as possible, the desired effect could still be achieved. In conjunction, open source components
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 17

with almost similar functionality were modified and updated to fully achieve the desired effect of the particular functionality.

REFLECTION
Since the desired effect for the project was achieved and there was no major complaints from the client, there would not have been any other way that these problems be managed. Software development is a creative process. There should be no fixed way to get something done the way the developer wants if enough effort is put it. On hindsight, there probably is not any other way to handle the problems properly other than the course of action taken.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

18

Organisational and External Party Requirements
External pressures

Prior to the beginning of the internship, the company already completed the move from its old location to the current one at Telok Ayer Street. As such there was not many organisation changes or issues that affected the internship on the whole. The only issue that existed arose from the fact that the company is small. Hence, consultation with the supervisor only came about when the person in question was actually around. Should he be off dealing with his own clients and their projects, there no one around to coach in whatever queries and questions there was about the project at hand.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

19

Database Transfer
Migration of Access to MDF INTRODUCTION
One of the initial applications that was written for this internship would be an experiment as well as research into Microsoft SQL Server 2005. The Database Transfer application was written as a precursor to the Nishino Product Database project as the original database had to be migrated from Access 2000 format to the new SQL 2005 format to take advantage of newer and more powerful features that the new database server provides.

REQUIREMENTS
Background The initial version of the Nishino Product Database that was previously developed Nishino Pharmaceutical Pte Ltd. stored all information in an Access 2000 database. The database itself was not normalised and not relational even though there was the capacity for that. It was also developed using an early version of CSLA.Net. With the move to the new version of CSLA, a better database storage engine was needed. Microsoft SQL Server 2005 was chosen due to the numerous performance and feature improvements over the old Access 2000 format. Project Specification The primary goal of the Database Transfer application was to transfer schema as well as table data from the source database (Access 2000) to the destination database (SQL 2005). The secondary goals of the project include the following, • Convert Autonumber identity field to GUID uniqueidentifier fields based upon selection. This was to full utilise SQL 2005 features of a more unique identifying field. • Drop table if it exists. • Handle Access to Access as well as SQL2005 to SQL2005 transfers as well.
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 20

Since there was a chance the project might be used extensively, additional optional goals for its initial inception were to include the following if possible, • Easy to use intuitive interface • Database Manager class to handle multiple database storage engine types • Auto detect database engine type Approach Since this was a personal project as well as a premier to the main internship project, the approach to this was flexible and used as learning platform to learn about C#, SQL 2005 as well as .Net Framework 2.0 related components. As much as possible, the goals were implemented as best as they could and sequentially. This was to ensure that the end result would be a complete product as well as a good learning experience. Tools and Techniques used All development work was done on Visual Studio 2005. This was also in preparation for the main internship project as this was the IDE of choice. Since the transfer process had to be achieved programatically, components that could achieve that effect were sourced and used in the development of the project. The traditional SQL engine components that the .Net Framework provides do not allow much programatic control of SQL database except through query statements. But with a little research on the internet turns out that there are additional components that come bundled with the SQL Server 2005 that are management components that allow such programatic control of the database. However it is only limited to SQL Server 2005. Problems or Challenges Encountered Mostly the challenges that arose from this project came from the fact that there was no prior experience with the development language. Also there was no extensive use of SQL 2005 which resulted in extensive research necessary for the development of the application.

DESIGN

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

21

Features The design goal of the application was a simple one and all it had to do was that one simple goal. As such, the overall design of the application was also to be as simple as possible to reflect that primary goal. As such, the following were the features that were considered, • Input of source and destination connection strings to allow easy passing into database connection methods • Auto checking if source and destination databases are valid based upon existence and type • Allow selection of ID field to force conversion to uniqueidentifier • Options to drop the existing table if it was detected to exist thereby replacing data and schema • Option to replace selcted ID field with uniqueidentifier fields • User interface to be straightforward and simple

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

22

Interface The application is very simple to use. The initial screen only shows the input fields for the source and destination connection strings. Once the user has entered both and the system checks its out as alright (denoted by a green tick icon), the rest of the options will be presented. From there, the user will be able to select additional options before they are transfered. Transfers are done to the destination database on a table by table basis. Progress messages will show in the status bar at the bottom of the application in the anticipation that a large database needs to be transfered. The progress messages provide a way to keep track of the process and assures the user that the application has not frozen up. Due the flexibility in using the connection strings, it is also possible transfer the database into an SQL 2005 Server or a SQL 2005 MDF file as well. And as much as the database manager and translation class allows, other database storage engines as well.

EVALUATION
The application performed as expected, converting a Access 2000 database full of product information into the SQL 2005 format in a MDF file. The identity field was also translated into a uniqueidentifier field in anticipation of the main internship project. Future There is a lot of potential in such an application. So far the only other commercially available application that does schema and data translation is bundled with SQL Server 2005 and only supports the formats that are proprietary to Microsoft. Should this application be further developed the following features could be included, • Translation of individual fields • Translation of data to a new schema and type • Handle other database storage engines like Oracle, MySQL, etc.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

23

Nishino Product Database
Pharmaceutical product information storage INTRODUCTION

Nishino Pharmaceutical deals in the sale of pharmaceutical products that are sold locally as well as imported goods, mainly from countries like Japan and Korea. These products cater mainly for the health of the customers by means of acting as supplements. They are usually sold as tonic and lotions although the company also sells many other common health products.

REQUIREMENTS SPECIFICATION
Background Information With the introduction of new Ministry of Health labeling requirements, any pharmaceutical product is required to display the following fields of data, 1. Product Name & Function 2. Full Ingredient Listing
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 24

3. Instructions for Use 4. Country of Manufacture 5. Contents (weight/volume) 6. Batch Number 7. Manufacturing or Expiry Date (exp. date labeling is mandatory if durability < 30 months) 8. Name and address of company responsible for placing the product in the market in Singapore 9. Special precautions (form the annexes or decided by company based on safety assessment Nishino Pharmaceutical already uses an early version of the NPD application that prints all of the above except for the fields in bold. With the addition of such fields, there is a need to change the label size as well as redesign the format of the printed label to allow for better readability when so much data is presented. The current user interface also lacks the places to enter the new fields required above. Additionally, the user interface also features multiple avenues of entry to use the different functions of the software that are not very obvious. Even though aesthetics are not a vital part of the application, it helps with making the software enjoyable to use. This is also lacking. Inspection of the product database store also shows that the storage format just deals with product information. The existing system is very simple. It is meant to store, retrieve, edit product information and allow labels to printed based upon a format specified in a Word Document. Client Requirements The client stressed the importance of ensuring the format of the label to be printed met the Ministry of Health Guidelines. Also, the printer should be able to print the contents on 2 different types of labels. Apart from that, they expressed no other requirements and will go with the recommendation of the developer.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

25

Objectives The primary objective of the project is to redesign the format of the label printing framework to handle the new label size as well as the addition of new fields of data. This is to be in compliance with the new Ministry of Health standards. The secondary objective is rewrite the original label software using CSLA.Net Business Object Framework to keep it more in line with object orientated programming practices. This will facilitate easy future upgrades to the application as well as provide a certain level of extensibility. With these two objectives, the remaining general objective is also a redesign of the user interface to make it more intuitive as well as aesthetically appealing. This will be achieved by maintaining a close parallel with Apple’s Human Interface Guidelines. Functional Requirements • Print labels based upon Ministry of Health Guidelines • Print 2 different types of label sizes • Store pharmaceutical product information • Store company information • Store ingredient information • Assign ingredient to product • Assign importer to product • Assign manufacture to product • Run on Windows XP Non-Functional Requirements • Intuitive and easy to use • As little clicks to get to desired function as possible • Optimized Performance

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

26

DEVELOPMENT
Tools Development of NPD was carried out on Visual Studio .Net 2005 using SQL Server 2005 Express as a database storage engine. In addition, creation of the database was done using the SQL Server 2005 Management Studio Express. Plotting of the use case diagram as well as project planning via the work breakdown structure was all achieved using the applications OmniGraffle and OmniPlan respectively. Documentation was written using Pages. These applications all run on the Mac OS X platform. Component-based Scalable Logical Architecture The core of the application would be its database capabilities that is gain through the use of CSLA.Net or Component-based Scalable Logical Architecture. CSLA is a framework created by Rockford Lhotka that allows for object orientated business objects. Business objects are objects that abstract business entities in an object orientated program. These entities can be sales orders, employees, invoices and so on 3. To put it simply, CSLA.Net allows for database records to be emulated as objects. With individual fields being accessed like properties of an object. This ORM (Object Relation Mapping) concept is further extended by the addition of capabilities such as business rules tracking, validation and N-level undo. Couple this with the .Net Framework’s ability to do data binding of its controls with objects, It makes writing database applications much simpler. To further simplify it, a code generator was used in conjunction to generate generic codes that are applicable to every business objects. Small changes then could be made to each class to give it more features. Because of the way CSLA works and the ease of use of code generators, the traditional workflow of creating the ER Diagram after the class diagrams has to be switched with the design for the database attempted first. CSLA is also most than just a simple ORM tool. Amongst its built in components to the framework that allows for access control, security, and many other features, it also leverages on .Net’s ability to send serialized objects across a transport (Object Remoting). This means
3

Wikipedia, (December 28, 2007), Component-based Scalable Logical Architecture. Retrieved January 12,

2008. Web site: http://en.wikipedia.org/wiki/Component-based_Scalable_Logical_Architecture

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

27

that to convert an application from one that uses a local database to a remote one, all that is required is one line of code to change. The learning curve for such a framework is very steep, but the concept is learnt, the full entirety of how powerful it is, is as simple as its usage. Label printing The traditional developer’s way of printing data would be to use Crystal Reports. However, for this application, such an option was not exercised due to its complexity and huge prerequisite list. One option to consider was using Microsoft Office’s Interop package to send data to Office applications to fit into a template. This was attempted in the initial version of NPD, but was too ugly and difficult to extend. Upon exploring options, an open source label printing engine was found. Extensive modifications had to be made to the engine due to its limitations and the client’s requirements. The list of changes include the following, • Ability to print formatted text. (Heading, Subheadings are bold, while text was normal) • Addition of page offset into coordinate calculation engine to account for different printer offsets • Allow coordinate engine to account for page offset and set padding for other margins to ensure consistent look • Addition of label sheet settings for the 2 types that the client requires • Allow coordinate engine to accommodate label padding as well as individual margins Being able to control the print process programatically helped in ensuring each label turned out the way it should. The only problem is that printers that will be used to print from this application would have to use Postscript drivers as PCL drivers are picky about the RAW data it outputs. One workaround would be to do low level control of the printer, but this would cause problems because the commands are unique to each type of printer.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

28

User Interface

To achieve a certain level of intuitiveness for the application, most of the important information for the application was organized on its main screen. The UI was adopted from Mac OS X’s Address Book application as it seemed to best fit the concept of what was to be displayed.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

29

The look and also the feel was mimicked as much as possible to ensure that the usability that came naturally to the Address Book application was also present in NPD. However, compared to Mac OS X form components, Windows has issues with its Windows.Forms Component of .Net when it came to performance. The layout panels would flicker whenever they bound data from the database. One of the alternatives was to use the latest WPF (Windows Presentation Foundation) which was only present in Windows Vista. Since the client’s computer systems only ran Windows XP, the other alternative was to subclass the form components affected and add in performance tweaks. Additional display performance tweaks were introduced to make the application more responsive. This include having a timer to check if the filter text changes within a certain time and bind data based upon that decision. Also having the controls data bind only when necessary.

DEPLOYMENT
Deployment of the application was done via a setup program. Updates to the application and its libraries were version controlled such that newer setup programs would overwrite the older version applications. The software was deployed to the client’s Orchard Road branch as well as their warehouse.

TESTING
Since the application was rapidly developed, most testing was done component by component as it was developed. Further user testing was done by observing the client use the product during their daily processes. While software bugs and errors were fixed, additional improvements in terms of performance and usability were also introduced and installed during updates.

EVALUATION
The objectives of the project have been fully met as evident by the satisfaction of the client. Functions were completed according to the specification in the terms of reference, this includes some of the optional components. The project was also completed ahead of schedule allowing for more time to do performance fixes and optimisation. Request for changes were handled with a short turn around due to the modular nature of the application.
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 30

However, the project could be further improved but was not as it was not economically feasible on the budget that was set for the project. Still, there is a great sense of satisfaction when using the product, even when testing which gives an idea of how complete the product is to the client as well as the developer. Future The project of course could be further extended from its original parameters. Some of these ideas could be as follows, • More customizable print engine allowing user to select fields to display along with free form text • Addition of a logistics management module to handle the company’s inventory. • Build in business rules for ingredients as there are certain criteria for restricted and prohibited ingredients. • More performance tweaks • Concurrent database access fixes • Barcode scanning • Picture of products • Update CSLA to 3.0 in preparation for Windows Vista-only features (WPF and WCF)

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

31

Subsumption Architecture
Layered reactive artificial intelligence INTRODUCTION
The subsumption architecture mimics the way insects behave by having neural networks of layers of simple components that handle a singular and often simple task. The sum of these layers would produce a behavior that is intelligent enough to react to changes in the environment. This architecture is most often used in the field of behavior based robotics and was created by Rodney Brooks. The sum of the entire neural networks makes for a very reactive artificial intelligence. This opens up a possibility for applications beyond the field of robots.

SOFTWARE ROBOTS
The only other application of subsumption architecture without the use for hardware was in an experiment to use artificial intelligence on RoboCode, a simulated tank game where developers write code for tanks to fight it out in an virtual arena. It would be interesting to apply the idea of a behavior based software robot in the field of perhaps generating newspaper layouts. This would enable templates to be generated based upon the content that will be passed to the inputs of the software robot. The robot will account for the content, advertisement placement and other considerations a layout editor in a newspaper usually makes. This will allow for multitude of different and interesting content layout to be generated for any type of medium.

FRAMEWORK
There is currently no framework available for a high level language like C#. In the exploration of the possibility of creating such a software robot to handled the generation of newspaper layouts, it is imperative that such a framework that encompasses the philosophy of the architecture be created.
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 32

This framework must embrace the following ideals, • A state machine that handles a singular task • These state machines are organised into layers • Inputs follow a path through these layers by being passed along as messages between each layer • Messaging system to pass messages between layers either inhibiting the message or suppressing the message. • Layers run in parallel of each other eventually ending up at a layer that actually outputs something that will make a change For now, work has started on such a framework by trying to emulate the ideals by means of .Net technologies as well as object orientated methodologies. Possible usage of the Messaging Queue4 of Windows operating systems or the Chain-of-Responsibility5 design pattern for inter layer communication will depend on whether the framework will be multi threaded or linear.

EVALUATION
It is highly possible that such a framework can be created and fully implemented native to .Net such that software robots can created. But since there has been no initial work at such high level languages, it is mostly a proof of concept as well as a trial and error implementation. Future The possibilities are endless should the framework come to fruition. Considering .Net is able to run on any platform that has the Common Language Runtime, it is highly possible to port the software robots to work in a online or offline environment. It could server numerous purposes apart from deciding whether a newspaper page is supposed to look the way it is.

4Simplify

Distributed System Design Using the Command Pattern, MSMQ, and .NET. Retrieved January 13,

2008, from http://msdn.microsoft.com/msdnmag/issues/04/09/CommandPattern/
5

Wikipedia, (2007, November 24). Chain-of-responsibility pattern. Retrieved January 13, 2008, from http://

en.wikipedia.org/wiki/Chain-of-responsibility_pattern

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

33

Conclusion
At the end of it all LEARNING EXPERIENCE
The internship experience was an invaluable experience that cannot be measured. The amount of knowledge gleaned and the experienced gain was considerably more than any other education. The immersion into the industry taught also many practical lessons. Things that were taught in school were not all used. Instead, the focus on more practical aspects of the Software development life cycle had more play in the industry. Especially with a company as small as Huminte, the agility that it needs to stay competitive would be removed should it follow everything completely. On a more personal note, this internship allowed for the education in new things, chief amongst of which that, • It is really a different world out there. School doesn’t really prepare you for everything • Software frameworks are the way to go for the future • C# is very much easy to pick up • .Net technologies are really useful as long as you can read past all that documentation • Object Orientation is most valuable to parallel what the system analysts comes up with and what the software developer must do • Visual Studio is a fantastic IDE just that it lacks third party version control • The synergy of CSLA.Net along with .Net technologies really helps to reduce the development time of any project. (A 3 month project can take 3 weeks) • Test each component before moving on to the next • Nothing beats observing the user using the application for insights on bugs • Artificial Intelligence, Agent programming will probably be the next big thing

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

34

CONCLUSION
The industry is way ahead of what is being taught in school. As much as school tries to form the basis for everything that the students will do when they head out into the workforce, they will not be prepared unless they diligently read up, be inquisitive and hunger to learn. Internship should be the only choice for a Final Year Project. It has been a most fruitful experience and every other student should gain this valuable insight too.

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

35

References
Wikipedia, (2008, January 11). ATX. Retrieved January 11, 2008, Web site: http://en.wikipedia.org/wiki/ATX Lhotka, Rockford (2006). Expert C# Business Objects Second Edition. Apress. Wikipedia, (2008, January 12), BIOS. Retrieved January 11, 2008. Web site: http://en.wikipedia.org/wiki/BIOS Wikipedia, (December 28, 2007), Component-based Scalable Logical Architecture. Retrieved January 12, 2008. Web site: http://en.wikipedia.org/wiki/ Componentbased_Scalable_Logical_Architecture Pete, (2007). Address Label Printing API for Windows. Retrieved January 13, 2008, from http://sourceforge.net/projects/ labelprintapi/ Boogie Woogie, (2006, February 26). Printing C# Friends. Retrieved January 13, 2008, from http:// www.csharpfriends.com/Forums/ ShowPost.aspx?PostID=40107 Ryan Farley, (2004, July 13). Writing to Your .NET Application's Config File. Retrieved January 13, 2008, from http:// ryanfarley.com/blog/archive/ 2004/07/13/879.aspx Wikipedia, (2007, November 24). Chain-ofresponsibility pattern. Retrieved January 13, 2008, from http://en.wikipedia.org/wiki/ Chain-of-responsibility_pattern Brad, King (2004). Simplify Distributed System Design Using the Command Pattern, MSMQ, and .NET. Retrieved January 13, 2008, from http:// msdn.microsoft.com/msdnmag/issues/ 04/09/CommandPattern/ Grant Fritchey, (2006, December 20). SQL Server 2005 Backups. Retrieved January 13, 2008, from http://www.simple-talk.com/ sql/backup-and-recovery/sql-server-2005backups/ Rick Strahl, (2005, May 18). Building a better .NET . Retrieved January 13, 2008, from http://www.west-wind.com/ presentations/configurationclass/ configurationclass.asp David Hayden, (2006, January 15). GetSchema - DbConnection.GetSchema in ADO.NET 2.0 - Retrieve Databases Tables Columns Views etc. from Database Connection. Retrieved January 13, 2008, from http://davidhayden.com/blog/dave/ archive/2006/01/15/2734.aspx Joydip Kanjilal, (2006, May 8). Implementing a Data Access Layer in C#. Retrieved January 13, 2008, from http:// aspalliance.com/837
Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic! 36

David Hayden , (2006, January 27). Create Table in SQL Server 2005 Using C# and SQL Server Management Objects (SMO) Code Generation. Retrieved January 13, 2008, from http://www.davidhayden.com/ blog/dave/archive/2006/01/27/2775.aspx Christian Nagel, Bill Evjen, Jay Glynn, Morgan Skinner, Karli Watson, Allen Jones, (2005). Professional C# 2005. Wrox. R. A. Brooks (1986) "A Robust Layered Control System For A Mobile Robot", IEEE Journal Of Robotics And Automation, RA-2, April. pp. 14-23. David P. Anderson, (2007, March 26), SUBSUMPTION FOR THE SR04 AND JBOT ROBOTS. Retrieved January 13, 2008, from http://dprg.org/articles/ 2007-03a/ Eisenstein, J.: Evolving robocode tank fighters. Technical Report AIM-2003-023, AI Lab, Massachusetts Institute Of Technology (2003) citeseer.ist.psu.edu/ 647963.html. Wikipedia, (2007, Octoboer 21), Subsumption Architecture. Retrieved on January 13, 2008 from http:// en.wikipedia.org/wiki/ Subsumption_architecture

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

37

Appendix
Everything else

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

38

USE CASE DIAGRAM FOR NISHINO PRODUCT DATABASE

NPD
Add Product

Print Label

Delete Product List Products

Assign Ingredient to Product

Edit Product

Staff

Delete Ingredient Add Ingredient

Database

List Ingredients

Assign Importer

Assign Manufacturer

Edit Company Add Company Delete Company List Company

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

39

ER DIAGRAM FOR NISHINO PRODUCT DATABASE

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

40

LABEL PRINTING CLASS DIAGRAM FOR NISHINO PRODUCT DATABASE

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

41

COMPANIES CLASS DIAGRAM FOR NISHINO PRODUCT DATABASE

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

42

INGREDIENTS CLASS DIAGRAM FOR NISHINO PRODUCT DATABASE

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

43

PRODUCTS CLASS DIAGRAM FOR NISHINO PRODUCT DATABASE

Jeremy Foo Jie You • jeremyfoo@gmail.com • Ngee Ann Polytechnic!

44

Terms of Reference
Project Title
Product Database with Label Printing Capability (NPD)

Name of Company
Nishino Pharmaceutical Pte. Ltd.

Nature of Business
Nishino Pharmaceutical deals in the sale of pharmaceutical products that are sold locally as well as imported goods, mainly from countries like Japan and Korea. These products cater mainly for the health of the customers by means of acting as supplements. They are usually sold as tonic and lotions although the company also sells many other common health products. Their place of business is at the level 2 basement of Takashimaya shopping centre.

Introduction
With the introduction of new Ministry of Health labeling requirements, any pharmaceutical product is required to display the following fields of data,

1. Product Name & Function 2. Full Ingredient Listing 3. Instructions for Use 4. Country of Manufacture 5. Contents (weight/volume) 6. Batch Number 7. Manufacturing or Expiry Date (exp. date labeling is mandatory if durability < 30 months) 8. Name and address of company responsible for placing the product in the market in Singapore 9. Special precautions (form the annexes or decided by company based on safety assessment
Nishino Pharmaceutical already uses an early version of the NPD application that prints all of the above except for the fields in bold. With the addition of such fields, there is a need to change the label size as well as redesign the format of the printed label to allow for better readability when so much data is presented. The current user interface also lacks the places to enter the new fields required above. Additionally, the user interface also features multiple avenues of entry to use the different functions of the software that are not ! 1

very obvious. Even though aesthetics are not a vital part of the application, it helps with making the software enjoyable to use. This is also lacking. Inspection of the product database store also shows that the storage format just deals with product information. The existing system is very simple. It is meant to store, retrieve, edit product information and allow labels to printed based upon a format specified in a Word Document. The project aims to deal with the problem of different label sizes as well as the introduction of the new compulsory fields. Improvements on the user interface to make it more intuitive along with restructuring of the fields to accommodate the new data to be stored. Normalization of the database to better fit the idea of each table as business entity would also help with easing the development and future upgrades of the application.

Project Objectives
The primary objective of the project is to redesign the format of the label printing framework to handle the new label size as well as the addition of new fields of data. This is to be in compliance with the new Ministry of Health standards. The secondary objective is re write the original label software using CSLA.Net Business Object Framework to keep it more in line with object orientated programming practices. This will facilitate easy future upgrades to the application as well as provide a certain level of extensibility. With these two objectives, the remaining general objective is also a redesign of the user interface to make it more intuitive as well as aesthetically appealing. This will be achieved by maintaining a close parallel with Apple’s Human Interface Guidelines. In short these objectives are as follows.

Requirements Definition

• To research existing NPD software and its operation. • To gather requirements of end users and potential operating environment of the software. • To familiarize with the label type to be used for printing.
Design and analysis

• To analyze and specify requirements of system. • Learn C# and CSLA.Net Business Objects Framework. • Understand development process and code of existing NPD application. • Design interface for new application • Design and add improvements to existing application

! 2

Development and Testing

• To develop and design new NPD application. • Develop testing criteria. • Ensure a smooth transition to new software. • Produce necessary documentation and report associated with development of system.

Project Scope
The project will develop the system to upgrade the existing version of the Pharmaceutical Product Database adding support for a different label type as well as reformatting the output to be in compliance with the Ministry of Health guidelines. Additionally, the application will be rewritten using CSLA.Net Business Objects to use more Object Orientated methodology to facilitate future upgrades and modules. Specifically, the the system will provide for the following functions

• Intuitive User Interface for easy usage. • Add/Remove/Modify • Product Details • Importer • Manufacturer • Ingredients • Search or Filter based upon general query strings or specific fields • Print labels • (Optional) Allow selection of different label size (formats) • Allow selection of fields for printing • (Optional) Control printer directly for printing so that content will fit size of label • (Optional) Export to Access/Excel.

Project Work Environment
Software Resources

1. Microsoft Visual Studio .NET 2005 2. Microsoft SQL Server Express 2005
! 3

3. Microsoft Office 2003 4. Microsoft Windows XP 5. Mac OS X 6. OmniGraffle 7. OmniPlan 8. Pages 9. Adobe Photoshop CS3
Hardware Resources

1. AMD PC running Windows XP with 1GB of RAM. 2. Vacuum tube amp with speakers. 3. Canon LBP3360 Laser Printer. 4. Server running Windows 2003 Server. 5. Photocopying Machine. 6. PowerBook G4 12” 1.5Ghz Running Mac OS X 10.5 Leopard.
Constraints

• 2 weeks (full time) to prepare terms of reference and project proposal. • 4 days for testing of system. • Keep within planned timeline with financial consequences if not. • Application to be written in C# and implemented using CSLA.Net Business Objects Framework. • Lack of prior experience with C# and CSLA.Net. • Lack of prior experience with printing engines/frameworks.

! 4

Schedule
The following schedule runs linearly one after the other. There is no overlap. Effort 4 days 4 days 1 week 1 week 1 week 1 week 4 days Task Prepare Terms of Reference Prepare Project Proposal Develop Business Objects using CSLA.Net Develop GUI to work with Business Objects Develop Printing framework Do adjustments on printing framework to fit labels. Testing

Total Effort amounts to 1 week 3 days.

! 5

! 6

User Guide
Nishino Product Database

huminte pte ltd
155B Telok Ayer Street ! Singapore 068611 7 Tel: (65) 6220-6474 Fax: (65) 6220-6475

Contents

Preface Chapter 1

About this Guide Getting Started Requirements Installation

Chapter 2 Chapter 3

System Overview Usage Deleting a product Printing product label Searching for a product

Chapter 4

Modifying or Adding products Generic Product Details Ingredients Companies

Chapter 5

Con guration Database Printing Companies Ingredients Application Con guration File

Appendix

Troubleshooting

About this Guide

This user’s guide shows you how to install, configure and use the Nishino Product Database.
Some information you might nd useful.
• Installation of NPD components and prerequisites,in Chapter 1 • NPD components, features and controls overview as well as how to use some of the basic functionality,in Chapter 2 • Creation and modi cation of the products,in Chapter 3. • Con guration of various options available to the users,in Chapter 4. • Some troubleshooting messages to aid in correcting problems with the application, in the Appendix

Working with the Nishino Product Database
NPD tries to be the most intuitive system for product management that requires little reference to the manual as possible. It was designed to encourage users to just go ahead and use the system in order to learn how it works.

1

Getting Started

This chapter covers setting up and installation of the application and her prerequisites. It is recommended for new as well as experienced users of the system. In this chapter you will find information on the following • • • • Brief summary of the whole system Application Requirements Setting up of prerequisites Application installation

2

Welcome to the Nishino Product Database
Changing the way pharmaceutical product information is stored and providing a way for the printing of pharmaceutical labels.

NPD provides a system of organization for cataloging pharmaceutical products. Along with that, its secondary purpose is to print labels of the products that it stores. As such, this manual will cover all the basis of the application from installation, to usage, to printing.

Conventions
To easy the usage of this manual, certain conventions will be used to simplify the understanding of the processes described.

Addition of Item Usually used to associate with addition of information to root items. This icon also appears along sections of the manual that has to do with addition of data. Removal of Item This icon will precede sections that has to do with removal or deletion of data.

3

Filter or searching Sections on ltering of the data lists or searching for information. The correct way Signi es that the following process is the correct way to get things done.

The wrong way The opposite of the correct way.

4

Requirements
NPD does not have many requirements, but there are some that are critical to its operation. Critical Requirements These are requirements that have to be satis ed in order for NPD to even run. • Microsoft Windows XP • .Net Framework 2.0 • SQL Server 2005 (Express or Server) Recommended Requirements These requirements ensure smooth operation of the NPD application. • PC running at at least 2.4Ghz • 512MB of RAM • Printer with borderless printing capabilities

Installation
Prerequisite setup
NPD’s installation system only ensures that the components that it requires for its smooth operation are present in the system. The user still has to make sure that they are downloaded from Microsoft and installed should they not be present. The prerequisite installation les can be found on the installation CD under the Prerequisites folder.

The following are the setup instructions for these prerequisites.
5

.Net Framework 2.0 Go into the prerequisite folders and run the le dotnetfx.exe. After the les have been extracted you should be presented with the following screen.

Click through the to the next EULA screen.

The installer should automatically go through the installation procedures as shown in the next screen.

6

Once this is done, .Net Framework 2.0 should be installed on your system. SQL Server 2005 Express Run sqlexpr.exe from the prerequisites folder.

Click through the EULA screen to the next one.

7

Wait for the setup system to complete con guration of the support les and other components. After clicking next again, SQL Server 2005 Express setup will do a system con guration check.

Click next after the system con guration check is completed and successful.

8

Enter your name and company (if any). The name eld is compulsory.

Ensure that the Database Services and Connectivity Components have been selected for installation.

9

Ensure the authentication mode is set to Windows Authentication Mode.

Check your installation options.

10

Let the setup system do its thing.

And everything is now done. Proceed to installation of NPD.

11

Nishino Product Database Setup
The setup application for NPD can be found in the Setup folder. Select the le Setup.exe to begin installation. Run Setup.msi if you intend to use SQL Server 2005 as the database engine.

Click through to the next screen.

Select the installation location and if the application is to be installed for all users.

12

Con rm the installation and let the thing run. You should be ready to use the application when you are done.

13

System Overview

This chapter explains the basics of the application and the many different aspects of the application. Expect a summary of the features of each application window which would serve as a guide to using them.

14

System overview
Main Window

NPD is designed as a system where there would be very little navigation to get to the features you want. The main window here basically shows every aspect of the application, from searching, to printing, to management and adding of products.

NPD features a searching system based on the idea of a lter. Typing on the main window itself will bring focus to the textbox for the lter system. Clicking on the X icon will reset the lter text and the lter itself. The lter system searches for matches in the database based upon the following elds, • • • • • • • • Id Product Number Name Description Usage Contents Volume Weight

Matches will refresh the listing and the currently selected product will be displayed on the display area on the right as shown.

15

The left pane also contains a button to toggle the addition of products to the database. Clicking on this button will actually cause the display area on the right to go into edit mode and clear the elds for the addition of a new product to the database.

As shown above, the display pane shows the product details of the currently selected product of the product listing. The display pane gives context to the options available for that particular product. The user is able to print the product as a label set, remove the product from the database and edit.

16

As shown above, this is the display panel when its edit option activated. New options are available for the saving and canceling of the edit. In addition, Printing is disabled. The elds that can be edited in the display pane will put on a more visible colour and become editable. The user can actually edit the individual elds to modify the details. As certain rules for the options will be applied, the user will be given a visible prompt should the data entered be not tting of the rule. The buttons in the display pane allow for the modi cation of the child attributes of the product. Namely the companies and ingredients associated with the product. Clicking on them are as the pictures depict. A plus will add new attributes, a negative is for deletion of the attribute. In addition, the not allowed icon also serves as a delete button for lists within the display panel like those demonstrated for the ingredients. The user can also edit the quantity of the particular ingredient by double clicking on the quantity that is shown.

17

Ingredients

The add ingredients inspector is called when the user clicks the plus icon when they are editing the product. The inspector works on the same principle of the product listing. The user is able to lter the ingredients available select the one to be added, ll in the quantity and add the ingredient to the product. Some shortcuts are built into the system name the ability to add new ingredients as well as a way to aid data entry personnel.

As shown, should the lter result in only on result, the option is auto selected. The user then only needs to ll in the quantity and hit the Add to Product button or hit enter.

18

Should the user ll in a completely new item into the lter, cues to add the item as a new ingredient to the database will be shown. The lter icon will be changed to an addition icon. Should the user click the Add to Product button or hit enter, the system will ask if the ingredient is to be added to the database before associating with the product.

The system also makes provision that the lter might lter results before the ingredient is added. Should such an event be detected, an Add New button will be shown to allow the user to manually add the ingredient the database. Thereafter, the ingredients list will refresh and the user can associate it with the product.

19

Companies

The add company inspector that is called when the user wants to add either an importer or a manufacturer to the product is fundamentally the same as the ingredients inspector. The only di erence is that it does not allow addition of new companies to the database to be later associated. The addition, management or removal has to be done via the database control system.

Printing

The print options is displayed when the user clicks the print icon of the display panel. The settings for the label that is to be printed as well as the paper information is loaded and additional options for the user to ll in. The number of labels to print along with which fonts to use are allowed as options for the user to con gure the settings. The Skip also allows the user to reuse label sheets that have already labels used up by skipping that speci c number of labels from the start of the sheet.
20

The print engine is able to check if the contents that is to be printed can t on the label and will resize the default font to allow the contents to all t the label dimensions speci ed. Upon clicking on the print button, the user can select the printer to be used and will be shown a print preview screen.

From here, clicking on the printer button will send the print job to the printer.

Ingredients Database Control

21

The ingredients database controls allows the user to remove ingredients from the database as well as add or rename ingredients. It functions exactly the same as the ingredients inspector. In order for changes to the database to be fully commit, the user has to click the save button. Otherwise clicking the close button will revert the changes and exit the database control.

Companies Database Control

The database control resembles the main window due to the complexity that it has to manage. It has similar functionality in the context of the addition of new companies, removal and editing. The user is allowed to speci c one owner company which is the company that is using application by checking against the companies listed. Searching is done by the company name. Addition of companies are done by clicking the same icon that resembles addition of products in the main window.

22

The details panel will only be activated for editing when the panel is in edit mode or during the addition of new companies.

Preferences

The preferences system allows for the con guration of the database that is used for the application as well as printing options. The con guration is pretty straight forward. Server instance selects the database server engine as well as the database that is used.

23

MDF File should be lled in should a SQL Server 2005 database le be used. Otherwise, the system is able to read from a SQL Server by specifying the database within the server instance textbox and leaving the MDF File textbox blank. Clearing of all data within the existing database is also another option to reset the database and start afresh. All modi cation of preferences will cause the application to restart to re read the application con guration les.

The printing preferences govern the label printing engine complete. All measurements here are in millimeters. Loading of label presets from the defaults that are speci ed in the system will automatically populate the textboxes with values. Paper The user is able to specify the paper name and dimensions that is sent to the printer under this section. In addition, the orientation that the printer prints in can also be selected. Paper O set This is a x for printers that do not do borderless printing and have a prede ned o set from the paper. This tells the print engine to t the labels such that the space on the paper is full utilized. Paper Margins The margins are measurable margins that is visible on the label sheet that the print engine has to correct for in addition to the paper o set to start the printing of each label correctly. Label

24

Here the user can select the attributes of each label, things like the width, height and how many rows and columns of labels are there. This is in respect to the orientation that is selected under the paper settings. The spacings between each column and row is a measurable width between these columns or rows. Label Padding This tells the print engine how much space from the edges of the label that the system is allowed to print. Label margins This is an additional option to allow for weird labels that have a speci c shape between each of the labels.

25

Usage

Basic usage of the system and step by step instructions to achieve the specific processes can be found in this chapter. These include, • Removal of products • Printing • Searching

26

Removal of Products
Removal of products is perhaps the easiest of all the processes. To delete a product, make sure it is selected in the product list and appears in the details panel. Click the remove button to remove the product.

The system will display a con rmation dialog for you to con rm your action in the event that this was an accident.

Upon con rmation, the record of the product will be automatically completely removed from the database.

Printing of Product
Similar to the removal of a product, ensure the product that is to be printed is the currently selected item.
27

Click the Print button to print the product.

The print options dialog will be displayed with options loaded from the application con guration.

As explained in the system overview, the user can select the labels to be printed, the amount to skip front the start of the label set and the fonts to be used. Upon clicking the print button, the printer can be selected and a print preview will be shown.

28

The user can then print the labels or take a closer look at them or close the window if its a mistake.

Searching
Searching is the most simple thing in the application. Its the same for the inspectors as well as the database control dialogs.

Typing on the main window itself will bring focus to the textbox for the lter system. Clicking on the X icon will reset the lter text and the lter itself. The lter system searches for matches in the database based upon the following elds, • • • • • • • • Id Product Number Name Description Usage Contents Volume Weight

Matches will refresh the listing and the currently selected product will be displayed on the display area on the right as shown.
29

Modifying or Adding Products
This chapter explains the main components of the system which are the product details. Topics covered here include, • Product generic details • Ingredients • Companies

30

Generic Product Details

Adding and modi cation of products will activate the details panel to allow editing. As shown above, this is an example of the addition of a new product. The editing of products is the same except that data will already be there. Clicking the add button will open the details panel up for editing and the elds set with default values. Since there are now inputs at all, the validation systems ag the elds that need to satisfy rules with the error icon. Upon lling these elds with correct data, the error icon will disappear.

Ingredients
In addition to generic product details, attributes can be associated with the product by clicking the plus sign icon to add attributes.
31

As shown, the add ingredients inspector allows for association of ingredients with products with the additional attribute of quantity.

The add ingredients inspector is called when the user clicks the plus icon when they are editing the product. The inspector works on the same principle of the product listing. The user is able to lter the ingredients available select the one to be added, ll in the quantity and add the ingredient to the product. Some shortcuts are built into the system name the ability to add new ingredients as well as a way to aid data entry personnel.

32

As shown, should the lter result in only on result, the option is auto selected. The user then only needs to ll in the quantity and hit the Add to Product button or hit enter.

Should the user ll in a completely new item into the lter, cues to add the item as a new ingredient to the database will be shown. The lter icon will be changed to an addition icon. Should the user click the Add to Product button or hit enter, the system will ask if the ingredient is to be added to the database before associating with the product.

33

The system also makes provision that the lter might lter results before the ingredient is added. Should such an event be detected, an Add New button will be shown to allow the user to manually add the ingredient the database. Thereafter, the ingredients list will refresh and the user can associate it with the product.

Companies
The companies inspector works the same as the ingredients inspector.

34

The add company inspector that is called when the user wants to add either an importer or a manufacturer to the product is fundamentally the same as the ingredients inspector. The only di erence is that it does not allow addition of new companies to the database to be later associated. The addition, management or removal has to be done via the database control system.

35

Configuration

This section covers all the configuration that is available for the application. In addition, it covers advanced configuration of the application via the Application Configuration file.

36

Configuration
Database
Refer to system overview for database preferences (page 23)

Printing
Refer to system overview for printing preferences (page 24)

Companies
Refer to system overview for companies database control (page 22)

Ingredients
Refer to system overview for ingredients database control (page 21)

Application Con guration File
The application con guration le is located in the installation directory of the application. It is usually at C:\Program Files\Huminte\Nishino Product Database\. The le name is the name of the executable with .con g appended. In this case, it is NPD.exe.con g. Hence the full path is C:\Program Files\Huminte\Nishino Product Database \NPD.exe.con g.

37

<?xml version="1.0" encoding="utf-8"?> <configuration> <appSettings> <add key="CslaAuthentication" value="Csla" /> <add key="PrefsDatabaseMDFFile" value="|DataDirectory| \Nishino.mdf" /> <add key="PrefsDatabaseProviderName" value="System.Data.SqlClient" /> <add key="PrefsDatabaseServerInstance" value=".\SQLEXPRESS" /> <add key="PrefsDatabaseDataSourceOptions" value="" /> <add key="PrefsDatabaseIntegratedSecurity" value="true" /> <add key="PrefsDatabaseUserInstance" value="true" /> <add key="PrefsPaperName" value="A4" /> <add key="PrefsPaperHeight" value="297" /> <add key="PrefsPaperWidth" value="211" /> <add key="PrefsPaperMarginRight" value="21" /> <add key="PrefsPaperMarginBottom" value="0" /> <add key="PrefsPaperMarginLeft" value="21" /> <add key="PrefsPaperMarginTop" value="0" /> <add key="PrefsPaperOffsetRight" value="4" /> <add key="PrefsPaperOffsetBottom" value="4" /> <add key="PrefsPaperOffsetLeft" value="4" /> <add key="PrefsPaperOffsetTop" value="6" /> <add key="PrefsLabelHeight" value="70" /> <add key="PrefsLabelWidth" value="51" /> <add key="PrefsLabelColumnSpacing" value="5" /> <add key="PrefsLabelRowSpacing" value="0" /> <add key="PrefsLabelColumns" value="5" /> <add key="PrefsLabelRows" value="3" /> <add key="PrefsLabelMarginRight" value="0" /> <add key="PrefsLabelMarginBottom" value="0" /> <add key="PrefsLabelMarginLeft" value="0" /> <add key="PrefsLabelMarginTop" value="0" /> <add key="PrefsLabelPaddingRight" value="1" /> <add key="PrefsLabelPaddingBottom" value="0" /> <add key="PrefsLabelPaddingLeft" value="1" /> <add key="PrefsLabelPaddingTop" value="0" /> <add key="PrefsPaperLandscape" value="true" /> </appSettings> <connectionStrings> <add name="NishinoMDF" connectionString="Data Source=. \SQLEXPRESS;AttachDbFilename=|DataDirectory|\Nishino.mdf;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration>

As shown, this le is very vital to the NPD system. In event of a con guration problem that might cause the application to crash, this is the le to edit to solve the problem. The options are all editable and correspond to the preferences dialog settings. They are all related to the options in the format of Prefs[Section][Option].

38

Appendix

Troubleshooting for application problems or crashes.

39

Troubleshooting
I am using SQL Server 2005 as my database engine and the application crashes on startup.
The default con guration of NPD is designed for SQL Server 2005 Express which allows the ag User Instance. Edit the NPD.exe.con g and change the value for User Instance to false.

The application still crashes on startup.
Are you sure the SQL Server 2005 process has been started?

Yes, the server is running and the application is still crashing on startup.
Check to see if you have all the pre requisites.

Yes, the server is running, I have the prerequisites and the application is still crashing on startup.
Contact the developer.

I want to edit the default label settings.
The default label settings are hardcoded into the print engine and cannot be edited. The alternative is to load a preset and edit the options to suit your con guration. Contact the developer if this is a must have feature.

How do I back up the database?
Check your con guration for the location of the MDF le. Make a copy of the MDF le as well as its log le (*.ldf). The default location of the MDF le should be at C:\Program Files\Huminte\Nishino Product Database\Nishino.mdf C:\Program Files\Huminte\Nishino Product Database\Nishino_log.ldf

40


				
DOCUMENT INFO
Shared By:
Tags:
Stats:
views:105
posted:11/28/2009
language:English
pages:93