One of the best ways refactor a long method is to break it up into several methods. The extract method refactoring enable you to do this by selecting a block of code and select the Extract method and create a refactored extract method. Extract Method is just a refactoring operation that provides an easy way to create a new method from a code fragment in an existing member. You can create a new method by extracting a selection of code from inside the code block of an existing member. Take a look at this example (don’t mention about the functionality of this method, I'm just go

There is a fact that writing application in JavaScript is so hard. JavaScript is not a programming language and this makes it so hard to manipulate it specially in large application and JavaScript is never designed for large application development. Typescript is a language for application scale JavaScript development, free and open source programming language by Microsoft which compiles to plain JavaScript. Typescript is entirely dynamically typed and every JavaScript code is a valid typescript code and you can copy and Paste JavaScript code to typescript. Typescript supports tools for lar

Today I was in the second meeting of Iran agile community, although the discussion was a little bit messy but I made some documents around. I'm just going to share what the members talked about and this blog post is the opinions of the members about "How to make an agile team motivated?"


What's the motivation?

Motivation is the process that initiates, guides and maintains goal-oriented behaviors. Everybody has a motivation, motivation to do som

Document oriented databases AKA Semi-structured data are designed for managing , storing and retrieving the document orientation databases. Document data stores are kinds of NoSQL databases.  There is no any kind of schema and limitation of fixed table fields and relations of traditional RDBMS databases in Document Store Databases. these databases store documents into a database. You can imagine the document a JSON document

PagedList.Mvc is one of many good paging and sorting packages for ASP.NET MVC, in the below simple example I'm gonna to implement it for content (posts) of a blog post, install the PagedList.Mvc via nuget and take a look at this code. This is an action which returns blog posts:

  1.        public ActionResult List(int? page)
  2.         {
  3.             var posts = _blogService.GetAllBlogPosts();
  4.             var pageNumber

POCO which stands for "Plain Old CLR Objects" is an entity/class and doesn’t depend on any specific base class. It is like any other Dot net class you have seen before. These POCO entities (also known as persistence-ignorant objects) also support most of the same LINQ queries you use in you Data access layers for your business objects.  POCO is a simple object to be used with a complicated, special object framework such as an ORM component. In other definition POCOs are entities of your domain, so When you use enti

As you know, Dependency Inversion Principle is the last principle of SOLID. I talked about SOLID principle and fundamental in my previous post that was about SRP. Now I'm gonna to consider the dependency inversion of SOLID. Based on definition "High level modules should not depend upon low level module, both should be depend upon abstraction". Or in other definition "abstraction should not depend upon details, details should depend upon abstraction

I had a long discussion with one of my colleague about using a base class in Data access layer or repository instead of implementing all common scenario like CRUD operation for every aggregate. it's Layer SuperType pattern that I'm talking about. I've posted about Layer SuperType pattern before, but now I'm going to know that what will happen in an application with large amounts of requests and transactions to performance in the case of using base class for Common methods of DAL.

SOLID stands for five basic principles of Object Oriented programming to create a system that is easy to maintainable and  extensible. The principles of SOLID are guidelines to create refactored and clean code understandable by other developers. Here are the five principles of OOP:


Single responsibility principle

Open-Close Principle

Liskov Substitution Principl

Optimistic and pessimistic concurrency control AKA optimistic and pessimistic locking is a mechanism to preserve database integrity in multi-user applications. Optimistic and pessimistic are two kinds of locking control. In general concurrency control ensures that correct results for operations are generated. Perhaps you are familiar with locking to serialize the data for accessing shared data; for example when several people in a system are working on a same data, what will happen if they save the changes at the same time?? Imagine this condition