Skip to main content

Posts

Showing posts from June, 2017

Introduction To JavaScript

JavaScript Language has following characteristics: Lightweight: Small memory footprint, easy to implement Interpreted: No compilation, Instructions executed only Object Oriented: Modeled around objects First-class functions: Functions used as variables and parameters Scripting language: Writing instructions for runtime environment JavaScript is used for  Client side web development Frameworks: JQuery, AngularJs, React, EServer-side Server-side web development Frameworks: NodeJS, Express Variable declaration and definition Declaration: Give a name to a variable Definition: Assign a value to the variable Equal operations  =: assigning value to a variable (a=30) ==: check the values (doesn't consider types) ===: check the values and types Functions:  no overloading functions are objects functional expression : assign function to variable anonymous function: function with no name Array methods push(value): value is appe...

Developing Restful-API using JAX-RS

Web Services  Services that are exposed to the Internet for programmatic access.  Two main types of web services REST (Representational State Transfer) REST has no standard protocol (can use XML,JSON,etc) SOAP Web services use HTTP (Hyper Text Transfer Protocol) to send and receive messages. To include service definitions that offered from Web Service: WSDL URI Two main types of URI Resource Based URI Every resource must be identified by a single URI  Doesn't contain .do in URI ( /message/{message_Id}) Collection URI return collection of instances ex : /message/1/comments -> return all the comments relevant to message id=1 To create new resource you have to use collection URI Filtering   /messages?offset=30&limit=10 -> return 10 messages starting from message_Id=30 HTTP Methods  Four main types of HTTP methods: Get: To get the details of resource Put: To update resources Post: To create ...