VS.NET 2013 and ASP.NET MVC 5!

July 14, 2013

Hello friends, ASP.NET MVC 5 has been bundled with VS.NET 2013 preview release. Here are few links for your reference.

VS.NET 2013:

The below url has the fantastic list of information about ASP.NET and Web Tools for Visual Studio 2013 Preview as well as the updated ASP.NET and Web Tools. Enjoy reading!

http://www.asp.net/vnext/overview/latest/release-notes#TOC10

ASP.NET MVC 5:

Tutorial available for Getting Started with ASP.NET MVC 5.
http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started

Note:
The ASP.NET MVC Framework is an open source web application framework that implements the model–view–controller (MVC) pattern.

http://aspnet.codeplex.com/wikipage?title=MVC

As of now, the download is available for MVC 4 only.

Just a pointer to the title related information. 🙂

Advertisements

2012 in review – My WordPress posts!

December 31, 2012

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 10,000 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 17 years to get that many views.

Click here to see the complete report.

VS.NET 2012’s new features in “MVC 4, Razor v2”

August 24, 2012

Here are two cool enhancement in Razor v2! Enjoy reading!!

1. No need to use “@href” or “@url.content” anymore for resolving the Url. We can simply use “~” as we use it in ASP.NET development

Example:
< script src=”@Url.Content(“~/Scripts/jGrowl.js”)”>

can be just simply as below
< script src=”~/Scripts/jGrowl.js”>

Note: <space> has been added after “<” in < script> for the perfect view

2. Conditional attributes:

Please refer: http://vibrantcode.com/blog/2012/4/10/whats-new-in-razor-v2.html/

Features in Visual Studio 2012 and ASPNET 4.5” Free E-book

August 4, 2012

There is an E-Book available for download in Telerik’s website. This e-book contains an overview of the features that would help great you as a developer :).

So, what is in this e-book you ask? Well…..

  • JavaScript Intellisense
  • CSS Intellisense
  • ASP.NET and Web API (overview and CRUD operations)
  • Strongly Typed Data Binding
  • Page Inspector (new debugging tool)
  • Etc

Here you go…

Free E-book: Time-Saving VS11 and ASP.NET 4.5 Features You Shouldn’t Miss

Daily life – The real fact!

August 4, 2012

Daily life - The real fact!

RowID or RowNumber for each rows in SQLServer!

April 15, 2012

Yesterday when I was interviewing candidates for one of our requirement, I asked a simple select query to write that “how to get, only the last two rows of an Employee table?”

The answer were ( only from few 😦 ) : SELECT TOP 2 * FROM Employee ORDER BY EmployeeId DESC (Provided EmployeeId INT, PrimaryKey)

Then, just i altered the question with “we don’t have an “INT” datatype for EmployeeId column, but UniqueIdentifier (GUID) as well, so now how would you get the last 2 rows?

Some of them were tried to use ROW_NUMBER(), but as that requires OVER(ORDER BY <Column> DESC), and the primary key is with GUID, so they got blocked!

But here is one solution I had, and with that I was asking them: 🙂

SELECT TOP 2 *, %%physloc%% AS PhysLoc FROM Employee ORDER BY PhysLoc DESC

Ref:

http://www.codeproject.com/Articles/159785/Physical-location-of-a-row-in-SQL-Server

 

DENALI (SQLServer 2012):

The special thing is that, we have got the cool and long waiting stuff  “SEQUENCE” in DENALI as it is in ORACLE. That helps great for the above question, with the elegant solution.

Here you go…

CREATE SEQUENCE RowId
    AS int
    START WITH 1
    INCREMENT BY 1 ;

SELECT TOP 2 *, NEXT VALUE FOR RowId AS NewId FROM Employee ORDER BY NewId DESC

Ref:

http://www.sqlservercentral.com/articles/sequence/88422/

http://msdn.microsoft.com/en-us/library/ff878058(v=sql.110).aspx

 

Hope this helps!

Focus

April 13, 2012

Delete a TFS task

April 13, 2012

Simply i was trying to create a sample task in TFS, its done successfully. Then tried to delete from there as it is a live one , and everybody would be looking into it. But, searching the options in TFS for long, i felt tired and nervousness. Finally, started googling and got few forums with no direct stuffs told. So thought of giving the stuff simple and humble 🙂

First of all, we need the exe file Witadmin.exe for deleting the tasks in TFS.

Where it resides? –  C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE  (you have to check the folder, depending upon the system type you have)

Initially, I was searching underneath C:\Program Files (x86)\Microsoft Team Foundation Server 2010 Power Tools, and got confused.

Here is the list of available commands with Witadmin:

Possible options:

So, finally, your command would look like…

>witadmin destroywi /Collection:http://%5BServerName%5D:8080/tfs/id:%5BId%5D

Note: Text kept inside “[]” differs as its provided to you. Also provided the permission to delete 😉

Hope, this helps! 🙂

Error “No Transport” Calling WCF REST action using jQuery

January 8, 2012

This issue has eaten up some of my time, trying myself to figure it out for the solution. Because, the following snippet worked great in FireFox. Only the boss “IE” was the killer there :).

var url = ‘http://localhost:35461/SampleApp.svc/get/Do/123;&#8217;;

        $.ajax({
            url: url,
            dataType: 'json',
            type: "GET",
            error: function (xhr, ajaxOptions, thrownError) {
                //debugger;
                $('#GetDiv').html("error");
            },
            success: function (model) {
                //debugger;
                $("#GetDiv").html(model.Echo);
            }
        });

Finally, after a bit of googling, I have got some references, that helped great.

Gotchas:

“…..We need to enable cross-domain requests in environments that do not support….”

Cors is equal to true if a browser can create an XMLHttpRequest object and if thatXMLHttpRequest object has a withCredentials property. To enable cross-domain requests in environments that do not support cors yet but do allow cross-domain XHRrequests (windows gadget, etc), set $.support.cors = true;”

Hence, the solution is……..

Add the following, in your client. It works like a charm.
jQuery.support.cors = true;

[Cors – Cross-Origin Resource Sharing]

There were some references to use dataType: ‘jsonp’, but that is a different story. I will write some later, what needs to be done if we say dataType: ‘jsonp’

Hope this helps someone…!

Do you know JavaScript?

November 12, 2011

Mind blowing one!

Michael Woloszynowicz has noticed many people adding ‘JavaScript’ to their resumes without really understanding it. He explains what he feels different levels of JS developers should know and why it’s important.

Here you go!

[ Just a copy & paste from www.w2lessons.com article http://goo.gl/x156J ]

A basic level of understanding for JavaScript includes:

  • Knowing the syntax of basic programming tools such as loops, if statements, try/catch, etc.
  • Understanding function definitions including the various ways they can be defined and assigned, as well as anonymous functions
  • Understanding basic scope principles, global (window) scope versus object scope (closures excluded)
  • Understanding the role of context and the use of the ‘this’ variable
  • Understanding the different ways to instantiate and declare an object as well as functions as objects
  • Understanding JavaScript comparison operators like ‘<‘, ‘>’, ‘==’, ‘===’,  what is falsy, and how object and string comparison works, as well as casting
  • Array indexing for object attributes and functions and how this differs from actual arrays (object literals vs. array literals)

An intermediate level of understanding includes:

  • Understanding timers, how they work, and when/how they can be useful as well as asynchronous method execution
  • In depth knowledge on callbacks and function application such as the ‘call’ and ‘apply’ methods for controlling context and function argument passing
  • Understanding JSON notation and the ‘eval’ function
  • Understanding closures, how they affect the performance of your code, and how they can be used to create private variables, along with the lovely (function(){})() call
  • AJAX and object serialization

An advanced level of understanding includes:

  • Understanding a methods ‘arguments’ variable and how it can be used to overload functions through arguments.length and make recursive calls through arguments.callee. It should be noted that use of arguments.callee can be dangerous as ECMAScript 5 Strict Mode doesn’t support it, although both jQuery (up to 1.4) and Dojo take advantage of it.
  • Advanced closures such as self-memoizing functions, currying, and partially applied functions
  • Function and html prototyping, the prototype chain, and how to use base JavaScript objects and functions (e.g. Array) to minimize coding
  • Object type and the use of instanceof and typeof
  • Regular expressions and expression compiling
  • With statements and why you shouldn’t use them
  • The most difficult part of all, knowing how to tie all these tools together into clean, robust, fast, maintainable, and cross browser compatible code.
Hope, you would feel great, reading this. And also i see that you started sharpening you! 🙂