Posts

Using OAuth 2.0 Authorization framework

Image
Using OAuth 2.0 Authorization framework This article describes, how third-party application access information from resource owners using OAuth2 framework.  OA uth ??? Open-standard authorization framework it provides secure designated access to application.  It never uses password, but authorization tokens are used to prove identity of service providers and consumers. OAuth act as valet key of car. Following figure shows the work flow of OAuth 2 framework.  In OAuth 2.0 following roles are identified. Resource Owner Resource Server Client Authorization Server. Authorization grant types The way of getting access token is called as grant type. Following are the 4 main grant types.  Authorization code grant type: this grant type used by native apps and web apps, here client has to be confidential. Implicit grant type: this is implemented for client-side scripting, here clients are public. Client credentials grant type: this t...
OOP  Concept OOP is a programming style which concept use to map the real world scenario by using some primary concepts such as abstraction, encapsulation, inheritance, and polymorphism. Most popular programming language like Java , c++ , c# , Ruby etc. Follow an object oriented programming paradigm. Abstraction When create a class which is declared as an abstract, cannot create an object of an abstract  class.  To use an abstract class, you have to inherit it from another class where you have to provide implementation for the abstract methods there itself , else it will become an abstract class. Let's look at the syntax of an abstract class: Abstract class Mobile {   // abstract class mobile Abstract void run();      // abstract method Encapsulation It uses for data hiding and data encapsulation is a mechanism of bundling the data. Declare the variables of a class as a private. When provides the public get...
REST services REST stand for REpresentational State Transfer.  It is an architectural style for developing web services. It is primarily used to build web services that are lightweight, maintainable , and scalable. REST is not depend on any protocol , but almost every RESTful service uses HTTP as its underlying protocol. Service architects and developers want this service to be easy to implement, maintainable, extensible, and scalable.  What are the features of RESTful services?? Representations Messages URIs Uniform interface Stateless Links between resources Caching What is representation??  Representation describe how resources get manipulated. Once we have identified our resources, the next thing we need is to find a way to represent these resources in our system. We can use any format for representing the resources, REST does not put a restriction on the format of a representation.      Eg: AJAX calls or JSON can be used t...
Image
MVC & MVVC What is MVC? MVC is software architecture design pattern. MVC stands for Model , View and Controller , it is a server side design pattern . MVC pattern is used by well-known frameworks such as Ruby on Rails, Apple ios Development, ASP.NET MVC, etc .  It has 3 main component. Model. Controller Views             It like as a triangle where all part can communicate with each other.  Model Model represent the shape of the data and business logic and also it defines the business rules for data. It contain the pure application data. In J2EE javabean provide Model.   View View display data using model to the user. It knows how to access the model’s data but it does not know what this data means. It is script-based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology. In J2EE JSP5 provide view. Controller  Controllers are responsible for controlling the flow o...
Introduction to NodeJS NodeJS is an open-source,cross-platform, run-time environment for sever-side and networking applications.  It is not a JavaScript framework. NodeJS was developed by Ryan Dahl in 2009 on Chrome's V8 JavaScript Engine. It is written using C++ language but uses JavaScript as an interpretive language for server-client request/response processing.  NodeJS runs stand-alone JavaScript programs. NodeJS is an asynchronous language .It is lightweight and efficient because of   it's event-driven   ,non-blocking I/O nature. NodeJS runs on various platforms(windows ,linux , unix , mac , OS X ,). Ideal for data-intensive real-time applications that run across distributed devices. Not the best platform for CPU intensive heavy computational applications. It is capable of handling a huge number of simultaneous connections with high throughput .NodeJS is single     threaded. It not create new thread for each connection. Where can be...