You are on page 1of 2

Jonas Karlo L.

Manigbas

BSIT 4-4

Take Home Activity for JSON

1. Compare JSON and XML. What are their advantages and disadvantages?

JSON is just a data format whereas XML is a markup language. You can actually place a
query and get your answer through XPath. Similarly, metadata, attributes, and namespaces can be
added in XML. Further, XML along with XSL, XSD, XQuery, etc. makes for a powerful combination.
These are some important features that still set XML a class apart. XML is the default choice for data
interchange because virtually every language has a parser for it, be it Java, .net or any others. It is
easy to fetch particular data from XML and there are schemas that can validate the XML. XML is
used extensively in today’s ‘e’ world – banking services, online retail stores, integrating industrial
systems, etc. One can put as many different types of information in the XML and it still remains
simple.

XML is platform independent and programming language independent, thus it can be used
on any system and supports the technology change when that happens. XML supports unicode.
Unicode is an international encoding standard for use with different languages and scripts, by which
each letter, digit, or symbol is assigned a unique numeric value that applies across different
platforms and programs. This feature allows XML to transmit any information written in any human
language. The data stored and transported using XML can be changed at any point of time without
affecting the data presentation. Generally other markup language such as HTML is used for data
presentation, HTML gets the data from XML and display it on the GUI (graphical user interface),
once data is updated in XML, it does reflect in HTML without making any change in HTML GUI. On
the other hand, the disadvantage of XML is its syntax is verbose and redundant compared to other
text-based data transmission formats such as JSON. The redundancy in syntax of XML causes higher
storage and transportation cost when the volume of data is large. XML document is less readable
compared to other text-based data transmission formats such as JSON. XML doesn’t support array.
XML file sizes are usually very large due to its verbose nature it is totally dependent on who is
writing it.

JSON is light weight component. It doesn’t take more time for execution. It supports data
structures used in modern languages. In Java script we cannot retrieve values from other files for
example java. In JSON we can retrieve values from anywhere. It supports all languages. Although, It
is very difficult to understand by a human. Because of so many braces and commas used in that.
JSON is not suitable for large data’s. JSON does not have a < [CDATA []]> feature, so it is not suitable
for handling multimedia formats.
Take Home Activity for Node.js

1. What are the features of Node.js?


 It is asynchronous and event Driven − All APIs of Node.js library are
asynchronous, that is, non-blocking. It essentially means a Node.js based server
never waits for an API to return data. The server moves to the next API after
calling it and a notification mechanism of Events of Node.js helps the server to
get a response from the previous API call.
 Fast- Being built on Google Chrome’s V8 JavaScript Engine, Node.js is efficient
and quick in code execution.
 Single Threaded but Highly Scalable- Node.js uses a single threaded model with
event looping. Event mechanism helps the server to respond in a non-blocking
way and makes the server highly scalable as opposed to traditional servers like
Apache which create limited threads to handle requests.
 No Buffering- Node.js applications never buffer any data. These applications
simply output the data in chunks. Because of above specifications some of the
biggies like eBay, Paypal, Godaddy, General electronic, Yahoo etc. relies on
Node for their server side programming needs.
2. What are the advantages of using Node.js?
 One of the key advantages of Node.js is that developers find it easy to scale the
applications in horizontal as well as the vertical directions. The applications can
be scaled in horizontal manner by the addition of additional nodes to the
existing system.
 Node.js is blessed to have a large and active community of developers who keep
on continuously contributing towards its further development and
improvement.
 With Node.js, the developers can get an extended support for the various
commonly used tools. Let’s take an example. Suppose, you want to test the
source code of Node.js application; you can do so by using the Jasmin and other
such unit-testing tools.
 The Node.js is known to be highly extensible, which means that you can
customize and further extend Node.js as per their requirements.
3. What is the definition of Module in relationship to Node.js?

Module in Node.js is a simple or complex functionality organized in single or multiple


JavaScript files which can be reused throughout the Node.js application. Each module in Node.js
has its own context, so it cannot interfere with other modules or pollute global scope. Also, each
module can be placed in a separate .js file under a separate folder.

You might also like