1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Practical limits for Libraries?

Practical limits for Libraries?

4 posts, 0 answered
  1. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    07 Apr 2010
    Link to this post
    Is there any practical limit on the number of libraries I can have? Obviously, if there are a large number, finding the particular one is harder, but one of my client's want to implement a storage area where they can upload invoices/statements for a particular customer, as well as other types of images and files.  For security reasons, since we don't have item-level security in a library, it seems easier to secure if use a specific provider, and don't mix items from multiple customers in the library.

    So, assuming I create a new library provider based on the OOTB one, I was thinking of programmatically creating a new library for each user.  Finding the library would be easy--my client would manage it from the User's profile edit page.

    Obviously Libraries are an abstraction anyway, but I'm wondering if there might be query optimization problems if I had, say, 10,000 libraries for a given provider. 

    Thanks!
    Mike Sharp
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    08 Apr 2010
    Link to this post
    Hello Mike,

    The libraries provider can handler 10 000 libraries and you will be to access the Images and Documents module without problems. Since there is a paging you will see about 50  libraries per page. The problem here is when you use the dialogs for the GenericContent modules - when you insert and edit documents and items. You could experience some performance peaks on the first load. Also you should extend this dialogs to support additional providers - say implement RadComboBox to switch the libraries between the providers.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Mike
    Mike avatar
    208 posts
    Registered:
    10 Dec 2007
    13 Apr 2010
    Link to this post
    Thanks Ivan,

    That's good news!  Fortunately, I don't think they will ever have to browse large numbers of libraries in a dialog.  I've set up a separate provider for these, and at this point, the main place they'll go to get to a customer library is via the Users page.  There's already a nice method of locating users there.  Since there is a one-to-one correspondence between a user and a library, I can construct a link directly to that user's library (since the library is provisioned by their account name).

    One follow-on question.  In the User's control in the Administrative section, I've been able to add a link to manage the library (just opens the library items list page).  If there isn't a library already created, a link is displayed to create a new library.  All this works great.

    Now below this set of links, I'd like to actually list the items in the library (if it exists), along with the same edit/delete controls that the actual LibraryItemList.ascx control uses.  Basically, I want them to be able to manage the items from the user details page in the same way as if they navigated directly to the library from the Modules page...

    I know how to create a new content view control, so that I can filter and do cool things on the public side of things,  but I'm not sure how to wire in the LibraryItemList.ascx control in Users.aspx.  Are there any examples of this?

    Thanks for your help!
    Mike Sharp

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 Apr 2010
    Link to this post
    Hi Mike,

    The easiest way will be to use NavigateUrl property of the Hyperlink and open a new window to th eImages and Documents module. Another option would be crating a custom dialog with RadWindow and implement the whole logic there. This will require to recreate the view - binding, create, edit, delete operations using the API. LibraryItemList.ascx is a control template and you need to migrate the content to a page to get the same visual appearance. The third option is using the built-in dialog for ItemSelector ( take a look at the attached screenshot).

    You could call the existing dialog by using ButtonSelector controlor directly open Sitefinity\UserControls\Dialogs\ImageDialog.aspx in RadWindow. In this template the  ItemSelector is declared as shown below. The ItemSector has a property ShowMode that you could change to Documents if you want to browse only documents. The default value is Images which shows only image items.

    <lib:ItemSelector ID="ItemSelector1" runat="server" AllowPageSelection="false" ShowMode="Images" />


    Best wishes,
    Ivan Dimitrov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Register for webinar
4 posts, 0 answered