Archives

Archives / 2010 / February
  • Lambda Expressions with NHibernate.Linq

    In the last two posts below I talked about creating a templated DataService class and also mused about whether UI data queries really were a cross-cutting concern. I'm agnostic about the question really; however, I do have one practical concern. I don't want to expose methods that take any old HQL query that the client sends my way. I'd like to have a controlled way of extending database queries down to the UI. Continue reading...

  • UI Data Query A Cross Cutting Concern?

    Rehein makes the interesting argument that there is no clean separation between the presentation, business, and data access layer. Instead, UI concerns often known only at runtime like paging, filtering, sorting, and so on make data querying a cross cutting concern. He therefore, recommends we stop creating UI interfaces like: Continue reading...

  • Refactor to DataService<T>

    In the post below on NHibernate 101 I said not to plumb data access code in the Operation Contract implementation. Now I'd like to refactor and get that out of there. Let's think about it a bit first. Do I really want to create a data layer class called "InstrumentService" with the CRUD in there? I could. But since this is a concert music application, I know I'm going to have several lookup tables in the system. In addition to musical instruments there will be musical genres, catalogs, recording labels, ensemble types, and so on and on. Continue reading...