Tuesday, December 24, 2013

Loading Entities in Entity Framework

In Entity Framework you can load data in few different ways, Eager loading Lazy loading Explicit loading Eager Loading Here query for a one type of entity also loads other related entities as a part of the query. You can load related entities by using Include method. Include is an extension method.         List<Employee>...

Saturday, December 21, 2013

DbContext in Entity Framework

Entity Framework, commonly known as EF (latest being EF Core) is a ORM tool which is introduced and maintained by Microsoft. In EF, DbContext Is the primary class which is used to interact with data as objects. DbContext is often referred to as context. The context class manages entity objects during run time, which includes populating data...

Saturday, December 7, 2013

Performance considerations in KnockoutJS

For web applications performance is an important factor to consider. In KnockoutJS when you do things in the wrong way this matters. We'll see some key areas you need to consider about performance in KnockoutJS.  First lets look at fundemental building blocks of KnockoutJS application observables most basic fundamental building block. You need to have these observableArrays subscribers get...

Monday, December 2, 2013

Thursday, November 28, 2013

Dependency Injection

Simply Dependency Injection means giving an object its dependencies, instead of them itself having initializing them. Dependency Injection is useful for testing as well. Because it allows dependencies to be mocked or stubbed out.  Types of Dependency Injection ## Constructor injection Setting dependencies through constructor Brilliant Example - Programmers SO Setter injection Setting...

Sunday, November 17, 2013

Wednesday, November 13, 2013

Other resources for Entity Framework

Difference between Eager loading and Lazy loading http://stackoverflow.com/questions/3485317/entity-framework-4-single-vs-first-vs-firstordefault Bulk Inserting in Entity Framework http://stackoverflow.com/questions/5940225/fastest-way-of-inserting-in-entity-framework http://stackoverflow.com/questions/6107206/improving-bulk-insert-performance-in-entity-framework ............... By...

Monday, November 11, 2013

Interesting Findings ASP.NET

HttpClient Use HttpClient for Downloads. It is a new feature. Makes it easier to download files in a separate thread. http://developer.greenbutton.com/downloading-large-files-with-the-net-httpclient/ http://blogs.k10world.com/technology/webclient-httpclient-consume-http-requests/ http://www.dotnetperls.com/httpclient  Handling 404 in ASP.NET MVC Correctly (SO)   HttpServerUtility (MSDN) Provides...

Saturday, November 9, 2013

Interesting Things on C#

Func vs Action Func returns values from the delegate (LINQ .Where()) Action does not return anything (LINQ Foreach()) link Fluent interfaces https://www.simple-talk.com/dotnet/.net-framework/fluent-code-in-c/ Asynchronous Programming  Using async and await  link Fluent validations https://fluentvalidation.codeplex.com IDisposable interface MSDN Documentation IDisposable...

Tuesday, November 5, 2013

Routing in ASP.NET MVC

Enables you to map URLs that does not map to any specific files in a web site. You should add default MVC routes to Application_Start event in Global.asax file as shown in the example below This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open...

Tuesday, October 22, 2013

Introduction to AngularJS

AngularJS is a pure JavaScript framework. It extends HTML attributes with Directives known as ng-directives. A very basic angular application looks like below, Here we define the ng-app in which the angular code resides. We add ng-model directive to input for data binding and show it in curly brackets in mustache style in next line. (We usually...

Saturday, October 12, 2013

HTML5 WebSockets

WebSockets is the next generation bi-directional communication technology for web applications. This operates over a single socket and is exposed via a JavaScript interface.  var Socket = new WebSocket(url, [protocal] ); The socket starts out as a HTTP request and updates to TCP socket after a HTTP handshake. After that either can receive data.  Socket.IO Is a real time...

Thursday, October 10, 2013

Structural elements in HTML5

<header> Specifies a header for a document or a section. Can have several header elements for a page. You cannot place header tag within a footer, address or another header <footer> Just like header defines a footer for a document or a section. It typically contains author of the document, copyright information etc. You can...

Media Controls in HTML5

To make our lives easier HTML5 introduced better media support via. <audio> and <video> elements. You can embed videos in your page using following codes <video src="http://v2v.cc/~j/theora_testsuite/320x240.ogg" controls> Your browser does not support the <code>video</code> element. </video> You can embed...

Saturday, October 5, 2013

Design patterns for cloud

Strangler pattern Incrementally developing a newer system replacing the old system. Parts of the old system is replaced with features in new system eventually replacing the complete system. This pattern is mainly helpful for backend systems (API). Federated Identity Pattern Delegate authentication to an external identity provider. Simplify...

Tuesday, September 10, 2013

Interesting Findings - Databases

What is SQL Server clusters Important in high availability http://www.brentozar.com/archive/2012/02/introduction-sql-server-clusters/ http://stackoverflow.com/questions/1163216/database-cluster-and-load-balancing http://stackoverflow.com/questions/tagged/cluster-computing Difference between identifying and non-identifying relationships http://stackoverflow.com/questions/762937/whats-the-difference-between-identifying-and-non-identifying-relationships Hi/Lo...

Monday, September 9, 2013

Introduction to Web API

HTTP is not just for serving up web pages. It is also a powerful platform for building APIs that expose services and data. ASP.NET Web API is a framework for building web APIs on top of the .NET Framework. In general, you don't need to know ASP.NET MVC to use Web API. See this nice poster http://www.asp.net/media/4071077/aspnet-web-api-poster.pdf Unlike Controllers which inherits Controller...

Saturday, August 24, 2013

Control flow in KnockoutJS

foreach binding duplicates section of markup for each entry in an array. Binds each copy of that markup to array item. You can nest foreach binding with other control-flow bindings such as if and with. You can use special context property $data, to refer the current array item itself. You can also use $index to refer the index of current array element. $index is an observable. Similarly you can...

Introduction to KnockoutJS

KnockoutJS is a JavaScript library of MVVM pattern with templates. It does not depend on jQuery.  With KnockoutJS you can have, Dependency tracking : Automatically update UI when model changes Declarative bindings: Connect parts of your UI to your data model Extensible: Implement custom behaviors What is MVVM pattern Model : objects and operations in your business domain, this is independent...
Powered by Blogger.


Software Architect at Surge Global/ Certified Scrum Master

Experienced in Product Design, Software Engineering, Team management and Practicing Agile methodologies.

Search This Blog

Facebook