TelerikMVC and NHibernate assembly dependencies

Dec 6, 2012 at 7:27 PM

Luis,

I have a new requirement to segregate the business logic of the application into a web service.  I'm using NHibernateGridCustomBindingHelper which is directly dependent on NHibernate and TelerikMVC assemblies.  This means that if TGH is kept at the UI - MVC layer the NHibernate dependency is broken.  If TGH is moved into the business web service layer then TelerikMVC assembly isn't there.  What are your thoughts on this?

Thanks.

Alex

Coordinator
Dec 11, 2012 at 11:00 AM

Well, in that case I prefer to do the simplest thing. Let TGH and NHibernte in the UI layer, I may be wrong, but I do not think this will break any design pattern, it's just a reference.

Dec 11, 2012 at 8:44 PM
Edited Dec 11, 2012 at 8:46 PM

I think the design pattern broken here is that the UI shouldn't bypass the service layer when talking with the database.

What about the alternative - placing TGH into the service layer.

  1. Telerik MVC assembly will need to be referenced, unfortunately, but can be done?  Is the only purpose of relying on TelerikMVC assembly needed for GridCommand support?
  2. Input: GridCommand is serializable, so I don't see issues there.
  3. Output: GridModel
    1. IEnumerable data - as long as the objects listed are serializable should be fine. Groupings might be an issue but I can drop Grouping support to make things easier.
    2. int Total - easy
    3. object Aggregates - doesn't seem to be used