Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Loading/Performance of views in a multi view? One-in-all or break it up?Loading/Performance of views in a multi view? One-in-all or break it up?
Previous
 
Next
New Post
4/7/2009 11:47 PM
 

The module I am writing consists of a multiview with some single views inside, each of them representing/displaying different sets of information, e.g.:

{multiview}

  • View 1: List of employees
  • View 2: Details of an employee
  • View 3: List of jobs
  • View 4: Job details
  • View 5: List of birthdays
  • View 6: List of anniversaries

{/multiview}

I am doing it this way so the module can be placed anywhere on the site and then the user can select in the module instance settings which information he wants to display on that place. But I am wondering if this is a good way, asking myself how the views and other parts of the ASCX are loaded. Even only one single view displayed a time, are all other views loaded together so it could be a performance issue? What about all my SqlDataSources which are not inside one of the {view}...{/view} tags? Does it mean everytime a single view is displayed, all SqlDataSources are loaded too? Should I better break all functionalities up into multiple modules?

 
New Post
4/8/2009 7:10 AM
 

dnn loads only one view (= usercontrol) at a time for any given module.. it does not matter if you have either x number of viewcontrols for one module or x number of modules

 


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
New Post
4/8/2009 11:48 PM
 

Hi Erik,

I think I wasn't clear enough: Talking about a "view" I mean the <asp:view> within an <asp:multiview>. Currently I have one user control (myModuleView.ascx) which looks like this

<asp:multiview>
   <asp:view>List of employees</asp:view>
   <asp:view>Details of selected employees</asp:view>
   <asp:view>List of jobs</asp:view>
   <asp:view>Details of selected job</asp:view>
</asp:multiview>
<asp:SqlDataSource/>
<asp:SqlDataSource/>
<asp:SqlDataSource/>
...

In the myModuleSettings.ascx the user can pick from a dropdown list what information (employee list, job list, etc.) the module instance should display, so actually which of the <asp:view> will be set to visible.
 
So I am wondering, if:
  1. only that <asp:view> is loaded, which is set to visible, or if every module instance will actually load all of the <asp:view> and then simply hide those not set to visible,
  2. all of the <asp:SqlDataSource> will be loaded, as they are not inside one of the <asp:view>

 

 
New Post
4/9/2009 5:19 AM
 

afaik only 1 view gets rendered to the client. Also, afaik, only the sqldatasource you are actually use will be loaded.

Anyhow, if you want to be more flexible, and split up your code a bit to prevent one big class, you can also use dynamic loading of user controls. That way you are certain that only the code that is used gets loaded.


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Loading/Performance of views in a multi view? One-in-all or break it up?Loading/Performance of views in a multi view? One-in-all or break it up?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out