In: Computer Science
course: Applications of mobile application development
Complete the tasks listed and submit in a word document with 3 pages length
1.What are web services and how do mobile and web applications utilize them?
Ans: Web services: web service is a piece ‘s of software which makes itself available over the internet and used as a standardized XML/JSON messaging system. XML is basically getting used to encode in order to all communication’s to a web service.
For example: A client invokes a web service by sending an XML/JSON message’s, then it’s waits for a corresponding XML/JSON response for the requested message. As all communication is in XML/JSON, web services are not tied to any one operating system or programming language.
mobile and web applications utilize them by the following ways:
A web service enables communication for the mobile and web application where mobile and web application work as a client which make request to the web services platform over the internet in the form of messages and get response among various applications by using open standards such as HTML, XML, WSDL, and SOAP. A web service takes the help of XML/JSON to tag the data , SOAP to transfer a message and WSDL to describe the availability of service in order to communicate with mobile and web application as client.
2. Research and describe SOAP web services. Are they still commonplace?
Ans: SOAP web Services: SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services , SOAP is used for communication between two applications such as between client and web server. SOAP is basically XML based protocol and It is a platform independent and language independent by using SOAP, we can easily and will be able to interact with other programming language applications.
Let’s discuss SOAP is still commonplace or not:
A few years ago all remotely accessible services were totally by default deployed using as SOAP web services which XML based protocol it was because that was basically assumed to be the future but the AJAX mobile revolution changed all of that and now, because we are probably developing a services for both web applications and mobile application’s devices, and we may be developing services for lot’s wider enterprise over the Internet, so REST is more efficient and acceptable for the transmission of the data over the internet between client and web server in order to satisfy the wider enterprise demand of the application now day’s so we can say that SOAP is not consider to be commonplace when it comes to develop a application’s mobile and web based which cover wider enterprise over the internet.
3.What are REST web services and how are they used? Please provide examples?
Ans: REST web services: REST stand for Representational state transfer and REST Web Services are basically REST Architecture based Web Services , In REST Architecture everything is a resource REST web services are very light weight, highly scalable and maintainable and are very commonly used to create APIs for web-based applications and basically used for the all communication between web client and web server.
For Example: Developing the web API like GET/PUT/POST which is used for the communication between web client and web server for the transfer of the data in the format of JSON
GET REST Web Services: When a client invokes this Restful API, they will be given the entire set of data which is requested from the web client to the web server.
POST REST web Services: When a client invokes this Restful API, the client will submit a request to insert and the web service will then add the submitted request /data in the format of JSON to the database.
DELETE REST web Service: When a client invokes this Restful API, the client will submit a request to delete a specific field from database and the web service will then delete the submitted request from the database or from the collection.
4. What are WebSocket’s and how are they used? Please provide examples ?
Ans: WebSocket’s: Web sockets can be defined as a two way communication between the web client’s and the web servers , which basically means both client and servers can communicate and easily exchange data at the same time in two way communication manner. This protocol depends on the full duplex communication between two parties such as client and server.
It use for the establishing a two way communication between client and server so that both client and server can transfer the required data at the same time without any blockage over the internet.
For Example: Once the socket is created, we should listen to events on it. There are totally 4 events:
open – connection established,
message – data received,
error – WebSocket error,
close – connection closed
which basically used for the two way communication between client and server over the internet.
5. Research GraphQL; how does using this differ from REST?
Ans: GaphQL: GraphQL is a query language for thr API development and used as a runtime for the fulfilling demand of those queries with the existing data. GraphQL provides a complete and understandable description of the data in api, which gives client the power to ask for exactly what they need and nothing else more which make it easier to evolve API’s over the time and enables powerful developer tools.
It is Differ from REST in the following ways:
With REST, we can be able to make three requests to different endpoints to fetch the required data but In GraphQL on the other hand, we only simply send a single query to the GraphQL server which includes the concrete data requirements and the server then responds with a JSON object where these requirements are fulfilled and matched to the client in web client and server architecture over the internet.