使用Enterprise Library或不? [英] To use Enterprise Library or not?

查看:228
本文介绍了使用Enterprise Library或不?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我与每一个复杂的业务逻辑一个多层的基于SOA的企业应用工作。许多业务验证需要从数据库中大量数据的支持,这减慢性能。并发用户的数量约为1000。
客户端是多层,顶部的WinForms。

我们正在考虑,几乎所有的企业库块。


  • 缓存应用程序块

  • 数据访问应用程序块

  • 异常处理应用程序块

  • 记录应用程序块

  • 策略注入应用程序块

  • 安全应用程序块

  • Unity应用程序块

  • 验证应用程序块


    1. 是去图书馆企业正确的方式?

    2. 请建议,在您看来,更好的库/框架,但考虑到讲述方式他们是更好的。

    3. 难道是不好的做法与其他库混合企业库?例如,我们考虑使用log4net的日志记录。



解决方案

在我看来,有大多数的一切更好的工具企业库一样。


  • 数据访问块

    我承认,因为我与EntLib的一个项目工作,它一直是几年,但我记得该数据块是在什么它提供非常有限的。全功能的ORM像NHibernate的或实体框架,甚至可以查询工具,如亚音速提供的的多。每一个项目我上工作不使用NHibernate的,我最终实现的功能,我会得到与NHib在框中自由。


  • 缓存应用程序块

    使用带有缓存的ORM将覆盖大部分的一切缓存块呢。


  • 异常处理块

    有就是从这里开始,一些好的想法,但这个概念可以的极大地的在提高。里纳特阿卜杜林有一些很好的开始信息<一个href=\"http://abdullin.com/journal/2008/12/1/net-exception-handling-action-policies-application-block.html\">leveraging异常处理的操作策略。


  • 日志记录应用程序块

    使用NLOG或log4net的。期。如果你需要一个门面,使用简单的日志门面或的 Common.Logging 。记录是一种非常有限良好定义的组成部分。该框架是几乎相同的,稳定的。无需过于复杂这一点。


  • 政策注塑和放大器;团结块

    研究DI /国际奥委会和挑选一个。不能几乎没有出错。这里是一个一个很好的列表的考虑。


  • 安全性与;验证块

    在这一点上,我们发现了这么多的EntLib更好的选择,即把它作为一个依赖以支持安全或验证感觉重。此外,还有很多其他的工具来协助安全(犀牛安全)和验证(的 XVAL ,<一个href=\"http://abdullin.com/journal/2008/11/23/net-application-block-for-validation-and-business-rules.html\">Lokad)


I'm working with a multitier SOA based enterprise application with every complex business logics. Many business validations require large amount of support data from database, which slow down the performance. The number of concurrent users are about 1000. The client is multitier with WinForms on top.

We are considering almost all the enterprise library blocks.

  • Caching Application Block
  • Data Access Application Block
  • Exception Handling Application Block
  • Logging Application Block
  • Policy Injection Application Block
  • Security Application Block
  • Unity Application Block
  • Validation Application Block

    1. Is enterprise library right way to go?
    2. Please suggest libraries/frameworks that are better in your opinion, but consider telling way they are better.
    3. Would it be bad practice to mix enterprise library with other libraries? For example we consider using log4net for logging.

解决方案

In my opinion, there are better tools for most everything the Enterprise Library does.

  • Data Access Block

    I'll admit it has been a couple years since I worked with EntLib on a project, but as I recall the Data block was very limited in what it offered. Full featured ORM's like NHibernate or Entity Framework, or even query tools like SubSonic offer far more. Every project I work on that doesn't use NHibernate, I end up implementing features that I would get "free in the box" with NHib.

  • Caching Application Block

    Using an ORM with caching would cover most everything the caching block does.

  • Exception Handling Block

    There's some good ideas starting here, but the concept can be greatly improved upon. Rinat Abdullin has some good starting info on leveraging action policies for exception handling.

  • Logging Application Block

    Use NLog or log4net. Period. If you need a facade, use Simple Logging Facade or Common.Logging. Logging is a very limited a well defined component. The frameworks are nearly identical and stable. No need overcomplicating this.

  • Policy Injection & Unity Blocks

    Research DI/IoC and pick one. Can't hardly go wrong. Here's a good list of one's to consider.

  • Security & Validation Blocks

    At this point, we've found better options for so much of the EntLib, that bringing it in as a dependency to support Security or Validation feels to heavy. Again, there's plenty of other tools to assist with Security (Rhino Security) and Validation (xVal, Lokad)

这篇关于使用Enterprise Library或不?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆