devexpress xpo 与报告页面的 BLL-DAL 方法对比
我们刚刚启动了一个网络项目。该项目的Sql表预计是百万条记录的大表。 Web应用程序通常会将数据报告给用户。这意味着网络应用程序将主要执行“SELECT”而不是“INSERT”或“UPDATE”。
此时,我想知道是否应该使用经典的 BLL-DAL-MODEL 方法(分层架构)或一些 ORM,例如 Devexpress 的 XPO。我们公司已经在很多小型应用中使用了XPO,开发人员也很熟悉它。他们也熟悉分层架构,但正如您所知,XPO 的实现比分层架构方法更容易。
现在,我想知道我应该选择哪种方法。有没有人根据XPO和分层弧的数据选择进行性能测试?或者有什么想法吗?
谢谢。
We have just started a web project. Sql tables of the project is expected to be large tables with millions of records. And web application will usually report the data to the users. That means web application will do "SELECT" mostly than "INSERT" or "UPDATE".
At this point, i wonder if i should use classic BLL-DAL-MODEL approach (layered architecture) or some ORM like Devexpress' XPO. Our company has used XPO in small many applications and developers are familiar to it. They are also familiar to layered architecture but as you know implementation of XPO is easer than layered architecture approach.
Now, i want to know which approach i should choose. Is there anyone who performs a performance test according to data select with both XPO and layered arc.? Or is there any idea?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
关于XPO性能。我的网格有 500k 条记录,并且工作正常。单个网格页面显示 20 条记录。
这里有一些提示(DevEx v10.2):
1.您可以在 ServerMode 下使用 ASPxGridView。您可以在此处查看演示。在服务器模式网格绑定中执行以下操作:
- 获取记录数
- 获取前 512 个记录 ID
- 获取记录以在网格中显示。这应该获取第一个网格页面上显示的记录,但在我看来,XPO 获取 cca。 50 条记录。
2.XPO还会获取相关对象所需的数据。这将导致许多简单的查询。您可以通过缓存来减少这种情况。
3.我们成功使用XPO缓存。它使应用程序更快并减少数据库命中次数。正如我已经说过的,我们在 500k 表上使用它。
Regarding XPO performance. I have grids with 500k records and it works fine. Single grid page shows 20 records.
Here are few hints (DevEx v10.2):
1.you can use ASPxGridView in ServerMode. You can take a look at demo here. In ServerMode grid binding does this:
- fetch record count
- fetch first 512 record ids
- fetch records for showing in grid. This should fetch records shown on first grid page, but it seems to me that XPO fetches cca. 50 records.
2.XPO will also fetch data needed for related objects. This will result in many simple queries. You can reduce this with caching.
3.We use XPO caching successfully. It makes application faster and reduces number of database hits. As I already said we use it on 500k tables.
Fer,我理解你问题的原因和含义,但我想说,在这种情况下,我永远不会放弃分层方法,只是为了快捷地使用某种技术或产品,例如 XPO。 EF 和 NHibernate 也可以直接从 UI 使用,无需分层,但这并不意味着很好,请参阅我的答案:
https: //stackoverflow.com/a/7474357/559144
我要么不使用XPO,要么只在它可以与我在那里描述的分层一起工作时才使用它,并且很有可能它也能起作用,因为最终它是一个 ORM,可以像任何其他产品一样与其他产品隔离和解耦。尽管如此,它仍然是专有的 DevExpress,我不会将其用于大型应用程序,这些应用程序可能会在几年内以不同的方式发展,因此像 EF 或 NHibernate 这样更标准的东西可能可以提供更可靠和经过验证的基础。
Fer, I understand the reason and meaning of your question but I would say that I would never give up layered approach just to shortcut use a certain technology or product like XPO in this case. also EF and NHibernate could be used directly from the UI without need for layering but this does not mean is good, see my answer here:
https://stackoverflow.com/a/7474357/559144
I would either do not use XPO or only use it if it can work with the layering as I described there and big chances are that it also works because in the end it's an ORM and can be isolated and decoupled from the rest like any other product. Still it's proprietary DevExpress and I would not use it for big applications which migh evolve differently over several years so something more standard like EF or NHibernate could probably offer a more reliable and proven ground.