Sunday, July 12, 2009

Update: What’s Coming in eXpressApp 9.2

Following is an updated list of features at 9.2 Code Freeze. Note the inclusion of F277 EasyTest – a UI test framework.

XPO

F702 New functions support in basic providers (Access, MSSql) Asynch loading

XAF

F189 UI: Integrate the ASPxTreeList control (ListEditor)

F557 UI: Hierarchical treelist-like navigation (ASP.Net & WinForms)

F565 UI: TreeListEditor improvements in Win

F622 UI: Test web UI under IE8, Chrome, Opera

F556 UI: TreeNodeController improvements

F540 UI.Layout.Win: Padding/spacing adjustment with LayoutStyleManager

F541 UI.TreeListEditor: Introduce the capability to set node images

F768 UI: Web - editors improvement

F277 EasyTest VS integration

F166 Demos.FeatureCenter: Add Audit section, demonstrate functionality and performance

F170 Demos.FeatureCenter: Demonstrate various features for the Grid, Tree and Scheduler ListEditors in WindowsForms and ASP.NET applications

F853 Demos.FeatureCenter: Demonstrate categorized content of the standard XAF image library

F575 Modules.ConditionalEditorState: Introduce the capability to enable/disable show/hide a property editor or column declaratively

F208 Modules.FileAttachment.Win: Add a ability to filter available to upload files by an extension

F213 Validation: Introduce the capability to apply a rule to a collection property

F672 Validation: Introduce the capability to apply "UniqueValue" rule to several properties at once

Friday, July 10, 2009

XPO Query Performance

One of the problems with forums is that answers tend to get forgotten with the passing of time.  So I though I would answer Charles’s follow-up query related to the last post here:-

“… is there a way to increase the performance of this operation?  I'm assuming that the CriteriaOperator.Parse() method uses reflection; is there a way to do it without using reflection?”

CriteriaOperator.Parse doesn't use reflection.  Instead it parses the query string into "native" format, which you can write directly yourself instead.

For example, the following two are directly equivalent:-

  1. CriteriaOperator.Parse("Managers[Name like 'Ale%']")
  2. new ContainsOperator(new OperandProperty("Managers"), new BinaryOperator(new OperandProperty("Name"), new OperandValue("Ale%"), BinaryOperatorType.Like))

Non trivial queries using "native" format can get extremely complex.  Which of the two equivalent queries do you prefer?

  1. CriteriaOperator.Parse("(Name = 'John' or Name = 'Bill') and SecondName != 'Doe' and not City like '%cow'")
  2. new GroupOperator(GroupOperatorType.And, new GroupOperator(GroupOperatorType.Or, new BinaryOperator(new OperandProperty("Name"), new OperandValue("John"), BinaryOperatorType.Equal), new BinaryOperator(new OperandProperty("Name"), new OperandValue("Bill"), BinaryOperatorType.Equal)), new BinaryOperator(new OperandProperty("SecondName"), new OperandValue("Doe"), BinaryOperatorType.NotEqual), new UnaryOperator(UnaryOperatorType.Not, new BinaryOperator(new OperandProperty("City"), new OperandValue("%cow"), BinaryOperatorType.Like))

Parsing is extremely fast and adds insignificant overhead to any query, as DevExpress have used Lexx/Yacc to implement the parser.  This is unlike Linq to XPO which is typically an order of magnitude slower than either of these methods, and which doesn't directly support "in transaction" queries.

One disadvantage of string queries is that errors are only apparent at runtime, and there are a couple of limitations.  Using "Simplified Criteria Syntax", one can address the issue of type-safety.  I don't recommend it, but it may suit you.

Thursday, July 9, 2009

XPO – Thinking in Objects

Charles Graham asks whether an XPO query can perform the equivalent of a particular SQL statement he has, given a set of database tables.

To him I answer…

Sure it can, but XPO is an "object first" ORM and has a query language that operates on your "object model" not on the "relational model".

So I suggest that to achieve best results with XPO (in a non-trivial scenario), one should not consider the relational schema at all, but should instead think in terms of the object model at the heart of your domain.

I say this because to really answer your question, one has to construct the object model that is represented by your "relational" description, so that we can define an "object based query" to answer your question.

Ideally, I should give you a UML diagram that represents the object model I'm thinking of in suggesting something like the following to answer you question:-

new XPCollection<Employee>(Session, CriteriaOperator.Parse("Department.Permissions[User.UserName = 'MyUserName']"));

It can be helpful with any session-based ORM, to consider a Session (UnitOfWork) to be an object that acts as the "controller" of the database mapping.

XPO doesn't implement the ActiveRecord (a la Ruby on Rails or CSLA) pattern which essentially results in a simpler one-to-one mapping between object and database table.  It can appear to be that way, because there are helper methods in the XPO base classes to perform operations like "Save".  In reality, this is a call to the Session to save an object and the associated object graph.

Part of the challenge with XPO, is moving away from the (disconnected) recordset based architecture with no business layer so long advocated by Microsoft - to one with a domain model in order to model complexity.

 

With that, needs to come a change in mindset away from just writing “Manager” type classes that iterate collections.  And also a move away from only writing procedural code, albeit in the guise of classes.

A need to think in terms of objects, not database schema.

This ability to model complexity through object-oriented analysis and design, with XPO providing persistence, is one of the reasons I am such an advocate for using XPO for certain classes of projects.

Saturday, June 13, 2009

New Features and Domain Components (DC) in 9.2

[Note: see also What’s Coming in eXpressApp Framework 9.2]

Domain Components (DC)

Unfortunately DC will not be delivered in finished form in 9.2 …

“Domain Components will not be in the finished form - we are depending on XPO persistent interfaces and kind of stuck until it is ready.”

I did express my disappointment at this …

“Of course not delivering something (yet again) that was Priority 5 (Must Deliver) in 9.2 is disappointing. Especially for something that was expected last year. … You mention this is an XPO issue. What prevented them implementing this? How should this should be explained to the community?”

New Features

Along with questioning the status of DC, I also questioned the lack of significant new Features being delivered in 9.2 …

… can't deliver scheduled features because there are an unexpectedly large number of support issues? No problem, many existing users rate a high quality, low defect rate, documented product - higher than new features.

Exactly what is the reason for the apparent inability to deliver major new features? How should I explain it to the community?

The explanation provided was …

“… amount of "background" work currently is higher than we expected. Background work is everything we have to do besides working on features. Bug reproducing, fixing, keeping builds up in several branches, moving functional tests on new test farm (so we could see results in 2 hours, not in 8) etc.

Developer Express is committed to make XAF a successful product. We are adding more people to the project, but obviously there will be no immediate output from this.”

I was really happy to hear this and found it entirely satisfactory, although getting *any* explanation was painful. Hopefully, the application of those additional resources will ultimately allow promised new Features to be undertaken and delivered.

What’s Coming in eXpressApp Framework 9.2

The following list was provided to the Framework Advisory Board on 3 June 2009. Items listed are subject to change.

Implemented XAF features for 9.2:

F557 UI: Hierarchical treelist-like navigation (ASP.Net & WinForms) – see sneak peek.
F622 UI: Test web UI under IE8, Chrome, Opera
F540 UI.Layout.Win: Padding/spacing adjustment with LayoutStyleManager
F541 UI.TreeListEditor.Win: Introduce the capability to set node images
F208 Modules.FileAttachment: Add a ability to filter available to upload files by an extension
F556 UI: TreeNodeController improvements
F768 UI: Web - property editors improvement

Total: 7

The following XAF features are intended to be included in the 9.2 release:

F189 UI: Integrate the ASPxTreeList control (ListEditor)
F238 Demos: Publish MainDemo, FeatureCenter demos (as ASPxDemos published)
F562 Core: DC
F563 Demos.VB: Provide appropriate VB demos for all XAF demos
F565 UI: TreeListEditor improvements in Win
F139 Core: Improve the concept of categorizing BO's
F166 Demos: Include Audit demo in FeatureCenter, restructure demo, add Performance section
F169 Demos: Lookup/Link filtering
F170 Demos: List Editors features
F575 Modules.ConditionalEditorState: Introduce the capability to enable/disable show/hide a property editor or column declaratively
F213 Validation: Introduce the capability to apply a rule to a collection property – see sneak peek
F382 Core: Support ServerMode in nested list views. F508 Core: Code refactoring & API improvements.
F583 Core: XPO-independent XAF-Core. F604 Core: XPO-independent modules.


Total: 15

See also: New Features and Domain Components (DC) in 9.2

Sunday, May 3, 2009

New in XAF Help

XAF’s documentation continues to get better and better.

Starting from v2009, changes are now listed on the Version History page. 

This means no more trying to guess what new topics and changes might be included in the documentation for a new release.  Much appreciated!

But it can be a bit hard to find… it can be found DX Website under Support/Version History.

http://www.devexpress.com/Support/WhatsNew/DXperience/

Thursday, April 16, 2009

Breaking Change and Unsatisfactory Solution

I rarely report bugs, but I recently reported a defect that appeared to be a breaking change. See http://www.devexpress.com/Support/Center/p/B135511.aspx. I'll let my final comment speak for my feelings ...

"Don't mislead any readers of this item by stating "We have fixed the problem when the ...". You've fixed nothing. What your saying is that to fix a previous problem, someone hacked a solution that broke previously working functionality. It's hard-coded and your not now prepared to change it."

Update 20 May 09: this has been fixed in 9.1.4.  See B135511