Saturday, December 18, 2010

DotNetQuiz 2011 on BeyondRelational.com- Want to be quiz master or participant?

Test your knowledge with 31 Reputed persons (MVPS and bloggers) will ask question on each day of January and you need to give reply on that. You can win cool stuff.My friend Jacob Sebastian organizing this event on his site Beyondrelational.com to sharpen your dot net related knowledge. This Dot NET Quiz is a platform to verify your understanding of Microsoft .NET Technologies and enhance your skills around it. This is a general quiz which covers most of the .NET technology areas.

Want to be Quiz Master?

Also if you are well known blogger or Microsoft MVP then you can be Quiz master on the dotnetquiz 2011. Following are requirements to be quiz master on beyondrelational.com. I am also a quiz master on beyondrelational.com and

Quiz master eligibility:

You will be eligible to nominate yourself to become a quiz master if one of the following condition satisfies:

  • You are a Microsoft MVP
  • You are a Former Microsoft MVP
  • You are a recognized blogger
  • You are a recognized web master running one or more technology websites
  • You are an active participant of one or more technical forums
  • You are a consultant with considerable exposure to your technology area
  • You believe that you can be a good Quiz Master and got a passion for that

 

Selection Process:

Once you submit your nomination, the Quiz team will evaluate the details and will inform you the status of your submission. This usually takes a few weeks.

Quiz Master's Responsibilities:

Once you become a Quiz Master for a specific quiz, you are requested to take the following responsibilities.

  • Moderate the discussion thread after your question is published
  • Answer any clarification about your question that people ask in the forum
  • Review the answers and help us to award grades to the participants

For more information Please visit following page on beyondrelational.com

http://beyondrelational.com/quiz/nominations/0/new.aspx

Hope you liked it. Stay tuned!!!

Shout it
Share:

Microsoft silverlight 5.0 features for developers

Recently on Silverlight 5.0 firestarter event ScottGu has announced road map for Silverlight 5.0. There will be lots of features that will be there in silverlight 5.0 but here are few glimpses of Silverlight 5.0 Features.

Improved Data binding support and Better support for MVVM:

One of the greatest strength of Silverlight is its data binding. Microsoft is going to enhanced data binding by providing more ability to debug it. Developer will able to debug the binding expression and other stuff in Siverlight 5.0. Its also going to provide Ancestor Relative source binding which will allow property to bind with container control. MVVM pattern support will also be enhanced.

Performance and Speed Enhancement:

Now silverlight 5.0 will have support for 64bit browser support. So now you can use that silverlight application on 64 bit platform also. There is no need to take extra care for it.It will also have faster startup time and greater support for hardware acceleration. It will also provide end to end support for hard acceleration features of IE 9.

More support for Out Of Browser Application:

With Siverlight 4.0 Microsoft has announced new features called out of browser application and it has amazed lots of developer because now possibilities are unlimited with it. Now in silverlight 5.0 Out Of Browser application will have ability to Create Manage child windows just like windows forms or WPF Application. So you can fill power of desktop application with your out of browser application.

Testing Support with Visual Studio 2010:

Microsoft is going to add automated UI Testing support with Visual Studio 2010 with silverlight 5.0. So now we can test UI of Silverlight much faster.

Better Support for RIA Services:

RIA Services allows us to create N-tier application with silverlight via creating proxy classes on client and server both side. Now it will more features like complex type support, Custom type support for MVVM(Model View View Model) pattern.

WCF Enhancements:

There are lots of enhancement with WCF but key enhancement will WSTrust support.

Text and Printing Support:

Silverlight 5.0 will support vector base graphics. It will also support multicolumn text flow and linked text containers. It will full open type support,Postscript vector enhancement.

Improved Power Enhancement:

This will prevent screensaver from activating while you are watching videos on silverlight. Silverlight 5.0 is going add that smartness so it can determine while you are going to watch video and while you are not going watch videos.

Better support for graphics:

Silverlight 5.0 will provide in-depth support for 3D API. Now 3D rendering support is more enhancement in silverlight and 3D graphics can be rendered easily.

You can find more details on following links and also don’t forgot to view silverlight firestarter keynot video of scottgu.

http://www.silverlight.net/news/events/firestarter-labs/

http://blogs.msdn.com/b/katriend/archive/2010/12/06/silverlight-5-features-firestarter-keynote-and-sessions-resources.aspx

http://weblogs.asp.net/scottgu/archive/2010/12/02/announcing-silverlight-5.aspx

http://www.silverlight.net/news/events/firestarter/

http://www.microsoft.com/silverlight/future/

Hope this will help you. Stay tuned!!!.

Shout it
kick it on DotNetKicks.com
Share:

New blogger template for My blog - DotNetJaps

I have changed my blogger template to newer version of blogger. Hope you guys liked it. There are some difficulties over there but I still love the changes that blogger has offered. I know my old version of syntax highlighter is not working. But I am fixing that for all the older posts and already did it for some posts.

‘Change is in all things sweet.’

As a philosopher Aristotle has said we all should be ready to change. I have changed my blogger template due to following reasons.

  1. It’s more SEO Friendly. It is having less errors on w3c validations and It will increase search engine optimization for my blog. Still blogger template are not totally compliant like word press but blogger has decided to moved in that way so I am going to support that way.
  2. It has good way to monetize your blog.
  3. It has provided a new feature called ‘Pages’. You can create your own pages like I have created like asp.net interview questions etc. I will going to post some frequently asked interview questions over here.
  4. It has providing status same like Wordpress so its good be changed.

Above all, I have also changed my script high lighter version 3.0.83. So there might be some difficulties in older posts but I am going to fix one by one. If you found anything then please fill free to contact me via posting comment on my blog and I am going to fix that right away.

Here is screenshot my blog is look like.

MyBlog new blogger template

Please fill free to contact me if you have any question. I am going to start posting technical post soon. I need your support and I know you guys are going to provide me that.

Thanks once again all the readers who have made my blog successful.Keep reading it I will going to post more and more.

Technorati Tags: ,
Shout it
Share:
Friday, December 3, 2010

ASP.NET MVC Razor IsPost property with IF –Else loop

ASP.NET MVC Razor a new view engine from Microsoft looks very promising. Here are example of code where we can determine page is post back or not. It support a IsPost Property which will tell you whether page is post back or not. So based on that we can write code for handling post back. Also one of greatest feature of razor is we can write code for decision making like if else and other stuff with single @ statement isn’t that great stuff.

Here is the stuff how we can write the code with IsPost property.

@{
var Message="";
if(IsPost)
{
Message ="This is from the postback";
}
else
{
Message="This is without postback";
}
}
And we can now print that variable with following HTML Form.
<form method="POST" action="" >
<input type="Submit" name="Submit" value="Submit"/>
<p>@Message</p>
</form>

Here submit button will submit the form and based on that it will print message. Let’s see how it looks in browser before post back and after post back.

WithoutPostback

And After post back

AfterPostaback

So that’s it. Now you can do lots of stuff with IsPost property possibilities are unlimited!!. Hope this will help you..Happy Programming.

Technorati Tags: ,,
Shout it
kick it on DotNetKicks.com
Share:

Output caching with ASP.NET MVC Razor

Caching data greatly increase the website performance as its not going to do server round trip. I have already mentioned how you can use Output caching in web forms in earlier blog post here. Let’s see how we can do same thing with asp.net mvc. For this example I have used asp.net mvc razor. In asp.net mvc you can use OutputCache attribute to cache the output. Just like below.

[OutputCache(VaryByParam="none",Duration=60)]
public ActionResult Index()
{
ViewModel.Message = DateTime.Now.ToString();
return View();
}
Here it will cache the view for 60 second and will not go for server round trip. Let’s see How it will look into the browser.

Temp

You can also set the output caching in web.config and and create output cache profile which you can use any where like following.
<caching>
<outputCacheSettings>
<outputCacheProfiles>
<clear/>
<add
name="MyOuputCacheProfile"
duration="60"
varyByParam="none" />
</outputCacheProfiles>
</outputCacheSettings>
</caching>
Here how you can use that profile.

[OutputCache(CacheProfile = "MyOuputCacheProfile")]
public ActionResult Index()
{
ViewModel.Message = DateTime.Now.ToString();
return View();
}
It support four type of settings for output caching. VaryByContentEncoding, VaryByParam, VaryByCustom,VaryByHeader. Hope this will help you!! happy Programming.

Technorati Tags: ,,
Shout it
kick it on DotNetKicks.com
Share:
Thursday, December 2, 2010

What is difference between HTTP Handler and HTTP Module.

Here are the difference between HTTP Handlers and HTTP Modules.

Http Handlers:

Http handlers are component developed by asp.net developers to work as end point to asp.net pipeline. It has to implement System.Web.IHttpHandler interface and this will act as target for asp.net requests. Handlers can be act as ISAPI dlls the only difference between ISAPI dlls and HTTP Handlers are Handlers can be called directly URL as compare to ISAPI Dlls.

Http Modules:

Http modules are objects which also participate in the asp.net request pipeline but it does job after and before HTTP Handlers complete its work. For example it will associate a session and cache with asp.net request. It implements System.Web.IHttpModule interface.

HTTP Handler implement following Methods and Properties

  1. Process Request: This method is called when processing asp.net requests. Here you can perform all the things related to processing request.
  2. IsReusable: This property is to determine whether same instance of HTTP Handler can be used to fulfill another request of same type.

Http Module implements following Methods and Properties.

  1. InIt: This method is used for implementing events of HTTP Modules in HTTPApplication object.
  2. Dispose: This method is used perform cleanup before Garbage Collector destroy everything.

An Http Module can Support following events exposed to HTTPApplication Object.

  1. AcquireRequestState: This event is raised when asp.net request is ready to acquire the session state in http module.
  2. AuthenticateRequest: This event is raised when asp.net runtime ready to authenticate user.
  3. AuthorizeRequest: This event is raised when asp.net request try to authorize resources with current user identity.
  4. BeginRequest: This event is raised when HTTP Modules receive new request.
  5. EndRequest: This event is raised before sending response to client.
  6. Disposed: This event is raised when http modules completes processing of request
  7. Error: This event is raised when any error occurs during processing of request.
  8. PreRequestHandlerExecute: This event is raised just before ASP.NET begins executing a handler for the HTTP request. After this event, ASP.NET will forward the request to the appropriate HTTP handler.
  9. PostRequestHandlerExecute: This event is raised when when HTTP Handler will finish the execution of current request.
  10. PreSendRequestContent: This event is raised just before ASP.NET sends the response contents to the client. This event allows us to change the contents before it gets delivered to the client. We can use this event to add the contents, which are common in all pages, to the page output. For example, a common menu, header or footer.
  11. PreSendRequestHeaders: This event is raised before asp.net Just send response header to client browser.
  12. ReleaseRequestState: This event is raised when asp.net runtime finishes handling of all the request.
  13. ResolveRequestCache: This event is raised to determine whether the request can be fulfilled by returning the contents from the Output Cache.
  14. UpdateRequestCache: This event is raised when ASP.NET has completed processing the current HTTP request and the output contents are ready to be added to the Output Cache.

Hope this will help you better understanding of HTTP Handler and HTTP Modules. I will post an real time implementation code in forthcoming blog post.

Shout it
kick it on DotNetKicks.com
Share:
Wednesday, December 1, 2010

GUID Vs Int data type as primary key

Recently one of my friend ask me when I should go for GUID and When I should go for Int as primary key in table. So decided to write a blog post for it. Here are advantages and disadvantage of the GUID and INT.

INT Data Type:

Advantages:

  1. Its required small space in terms of the storage it will only allocates 4 bytes to store data.
  2. Insert and update performance will be faster then the GUID. It will increase the performance of the application.
  3. Easy to index and Join will give best performance with the integer.
  4. Easy to understand and remember
  5. Support of function that will give last value generated like Scope_Indentity()

Disadvantages:

  1. If you are going to merge table frequently then there may be a chance to duplicated primary key.
  2. Limited range of uniqueness if you are going to store lots of data then it may be chance to run out of storage for INT data type.
  3. Hard to work with distributed tables.

GUID Data Type:

Advantages:

  1. It is unique for the current domains. For primary key is uniquely identifies the table.
  2. Less chances of for duplication.
  3. Suitable for inserting and updating large amount of data.
  4. Easy for merging data across servers.

Disadvantages:

  1. Bigger storage size (16bytes) will occupy more disk size then integer.
  2. Hard to remember and lower performance with Join then integer.
  3. Don’t have function to get last uniquely generated primary key.
  4. A GUID primary Key will added to all the other indexes on tables. So it will decrease the performance.

Conclusion:

From above the advantages and disadvantages we can conclude that if you are having very large amount of data in table then go for the GUID as primary key in database. Otherwise INT will give best performance. Hope this will help you. Please post your opinion as comment.

Shout it
kick it on DotNetKicks.com
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