Thread: Approaching THB
View Single Post
  #45 (permalink)  
Old November 15th, 2007, 10:21 AM
jimibt jimibt is offline
Friend of Wrox
Join Date: Mar 2007
Location: Creetown, UK
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts

forumuser - glad it worked for you. ok, to answer your points:

1. correct, cacheing means that pre-existing cached objects are used, rather than database retrieves. unless of course, a record is changed which causes the database to be queried again (very unlikely but both possible and perhaps desirable).

2. re providers, yes, as i mentioned before where you put the entities is immaterial. organisationally you may elect to put them in seperate providers.

3. i'm not sure how we'd measure that but given that we get the objects from the cache, then it's pretty efficient. we also have the flexibility of adding new methods (either in code behind or in the BLL) without touching any of the data-access code. this is a HUGE plus as it means that any shared functionality will be unaffected by any 'changes' that we may make by adding such new methods. an example of this might be where someone says that they love the layout but could they have certain calculated fields added etc, etc..

the example i gave you is of course only one way of quite a few to achieve the same result. that particular example makes sense with the gridview as it requires very little change to the existing code. of course, you may wish to incorporate dropdowns for editting the department etc and this again would be no problem and would merely require that the department (or in the example i gave you 'forum') function was changed to return an integer value representing the index in the dropdown list of departments (i.e. you'd change the asp:Literal to an asp:DropDownList in a similar way to the way that it's wired in the Edit.aspx page).

hope you can see a little bit more than the tip of the iceberg regarding the flexibility of the framework. even if you decide not to adopt it, it should hopefully have given you some insight for the future.