* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Download chapter 2 literature review
Survey
Document related concepts
Open Database Connectivity wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Relational model wikipedia , lookup
Functional Database Model wikipedia , lookup
Transcript
CHAPTER 2 LITERATURE REVIEW 2.1 General Theories 2.1.1 Software Engineering Software engineering “encompasses a process, a collection of methods (practice) and an array of tools that allow professionals to build high-quality computer software” (Pressman & Maxim, 2015, p. 14). There are many software development methods that are available, each with its own advantages and disadvantages. By following the guidelines and practices imposed by the software development methods, software engineering helps programmers to build computer software in sync with the timetable, and with high quality result that satisfies the requirements defined by the stakeholders. 2.1.1.1 Extreme Programming Figure 0.1 The Extreme Programming Process (Pressman & Maxim, 2015, p.72) According to Pearman and Goodwill (2006, p. 5), Extreme Programming, or simply known as XP, is a type of Agile software development method. 9 It consists of a 10 collection of core framework activities, principles, and practices that embraces change that occurs during software development. What differentiates XP from other agile methodologies is the constant implementation of its core framework activities on a daily basis. Pressman and Maxim (2015, pp. 72-75) outlines the four core framework activities: 1. Planning The planning activity begins with gathering requirements from the user to enable the XP team to understand the business flow, required output, major features and functionality. This will eventually be called user stories and each of these stories are assigned a priority. The XP team then estimates the cost in development weeks for each story. If the story requires more than three development weeks, the story will be broken down into simpler stories and assigned with priority and cost. The user and the XP team decides together on the number of stories for the next release. When the project is released, the XP team calculates its project velocity, which is the number of stories implemented in that release. During the development, the user can add new stories, change the value of existing stories, split stories, or even remove stories. The XP team therefore should readjust its releases and plans accordingly. 2. Design XP prefers a simple design rather than a complex design. Hence, if the XP team encounters a difficult design, the team creates an operational prototype of that design called a spike solution. The idea behind this is to reduce risk during the real deployment. 11 The design activity happens before and after coding starts. As a result, XP encourages refactoring so that design is constantly done. 3. Coding Before the coding activity starts, the team must develop unit tests based on the stories. These unit tests will be used when the coding activity is complete so that it acts as a feedback to the developers. The core idea in this activity is pair programming where two people work together on one computer to code. This promotes faster problem-solving and real-time quality check. After these programmers finish their work, the codes are then merged. 4. Testing The testing activity focuses on two tests. First, it focuses on the unit tests developed in the coding activity. These unit tests may be merged into a “universal testing suite” and it can occur daily. This serves as an indication of progress and can help programmers by detecting warnings and errors early. Second, it focuses on acceptance tests, which are developed from user stories. This test focuses more on the overall system features and functionality. XP defines four core values which serve as its foundation. Each of these values is outlined below. 1. Communication In a software development, teams that can communicate effectively are able to make decisions and solve problems quickly. It can be in the form of writing, speaking, gestures, and body posture and it can be via email, telephone, communication. 2. Simplicity documentation, and face-to-face 12 XP encourages teams to do their work as simple as possible. It can be codes, documentations, and processes. Hence, teams are focused on fulfilling user's requirements rather than developing functionality that the user does not want. Simplicity results in reduction of codes, documentations, and processes which gives the teams more time to develop more functionality into the system. 3. Feedback Feedback helps the teams to evaluate their work. In XP, feedback needs to be done frequently. In addition, feedback ensures that the teams deliver high quality and stable result. 4. Courage XP teams have to have the courage to try something new and embrace change. Furthermore, courage may also expose the programmers' weakness when they are pair programming. Furthermore, XP has fundamental principles that are based on the four values and these principles are more concrete and practical than the values. Each of these principles is outlines below. 1. Allow Rapid Feedback This principle means that the feedback is returned to the XP team as quickly as possible. Acceptance tests provide the business with rapid feedback within days or weeks and unit tests provide the developers with rapid feedback within seconds or minutes. 2. Assume Simplicity This principle encourages the developers to solve every problem with simplicity. Hence, developers only add more complexity when needed in the future. 3. Make Incremental Changes 13 This principle means that every new releases has small change compared to the older release. This helps developers identify problems and boost confidence. If the change is large and there is a problem, developers will have to search through a large area of code. 4. Embrace Change Developers need to prepare for changes in the requirements, not fear them. For example, if in one of the meetings the user changes the requirements, the developers need to embrace this changes and work on the new requirements. 5. Deliver High-Quality Work The developers always have to insist on delivering only high-quality work. This ensures that the work is stable and bug-free. 2.1.2 Web-based Applications Web-based applications, otherwise known as WebApps, provide stand-alone function to end users. In addition, WebApps integrate with corporate databases and business applications (Pressman & Maxim, 2015, p. 9). Webapps were born because of the increasing popularity of HTML, which eventually enabled programmers to merge computing capability with informational content. The characteristics of Webapps are that it is deployed in a server and uses web browser as a client to access it. Some example of Webapps are Google Docs, Google Voice, Mint, and Hulu. The advantages of Webapps are (Bartz, 2015, p. 538): - Web browser based and platform independent - Very limited or no client-side updates - Centralized web-side updates - Enables users to work from any location - Requires no client-side installation - The data is centralized 14 2.1.3 Human Computer Interaction Human Computer Interaction is a field of study that deals with the design, implementation, and evaluation of user interface between people and computers. There are two guidelines that is followed in this thesis: the 8 golden rules of interface design and the 5 measurable human factor. 2.1.3.1 Eight Golden Rules of Interface Design In order to design a typical user interface, according to the principle in designing user interface which is known as the Eight Golden Rules (Schneiderman & Plaisant, 2010, pp. 88-89), consists of: 1. Strive for consistency It is very important for interface designer to manage the consistency of the interface design in order to prevent user from confusion. Identical design should be used in application menus and screens. 2. Cater to universal usability The interface design should be well-suited to any kind of users. Some application may only be used by expert users, yet at least end-users should know how to interact with the application. Adding explanations for users can enrich the interface design and improve application quality. 3. Offer informative feedback For every user action within the application, there should be some system information and feedback to avoid user’s confusion. 4. Design dialogs to yield closure The concatenation of actions should be grouped together in order to help user recognize to know the 15 beginning, middle, and end of those actions. It is necessary to give an informative feedback at the end of the actions. 5. Prevent errors The interface of an application should display its design as understandable as possible for user to prevent user from making mistakes. If user suddenly makes an error, the interface should provide simple and directive information for recovery. 6. Permit easy reversal of actions Actions should be reversed in order to encourage user to explore unfamiliar options. So users can freely explore the uncommon actions since they have known it could be undone. 7. Support internal locus of control Provide the sense that users are in charge of the interface and the interface responds to their actions. 8. Reduce short-term memory load Prevent the interface where user needs to remember the position or information from one place to another place. 2.1.3.2 Five Measurable Human Factor According to Shneiderman and Plaisant (2010, p. 32), there are five usability measures: 1. Time to learn Time to learn is the amount of time that user needs to learn the used of an action of a set of tasks. 2. Speed of performance Speed of performance is specified by the amount of time the tasks is done by user. 3. Rate of errors by users Rate of errors is specified by the amount of errors that users did while doing a task. 4. Retention over time 16 It is measured by the user’s ability to maintain their knowledge about a certain task on an amount of time. 5. Subjective satisfaction Subjective satisfaction is measured by user’s satisfaction about the various aspects of the interface. It can be gathered by doing some interviews or written surveys. 2.1.4 Data Data are “raw facts about people, places, events, and things that are of importance in an organization” (Whitten & Bentley, 2007, p. 21). The data that is captured is meaningless until it gets combined, filtered, organized, and analyzed to produce valuable information. 2.1.5 Database Connolly and Begg (2014, p. 63) refer to the database as “a shared collection of logically related data and its description, designed to meet the information needs of an organization”. The database is a single place that can be used concurrently by multiple users or departments. Hence, in an organization, it can be used to share corporate resources across all departments. 2.1.5.1 Database Components 2.1.5.1.1 Data Definition Language Connolly and Begg (2014, p. 90) explained that Data Definition Language (DDL) is a language used to describe and name the entities, attributes, and relationships, together with any integrity constraints. Some examples of DDL are: 1. CREATE: to create new object to the database, 2. ALTER: to change the structure of objects from the database, 3. DROP: to delete objects from the database. 17 The data stored in the database may need to satisfy certain integrity constraints. Silberschatz, Korth, and Sudarshan (2011, pp. 11-12) defines four types of integrity constraints: 1. Domain constraints: a domain contains all sets of values that are permitted in an attribute. This is the most basic form of integrity constraints and they are tested easily by the system whenever a new data item is inserted. 2. Referential integrity: it means that a value that appears in an attribute of a table also appears as a value in another attribute of another table. An example of referential integrity is a foreign key. When a referential integrity constraint is violated, the normal procedure is to reject the action that caused the violation. 3. Assertions: it means that any condition that the database must always satisfy. Domain constraints and referential integrity constraints are special forms of assertions. Other constraints that cannot be expressed by these two constraints can be created using assertions. For example, “every school department must have at least five courses offered every semester” must be expressed as an assertion. When an assertion is created, the system tests it for validity. If the assertion is valid, then any future modification to the database is allowed only if it does not cause that assertion to be violated. 4. Authorization: the users who access the 18 database may have different access levels. These differentiations are expressed in terms of authorization. 2.1.5.1.2 Data Manipulation Language Connolly and Begg (2014, pp. 90-91) defined Data Manipulation Language (DML) as a language that is used to manipulate data in the database. Some examples of DML are: 1. INSERT INTO: to insert a data into the database, 2. SELECT: to retrieve data from the database, 3. UPDATE: to modify data in the database, 4. DELETE FROM: to delete data from the database. There are two types of DML: 1. Procedural DML: a language that enables the user to tell the system what data is needed and how to retrieve such data. 2. Nonprocedural DML (also known as declarative DML): a language that enables the user to tell the system what data is needed without telling it how it is retrieved. 2.1.5.1.3 Stored Procedure Stored procedure is a set of instructions that can take parameters, be invoked, and perform a particular task (Connolly and Begg, 2014, p. 280). They are used to encapsulate a group of statements. These parameters have its own name and data type and it can be specified as IN parameter, parameter. OUT parameter, or IN OUT 19 2.1.5.2 DBMS According to Connolly and Begg (2014, p. 64), DBMS is “a software system that enables users to define, create, maintain, and control access to the database”. DBMS provides the following activities: 1. It allows users to define the database. 2. It allows users to insert, update, delete, and retrieve data from the database. 3. It provides controlled access to the database. For example, it may provide: a. A security system: to prevent unauthorized users accessing the database, b. An integrity system: to maintain the consistency of stored data, c. A concurrency control system: allowing shared access of the database, d. A recovery control system: a system used to restore the database to an earlier, more stable state in the event of a hardware or software failure, e. A user-accessible catalog: containing descriptions of the data in the database. The DBMS environment consist of five major components: hardware, software, data, procedures, and people, as illustrated in Figure 2.2. Figure 0.2 The DBMS Environment (Connolly & Begg, 2014, p. 66) 1. Hardware: The DBMS and its application require hardware to run. The hardware ranges from a personal computer to a mainframe. The hardware requirements 20 depend on the needs of the organization and what DBMS is used. Some DBMS only run on a particular hardware or operating system, while others run on many hardware and operating systems. 2. Software: The software component covers the DBMS software itself and other application programs, along with the operating system, including network software if DMBS is being used over a network. These application programs are typically written in a third-generation programming language, such as C, C++, C#, Java, Visual Basic, COBOL, Fortran, Ada, or Pascal, or a fourthgeneration language such as SQL, embedded in a thirdgeneration language. 3. Data: Data is arguably the most important component of the DBMS environment. In Figure 2.2, data acts as a bridge between the machine components and the human components. The database contain both the operational data and the metadata. 4. Procedures: Procedures are the instructions and rules that control the design and use of the database. The users or staff who manage the database require documented procedures on how to use the system. 5. People: People are the final component involved in the system. There are four types of people that are involved in the DBMS environment: a. Data Administrator (DA) and Database Administrator (DBA) DA is responsible for the management of the data resource. The DA together with senior managers to make sure that the database development supports corporate objectives. DBA is responsible for the physical realization of the database. The DBA deals more in the technical aspect than DA. 21 b. Logical and Physical Database Designer Logical database designer is responsible for identifying the data, the relationships between the data, and the constraints of the data that will be stored in the database. Physical database designer is responsible for physically realizing the logical database design. c. Application Developer Application developer is responsible for implementing the application programs using all of the requirements needed by the end-users. d. Naive and Sophisticated End-User Naive users are users who do not understand DBMS and how to operate DBMS. They usually access database using application programs. Sophisticated users are users who are familiar the structure of the database and all the capabilities offered by the DBMS. 2.1.5.2.1 Advantages of DBMS There are several advantages of using DBMS (Connolly & Begg, 2014, pp. 75-78): 1. Storing data in a database eliminates data redundancy by integrating the files. Hence, multiple copies of the same data are not stored. As a result, the risk of inconsistencies are reduced. 2. It gives more information from the same amount of data. 3. The database belongs to the entire organization, so all of the data inside the database can be shared by all authorized users. 4. It improves data constraints to data. integrity by enforcing 22 5. It improves security by protecting the database from unauthorized users. 6. It allows the enforcement of necessary standards, which includes naming conventions, documentation standards, update procedures, and access rules. 7. It reduces cost since all departments work on one source of data. 8. It increases productivity by providing many standard functions that programmers would need to code in a file-based application. 9. It improves maintenance through data independence, a process that separates the data descriptions from the applications. Hence, applications become immune to changes in the data descriptions. This cannot be achieved in file-based systems as a change on data require many changes to the programs that are involved. 10. It provides database concurrency access, which file-based systems cannot do. 11. It provides data backup and recovery features to protect data from failures. 2.1.6 Intranet Intranet is a web site or group of sites belongs to an organization and accessible only by the members of the organization (Connolly & Begg. 2014, p. 1050). In other words, intranet is a closed network, only private members on a company can access the document sources inside the local host. Intranet has same function as internet includes exchanging email, publishing web pages, sharing multimedia files but only in a specific closed network. Intranet is useful for organizations since it is “... much less expensive and manageable than private 23 networks based on proprietary protocols.” (Connolly & Begg. 2014, p. 1050). 2.1.7 World Wide Web World Wide Web (WWW) or web is a system that links documents and/or information through hyperlinks and accessed via internet. The information is stored as web page. The web page may contain text, image, video, audio, and any other multimedia format. Web has several advantages such as distributed data, freedom and decentralization of publication, a “missing isn’t broken” open-world philosophy, lack of centralized control, evolvability, and scalability (Dutton & Jeffreys, 2010, p. 100). 2.1.8 URL URL (Uniform Resource Locator) is a set of characters according to a certain standard that is used to point a certain document (in web page format) in the internet. According to Connolly and Begg definition (2014, p. 1057) URL is “a string of alphanumeric characters that represents the location of address of a resource on the internet and how that resource should be accessed”. The URL syntax consists of three basic parts which are the connection protocol, the host name, and the path name where resource can be found. 2.1.9 URI URI stands for Uniform Resources Identifiers which definition is the generic set of all names/addresses that refer to internet sources (Connolly & Begg, 2014, p. 1057). URI enables interaction within World Wide Web using a specific protocols. URI can be categorized as URL (Uniform Resource Locator) and URN (Uniform Resource Name). 2.1.10 HTTP HTTP as the abbreviation of Hypertext Transfer Protocol is the protocol that is used to transfer web pages through the internet. HTTP 24 defines the client-server communication manner. HTTP transaction consists of several stages (Connolly & Begg. 2014, p. 1053): 1. Connection: stage where the client assign a connection with the web server 2. Request: stage where the client sends request message to web server 3. Response: stage where the web server sends response answered client's request 4. Close: stage where connection between client and server is terminated. 2.1.11 HTML Robbins (2012, p. 12) explained that “HTML (HyperText Markup Language) is the language used to create web page documents”. HTML is a markup language, not a programming language. This means that it can be used to identify the various components that make up the document. Some examples of these components are headings, paragraphs, or lists. Figure 0.3 Example of an HTML File (Duckett, 2011, p.20) Figure 2.3 shows an example of HTML document. The HTML codes are written in blue and consist of characters placed inside angle brackets called HTML elements. Each element generally consists of two tags: an opening tag and a closing tag. The closing tag has an 25 extra forward slash before the character. For instance, the opening tag <h2> has a closing tag of </h2>, and the opening tag <body> has a closing tag of </body>. Figure 0.4 Example of an HTML Element with Attribute (Duckett, 2011, p.25) Some of HTML elements may have additional attributes associated with them. According to Duckett (2011, p. 25), “attributes provide additional information about the contents of an element”. They are written inside the opening tag and consist of a name and a value, separated by an equal sign. Figure 2.4 shows an element <p> with attribute lang and this attribute has a value en-us. 2.1.12 Web Browser A web browser is a software program that enables users to access and view websites. Some of the most popular web browser available for personal computers are Internet Explorer, Firefox, Opera, Safari, and Google Chrome (Shelly & Vermaat, 2011, p. 81). 2.1.13 Web Server According to Whitten and Bentley (2007, p. 487), web server is “a server that hosts internet or intranet web sites”. A web server is used to store a website. Web server can store more than one website. By uploading website to web server, website can be accessed through any computer connects to the network. 26 2.1.14 Entity-Relationship Diagram Entity-relationship diagram (ERD) is “a data model utilizing several notations to depict data in terms of the entities and relationships described by that data” (Whitten & Bentley, 2007, p. 271). ERD is one of the tools used for data modeling. ERD consists of three basic components: entity sets, attributes, and relationship sets. 1. Entity Entity is a class about which its data needs to be maintained. It represents a group of objects with the same characteristics (Connolly & Begg, 2014, p. 406). Some example of entities can be found on the following: a. Persons: employee, student, supplier; b. Places: building, branch office, campus; c. Objects: product, book, machine; d. Events: class, flight, order; e. Concepts: stock, fund, bond. Every entity has a data occurrence. Every single occurrence of an entity is called entity instance. For example, an entity called student may have many instances: Andy, Sue, Michael, and Tom. In the diagram, entities are represented by a rectangle. The name of the entity, which is a singular noun, is written on the upper part inside the rectangle. 2. Attributes Attributes are any properties or characteristics that describe the entity. Some example of attributes can be found on the following: a. Student: name, address, gender, major, GPA; b. Vehicle: type, brand, color, weight, horsepower; c. Book: name, year, publisher, edition, ISBN; d. Room: number, capacity, floor; e. Class: course code, credit, lecturer, time. Attribute can be characterized by the following types (Silberschatz, Korth, & Sudarshan, 2011, pp. 267-268): a. Simple and composite attributes 27 Attributes that has not been and cannot be divided into subparts is called simple attributes. On the other hand, attributes that can be broken down into other attributes are called composite attributes. For example, a student’s name may have a composite attribute that consists of first name, middle name, and last name. b. Single-valued and multivalued attributes Attributes that only have one value for every entity instance is called single-valued entity. For example, the student ID attribute refers to a single student entity. Conversely, attributes that have more than one value for each of its entity are called multi-valued attributes. For instance, an instructor entity may have more than one phone numbers. c. Derived attributes Derived attributes are attributes that its value can be computed from the value of other attributes. For instance, the value of attribute age of a student entity can be calculated from the difference between the value of attribute date of birth and current date. An attribute or a group of attributes that is unique and helps to distinguish between entity instances is called a key or an identifier. An entity may have more than one key that can differentiate its entity instance. Each of these keys are called candidate key. One of the candidate keys that is commonly used will eventually be chosen as a primary key. A primary key cannot contain a null value. The remaining candidate key that is not chosen as a primary key are called alternate key or secondary key. An attribute that is not a primary key in an entity but appears as a primary key in another entity is called a foreign key. Foreign keys must satisfy referential integrity constraint, which states that the value of an attribute in an entity relies on the value of the same attribute in another entity. 28 In the diagram, each of the attributes are written after the entity name. Figure 2.5 is an example of a student entity along with its attributes. The primary key is written directly after the entity name. All of the foreign keys, if exist, are then written after the primary key. The rest of the attributes are written below the foreign key. Every primary key is marked with PK while every foreign key is marked with FK. Figure 0.5 Example of a Student entity (Valacich, George, & Hoffer, 2012, p. 200) 3. Relationship A relationship “is a natural business association that exists between one or more entities” (Whitten & Bentley, 2007, p. 275). All relationships are bidirectional, which means that they can be interpreted in both directions. Each relationship must show the number of occurrences between the entities. This is called cardinality, which displays the minimum and maximum occurrences of an entity that are related to a single occurrence of other entity. The notations for cardinality can be found on Figure 2.6. In the diagram, relationships are represented by a line from one attribute of an entity to another attribute of other entity. The attribute can only be either primary key or foreign key. If on one end is a primary key, the other end must be a foreign key and vice versa. 29 Figure 0.6 Cardinality Notations (Whitten & Bentley, 2007, p.276) 2.1.15 Data Flow Diagram Data flow diagram (DFD) is a diagram “that depicts the flow of data through a system and the work or processing performed by that system” (Whitten & Bentley, 2007, p. 317). DFD is considered as process modeling. There are four symbols used in DFD. 1. External Agent An external agent is a person, an organization unit, another system, or another organization that interacts with the system and lies outside the system (Whitten & Bentley, 2007, p. 319). It is the origin or destination of the data (Valacich, George, & Hoffer, 2012, p. 156). External agent can also be called external entity, source (as it is the origin of the data), or sink (as it is the destination of the data). All external agents within DFD are considered outside the system. Therefore, the following things are not considered: 30 a. Interactions between sources and sinks, b. What sources or sinks do with the data, c. How to redesign the sources or sinks because they are fixed, d. How to create a direct access to stored data for sources and sinks because they are prohibited to do such things and have to involve processes within the system. In the diagram, external agents are represented with squares. The DeMarco/Yourdon equivalent for external agents are rectangles. They are illustrated in Figure 2.7. External External Agent Agent Figure 0.7 External Agent Symbols 2. Data Store Data store is data at rest which is captured for later use. It is also called file and database. Data store should describe things that is needed in the system. Some example can be found on the following: a. Persons: customer, department, instructor; b. Places: building, room, campus; c. Objects: book, product, vehicle; d. Events: class, flight, sale; e. Concepts: account, course, fund, stock. If data modeling such as entity-relationship diagram (ERD) is complete before process modeling, the data identification follows this rule: “There should be one data store for each data entity on an entity relationship diagram” (Whitten & Bentley, 2007, p. 320). 31 In the diagram, data stores are represented by the open-end box. The DeMarco/Yourdon equivalent for data stores are double lines enclosing the data store name. They are illustrated in Figure 2.8. Data Store Data Store Figure 0.8 Data Store Symbols 3. Process Process is the work performed on incoming data. A process is the same as a system. In the diagram, processes are represented by the rounded rectangle illustrated in Figure 2.9. The DeMarco/Yourdon equivalent for processes are circles. Process Process Name Name Figure 0.9 Process Symbols A system that is complex is usually too difficult express as a single process. As a result, it becomes too difficult to understand. Hence, the system can be broken down into smaller subsystems. This technique is called decomposition. An example of this technique is illustrated in Figure 2.10. 32 Figure 0.10 System Consists of Subsystems and Processes (Whitten & Bentley, 2007, p.322) 4. Data Flow Data flow “represents an input of data to a process or the output of data from a process” (Whitten & Bentley, 2007, p. 325). The data that travels in a single data flow can be more than one and they should be descriptive nouns and noun phrases that are singular. Furthermore, data flow should have a name. A data flow from a data store to a process means that the data is retrieved to be viewed. On the other hand, a data flow from a process to a data store means that the data is to be created, updated, or deleted in the data store. In addition, all data flows should start and/or end at a process. In the diagram, data flows are drawn in solid line with arrow. An illustration of data flow is shown in Figure 2.11. Data Flow Name Figure 0.11 Data Flow Symbol DFD may have a different complexity depending on the system. Hence, DFD can be broken down into different levels to 33 properly describe the flow within the system. The DFD that shows the entire system as one process is called context diagram. In other words, a context diagram shows the system boundaries, the external agents, and the data travelling between them (Valacich, George, & Hoffer, 2012, p. 158). In context diagram, this one process is usually numbered “0”. An example of a context diagram is illustrated in Figure 2.12. Figure 0.12 Example of DFD Context Diagram (Valacich, George, & Hoffer, 2012, p.158) After context diagram, the DFD that are used to describe more of the process, data flows and data stores inside the system is level-0 diagram. In this diagram, each process’s number ends with .0. An example of a level-0 diagram is illustrated in Figure 2.13. 34 Figure 0.13 Example of DFD Level-0 Diagram (Valacich, George, & Hoffer, 2012, p.159) When drawing DFD, there are some rules that must be complied. These rules are shown on Figure 2.14. Each of these rules are explained on the table below. Table 0.1 Rules in drawing DFD Rule Explanation A A process cannot have only outgoing data flows. If the object only have outgoing data flows, then this object is an external agent (or source). B A process cannot have only incoming data flows. If the object only have incoming data flows, then this object is an external agent (or sink). D Data flow cannot move directly between one data store to another. Instead, this movement of data must involve a 35 process. E Data cannot move directly from an external agent to a data store. Instead, this movement of data must involve a process. F Data cannot move directly from a data source to an external agent. Instead, this movement of data must involve a process. H Data cannot move directly between two external agents. Instead, this movement of data must involve a process. J Data flow cannot have bidirectional arrow. The data must be separated into two data flows: one from process to data store and another in an opposite direction. K Data that flows from one process to many processes must have the same data. L Data flow that joins another data flow must have the same data. M Data flow cannot move from one process and ends up in that same process. The data flow must move to a different process and produce another data flow. This new data flow can then move to the first process. 36 Figure 0.14 Incorrect and Correct Ways to Draw DFD (Valacich, George, & Hoffer, 2012, p.161) 37 2.1.16 Black-Box Testing Black-box testing enables programmers and developers to derive sets of input conditions that fully utilizes all functional requirements for a program (Pressman & Maxim, 2015, p. 509). It attempts to find errors in the following categories: 1. Incorrect or missing functions, 2. Interface errors, 3. Errors in data structures or external database access, 4. Behavior or performance errors, 5. Initialization and termination errors. 38 2.2 Specific/Thematic Theories 2.2.1 PHP PHP stands for PHP Hypertext Preprocessor. According to Welling and Thomson (2008, p. 2), it is a server-side scripting language designed for web development. PHP codes can be merged inside an HTML page, and these codes are interpreted by PHP-supported web server. PHP can also be used to generate HTML codes, enabling developers to create a dynamic web page. According to Powers (2010, p. 3), the process when a PHPembedded HTML page is accessed is shown on Figure 2.15. First, the computer’s browser sends a request to the web server via the internet. Second, The PHP-enabled web server receives and passes the request to the PHP engine embedded in the server. Next, the PHP engine interprets the code and, if necessary, connects to the database to perform queries. Finally, the server sends the finished page to the browser. Figure 0.15 Web Server Builds Response to a Request (Powers, 2010, p.3) 2.2.1.1 Advantages of PHP According to Welling and Thomson (2008, pp. 4-5), some of the advantages of using PHP are: 1. Performance: PHP is very fast. 2. Scalability: PHP uses a “shared-nothing” architecture, which means that implementation of horizontal scaling can be implemented effectively and cheaply. 3. Interfaces within many different database systems: PHP can connect to many popular database systems. 39 4. Low cost: PHP is free. 5. Ease of learning and use: PHP is a high level programming language as it is primarily based on C and Perl. 6. Portability: PHP is available for many operating systems. 2.2.2 CSS CSS stands for Cascading Style Sheet and, according to Robbins (2012, p. 207), is the W3C (World Wide Web Consortium) standard for defining the presentation layer of HTML or any XML documents. The presentation layer controls how the page is displayed on the browser. CSS has its own language and therefore, has its own syntax. Robbins (2012, p. 12) also mentions that CSS provides methods for controlling how the documents look on screens other than traditional desktop computers, such as smartphones or tablets. Furthermore, it also has rules for specifying the non-visual presentation of documents. 2.2.2.1 Advantages of CSS According to Olsson and O’Brien (2008, p. 3), there are several advantages of using CSS for the presentation layer: 1. All of the pages’ styles are kept in a limited number of style sheets. 2. The style sheet can be cached by browsers after the first request and can be reused by other pages, hence bandwidth can be saved. 3. The separation of content and presentation layer makes content reuse easier. 4. Separate styling rules can be used for different output media. 2.2.3 Bootstrap Bootstrap is an open-source front-end framework designed to help programmers and developers build the user interface of websites. 40 Bootstrap was developed by Mark Otto and Jacob Thornton (Spurlock, 2013, p. 1). It consists of HTML, CSS, and Javascript code templates for typography, form, buttons, navigation, optional Javascript extensions, and other interface components. Additionally, Bootstrap also supports both HTML5 and CSS3 (Bedi, 2014). The reasons why Bootstrap framework is preferred are outlined below: 1. Easy to get started; 2. Great grid system; 3. Base styling for most HTML elements such as typography, tables, forms, buttons, images, and icons; 4. Extensive list of components; 5. Bundled Javascript plugins. 2.2.4 Bootstrap Table Bootstrap table is an extension of the established Bootstrap framework. It was developed by Wen Zhi Xin and it provides a template for table with many features such as radio, checkbox, sort, and pagination that the basic Bootstrap framework does not have. 2.2.5 AJAX AJAX stands for Asynchronous Javascript and XML. It is not a programming language; it is a data-transfer mechanism. It combines client-side programming via Javascript with XML-formatted data and server-side programming. In addition, XHTML and CSS may also be used for the presentation layer of AJAX-enabled elements (Welling & Thomson, 2008, p. 856). In a traditional webpage, when the data is retrieved from the server and needs to be shown on the page, the whole page has to be reloaded. This causes the user experience to become slower. AJAX eliminates this problem as the client-side programming invokes the server-side programming in a specific part of the page. As a result, only a portion of the page is reloaded (Robbins, 2012, p. 497). 41 2.2.6 jQuery According to Chaffer and Swedberg (2013, pp. 8-10), jQuery is a free and open source library that provides a general-purpose abstraction layer for common web scripting and as a result, jQuery is useful when scripting is needed. jQuery is built using Javascript and it is extensible, meaning that jQuery can be developed to add new abilities not previously available. The capabilities that jQuery can do are: 1. Accessing elements in a document Before the inception of jQuery, developers need to writes many lines of code to locate part of the HTML's document. With jQuery, developers can retrieve the exact piece of the document that needs to be inspected or manipulated easily. 2. Modifying the appearance of a web page jQuery helps developers by establishing the same standards support across all browsers, a feature that CSS cannot do. Moreover, jQuery can alter the style properties to a part of the document even after the page has been rendered. 3. Altering the content of a document jQuery can modify text, insert or swap images, reorder lists, rewrite and extend HTML structure with a few lines of code. 4. Responding a user's interaction jQuery can respond to a wide variety of events to avoid cluttering the HTML document with event handlers. Its eventhandling API also removes browser inconsistencies that burden developers. 5. Animating changes being made to a document jQuery provides interactive behaviors in the form of visual feedback by providing many effects such as fades and wipes. There is also a toolkit for creating a new effect. 6. Retrieving information from a server without refreshing a page This mechanism uses Asynchronous JavaScript and XML (AJAX). The jQuery removes browser complexity in the client-side, enabling developers to focus on the server-side. 42 7. Simplifying common JavaScript tasks jQuery provides enhancements to basic Javascript operations such as iteration and array manipulation. All of the capabilities above can be achieved because jQuery utilizes the following strategies: 1. Leverage knowledge of CSS jQuery employs the same mechanism for locating elements like those on CSS. Hence, if programmers want to add behaviors to their pages, they need to understand CSS. 2. Support extensions To keep the library size small and avoid “feature creep”, new plugins are developed as modules. In other words, new plugins are not merged with the basic jQuery library. Hence, developers can add additional plugins if needed or remove unused plugins. 3. Abstract away browser quirks The numerous web browsers that are available may have its own interpretations from the defined standards. This makes it even harder for programmers to develop a browserindependent code. jQuery adds an abstraction layer to regulate common tasks and simplify the codes. 4. Always work with sets All methods in jQuery are designed to work on sets of elements rather than individual elements. Hence, if we need to find all elements within a class, we do not have to loop through every elements within that class. This technique is called implicit iteration. 5. Allow multiple actions in one line jQuery uses a programming pattern called chaining, meaning that an element can undergo a multiple methods in a single statement. This reduces repetition and overuse of temporary variables. 43 2.2.7 jqPlot jqPlot is a jQuery plugin to generate pure client-side javascript charts in web pages (Leonello, 2011). It was conceived, developed, and mantained by Chris Leonello since 2009. This plugin can be used to render data into various charts: bar chart, line chart, bubble plot, pie and donut chart etc. This plugin also supports JSON data format and AJAX to load the data. 2.2.8 PHPExcel PHPExcel is a free and open source PHP library that contains a set of classes used to write or read many different spreadsheet file formats (Baker, 2014). Some of the formats supported are Excel .xls, Excel 2007 .xlsx, CSV, and HTML. This library is built using Microsoft’s OpenXML standard. 2.2.9 TCPDF TCPDF is a free and open source PHP library that contains a set of classes for generating PDF documents (Asuni, 2005). It was released in 2005 by Nicola Asuni. TCPDF provides complete support for UTF-8 Unicode, right-to-left languages, 1D and 2D barcode generation, and 256-bit document encryption. 2.2.10 JSON JavaScript Object Notation or JSON is a text-based, lightweight, and human-readable data interchange format used for data exchange between clients and servers. It was developed by Douglas Crockford. Although derived from Javascript and similar to Javascript objects, JSON is not dependent on Javascript. Furthermore, JSON is languageindependent, which means that JSON can be used with all popular programming languages such as C#, PHP, Java, C++, Python, and Ruby (Sriparasa, 2013, p. 17). Figure 2.16 below is an example of data in JSON format. 44 Figure 0.16 Example of Data in JSON Format 2.2.11 Javascript Javascript is lightweight yet powerful scripting language that enables interactivity and custom behaviors to objects on websites. It is a client-side language, meaning that it is executed on the user’s browser rather than on the server. Hence, Javascript relies heavily on the user’s browser settings as the user can choose to enable or disable it (Robbins, 2012, p. 459). Javascript is a dynamic programming language, meaning that it does not need to be passed through a compiler to translate the code to another that the browser understands. Instead, the browser reads and interprets the code directly. Javascript is also loosely typed. This is particularly useful when defining a variable. For example, if a variable is set to a value of 5, that variable does not have to be specified programmatically since Javascript automatically recognizes it. Javascript allows programmers to script the presentation layer of documents in web browsers and define behaviors to those documents with event handlers. An event handler is a Javascript function that is embedded inside the HTML tags and invoked by the browser when certain events occur (Flanagan, 2011, p. 10). According to (Gotmare & Jeure, 2008, p. (3:56)), there are two types of event handlers: 45 1. Interactive event handler: depends on the user interactivity with the document. Some examples of this type are mouse click (specified as onclick) and key press (specified as onkeypress, onkeyup, and onkeydown). 2. Non-interactive event handler: does not need the user’s interactivity. For example, the onload event handler executes Javascript code when a form is loaded. Javascript can be embedded anywhere in a document using script element in one of two ways: 1. Embedded script: by inserting the code between the script elements as shown in Figure 2.17. Figure 0.17 Example of Embedded JavaScript 2. External scripts: by using the src attribute of the script element to locate the script file (followed by a .js suffix) by its URL containing the code as shown in Figure 2.18. Figure 0.18 Example of External JavaScript 2.2.12 MySQL Welling and Thomson (2008, p. 3) explained that MySQL “is a very fast, robust, relational database management system (RDBMS)”. MySQL is a multiuser, multithreaded server, meaning that its server can be accessed by multiple users concurrently. MySQL is the world's most popular open source database and has won the Linux Journal Readers' Choice Award many times. 46 2.2.12.1 Advantages of MySQL According to DuBois (2009, p. 3), there are several advantages of using MySQL: 1. Speed: MySQL is fast. 2. Ease of use: MySQL is a high-performance but relatively simple database system and is much less complex to set up and administer than larger systems. 3. Query language support: MySQL uses SQL (Structured Query Language), which is the standard language for all modern database systems. 4. Capability: MySQL server is multithreaded, which means that multiple users can connect and access multiple databases simultaneously. In addition, MySQL provides many interfaces depending on users' needs: command-line, web browsers, and GUI and these interfaces are available for many programming languages. 5. Portability: MySQL runs on many popular operating systems: Unix, Linux, Windows and NetWare. Moreover, MySQL can be used on high-end servers or even small personal computers. 6. Small size: Compared to other database systems, MySQL has a relatively smaller distribution size. 7. Availability and cost: MySQL is an open source database systems available under multiple licensing terms. Under the terms of GNU General Public License (GPL), MySQL is free for most in-house uses. MySQL is also available with commercial licenses for organizations. That do not want to be bound by the conditions of the GPL. 47 2.2.13 XAMPP According to its official web site, i.e. www.apachefriends.org, XAMPP is an open-source web server package that can be installed on Windows, Linux, and OS X. It is an acronym that stands for X meaning cross-platform, A meaning Apache HTTP server, M meaning MySQL, P meaning PHP, and P meaning Perl. XAMPP acts as a server on local computer, allowing developers and programmers to check their work without connection to the internet. Hence, they can run their work locally before deploying these pages to the real server. XAMPP is a freeware and is licensed under GNU GPL. 2.2.14 TortoiseSVN TortoiseSVN is “an open-source Windows shell extension that provides Subversion support” (Berlin & Rooney, 2006, p. 166). In other words, TortoiseSVN allows programmers to work with Subversion from Windows Explorer. In addition, it provides user interface for diffing, merging, and browsing via the Explorer. Subversion is a version control system that manages files and directories as well as their changes made over time. This enables programmers to recover older versions of a particular files or directories, or analyze the history of how the files or directories changed. Furthermore, Subversion works across networks, allowing people from different computers to work across the same files or directories (Collins-Sussman, Fitzpatrick, & Pilato, 2008, pp. xi-xiv). Figure 0.19 The Repository and Working Copies (Mason, 2006, 48 p.14) Figure 2.19 shows the architecture of Subversion (Mason, Pragmatic Version Control Using Subversion, 2005, p. 14). A repository is the central location that contains the master copy of all versions of the files inside a project. When Fred wants to work on this project, he can start a mechanism called checking out. This mechanism copies all of the files inside the project to his computer’s local storage. The copied project in Fred’s computer is called working copy. Wilma can also work on the same project by checking out to obtain a working copy. When Wilma finished making changes to her working copy and wants to save it to the repository, she can commit. Her changes only affects the repository; it does not change Fred’s working copy. Hence, Fred can update his working copy to receive the latest files from the repository. 2.2.15 PHPMailer PHPMailer is an open-source PHP class used to create and send email. It is integrated by many popular open source projects such as Wordpress, Drupal, and Yii.