Posts

Showing posts from January, 2014

Responsive Web Design

Image
  What it is A web application developed based on the responsive web design concept will adopt the layout of the application based on the screen size and orientation. As the user switches from their laptop to iPad, the website should automatically switch to accommodate for resolution, image size and scripting abilities. In other words, the website should have the technology to automatically respond to the user’s preferences. This would eliminate the need for a different design and development phase for each new gadget on the market. When designing a web in responsive manner same HTML content will be maintained, but it will be viewed in different layouts when user switches among different browser sizes. In that way website can server the users by changing the layout of the content so user can view it in more user friendly manner, without too many scrolling. How the layout changes will be discussed under topic Design patterns   Pros Increasing your reach to tablet and mobile au

Attribute Routing in Web API 2

Image
With the release of Web API 2 there are few improved & new features been introduced. Those are External Authentication Enabling cross origin request Use OWIN to host Web API in an Azure worker Role IHttpActionResult, a New Way to Create Responses in Web API Attribute Routing Using $select, $expand, and $value in Web API OData In this blog I am going to talk about Attribute routing in detail. Before Web API 2 comes for routing in web API what we have used in conventional routing. In this normally what we have in a single API controller ex:- Employee Controller Get(int Id) // Get Employee By Id Get() // Get All Employees Post() Put() Delete() You can get more details on conventional routing here The constraint here is if we want to get Leave Records by Employee Id we will have to create a different controller. We cannot have that in the same controller. Attribute Routing solves this issue. Attribute routing supports some of the URI patterns which are commonly used in