有没有人有CSLA任何现实世界的经验? [英] Does anyone have any real-world experience of CSLA?

查看:247
本文介绍了有没有人有CSLA任何现实世界的经验?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我公司的主要网络应用迫切需要一个漂亮的库,使其以某种方式维护和可扩展性,以及我的同事曾建议CSLA。所以我买了这本书,但为:

  

的程序员不看书了

我想衡量它的SOFlow社会各界的意见。

因此​​,这里是我的问题:

  1. 如何可能人在使用CSLA?
  2. 有哪些优点和缺点?
  3. CSLA是否真的不与TDD?适合
  4. 在我有什么办法?
  5. 如果您在使用已停止或决定不为什么?
解决方案

在我具体回答你的问题,我想提出一些想法了。 CSLA是适合你的项目?这取决于。我个人认为里昂证券为基础的桌面应用程序,这并不值的单元测试作为一个高度优先事项。如果你想轻松扩展到N层应用程序CSLA是伟大的。 CSLA趋于得到一些长颈瓶,因为它不允许纯单元测试。这是真实的,但像任何技术,我相信有没有唯一正确的方法的。单元测试可能不会是你正在从事的具体项目。什么工作一个团队,一个项目可能会为其他球队或其他项目都不行。

也有许多误解,在问候CSLA。这不是一个ORM。它不是(CLSA使用Business Objects公司与放大器事实上,NHibernate的数据访问合适的真的很好在一起)的竞争对手NHibernate的。它正式确立的概念的移动对象的。

1。有多少人在使用CSLA?
根据该 CSLA论坛的,我会说,有相当多的CSLA为基础的项目在那里的。老实说,虽然,我不知道有多少人真正使用它。我已经用它在过去的两个项目。

2。有哪些优点和缺点?
虽然很难在很短的清单来概括,这里是一些亲/ CON的浮现在脑海中。
优点:

  • 可以很容易地得到新的发展起来 加快。里昂证券的书和样品 应用程序是伟大的资源,以跟上进度。
  • 验证框架是真正的世界级 - 并一直借用了许多许多其他非CSLA项目和技术
  • 在你的业务对象正级撤消
  • 配置线变化N层的可扩展性(注:甚至没有一个 重新编译是必要的)
  • 在关键技术是从真正的code抽象。当WCF是 介绍,它有上的影响最小 CSLA code。
  • 这是可能的Windows和Web项目之间共享你的业务对象。
  • CSLA促进正常化的的行为的,而不是正常化的数据的(离开数据库数据标准化)。

缺点:

  • 在困难的单元测试
  • 在缺乏关注的分离(一般业务对象里面都有他们的数据访问code)。
  • 如CSLA促进的行为的,而不是数据的正常化,这会导致在被命名类似业务对象,但有不同的目的正常化。这可能会导致一些混乱和感觉,就像你不能重复使用适当的对象。这就是说,一旦生理飞跃拍摄,它比是有道理的 - 它似乎不恰当的结构对象的老办法
  • 这不是时尚来构建应用程序这种方式。您可能很难得到开发商谁是热衷于技术。

3。在阅读完之后并CSLA真的不与TDD?适合
我还没有找到做TDD与里昂证券的有效途径。话虽如此,我相信有很多聪明的人在那里比我可能已经试图与更大的成功。

4。我有什么办法?
领域驱动,设计也越来越大推的时刻(这是理所当然的 - 这是梦幻般的一些应用程序)。也有一些有趣的图案从引进的LINQ(和LINQ to SQL,实体框架等)的发展。福勒的书 POEAA ,记录了很多的模式,可能是适合你的应用。请注意,某些模式竞争(即活动记录和信息库),从而意味着被用于特定的场景。虽然CSLA不完全匹配任何在这本书中所描述的模式,它最接近的Active Record(虽然我觉得要求对这个模式的精确匹配是短视的)。

5。如果你使用它已停止或决定不为什么?
我没有完全推荐里昂证券对我的最后一个项目,因为我相信,应用范围太大,里昂证券提供的好处。
我的没有的在Web项目中使用CSLA。我觉得还有其他的技术更适合在这种环境中构建应用程序。

总之,尽管里昂证券是什么,但一个的银弹的,它适用于某些情况下。

希望这有助于!

The main web application of my company is crying out for a nifty set of libraries to make it in some way maintainable and scalable, and one of my colleagues has suggested CSLA. So I've bought the book but as :

programmers don't read books anymore

I wanted to gauge the SOFlow community's opinion of it.

So here are my questions:

  1. How may people are using CSLA?
  2. What are the pros and cons?
  3. Does CSLA really not fit in with TDD?
  4. What are my alternatives?
  5. If you have stopped using it or decided against why?

解决方案

Before I specifically answer your question, I'd like to put a few thoughts down. Is CSLA right for your project? It depends. I would personally consider CSLA for desktop based applications that does not value unit testing as a high priority. CSLA is great if you want to easily scale to an n-tier application. CSLA tends to get some flack because it does not allow pure unit testing. This is true, however like anything in technology, I believe that there is No One True Way. Unit testing may not be something you are undertaking for a specific project. What works for one team and one project may not work for another team or other project.

There are also many misconceptions in regards to CSLA. It is not an ORM. it is not a competitor to NHibernate (in fact using CLSA Business Objects & NHibernate as data access fit really well together). It formalises the concept of a Mobile Object.

1. How many people are using CSLA?
Based on the CSLA Forums, I would say there are quite a number of CSLA based projects out there. Honestly though, I have no idea how many people are actually using it. I have used it in the past on two projects.

2. What are the pros and cons?
While it is difficult to summarise in a short list, here is some of the pro/con's that come to mind.
Pros:

  • It's easy to get new developers up to speed. The CSLA book and sample app are great resources to get up to speed.
  • The Validation framework is truly world class - and has been "borrowed" for many many other non-CSLA projects and technologies.
  • n-Level Undo within your business objects
  • Config line change for n-Tier scalability (Note: not even a recompile is necessary)
  • Key technologies are abstracted from the "real" code. When WCF was introduced, it had minimal impact on CSLA code.
  • It is possible to share your business objects between windows and web projects.
  • CSLA promotes the normalization of behaviour rather than the normalization of data (leaving the database for data normalization).

Cons:

  • Difficulty in unit testing
  • Lack of Separation of Concern (generally your business objects have data access code inside them).
  • As CSLA promotes the normalization of behavior, rather than the normalization of data, and this can result in business objects that are named similarly, but have different purposes. This can cause some confusion and a feeling like you are not reusing objects appropriately. That said, once the physiological leap is taken, it more than makes sense - it seems inappropriate to structure objects the "old" way.
  • It's not "in fashion" to build applications this way. You may struggle to get developers who are passionate about the technology.

3. After reading this does CSLA really not fit in with TDD?
I haven't found an effective way to do TDD with CSLA. That said, I am sure there are many smarter people out there than me that may have tried this with greater success.

4. What are my alternatives?
Domain-Driven-Design is getting big push at the moment (and rightfully so - it's fantastic for some applications). There are also a number of interesting patterns developing from the introduction of LINQ (and LINQ to SQL, Entity Framework, etc). Fowlers book PoEAA, details many patterns that may be suitable for your application. Note that some patterns are competing (i.e. Active Record and Repository), and thus are meant to be used for specific scenarios. While CSLA doesn't exactly match any of the patterns described in that book, it most closely resembles Active Record (although I feel it is short-sighted to claim an exact match for this pattern).

5. If you have stopped using it or decided against why?
I didn't fully recommend CSLA for my last project, because I believe the scope of the application is too large for the benefits CSLA provides.
I would not use CSLA on a web project. I feel there are other technologies better suited to building applications in that environment.

In summary, while CSLA is anything but a silver bullet, it is appropriate for some scenarios.

Hope this helps!

这篇关于有没有人有CSLA任何现实世界的经验?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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