Sunday, May 1, 2016

Key Design Principles of Software Architecture

  • Separation of concerns. Divide your application into distinct features with as little overlap in functionality as possible. 
  • Single Responsibility principle. Each component or module should be responsible for only a specific feature or functionality, or aggregation of cohesive functionality.
  • Principle of Least Knowledge (also known as the Law of Demeter or LoD). A component or object should not know about internal details of other components or objects.
  • Don’t repeat yourself (DRY). For example, in terms of application design, specific functionality should be implemented in only one component; the functionality should not be duplicated in any other component.
  • Minimize upfront design. Only design what is necessary. In some cases, you may require upfront comprehensive design and testing if the cost of development or a failure in the design is very high. In other cases, especially for agile development, you can avoid big design upfront (BDUF). If your application requirements are unclear, or if there is a possibility of the design evolving over time, avoid making a large design effort prematurely. This principle is sometimes known as YAGNI ("You ain’t gonna need it").

Resources

Tuesday, December 31, 2013

System.Data.UpdateException

An Entity Framework error with visual stdio 2010 

Problem:
1- update EF after update Data base
2- try to insert data from asp.net page more than one in to table which its primary key is identity (auto incremental )
      A- first one insert correctly  
     B- second one throw this exception (exception source is  "System.Data.Entity")


Solution
 just regenerate the .edmx file (delete old file and generate new one)  :)