zoukankan      html  css  js  c++  java
  • Application review: Northwind Starter Kit

    I continue to try to find a sample application for Northwind to use as my contrasting example for an article that I am writing, and I found the Northwind Starter Kit project. Even the project summary page gave me a few twitches, here is a small piece with the twitch inducing stuff bolded:

    The application has been designed using common patterns, such as the ones defined within the "classic" "Designs Patterns" by Erich Gamma et al. and "Pattern of Enterprise Application Architecture", by Martin Fowler; though not required, these lectures are strongly recommended.

    Guys! This is Northwind, the likelihood that you’ll need design patterns to build this application is nil to none! That just screens complexity overload.

    Domain logic is implemented by means of a Domain Model, onto a layer of services adds application logic. The model is persisted by a DAL designed around the principles of the "Repository" patterns, which has been implemented in a LINQ-friendly way.

    Northwind is a CRUD app, at its core, all of those things are adding complexity, and they aren’t really adding much at all. In fact, they are going to create just noise, and make working with things that much harder.

    And then I opened the project, and I got this:

    image

    I mean, really? Seriously?!  22(!) projects to do a sample application using Northwind?

    This is the point where I gave up on this as something that could be useful, but here are a few other gems as well:

    image

    image

    I really like how the Update method does what it is meant to do, right?

    Note that in either implementation, we are looking at totally and drastically different behavior.

    Let us look at the interface, too:

    image

    The design is straight out of Patterns of Enterprise Application Architecture, and it is totally the wrong design to be using if you are using a modern OR/M.

    Seriously, this is Northwind we are talking about, why make things so freaking complex?!

  • 相关阅读:
    创建字典的方法
    python中,a=10.0 b=10.0 a is b 为什么输出是false
    Python 拷贝对象(深拷贝deepcopy与浅拷贝copy)
    二十三种设计模式及其python实现
    python字符串替换的2种方法
    数据库索引的实现原理?
    异步IO数据库队列缓存RabbitMQ队列
    Python 如何用列表实现栈和队列?
    Python数据结构与算法?
    django -----原生SQL语句查询与前端数据传递?
  • 原文地址:https://www.cnblogs.com/shihao/p/2320526.html
Copyright © 2011-2022 走看看