tag:blogger.com,1999:blog-1944926148473713281.post4983906435410027414..comments2024-03-11T04:42:50.934-07:00Comments on News, tips, tricks and more about DevExpress Application Framework (XAF) directly from the lab: Avoiding data redundancy for the 'last modified' date when using the Audit Trail moduleDennis Garavskyhttp://www.blogger.com/profile/05439634942797151905noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-1944926148473713281.post-42524108864994902472013-03-31T09:30:40.663-07:002013-03-31T09:30:40.663-07:00First of all thanks for reading and please accept ...First of all thanks for reading and please accept my apologies for the delay since I somehow missed your comment.<br /><br /><br />>><br />How does XAF address processes like that and how bad of a performance hit am I taking if my application is doing all the heavy lifting?<br />...<br />how do you approach that aspect of your application build?<br /><<<br />There are quite many means in our framework that allow you to achieve a good performance while working with large amounts of data. These are delayed loading (http://documentation.devexpress.com/#XPO/CustomDocument2024), server mode (http://documentation.devexpress.com/#WindowsForms/CustomDocument8398), XPPageSelector, XPCursor (http://documentation.devexpress.com/#XPO/CustomDocument2075) and XPView (http://documentation.devexpress.com/#XPO/CustomDocument2068).<br />In short, all of these features allow you to work with small portions of data or load only necessary data. However, even with these built-in means it is sometimes possible to hit performance problems, if the design of your persistent classes has mistakes that will lead to pulling unnecessary data. To avoid such problems, there are certain best practices (http://www.devexpress.com/issue=A2944, http://www.devexpress.com/issue=AQ11942, etc.) and also a specialized tool (http://documentation.devexpress.com/#XpoProfiler/CustomDocument10660).<br /><br /><br />While it is also possible in our framework to get data directly from stored procedures (http://documentation.devexpress.com/#XPO/CustomDocument8919), I think it is still worth quoting myself from the http://www.devexpress.com/issue=Q476093 thread:<br />"...let me first describe the basics of our framework.<br /> eXpressApp Framework (XAF) framework is based on XPO and Entity Framework, which are ORM. The ORM concept is very important here as in our framework you should not normally think of database tables, stored procedures, SQL statements, but rather operate data in an object-oriented manner. <br />I suggest you check out the Business Classes vs Database Tables help article to get more inspirations. Some links about Domain Driven Design posted in the http://community.devexpress.com/blogs/eaf/archive/2008/05/20/xaf-1-best-practices-for-domain-objects.aspx blog post may be helpful as well.<br /><br />As you might distill from this, the core of our framework is a business or domain object, and not a database table or SP. Thus, most of XAF scenarios are implemented considering that you are dealing with business objects. Yes, there is certainly support for executing a raw SQL via the Session.ExecuteXXX method, stored procedures, mapping to database views at the XPO level, but there is no specialized support in XAF for this, as such cases are considered to be exceptions rather than rules due to above.<br /> So, I agree with you that the solutions I suggested above are not straightforward, but I could not help mentioning all the possible ways to accomplish your task.<br /> If in your project you have to heavily work with stored procedures or read data from database views, I think that you would better avoid using XAF for your project and rather implement it the 'old way', just using our visual components and the standard means for accessing SQL data.<br /> Alternatively, you can still use XAF, but try to start thinking its way and operating your requirements by business objects and not database tables. Take special note that you can easily establish relationships between your objects and XPO will manage all the data retrieval tasks for you (like joining multiple tables). I suggest you check out the Object Relationships help article to get started with this. Most likely, it will be easier for you if XPO creates all the associated objects using the ORM Data Model Wizard.<br /> As for filtering data, the object-oriented criteria language or LINQ is always at your service with our frameworks: Querying a Data Store"Dennis Garavskyhttps://www.blogger.com/profile/05439634942797151905noreply@blogger.comtag:blogger.com,1999:blog-1944926148473713281.post-64861248431118550702013-03-21T21:14:56.747-07:002013-03-21T21:14:56.747-07:00Hi Dennis,
I've been a Dev Express customer f...Hi Dennis,<br /><br />I've been a Dev Express customer for years but I've never made the leap to XAF or XPO but I'm about to start revising some existing applications that I have built and am giving it a much closer examination this go round - mainly for the Domain Objects, Application Server and Security features.<br /><br />I've tried to research this topic but can't seem to find anything documented (I'm probably looking in the wrong place) but here goes:<br /><br />I've always developed my database model first and put most of my logic coding and hard business rules within SQL Server and stored procedures. I've done this for 2 reasons, to make the front ends lighter and to gain data performance as the data set gets larger.<br /><br />Sometimes, in the applications that I work with, there are many procedures that are performed within the database itself using sets of data. <br /><br />How does XAF address processes like that and how bad of a performance hit am I taking if my application is doing all the heavy lifting?<br /><br />To give you an example, let's just say you've built an accounting system and at the end of the month, you do a closing and need to update registers, customer balances, etc. - how do you approach that aspect of your application build?<br /><br />For argument sake, I'm not worried about implementing on anything but SQL Server. Maybe its the way I'm approaching things but I am unsure about taking the plunge to XAF and am looking for more concrete information/advice on data performance and general application principles.<br /><br />Thanks in advance and these are all great posts btw.<br /><br />MSDTrinityhttps://www.blogger.com/profile/01724952216328023258noreply@blogger.com