1. Introduction
A complex interface can confuse the user in a mild situation and completely estrange them in an extreme case when designing web-based applications. Web services technologies are very manure stack of technologies which are getting great recognition. With the emergence of this prodigious recognition; web applications should be developed as fully autonomous components to run on different types of platform provided by web services more rapidly, easily and cheaply than ever before [1] [2] based on open standardized suite of technologies such as Extensible Markup Language (XML) [3], Hyper-Text Transport Protocol (HTTP) [1] [2] [4], Simple Object Access Protocol (SOAP) [1] [2] and Web Service Description Language (WSDL) [1] [2].
The function of web services requires a service provider and consumer to exchange messages through the mechanism of XML documents: used for representing and transporting data to and from integrated applications public interface [5]. In order for XML document to provide a shared understanding about data exchange between applications XML documents require well design of XML schema [5]. In XML background data representations are made by designing schemata which can be in different XML schema languages. The most favored XML schema languages for generating XML documents are Document Type Definition (DTD) [3] [6], XML Schema Definition/World Wide Web Consortium XML Schema (XSD/WXS) [7] [8] [9] and Regular Language for Next Generation (RNG) [10] [11] [12].
2. Review of Related Works
In the software industry today researchers have focused on measuring complexity of service description like any other software artifact on size, data, building components, mapping process and qualities. Regardless the context usage; much of the success of individual web service depends on the quality of its interface because in practice it is the only information source consumers have available when reasoning about the functionality offered by the service [13]. XML schema documents have many measurable attributes to quantify different aspect of complexity and have streamlined complex applications in web services into lightweight [14]. For examples, [15] proposed metrics based on quality: according to these metrics, the quality of XML documents has great impact on the design quality of its schema document therefore their metrics measured the reusable, extensible and understandable of XML schema documents in web engineering process respectively and provided valuable information for improving the quality of XML based system.
A set of metrics of XML schema for both manual and automatic mapping processes was developed [16]. The metrics based on well-established metrics analyzed the complexity and mapping effort of a business documents standards prior to actual mapping process. With XML document typically large, there is need to find ways of improving their ease of use and maintainability by keeping their complexity low, [17] focused on different ways of keeping complexity low by determining the complexity of XML documents based on various syntactic and structural aspects of the documents. The findings is on documents with higher nesting levels, had more weights and could be viewed more complicated as compared to the documents with lower nesting level. References [18] and [19] formulated a metric that aimed at measuring complexity of an XML schema through its internal structure and recursion. They further developed measure adopted metrics on communication information theory [20] and ARS metric [21] targeted at finding the structural complexity of DTD schema language [22]. Their metric is more realistic and could be useful in differentiating DTDs of the same size.
A study that assesses human perception on some recent services interface complexity metrics was presented by group of authors [23] following the metrics suite [24]. The metric suggests that a service that is not complex for a software application in terms of time and space required to analyze it, will not be necessarily well designed in terms of best practices for designing web services. An interface complexity measure was designed that takes into account—interaction complexity: an important aspect of complexity of a component-based system [25]. The metric showed that the effect of this parameter on complexity of a component-based system is quite significant and appear to be logical to fits the intuitive understanding. Reviewed was done on existing schema metrics based on different XML schema languages [26] to show how recent each metric is, its effectiveness, how good and comprehensive complexity measure the metric has; Another metrics developed improved schema entropy and interface complexity adopted DTD metrics to measure complexity of schemas for the assessment and improved quality of software product using RNG [27]. The metrics assist application developers in writing less lengthy codes by ensuring that a given XML documents satisfies the desired data transported among applications.
3. The Proposed Metric (NICWXS)
Following the formulated metrics [27] which measure the assessment and improved quality of software product using RNG, this metric is presented as New Interface Complexity (NIC) metric using WXS schema language and then likened with existing measure. The metric is defined as:
(1)
where NEC is the number of equivalence class.
FOCi is the frequency occurrence of class.
NE is the total number of element nodes in the graph.
NA is the number of attribute an element of WXS has in a particular XML documents.
3.1. Algorithm for the NICWXS Metric
The NIC metric is based on the effort required in understanding the XML documents and the information contained in the WSDL. Number of Attribute (NA), Number of Equivalence Class (NEC), Frequency Occurrence of the Class (FOCi) and Number of Element (NE) are the parameters used for the approach of this metric; given in the algorithm below:
• Step 1: Start by identifying root of the schemas and all the elements.
• Step 2: Identify the root parent, child elements and the attributes.
• Step 3: Input root.
• Step 4: Input the child elements FOC.
• Step 5: Input the attributes.
• Step 6: Input NEC.
• Step 7: Represents the attributes.
• Step 8: Identify and set up references.
• Step 9: Define the reference.
• Step 10: Set NIC = 0.
• Step 11: Connect the references to the main schemas.
• Step 12: Set FOC occurrence [i] = 0.
• Step 13: Se NE [i] data type = 0.
• Step 14: Set NA [i] attribute type = 0.
• Step 15: Initialize NEC = 0.
{i} While NEC ≥ 1.
{ii} NICWXS = Summation NEC[i]FOC[i]^2/NE + NA.
• Step 16: End.
3.2. Data Flow Diagram for NICWXS Metric
The data flow diagram showed the process in which
is divided by the NE and then adds NA to it as seen in Figure 1.
3.3. Illustration of NICWXS Metric
Demonstration of NICWXS metric is given as sample schema Manuscript SD/No 34 in Appendix 1 as FigureA1 and the rest of the schemas are provided as web links in Appendix 5. The directed graph representation of the schema is given in Appendix 2 as FigureA2 and from the directed graph representation of this schema; evaluation of the equivalence classes is labelled in Appendix 3 as FigureA3. The empirical validation of the resulting listing is calculated from Equation (1); the analysis goes thus:
• Analysis of WXS schema Manuscript.
Figure 1. Data flow diagram for NICWXS metric.
.
4. Results and Discussions of NIC Metric
Discussion on results obtained from a total number of sixty-five (65) schemas acquired from WSDL implemented in WXS is shown in Appendix 4 as TableA1; listings and directed graph representations showed the complexity values between NICWXS metric and DSERSWXS (existing measure). The applicability of NICWXS and DSERSWXS revealed the effort required in understanding the information contents of the metric when implemented in WXS. It was observed that some schemas had similar NE yet their complexity values were different because their schema had more diversity in their class elements. At the same time some schema had equal elements and equal complexity values because they had equal fan-in and fan-out values, same listings and same directed graph representations therefore, complexity value for each metric is known based on their element count; more so, more element can contain more repetition.
The comparative study of NICWXS and DSERSWXS is depicted in the graph shown in Figure 2. Review of this graph disclosed that NA is closely related and considered in NICWXS metric than DSERSWXS which differentiate their complexity values therefore; schema documents with many inheritance features give greater complexity values due to high degree of extensibility, interoperability and flexibility qualities.
4.1. Conclusion
The NICWXS metric made more sensitive measurement in understanding the information content contained in the schema documents. The applicability of
Figure 2. Relative graph of NICWXS and DSERSWXS.
NICWXS metric was evaluated by different schemas from WSDL implemented in WXS to prove its robustness and effectiveness. The results showed that NICWXS had greater complexity values because of many inheritance features therefore, exhibited the complexity of schemas very clearly and accurately with high degree of extensibility, interoperability and flexibility thus, reduced maintenance effort and this made it suitable measure. However, NICWXS metric can be likened with other schema languages to see the effectiveness of this metric; therefore the future work may be geared towards this aspect.
Appendix 1
Appendix 2
Figure A2. Directed graph representation of manuscript.
Appendix 3
Figure A3. Equivalence classes of WXS schema manuscript.
Appendix 4
Table A1. Complexities measure for NICWXS and DSERSWXS metrics.
Appendix 5
Web Links
http://docbook.sourceforge.net/release/dsssl/current/dtds/
http://java.sun.com/dtd/
http://struts.apache.org/dtds/
http://jonas.objectweb.org/dtds/
http://www.ncbi.nlm.nih.gov/dtd/
http://www.cs.helsinki.fi/group/doremi/publications/XMLSCA2000.html
http://www.pramati.com/dtd/
http://www.w3.org/TR/REC-xml-names/
http://www.omegahat.org/XML/DTDs/
http://www.openmobilealliance.org/Technical/dtd.aspx
http://fisheye5.cenqua.com/browse/glassfish/update-center/dtds/
http://www.python.org/topics/xml/dtds/
http://www.okiproject.org/polyphony/docs/raw/dtds/
http://www.w3.org/XML/, Last Visited 2008.
http://ivs.cs.uni-magdeburg.de/sw-eng/us/metclas/index.shtml, Last Visited 2008.
http://www.xml.gr.jp/relax, Last Visited 2008.
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/, Last Visited 2008.
http://www.w3.org/TR/2001/PR-xmlschema-0-20010330/, Last Visited 2008.
http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/, Last Visited 2008.
http://www.w3.org/TR/1998/REC-xml-19980210, Last Visited 2008.
http://www.xfront.com/GlobalVersusLocal.html, Last Visited 2008.
http://www.oreillynet.com/xml/blog/2006/05/metrics_for_xml_projects_1_ele.html, Last Visited 2008.
http://www.w3.org/TR/wsdl, Last Visited 2008.