C |
31 Dec 2009
Updated: 31 Dec 2009
Rating: 1.92/5
Votes: 6
Popularity: 1.50
Licence: CPOL
Views: 8,053
Bookmarked: 2
Downloaded: 0
I explored a bit more on Entity framework,during last week of 2009 and here goes my observations on how to extend the Entity Framework functionality if you want to customize the normal/ideal flow of Entity framework execution engine.1) OnContextCreatedBy default a declaration of this...
|
C# |
18 Dec 2009
Updated: 23 Dec 2009
Rating: 2.07/5
Votes: 5
Popularity: 1.44
Licence: CPOL
Views: 11,510
Bookmarked: 1
Downloaded: 0
Introduction...
|
|
2 Mar 2010
Updated: 2 Mar 2010
Rating: 2.33/5
Votes: 5
Popularity: 1.63
Licence: CPOL
Views: 5,780
Bookmarked: 1
Downloaded: 0
Refactoring Tips - Tip 10Tip 10 If the derived classes(or concrete/specialized classes) cant make use of all the functionalities (100% usage) of its base class(though it is a 'is a kind of' relationship among them, then prefer delegation/composition over...
|
|
10 Mar 2010
Updated: 10 Mar 2010
Rating: 3.33/5
Votes: 8
Popularity: 3.01
Licence: CPOL
Views: 12,092
Bookmarked: 1
Downloaded: 0
Refactoring Tips - Tip 11Tip 11Refactoring 'OR' type of conditions - In a method,if we have multiple conditional statements,with the same result. apply this rule.Bad practiceprivate int Method(){ int result = 1; if( condition1) result = 0; if( condition2) ...
|
|
22 May 2010
Updated: 22 May 2010
Rating: 4.64/5
Votes: 7
Popularity: 3.92
Licence: CPOL
Views: 12,231
Bookmarked: 4
Downloaded: 0
.Net Performance Tip - 1
|
|
22 May 2010
Updated: 22 May 2010
Rating: 3.00/5
Votes: 8
Popularity: 2.71
Licence: CPOL
Views: 20,653
Bookmarked: 1
Downloaded: 0
.Net Performance tip - 2
|
|
22 May 2010
Updated: 22 May 2010
Rating: 3.60/5
Votes: 8
Popularity: 3.25
Licence: CPOL
Views: 16,740
Bookmarked: 1
Downloaded: 0
.Net Performance tip - 3
|
|
26 Dec 2009
Updated: 26 Dec 2009
Rating: 2.46/5
Votes: 6
Popularity: 1.92
Licence: CPOL
Views: 7,260
Bookmarked: 5
Downloaded: 0
From past few days i was doing some R & D on the upcoming Entity framework from Microsoft, and i found it was interesting in many ways,The first part which i liked the most is -Querying to the Entity Data Model(EDM) rather than the real data store.At a high level , we have plenty of...
|
|
21 Dec 2009
Updated: 20 Jan 2010
Rating: 2.58/5
Votes: 27
Popularity: 3.70
Licence: CPOL
Views: 50,434
Bookmarked: 10
Downloaded: 0
.NET Coding Best Practices - Vinayak's thumb rulesDo not hard code strings/ numerics. Instead of that use constants as shown below.Bad practice int Count; Count = 100; if( Count == 0 ) { // DO something… }Good practice int Count; Count = 100; private...
|
|
28 Feb 2010
Updated: 28 Feb 2010
Rating: 3.03/5
Votes: 12
Popularity: 3.27
Licence: CPOL
Views: 8,380
Bookmarked: 1
Downloaded: 0
Refactoring Tips - Tip 2Tip 2Avoid temporary variable declaration, if the variable is just a place holder as shown below.Bad practiceprivate string GetData(){ string temp; temp = expression + ( var1 * var2).ToString();//Some expression which calculate the desired...
|
|
28 Feb 2010
Updated: 28 Feb 2010
Rating: 2.42/5
Votes: 8
Popularity: 2.19
Licence: CPOL
Views: 5,020
Bookmarked: 1
Downloaded: 0
Refactoring Tips - Tip 3Tip 3In a class,if the expression is repeating across the methods. Then encapsulate/wrap that with either a Property or Method as shown below.This increases the code reuse,easy to extend and maintainBad practicepublic class A{ private int Var1;...
|
|
1 Mar 2010
Updated: 1 Mar 2010
Rating: 3.12/5
Votes: 7
Popularity: 2.63
Licence: CPOL
Views: 7,430
Bookmarked: 0
Downloaded: 0
Refactoring Tips - Tip 6Tip 6 Remove unused variable from the codeBad practiceIn the following code var1 is declared but not used public class A { private int var1; private void Method() { //Some statements... } }Good...
|
|
1 Mar 2010
Updated: 1 Mar 2010
Rating: 2.33/5
Votes: 5
Popularity: 1.63
Licence: CPOL
Views: 6,220
Bookmarked: 0
Downloaded: 0
Refactoring Tips - Tip 7Tip 7Remove unused Methods from code.This helps to achieve highly maintainable codeIn the following snippet function Method1 is declared but not used.Bad practice public class A { private void Method1() { //Some statements......
|
|
1 Mar 2010
Updated: 1 Mar 2010
Rating: 2.33/5
Votes: 5
Popularity: 1.63
Licence: CPOL
Views: 5,610
Bookmarked: 0
Downloaded: 0
Refactoring Tips - Tip 8Tip 8Remove classes/types declared,but not used.Remove namespaces, which are included in code,but not used - This usually happens when we are in process of removing the Classes or types which are not used.I hope this helps!.Regards,-Vinayak
|
|
28 Feb 2010
Updated: 1 Mar 2010
Rating: 2.88/5
Votes: 8
Popularity: 2.60
Licence: CPOL
Views: 10,480
Bookmarked: 1
Downloaded: 0
Refactoring Tips - Tip 4Tip 4 Based on one of the design principle - SRP( Single Responsibility Principle) There should be only one reason to change or break a classs.Dont mixup more than one functionality in a class.Bad practice Dont have domain and persistence logic in a...
|
|
2 Mar 2010
Updated: 2 Mar 2010
Rating: 2.33/5
Votes: 5
Popularity: 1.63
Licence: CPOL
Views: 7,241
Bookmarked: 0
Downloaded: 0
Refactoring Tips - Tip 9Tip 9If your static method is operating on any entity/type/class,try to move the method to the entity.For eg:Bad practicepublic class Utility{ public static void Method1(Customer cust) { //Some processing on the Entity customer... }...
|
|
1 Mar 2010
Updated: 6 Mar 2010
Rating: 2.75/5
Votes: 8
Popularity: 2.48
Licence: CPOL
Views: 7,340
Bookmarked: 0
Downloaded: 0
Refactoring Tips - Tip 5Tip 5Always Programme for interface/abstract than concrete classes, Which will gives the option for extension, loose coupling and plugin.This will also be in line with one of the design principle - LSP(Liskov's substitution Principle) - in simple word it...
|
|
28 Feb 2010
Updated: 24 Mar 2010
Rating: 2.80/5
Votes: 10
Popularity: 2.80
Licence: CPOL
Views: 11,130
Bookmarked: 3
Downloaded: 0
Hi,I was thinking to wrtite a series of tips on Refactoring exercise from past couple of months.Here goes the result of that exerciseTip 1 Try to declare the variable close to its first value assignment.For eg :Try to avoid this - private void Method(){ int...
|
Web Development
|
ASP.NET |
20 Apr 2010
Updated: 20 Apr 2010
Rating: 4.86/5
Votes: 7
Popularity: 4.10
Licence: CPOL
Views: 14,051
Bookmarked: 7
Downloaded: 0
Page Transfer best practices in ASP.NET.Scenario :Inside Try/Catch block, If you want to transfer/Redirect the page to another page - To avoid ThreadAbortException Option 1Use Response.Redirect("Pagetotransfer.aspx",false);OrOption...
|
|
20 Apr 2010
Updated: 20 Apr 2010
Rating: 4.90/5
Votes: 7
Popularity: 4.14
Licence: CPOL
Views: 25,732
Bookmarked: 6
Downloaded: 0
ViewState and Server.Transfer Best practicesScenario : Server.Transfer("destiny.aspx",true); Above statement will cause ViewState is invalid exceptionReason :By default EnableViewStateMac is set to true, and hence on every page life cycle , it tries to validate the value of the...
|
|
5 Aug 2010
Updated: 5 Aug 2010
Rating: 5.00/5
Votes: 4
Popularity: 3.01
Licence: CPOL
Views: 11,140
Bookmarked: 2
Downloaded: 0
.Net memory tuning
|
|
5 Aug 2010
Updated: 5 Aug 2010
Rating: 5.00/5
Votes: 6
Popularity: 3.89
Licence: CPOL
Views: 22,831
Bookmarked: 6
Downloaded: 0
Probable leak while using SqlDataReader in ADO.NET
|
|
6 Aug 2010
Updated: 6 Aug 2010
Rating: 4.60/5
Votes: 4
Popularity: 2.77
Licence: CPOL
Views: 13,090
Bookmarked: 1
Downloaded: 0
Twist in Performance counters for Connection pool settings
|
|
6 Aug 2010
Updated: 6 Aug 2010
Rating: 5.00/5
Votes: 4
Popularity: 3.01
Licence: CPOL
Views: 16,232
Bookmarked: 2
Downloaded: 0
Scaling options for ASP.NET Sessions
|
|
23 Aug 2010
Updated: 23 Aug 2010
Rating: 5.00/5
Votes: 3
Popularity: 2.39
Licence: CPOL
Views: 14,270
Bookmarked: 1
Downloaded: 0
Best Strategy for deploying ASP.NET application and application Pool
|
|
23 Aug 2010
Updated: 23 Aug 2010
Rating: 4.60/5
Votes: 5
Popularity: 3.22
Licence: CPOL
Views: 16,130
Bookmarked: 5
Downloaded: 0
Entity Framework 4 twist in Complex Type
|
IIS |
5 Aug 2010
Updated: 5 Aug 2010
Rating: 5.00/5
Votes: 5
Popularity: 3.49
Licence: CPOL
Views: 40,088
Bookmarked: 2
Downloaded: 0
Setting the best value for Application pool Queue length limit
|