Thursday, January 9, 2014

JSLint : Static program analysis tool

JSLint is a static program analysis tool. It was developed by Douglas Crockford. Static program analysis is the interpretation of computer software that is performed with actually executing. JSLint is used for checking if JavaScript source code complies with coding rules.It can be referred as code quality tool.
JavaScript is a young-for-its-age language. It was originally intended to do small tasks in webpages, tasks for which Java was too heavy and clumsy. But JavaScript is a surprisingly capable language, and it is now being used in larger projects. Many of the features that were intended to make the language easy to use are troublesome when projects become complicated. A lint for JavaScript is needed: JSLint, a JavaScript syntax checker and validator.
JSLint takes a JavaScript source and scans it. If it finds a problem, it returns a message describing the problem and an approximate location within the source. The problem is not necessarily a syntax error, although it often is. JSLint looks at some style conventions as well as structural problems. It does not prove that your program is correct. It just provides another set of eyes to help spot problems.
JSLint is provided primarily as an online tool, but there are also command-line adaptations. JSLint.VS2012 extension also available for Microsoft Visual Studio 2012.
Also, JSONLint is the JSON validator availabe for online use.
Links:
http://www.jslint.com/
http://visualstudiogallery.msdn.microsoft.com/1a417c37-4d6f-43ca-b753-6ea6eb5041fd
http://jsonlint.com/

JSLint.NET
JSLint.NET is a wrapper for Douglas Crockford's JSLint, the JavaScript code quality tool. It can validate JavaScript anywhere .NET runs.
At it's core, the JSLint.NET project aims to provide:
  • a complete, accurate and up-to-date wrapper for JSLint
  • an interface that's natural for .NET developers while staying true-to-source
  • a suite of valuable tools that assist JavaScript developers working on Microsoft platforms

Tuesday, December 31, 2013

Happy New Year 2014



I wish u to have a
Sweetest Sunday,
Marvelous Monday,
Tasty Tuesday,
Wonderful Wednesday,
Thankful Thursday,
Friendly Friday,
Successful Saturday,
Have a great Year,
HAPPY NEW YEAR

Web API

What is Web API?
Web API is a new web application runtime that builds on the lessons and patterns proven in ASP.NET MVC. Using a simple controller paradigm, Web API enables a developer to create simple HTTP web services with very little code and configuration. WebAPI is an ideal platform for building pure HTTP based services where the request and response happens with HTTP protocol. The client can make a GET, PUT, POST, and DELETE request and get the WebAPI response appropriately.
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
WebAPI is
  • An HTTP Service
  • Designed for broad reach
  • Uses HTTP as an Application protocol, not a transport protocol
Why Web API?
Today, a web-based application is not enough to reach it's customers. People are very smart, they are using iphone, mobile, tablets etc. devices in its daily life. These devices also have a lot of apps for making the life easy. Actually, we are moving from the web towards apps world.
Web API is the great framework for exposing your data and service to different-different devices. Moreover Web API is open source an ideal platform for building REST-ful services over the .NET Framework. Unlike WCF Rest service, it use the full featues of HTTP (like URIs, request/response headers, caching, versioning, various content formats) and you don't need to define any extra config settings for different devices unlike WCF Rest service.
How Web API is different from WCF
WCF ASP.NET Web API
Enables building services that support multiple transport protocols (HTTP, TCP, UDP, and custom transports) and allows switching between them. HTTP only. First-class programming model for HTTP. More suitable for access from various browsers, mobile devices etc enabling wide reach.
Enables building services that support multiple encodings (Text, MTOM, and Binary) of the same message type and allows switching between them. Enables building Web APIs that support wide variety of media types including XML, JSON etc.
Supports building services with WS-* standards like Reliable Messaging, Transactions, Message Security. Uses basic protocol and formats such as HTTP, WebSockets, SSL, JQuery, JSON, and XML. There is no support for higher level protocols such as Reliable Messaging or Transactions.
Supports Request-Reply, One Way, and Duplex message exchange patterns. HTTP is request/response but additional patterns can be supported through SignalRand WebSockets integration.
WCF SOAP services can be described in WSDL allowing automated tools to generate client proxies even for services with complex schemas. There is a variety of ways to describe a Web API ranging from auto-generated HTML help page describing snippets to structured metadata for OData integrated APIs.
Ships with the .NET framework. Ships with .NET framework but is open-source and is also available out-of-band as independent download.
Web API Features
  • It supports convention-based CRUD Actions since it works with HTTP verbs GET, POST, PUT and DELETE.
  • Responses have an Accept header and HTTP status code.
  • Responses are formatted by Web API’s MediaTypeFormatter into JSON, XML or whatever format you want to add as a MediaTypeFormatter.
  • It may accepts and generates the content which may not be object oriented like images, PDF files etc.
  • It has automatic support for OData. Hence by placing the new [Queryable] attribute on a controller method that returns IQueryable, clients can use the method for OData query composition.
  • It can be hosted with in the applicaion or on IIS.
  • It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection that makes it more simple and robust.

Friday, December 27, 2013

XBRL : eXtensible Business Reporting Language

XBRL (eXtensible Business Reporting Language) is a freely available and global standard for exchanging business information. XBRL allows the expression of semantic meaning commonly required in business reporting. The goal of XBRL is to standardize the automation of business intelligence (BI).
Highlights:
  • XBRL International is a not-for-profit consortium of approximately 650 companies and agencies worldwide working together to build the XBRL language and promote and support its adoption
  • XBRL is XML-based, it uses the XML syntax and related XML technologies
  • Effort had began in 1998 and has produced a variety of specifications and taxonomies
  • It is language for the electronic communication of business and financial data
  • It is an open standard which supports information modeling and the expression of semantic meaning commonly required in business reporting
  • It provides major benefits in the preparation, analysis and communication of business information.
  • It offers cost savings, greater efficiency and improved accuracy and reliability to all those involved in supplying or using financial data. 
  • XBRL is a standards-based way to communicate business and financial information.
  • These communications are defined by metadata set out in taxonomies.
  • Taxonomies capture the definition of individual reporting concepts as well as the relationships between concepts and other semantic meaning.
  • Provides identifying tag for each individual item of data such that it can be used by name
  • The basis for this technology is a "tagging" process by which each value, item, and descriptor, etc. in the exchanged information can be given a unique set of tags with which to describe it. Using these tags, computer programs can read the data without human intervention.
For more information: http://xbrl.squarespace.com/

Monday, December 9, 2013

Hekaton : In-Memory Optimization

Hekaton : The codename for a Microsoft project that will provide support for mixing in-memory database tables with more traditional on-disk tables in the same database. These hybrid databases will be able to dynamically handle both in-memory and on-disk storage in the same database for optimal performance and reliability. Traditional RDBMS architecture was designed when memory resources were expensive, and was optimized for disk I/O. Modern hardware has much more memory, which affects database design principles dramatically. Modern design can now optimize for a working set stored entirely in main memory. Hekaton fully provides ACID database properties.
Project Hekaton will enable Microsoft to compete in the in-memory database market with products like Oracle Database's Exadata and Exalytics appliance options and SAP Hana.
This SQL Server In-memory OLTP capability is released in SQL 2014 version. In-Memory OLTP is a memory-optimized OLTP database engine for SQL Server. Depending on the reason for poor performance with your disk-based tables, In-Memory OLTP can help you achieve significant performance and scalability gains by using,
  • Algorithms that are optimized for accessing memory-resident data.
  • Optimistic concurrency control that eliminates logical locks.
  • Lock free objects are used to access all data. Threads that perform transactional work don’t use locks or latches for concurrency control.
  • Natively compiled stored procedures result in orders of magnitude reduction in the engine code path.
Use of main memory can result in a few percentage points of performance improvement, to 20 times performance improvement.

Thursday, November 28, 2013

Open Authentication (OAuth)

OAuth is a free and open protocol, built on IETF standards and licenses from the Open Web Foundation, and is the right solution for securing open platforms. OAuth is a simple way to publish and interact with protected data. It's also a safer and more secure way for people to give you access. An open protocol to allow secure authorization in a simple and standard method from web, mobile and desktop applications.
OAuth is ‘An API access delegation protocol’
The heart of OAuth is an authorization token with limited rights, which the user can revoke at any time should they become suspicious or dissatisfied. OAuth supports "delegated authentication" between web apps using a security token called an "access token". Delegated authorization is grating access to another person or application to perform actions on your behalf. An OAuth token gives one app access to one API on behalf of one user.
Below is the pictorial representation of OAuth Authorization Flow:
Microsoft provides the "Microsoft.Web.WebPages.OAuth.dll" for OAuth implementation via .Net applications. The Microsoft.Web.WebPages.OAuth namespace contains core classes that are used to work with OAuth and OpenID authentication. The classes in this namespace interact with the classes from the open-source DotNetOpenAuth library.
OAuthWebSecurity Class
This class manages security that uses OAuth authentication providers like Facebook, Twitter, LinkedIn, Windows Live and OpenID authentication providers like Google and Yahoo. Below are the main API that commonly used for implementation.
  1. Register...Client (... : Microsoft, Facebook, etc) : These various register methods allows user to register specific identity provider.
  2. RegisteredClientData : This API provides the list of the registered identity providers. This is necessary for the ProviderName property when requesting authentication.
  3. RequestAuthentication : This is the API to invoke to trigger a login with one of the identity providers. The parameters are the identity provider name (so one of the ProviderName values from the RegisteredClientData collection) and the return URL where you will receive the authentication token from the identity provider. Internally it does a Response.Redirect to take the user to the identity provider consent screen.

Reference Links: http://hueniverse.com/2007/09/explaining-oauth/

Tuesday, November 5, 2013

Kanban Vs Scrum

Difference between Kanban and Scrum:
  • Iterations : Kanban sees development as a forever ongoing flow of things to do where as in Scrum you work in iterations.
  • Commitment : Kanban is ongoing where as in Scrum a team commits to what they will do during a sprint.
  • Estimations : In Kanban it’s optional since focus is on time-to-market. In Scrum you need to estimate to be able to have a velocity.
  • Cross-functional teams : That’s one of the pillars of Scrum. For Kanban it’s optional.
  • Workflow : The Kanban Method does not prescribe any workflow. Scrum prescribes a set of activities that are performed within a Sprint.
  • Roles : Kanban does not prescribe any roles. Scrum generally prescribes three roles, Scrum Master, Product Owner, and Team Member.
  • System Thinking : The Kanban Method takes a system thinking approach to process problems. Scrum is team-centric.
Kanban Scrum
Board / Artifacts board only board, backlogs, burn-downs
Ceremonies daily scrum, review/retrospeective on set frequency and planning ongoing daily scrum, sprint planning, spring review, sprint retrospective
Iterations no (continuous flow) yes (sprints)
Estimation no (similar size) yes
Teams can be specialized must be cross-functional
Roles Team + need roles Product Owner, Scrum Master, Team
Teamwork swarming to achieve goals collaborative as needed by task
WIP controlled by worklfow state controlled by sprint content
Changes added as nedded on the borad (to do) should wait for the next sprint
Product Backlog just in time cards list of prioritized and estimated stories
Impediments avoided dealt with immediately