Wednesday, June 27, 2012

Interview questions about ASP.NET Web services.

I have seen there are lots of myth’s about asp.net web services in fresher level asp.net developers. So I decided to write a blog post about asp.net web services interview questions. Because I think this is the best way to reach fresher asp.net developers. Followings are few questions about asp.net web services.

1) What is asp.net web services?
Ans: Web services are used to support http requests that formatted using xml,http and SOAP syntax. They interact with through standards xml messages through Soap. They are used to support interoperability. It has .asmx extension and .NET framework contains http handlers for web services to support http requested
directly.


2) What kind of data can be returned web services web methods?
Ans: It supports all the primitive data types and custom data types that can be encoded and serialized by xml. You can find more information about that from the following link.
http://msdn.microsoft.com/en-us/library/bb552900.aspx

3) Is web services are only written in asp.net?
Ans: No, It can be written by Java and PHP languages also.

Share:

Bundling in visual studio 2012 for web optimization

Note: I have been writing a series of posts about Visual Studio 2012 features. This series describes what are the new features in the Visual Studio 2012. This post will also be part of Visual Studio 2012 feature series.
As we know now days web applications or site are providing more and more features and due to that we have include lots of JavaScript and CSS files in our web application.So once we load site then we will have all the JavaScript  js files and CSS files loaded in the browsers and If you have lots of JavaScript files then its consumes lots of time when browser request them.
Following images show the same situation over there.

Bundling feature in Visual Studio 2012 - Visual Studio 2012 feature series

Here you can see total 25 files loaded into the system and it's almost more than 1MB of total size. As we need to have our web application of site very responsive and need to have high performance application/site, this will be a performance bottleneck to our site. In situation like this, the bundling feature of Visual Studio 2012 and ASP.NET 4.5 comes very handy. With the help of this feature we do optimization there and we can increase performance of our application.
Share:
Friday, June 22, 2012

Why C# does not support multiple inheritance?

Yesterday, One of my friends, Dharmendra ask me why C# does not support multiple inheritance. This is the question most of the people ask every time. So I thought it will be good to write a blog post about it. So why it does not support multiple inheritance?

I tried to dig into the problem and I have found the some of good links from C# team from Microsoft for why it’s not supported in it. Following is a link for it.

http://blogs.msdn.com/b/csharpfaq/archive/2004/03/07/85562.aspx


Also, I was giving some of the example to my friend Dharmendra where multiple inheritance can be a problem.The problem is called the diamond problem. Let me explain a bit. If you have class that is inherited from the more then one classes and If two classes have same signature function then for child class object, It is impossible to call specific parent class method.
Share:
Thursday, June 21, 2012

Color indication in Visual Studio 2012

Note: This post will be a part of Visual Studio 2012 series.
Before some days Microsoft has released the release candidate version of Visual Studio 2012. Today I got installed Visual Studio 2012 and once I loaded the visual studio 2012 first things I noticed that there is purple color blank strip is there at bottom. After doing some R and D on internet I have found that it is used for the different indication. The purple color indicates that there is no project loaded now.

Color Indication in visual studio 2012 Purple color for no project
Share:
Friday, May 25, 2012

ASP.NET Web API Basics

We have seen that now web is really becoming cross plate form and you can see your services or API can be exposed to any client. Till now one of big challenges is to choose platform for this kind of service. There are so many options available like web services, WCF services,Generic Handlers, directly writing responses on aspx page etc. There are plenty of options available and each one has their own pros and cons.  But now we have one simpler answer for that is ASP.NET Web API.

What is Web API?

ASP.NET Web API is a framework for building web API on the top of .NET framework. It’s a framework for building and consuming web services that can be use at broad range of clients like browsers,tablets phones etc. You can expose JSON or XML whatever you want to use.

Why to use Web API?

Think about a situation where a jQuery script that is making a ajax request and we need some thing who can expose data from the server to the client at that time WEB API can be very handy you can expose server data in XML or JSON form and you can make that call with simple http request. No lengthy code required to call WEB API.
Share:
Thursday, May 24, 2012

Extract to User Control in visual studio11

Note: This post will be part of Visual Studio 2012 feature series. As Visual studio 2011 beta is now known as Visual Studio 2012
I have been playing with Visual Studio 11 beta recently and everyday I am amazed with new features of it. Today I have found one more very useful feature Extract to User Control feature.

In large projects, we are having large pages and its always good to use  user control(.ascx) but sometimes we are so lazy to create user controls and we remain with the whole page and even we can’t reuse that code. In similar kind of situation ‘Extract to user control’ can be quite useful. Suppose we have long HTML mark up and we need to convert one div to user control and then we can do it very easily with Visual Studio 11 beta Extract to User Control feature.

You just need to select code you want there in user control and then you need to right click and click ‘Extract to User Control’ like below.

Extract to user control feature- What's new in visual studio 11 features
Share:
Wednesday, May 23, 2012

Browser selection in Visual Studio 11

This blog post will be a part of Visual Studio 2012 features series. As now Visual Studio 2011 beta know as Visual Studio 2012.

In the earlier version of the Visual Studio if you want to run your page in browser then you have to do it with view in browser. But now you have directly that on the Visual studio 2012 toolbar like below.

Visual Studio 2011 beta Broswer selection toolbar

Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews