Introduction
Today, the number of mobile devices in use globally has grown tremendously. These devices have become more sophisticated than before due to the dynamic technological inventions taking place each day. In addition, the mobile devices manufacturing companies have also invested heavily to improve the user experience of these devices. As a result, new ways of accessing information by the users have been invented. The development of these mobile applications used by individuals often take two different approaches, native and cross-platform. The native applications are developed for a specific platform from scratch without borrowing coding properties. Thus, paying careful attention to the language of choice. This mode of development gives the developers power to focus solely on the given platform resulting in the best possible output.
Cross-platform applications, on the other hand, involves the development of applications over a variety of platforms (Iacono et al., 2017). Thus, the codes for cross-platform applications are often written to run on multiple devices operating on various platforms such as iOS, Windows, and Android. These codes may be written using programming languages such as Java, C Sharp, CSS, or HTML. However, this mode of development is often more suitable for coding applications that only need simple interactions and does not require access to other peripherals of the platform.
Mobile development that requires access to information is always implemented using technologies such as XML and JSON. XML stands for Extensible Markup Language, which is a text-based format used for representing information such as data, configurations, invoices, transactions and much more in a structured manner (Bray et al., 1997). The technology has been widely used for sharing structural information between individuals, computers, as well as programs locally and across networks (Kumari & Rath, 2015). XML is advantageous to use as it is redundant regarding verbosity allowing the computer system to catch any existing error and give the appropriate output. The language is also self-describing allowing individuals to get a head start in understanding its syntax and format for easier identification of existing mistakes. It also operates on the principle of the XML promise where any given XML tool can process the XML document. Thus, every new XML document increases the value of every XML tool and vise vasa, making the format the most widely used in the world. XML is implemented using SOAP standard communication protocol (Garcia & Abilio, 2017). The SOAP which stands for Simple Object Access Protocol makes use of its protocol while exposing pieces of the application logic as service.
JSON on the other hand, which stands for JavaScript Object Notation is a lightweight format used in the exchange of data. The format is easier for human beings to read as well as write. The format is also easier for machines to pass and generate when implemented in the development of mobile applications. JSON was developed based on a subset of the JavaScript Programming Language (Iacono et al., 2017). The text format is completely language independent. However, it implements conventions which are familiar to developers of Java, Python, Perl, JavaScript as well as the C-family of languages such as C, C Sharp, and C ++ making it ideal in the exchange of data. The format is built on an ordered list of values as well as a collection of name pairs realized as an object, keyed list, hash table, record, or associated array. The structures used in JSON are universal data structures supported by virtually every modern programming language. Thus, basing the data interchange format on these structures is ideal.
The structures in JSON takes the form of an object which starts with an opening curly brace and end with a closing curly brace. JSON makes use of the RESTful web service. REST defines a given set of principles through which data is transmitted over standardized interfaces such as HTTP (Thu & Aung, 2015). The Web Service focuses on the design rules for creating stateless services thus lacks additional messaging layers. When implemented in the mobile development, clients can access resources using unique URI's while returning a representation of the given resource. Any new resource representation in REST leads to a transfer of state. Therefore, a combination of RESTful resources and HTTP protocol gives the resource identifier, which is the URL, and the standard HTTP operations to be performed on the resource such as GET, HEAD, PUT, POST, and DELETE (Kumari & Rath, 2015).
These two formats, XML, and JSON have been widely used in the data access in Web Service. The web services exist in three types. These include the Simple Object Access Protocol (SOAP), Representational State Transfer Application Programming Interface (REST API), and Hypertext Transfer Protocol Application Programming Interface (HTTP API). Web Service integration technology is robust and well demonstrated in the integration of the heterogeneous systems. The technology supports different kinds of languages, networks, and run times. These formats are essential in connecting applications from incompatible environments (Garcia & Abilio, 2017). The use of these web services is advantageous as they bring forth a centralized data storage for every user, avail a wide variety of data sets for manipulation as well as analysis giving the users total control of the application. The services also give the mobile developer the freedom to use his or her mobile application for displaying data rather than working on the complex tasks like interfacing the incompatible environments. Effecting new changes become easier when these technologies are implemented in the development, as they will not require the mobile application. A given web service can also be implemented across various mobile applications due to the independence of the web service platform.
Conclusion
However, in every system, security is always a matter of concern. Thus, the choice of formats for parsing data between XML and JSON must always compromise the security of the services involved. SOAP as a protocol largely used in XML exposes the operations while accessing them. These operations implement given business logic on different interfaces. Performing operations using SOAP makes use of the following code switchCategory(User, OldCategory, NewCategory). On the other hand, the same logic can be implemented using the REST API in the following line of code getUser(User); which will access the required resource. Mobile development, both native and cross platforms can implement any of the web services. However, the use of RESTful web service which uses the standards of HTTP is much more straightforward (Thu & Aung, 2015). Developments done in RESTful web services such as the creation of clients and the development of API's are much easier to understand that when implemented using SOAP. Also, REST permits a variety of data formats as opposed to SOAP which only permits XML. Due to this capability of REST, makes JSON a better fit for data as well as in its parsing (Garcia & Abilio, 2017; Rodriguez et al., 2016). The REST web service is also beneficial for its better support to the browser clients. These give REST a better performance as well as scalability as compared to SOAP.
References
Bray, T., Paoli, J., Sperberg-McQueen, C. M., Maler, E., & Yergeau, F. (1997). Extensible markup language (XML). World Wide Web Journal, 2(4), 27-66.
Garcia, C. M., & Abilio, R. (2017). Systems Integration Using Web Services, REST and SOAP: A Practical Report. Revista de Sistemas de Informacao da FSMA, (19), 34-41.
Iacono, L., Garcia Garino, C., Marianetti, O., & Parraga, C. (2017). WSNs Data and Configuration Management in Sensor Clouds with Cloud File Synchronization Services. Journal of Computer Science & Technology, 17.
Kumari, S., & Rath, S. K. (2015). Performance comparison of soap and rest based web services for enterprise application integration. In Advances in Computing, Communications and Informatics (ICACCI), 2015 International Conference on (pp. 1656-1660). IEEE.
Rodriguez, C., Baez, M., Daniel, F., Casati, F., Trabucco, J. C., Canali, L., & Percannella, G. (2016). REST APIs: a large-scale analysis of compliance with principles and best practices. In International Conference on Web Engineering (pp. 21-39). Springer, Cham.
Thu, E., & Aung, T. (2015). Developing Mobile Application Framework by Using RESTFul Web Service with JSON Parser. Advances In Intelligent Systems And Computing, 177-184. doi:10.1007/978-3-319-23207-2_18
Cite this page
The Use of XML and JSON in Mobile Development on Native and Cross-Platform: Essay Sample. (2022, Apr 07). Retrieved from https://proessays.net/essays/the-use-of-xml-and-json-in-mobile-development-on-native-and-cross-platform-essay-sample
If you are the original author of this essay and no longer wish to have it published on the ProEssays website, please click below to request its removal:
- Solar Roof Tiles Essay
- The Use of Renewable Sources of Energy in the Construction of Green Buildings Paper Example
- Natural Power, Ethanol Fueling Nations: Responder Strategies - Research Paper
- Essay Example on Innovations in Nursing Curriculum for Enhanced Knowledge Acquisition
- Essay Example on Robots Dreaming of Human Life: Philip K. Dick's Do Androids Dream
- Paper Example on Huawei's Innovative Health & Fitness App: A Comprehensive Review
- Free Paper Example on Cognitive Development: The Information Processing Approach