Establishing the suitability of dynamic web applications development platforms for teaching remote database processing Johnson Dehinbo Dehinbooj@tut.ac.za Department of Web & Multimedia Applications, Tshwane University of Technology, Pretoria, 0001, South Africa Abstract The availability of many platforms for developing dynamic Web applications suggests the existence of the problem of choosing the most suitable platform for teaching the concepts of web applications development to undergraduate students in tertiary institutions. Students will not perform at their best capacity level if the platform chosen by the institution is not very suitable for teaching the relevant concepts. As part of the framework to determine the most suitable platform for teaching web applications development in tertiary institutions, this study establishes a set of criteria for evaluating the suitability for teaching remote database processing concepts in Web applications. These criteria were tested by evaluating four platforms namely Java Servlets, Java Server Pages, Active Server Pages and PHP using various research methods including descriptive inquiry, document analysis, observations and programming tests. While PHP was found to be most suitable on applying the criteria, the significance of the study lies in the establishment of a comprehensive but specific set of criteria that can be used as a scientific basis for selection. Keywords: Web applications development platforms, programming languages, database processing concepts 1. BACKGROUND OF THE STUDY As part of a comprehensive framework, this study is aimed at determining a platform that will be most suitable for teaching remote database processing to undergraduate students in Web applications development in tertiary institutions. The purpose of the study is not to persuade readers that one platform is better than the other, but to enable a more informed choice of platforms. The context of the research problem Many platforms for teaching dynamic web applications development in tertiary institutions imply a problem of how to make the best choice. The choice made may have an effect on the comprehension of relevant concepts by students. As noted by Lim (2002), the advent of the World Wide Web has changed the way computer software is built and should cause academics to change their way of teaching computing. A good way of teaching Web application development is to teach using a platform that is suitable for appropriate concepts. According to Sebesta (1996:2-3), it is widely believed that the depth at which we can think is influenced by the expressive power of the language in which we can communicate our thoughts. Sebesta further indicates that programmers in the process of developing software are similarly constrained. The language in which they develop software places limits on the kinds of control structures, data structures, and abstractions they can use; thus the form of algorithms they can construct are also limited. Therefore, for undergraduates learning various aspects of programming, the suitability for teaching relevant concepts that forms the backbone of programming needs to be taken into consideration while choosing the platform to be used. As good dynamic websites are database-backed, the dynamic Web platform chosen by the institution need to be well suited for implementing and teaching remote database processing concepts that underlines the dynamic nature of Web applications. The research question then is: How do we determine the dynamic Web platform that will be suitable for implementing and teaching remote database processing to undergraduate students of Web application development? The objectives of the study The objectives of the study are therefore given below: 1.) Identify the database processing concepts that should be taught to undergraduate students of Web applications development in tertiary institutions. 2.) Establish the criteria to determine suitability for teaching the concepts. 3.) Apply the criteria by using them to evaluate the suitability of four specified platforms. The importance of the study The main benefit of the study will be the educative choice of suitable dynamic Web platform to enhance the teaching of remote database processing. This would enable comprehension of relevant concepts. It will therefore be of benefit to institutions teaching web application development using specific platforms. 2. LITERATURE REVIEW Evaluating programming languages, development platforms and tools is very important for understanding the effects on novice programmers, but is difficult to carry out (Wiedenbeck et al, 1999). This could be the reasons why there have been various approaches towards the comparisons of programming languages and platforms. Apte et al. (2003) note that a study of existing literature showed varying conclusions about the superiority of one dynamic Web platform over another. Prechelt (2000) indicates that when it comes to the advantages and disadvantages of various programming languages, programmers and computer scientists usually hold strong opinions. These are illustrated in the presentations of various studies given below. Previous studies comparing platforms Various studies compared programming languages and dynamic Web platforms. In the survey of middleware platforms by Cooper (2001), it was concluded that ColdFusion is fast to learn and fast to use, Common Gateway Interface (CGI) is also fast to learn ant that Servlets are hard to learn and use, even by someone who already knows Java. Bishop and Hurter (1999) examined some competitors to Java, namely the Scripting languages Tcl/Tk, Perl and Python and found out that Python is suitable for "programming in the large", unlike Tcl and Perl. Programs in Python were also found to be typically much shorter than equivalent in C or Java. In an empirical comparison of seven programming languages, Prechelt (2000) observes that designing and writing programs in the scripting languages, namely Perl, Python, Rexx, or Tcl takes no more than half as much time as writing it in C, C++, or Java. Moreover, the resulting program is only half as long. Prechelt therefore concluded that the scripting languages offer reasonable alternatives to other full programming languages, and may offer significant advantages with respect to programmer productivity, at least for reasonably small programs. Kruse (2003) illustrates the differences in the strengths and weaknesses of Personal Home Page (PHP) and Java. Klopper (2003) compares Personal Home Page (PHP), Active Server Page (ASP) and Java Server Page (JSP) in terms of their advantages and architectures. However, most of these studies did not use any criterion as a basis for the comparisons. The comparisons in these studies seem to be based on intuition rather than scientific facts. Comparison needs to be based on a variety of factors supported by scientific facts and results. This is in line with Ashenfelter’s (1999:105) assertion that before analyzing tools, it is worth discussing how to evaluate them. Towards frameworks for performance comparisons Cooper (2001) estimated the response time for some platforms with ColdFussion having the best performance. Marshak and Levy (2003) also evaluated platforms only in terms of user-perceived latency. Renaud et al (2003) indicate various metrics can be used to measure performance of algorithms in distributed systems. These include response or waiting time, synch delay, number of messages exchanged, throughput, communication delay, and memory usage. Performance however, has somehow been overemphasized in various studies. This view is shared by Vinoski (2003), who explains that people check only those qualities that are easily measurable, such as performance. An interesting side effect is that it has unintentionally led many programming language users to presume that “high performance” is the same as “high quality”. Meanwhile, such presumptions could be entirely meaningless, depending on the nature of one’s application. So, Vinoski agrees that a suitable framework for comparison should involve other relevant factors as criteria in their comparisons. Studies using various criteria in their comparisons Cecchet et al (2003) evaluate three specific mechanisms namely PHP, Java Servlets, and Enterprise Java Beans (EJB) with respect to performance and ease of development. The study attributes PHP’s better performance to the fact that it executes as a module in the Web server, sharing the same process (address space), thereby minimizing communication overhead between the Web server and the scripts. This is unlike Java Servlets which run in a Java Virtual Machine (JVM) as a separate process from the Web server and so can even be placed on a separate machine (Cecchet et al, 2003). In terms of ease of development, Cecchet et al (2003) explain that PHP scripts are easy to write because they can be seen as an extension of the HTML language that embeds code directly into an HTML page. However, it mentions that of concern is the fact that the database interfaces of PHP are ad hoc and code maintenance for database is awkward because new code needs to be written for each new database to which the scripts need access. On the other hand, Java Servlets access database using JDBC, making them easily portable between databases. Hartman (2001) examined ASP, PHP and ASP.NET and mentioned some factors that complicate choosing a scripting environment. First is the issue of culture among developers which has a lot to do with the ideological camps to which they belong. If they love to tinker with source-code to develop efficient solutions, and if their cubicles are embellished with defaced portraits of Bill Gates, they would probably prefer to use PHP. For the convenience and efficiency of existing integrated technology solutions, they would probably prefer to use ASP. Interestingly, very few developers are equally willing to use both, or talk about "the other" technology without a trace of disdain. The second factor that complicates choosing a scripting environment is the website's future scalability and functional requirements. The choice between JSP, PHP and ASP/ ASP.NET might restrict which servers and platforms the site could run on or impact the feasibility of developing future features, such as database-linked connectivity with extranet partner sites (Hartman, 2001). So far, the need to evaluate platforms using various criteria has been highlighted. However, the most important criterion is the suitability for doing the job for which a tool is needed. This view is shared by the following studies. Studies emphasizing suitability for achieving the purpose of systems The choice of dynamic Web platform for teaching students needs to be backed with evidence from relevant literatures, information from practicing web developers and empirical experimental programming results. This leads to critical evaluation of the dynamic Web platforms, in line with the ideas put forward by Ashenfelter in the statement below. Web development tools need to be analyzed in terms of its purpose (what it is designed to do), technology (ease of use, robustness, scalability, security, performance, etc.), support (portability, cost, ISP support), and how well it works in the real world (Ashenfelter, 1999:105). Similarly, in the process of choosing a language or platform that is usable and suitable for teaching introductory programming, Holt et al. (1997) lists the following criteria: > It should be appropriate for introducing programming concepts used in the real world such as in business, science and government. > It should encourage systematic problem solving. Furthermore, Kolling and Rosenberg (1996) suggest that the concepts of the language should be presented in a way that directly reflects the theoretical model. This emphasizes teaching with no conceptual redundancy as achieving the same thing in a variety of ways can mean flexibility to the expert, but is usually confusion to the beginner. Moreover, Hadjerrouit (1998) evaluates the suitability of Java as a first programming language using the following criteria: > Programming concepts to be taught. These include problem solving skills, algorithmic thinking and structured programming. > Use in subsequent courses. Knowledge gained should be useful in later studies. > The language should support the desired programming paradigm. These studies emphasize the need for the suitability for doing the job for which a tool is needed, which in this case is the teaching of Web applications development. This however involves the suitability for teaching database processing concepts. Summary of the literature review Choosing a suitable tool should involve exhaustive evaluations of various options based on various relevant criteria that are backed by scientific facts and results. This study fills this gap in the body of knowledge by being unique in the following ways: This study suggests that the advantages and strengths should be examined and ranked in the light of certain desired qualities relevant to specific use. For example, the ease of learning increases productivity in institutions than flexibility which is good in industries. Most importantly, the study addresses the need for comparisons to be done with reference to specific use such as the suitability for the teaching of Web applications development. 3. RESEARCH DESIGN AND METHODOLOGY The research design will involve elements of descriptive and comparative studies. McMillan and Schumacher (2001:33) state that while a descriptive study describes a system with the aim of characterizing it as it is, by using numbers, comparative study investigates the differences, thereby taking descriptive study a step further. We therefore use a descriptive approach to characterize the platforms in order to compare them to determine the most suitable platform. Research methods adopted to obtain the results Evaluation of the platforms using a framework will involve the use of modeling. According to Bowling (2002:141), models are abstract representations of the essential characteristics of phenomena of interest, thereby making explicit, the relationships and or comparison between the characteristics. The form of modeling used in this study will consist of a set of criteria that will be established to measure the suitability for implementing and teaching the desired concepts. The measurement of the suitability for implementing and teaching the remote database processing concepts by the platforms will involve the use of descriptive modes of inquiry to characterize the features of the platforms. We find it necessary to first identify the database handling concepts and constraints to ensure effective use. This will enable us to establish some criteria to evaluate and compare the platforms with respect to the suitability for implementing and teaching the identified concepts. We can then evaluate the platforms according to the satisfaction of these criteria. We eventually find out the features of the specified platforms from various sources and other established body of knowledge, and assign scores to the platforms based on the availability of the necessary features.       Sources of information used: To accomplish the above, we sought answers to the questions and the availability of features that serve as the criteria. We sought these answers from established texts, journals and authoritative websites, which include those written by the designers of the platforms. These were augmented by authoritative websites for the applicable web servers such as IIS and tomcat. We also physically examine the handling of remote database in the various platforms.       Measuring scale to be used:   Using close-ended "Yes/No" questions, the measuring tool has values on a scale of 1 to 3, where: 3 = "Yes", 2 = "Not quite / with some workaround", 1 = "No". We have used a scale of 1 to 3 to avoid subjective situations where it will be difficult to distinguish between, for example, a score of 3 or 4 in a scale of 1 to 5. The use of the 1 to 3 scale therefore reduces the situation as to whether or not a facility is available, or in between.       Establishing reliability and validity: It is important that a measuring scale or instrument be consistent and reliable. It should produce more or less the same accurate results every time it is applied, even when applied by different persons (Coertze & Heath, 1997:78). Also, Coertze and Heath (1997:79) indicate that validity is concerned with soundness or the effectiveness of the measuring instrument. As a way of increasing validity, answers to the criteria questions were sought from established and recognized sources. We provide the accompanying references so that interested readers can verify or seek more information. This is supplemented with practical experiences confirming the satisfaction of some of the criteria established. Also, to increase reliability, the quantitative characterization and evaluation using numbers will enhance clarity in the choice of platform with the highest score. This is unlike just using qualitative sentences to evaluate the platforms, at the end of which it is difficult to say which platform is really more suitable. Furthermore, the avoidance of subjectivity with range of values applicable between 1 and 3 instead of say between 1 and 5 will increase reliability.       Data analysis:   The analysis for the study involves qualitative analysis for the criteria establishment and simple statistical parametric analysis, such as sums for the scores. The scores for all the criteria were summed up for each platform to obtain a total score. 4. DEVELOPMENT OF THE CRITERIA FOR THE EVALUATIONS It is of primary importance that a suitable platform must be suitable for the purpose of teaching desirable concepts. We therefore first identify desirable database processing concepts and then develop criteria for evaluating the platforms according to the suitability for implementing and teaching these concepts. Database handling in Web applications Databases are the power behind dynamic Web page generation. Dynamic Web page generation allows the user to access up-to-the-minute data. In order to be truly dynamic, providing up-to-date information in a real-time interactive form, Web applications store information on databases with built-in features to help in managing the data. Moreover, where Web contents changes often, storing the data contents in a database allows for efficient, stable, flexible and scalable website with the database advantage.       Relational databases & SQL syntax:   Dynamic Web platforms communicate with relational databases using the Structured Query Language (SQL) to create, modify and query relational databases. The syntax for SQL is divided into Data Manipulation Language (DML) and Data Definition Language (DDL). DDL is the set of SQL commands used to create and modify the database structures that hold the data. DML is used to retrieve and modify data in an existing database, and is remarkably compact, consisting of only four verbs: select, insert, update and delete (Lerdorf & Tatroe, 2002:191). Students will also have to review: > How to use SQL statements to create database and tables? > How to use SQL statements to insert, retrieve and delete data?       The use of Application Programming interfaces:   Dynamic Web platforms support varying numbers of DBMSs which are usually accessed via Application Programming Interfaces (APIs) such as JDBC (not Java Database Connectivity) (Sun MicroSystems, 1997), Object Linking and Embedding Database (OLE DB) as well as Open Database Connectivity (ODBC) (Microsoft Corporation, 2002, Module 8:19). According to Sun MicroSystems (2001, Module 4: 2), the interfaces serve as a layer of abstraction that allows writing database applications without being concerned with the underlying details of a particular database. Students would need to be exposed to the database access interfaces that provide access to a variety of data sources which work with various tools, languages and platforms. From the author’s experience, this will involve showing the students: > How to set up (or specify) the drivers (if necessary) that control the access? > How to establish a connection with the database file on specified location on remote disks; opening the database connection? > Retrieving values of the database fields; issuing and executing SQL queries that will retrieve the data values? > How to extract the data returned by the query, and how to temporarily store the retrieved values into arrays or datasets for easy manipulation of the data? > Knowledge on navigating the records; how to extract the first record, the records that follow, as well as how to determine the last record in the database. > Storing values of the form onto the database fields on file; issuing and executing SQL queries that will store the data values. > Modification (update) and deletion of database records > How to close the database connection as well as the need for closing them at the end of the database operations? It’s noteworthy that the advent of Web applications enables changes (the only constant in life) to be effected constantly in order to avoid consistency/integrity problems. At the end of teaching these concepts, students should be able to show an understanding of the contents demonstrated by successfully answering questions such as those given below:       Question 1:   Create a database in Microsoft Access with the following structure: Studnumber(integer),surname(text), initials(text),sex(text),diploma(text) and subject1(integer),subject2(integer), subject3(integer),subject4(integer), subject5(integer),subject6(integer). Then add records to the database table, and write Web application program(s) to access and display all the stored records. The program should also give the time when the program begins execution and the time after the last record is displayed. The output from the program should look as given below in figure 1. Figure 1. Remote Database records retrieval        Question 2:    Remote update of data in relational database: Write a Web application that can be used to accept either the surname or the student number of a student, in order to fetch and modify the whole record for that student. The record is then displayed using the format in figure 2 filled with the values for the text fields. The user should be able to modify the page to contain the desired information for the five text fields, while new values for the subject and title field can be clicked. On clicking the Update button, the program will now effect the modifications on the database. Figure 2. Student information update page Criteria for the evaluation of suitability for teaching database processing The importance of database handling in a Web application cannot be overemphasized. More especially, the remote handling of the database manipulations forms the hub of most Web applications. After previously discussing the database handling concepts of Web application development, this section establishes the availability of features that will enhance the understanding of remote database manipulations. It is of utmost importance that the communications between the server and the database are achieved with the minimum effort. The criteria below could ensure adequate database handling: * Support for various Database Management Systems (DBMS): this will leverage the knowledge of any DBMS the students may already have. * Inclusion of specific database in the installation package: this will ease the configuration settings and may be used to test and master the system. * Support for common Database Management Systems, e.g. Microsoft Access via both ODBC and JDBC: this will ensure transfer of previous knowledge and also illustrate the use of the two APIs. * User-friendly and easy to use facilities for loading drivers, opening and closing connections, retrieving data items, etc.: this will ensure that the communications between the server and the database are achieved with minimum effort. * Possibilities for retrieving items in their original data types rather than converting back from strings: this will avoid the error of attempting calculations on String variables or converting to and from Strings. * Facilities for navigating the datasets: this will ensure knowledge of looping through the data items fetched. 5. SUMMARY OF THE RESULTS OF APPLYING THE CRITERIA The emphasis of this study is on the establishment of the criteria that enables the selection among the platforms. Users can therefore adapt these criteria to their own taste, test with other platforms and assign scores based on their own experiences/sources. For mere illustration, we applied the criteria to evaluate the suitability of four platforms namely Java Servlets, JavaServer Pages (JSP), Active Server Pages (ASP) and Personal Home Page (PHP) for teaching the database processing concepts. Table 1 (see Appendix 1) gives the scoring for the platforms based on our own subjective experiences and sources. Web platforms should support various Database Management Systems (DBMS) so that Web applications developers can choose the one most appropriate for their purposes and also to leverage the knowledge of any DBMS the students may already have. Experience shows that the Java-based platforms support various database systems. ASP, however, being Microsoft based, supports a limited number of database systems. According to Lerdorf and Tatroe (2002:189), PHP supports over 20 databases, including the most popular and open-source varieties. Students often have problems configuring the interaction between the Web server and the database. It would be very helpful if the DBMS was included in the installation package so as to ease the choice problem and the installation configuration settings. The Java-based platforms do not include any database along with their installation package. ASP is Microsoft based and so the natural choice of database is Microsoft Access. This may also ease configuration settings between Microsoft XP/2000 and Microsoft Office as they are installed. PHP, unlike others, is sometimes bundled with MySQL. Being “bundled” together also increases the degree of interoperability between PHP and MySQL, as they are automatically installed and configured. Moreover, since the most common operating system used by our students is Microsoft based, support for Microsoft Access is important. The Java-based platforms support the use of Microsoft Access. As for ASP, Microsoft Access is strongly supported as both have been developed by Microsoft. PHP supports Microsoft Access as DBMS via both ODBC and JDBC. We noted that Microsoft, in line with its goal of ensuring good Graphical User Interface, and unlike the Java-based platforms, has introduced user-friendly facilities for establishing the interaction between the Web server and the DBMS. Active Server Pages communicate with databases through ADO (ActiveX Data Objects), which provide a uniform way for a program to connect with a variety of databases in a general manner without having to deal with the specifics of those database systems (Deitel et al., 2001:810). PHP also has features that ease interaction with MySQL as the database. Attempting to perform arithmetic calculations with values retrieved from database in String form will frustrate many students. In the Java-based platforms, retrieved numeric data items are in String form and must be converted to numeric. In ASP and PHP, however, there is the facility to retrieve data items in their original types rather than converting them back from Strings. Experience shows that results of retrieval operations are stored in datasets and one needs to navigate or move in steps through the dataset to access the data, records by records. Unlike others relying on loops to move through datasets, ASP has facilities for navigating the fetched datasets. These include moving to the top and bottom of the dataset or using the MoveNext() method by incrementing the record set pointer to point to the next record (Deitel et al., 2001:816). In summary, application of the criteria reveals that PHP has the highest score followed by ASP and then the Java-based platforms. However, the Java-based platforms are considered more suitable for serious developers who want the ultimate in power, flexibility and scalability and do not mind paying for it in sweat and development time. 6. CONCLUSIONS It is important to ensure that a platform selected for teaching Web applications development is suitable for implementing and teaching the database processing concepts. This is because remote database processing serves as the “engine” for dynamic Web applications development. By studying the database processing features of many platforms, we identify features that are desirable for remote database management in web applications. These enabled us to establish criteria to ensure the implementation and teaching of the database concepts. While PHP was found to be most suitable on applying the criteria, the significance of the study lies in the establishment of a comprehensive but specific set of criteria that can be used as a scientific basis for selection. 7. REFERENCES Apte, V., Hansen, T. and Reeser, P. (2003) “Performance comparison of dynamic Web platforms.” Computer Communications. 26 (8) pp. 888 – 898. Ashenfelter, J.P. (1999) Choosing a Database for Your Web Site. John Wiley & Sons, New York. Bishop, J. and Hurter, R. (1999) “Competitors to Java: Scripting languages” (Paper read at the South African Computer Lecturers Association -SACLA- conference, June, Golden Gate, South Africa). Unpublished. Bowling, A. (2002) Research methods in health. 2nd edition. Open University Press, Buckingham. Cecchet, E., Chanda, A., Elnikety, S., Marguerite, J. and Zwaenepoel, W. (2003) “Performance Comparison of Middleware Architectures for Generating Dynamic Web Content.” Lecture Notes in Computer Science: Middleware. 2672 (2003) pp. 242-261. Coertze, D. and Heath, R. (1997). Research Methodology for Technikon Students: A practical Approach. Technikon Natal publishing, Durban. Cooper, R. (2001) “Software for managing websites.” Proceedings of the South African Institute of Computer Scientists and Information Technologists (SAICSIT) Annual conference. 5-8 September 2001. Pretoria, South Africa. Deitel, H.M., Deitel, P.J. and Nieto, T.R. (2001) e-Business & e-Commerce: how to program. Prentice Hall, New Jersey. Hadjerrouit, S. (1998) “Java as first programming language: a critical evaluation.” ACM SIGCSE Bulletin inroads. 30 (2) pp. 43-47. Hartman, H. (2001) “Tools for dynamic websites: ASP vs PHP vs ASP.NET.” Seybold Report Analysing Publishing Technologies, 15339211 (12) pp.1-12. Holt, R., Wortman, D., Barnard, D. and Cordy, J.R. (1977) “SP/k: a system for teaching computer programming.” Communications of the ACM. 20 (5) pp. 301-309. Klopper, S. (2003) “Comparing the three scripting languages: PHP, ASP and JSP with each other, in order to use the best option for a specific application.” Technologiae. 1 (2003) pp. 17-22. Kolling, M. and Rosenberg, A. (1996) “Blue: A language for teaching object-oriented programming.” Proceedings of the 27th SIGCSE Technical Symposium on Computer Science Education, Philadelphia. New York. pp.190-194. Kruse, W. (2003) “A comparison of PHP and J2EE.” Technologiae. 1 (2003) pp. 110-117. Lerdorf, R. & Tatroe, K. (2002) “Programming PHP.” O’Reilly & Associates Inc. Sebastopol, California. Lim, B.L. (2002) “Teaching Web development technologies: Past, present, and (near) future.” Journal of Information Systems Education. 13 (2). pp. 117-123. Marshak, M. and Levy, H. (2003) “Evaluating Web user perceived latency using server side measurements.” Computer Communications. 26 (8) pp. 872-887. McMillan, J.H. and Schumacher, S. (2001) Research in education. 5th edition. Addison Wesley Longman, New York. Prechelt, L. (2000) “An empirical comparison of seven programming languages.” Computer. 33 (10) pp. 23-29. Renaud, K., Lo, J., Bishop, J., Van Zyl, P and Worrall, B. (1999) “Algon: A framework for supporting comparison of distributed algorithm performance.” Proceedings of PNDP conference, February 2003. Genoa. Rome. Sebesta, R.W. (1996) “Concepts of Programming Languages, 3rd edition. Addison-Wesley, Reading, Mass. Sun Microsystems. (2002) “Web Component Development With Java Technology.” SL-314 Student Guide. Revision A.1, Sun Microsystems, New York. Vinoski, S. (2003). “The performance presumption.” IEEE Internet Computing. 7 (2) pp. 88-90. Wiedenbeck, S., Ramalingam, V., Sarasamma, S. and Corritore, C.L. (1999) “A comparison of the comprehension of object-oriented and procedural programs by novice programmers.” Interacting with Computers. 11 (3) pp. 252-282. APPENDIX 1 - Tables