Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Proxicode 127 posts 323 karma points
    Dec 07, 2015 @ 18:39
    Proxicode
    0

    Archetype - Long Lists in Back Office?

    Hey Everyone,

    I am working on a Umbraco 7.3 website for a local high school and I have built a "Teacher Pages" section in the back office. The purpose of this section is to allow each teacher to manage multiple courses, and within each course to manage multiple assignments, and within each assignment the ability to have multiple downloadable attachments.

    So basically it looks like this...

    • Course (A teacher can have multiple courses so Course is an archetype). Course's properties are...

      • Course Name

      • Course Description

      • Course Folder (example would be "Homework 12/07" or "Syllabus" or whatever but there will in theory be a new one every week night, so I've used an archetype). Course Folder's properties are...

        • Folder Name
        • Folder Description
        • Download (can be multiple downloads per folder, so another archetype here). Download's properties are...
          • Name
          • File(Media Picker)

    The good news is that this all works great! Bad news is, as more teachers have added more assignments, the back office has become unusably slow. I believe this is blow back from all of the nested Archetypes. I think Archetype is an awesome property editor..I use it on almost every project. However, after speaking briefly with Kevin on Twitter, I realized that I have violated some of his recommendations specifically the level of nesting and the sheer number of them on a page. I am looking for any suggestions that you all may have for a better solution. We are only half way through the school year here so this will only get worse going forward.

    1. Is there a better package that you may know of for this?
    2. Is there a better architecture/relationship for teachers/courses/assignments/attachments that you can think of?
    3. Is there a way to optimise Archetype to make it faster?

    Screenshot as well so you can see the thought process. It's pretty slick actually, just really slow. The public site (the student side) is great, no issues there.

    BackOffice-Screenshot

    Thanks -Roger

  • Ian 178 posts 752 karma points
    Dec 11, 2015 @ 10:29
    Ian
    100

    I too like Archetype for its repeating field capabilities but I don't know how you could optimise archetype. So I recommend that on this occasion sticking to umbraco's default node management for doing most of what you're trying to do, that way it should ultimately be easier than dealing with all that nested json and ultimately more powerful and performant.

    If it makes sense towards what you are trying to achieve. I would create a 'course repository' document type which can only contain 'course' document types. There could be multiple course repositories one per teacher, or just one with some clear means of identifying to which teacher the repository belongs.

    If there is any possibility that a course could relate to more than one teacher I would set the relationships up using something like nuPickers and Umbraco Relation Types and then just have one course repository. The repository document type would have a list view in the backend so you get a nice paginated list of courses. The Course document type would have the fields you require.

    A course folder can be a document type with a description property and it can be configured to only contain download document types which have your media picker property. You could if you really wanted do away with the download document type as it has hardly any properties and have a files property on the folder document type, this property 'could' be a media picker configured to pick multiple items the name would be derived from the media item.

    I think on balance i would tend to keep the separate document types though.

  • Proxicode 127 posts 323 karma points
    Dec 11, 2015 @ 21:05
    Proxicode
    0

    Thanks Ian, this is almost exactly what I ended up doing!

    I setup Course as a child docType to Teacher, assignments inside each course remained an Archetype and attachments lost their archetype and just turned into a media picker, allowing multiple files as you said.

    Still finishing up so it's untested at this point but I will wrap it up this weekend and let you know how much improvement I can achieve.

    Thanks again!

    -Roger

  • Nicholas Westby 2054 posts 7100 karma points c-trib
    Dec 11, 2015 @ 21:42
    Nicholas Westby
    0

    FYI, the speed issue was fixed for me in Archetype 1.12: https://github.com/imulus/Archetype/releases/tag/v1.12

    The current latest release is 1.12.1: https://github.com/imulus/Archetype/releases/tag/1.12.1

    It's probably good you've restructured your data, but thought I'd let you (and others reading this) know that Archetype is now much more performant.

    I had a node with hundreds of Archetype fieldsets that was taking 2+ minutes to load in the back office. After updating, it takes closer to 2 seconds.

    The fix, if you are curious, simply does not load the contents of fieldsets until they are expanded.

  • Ian 178 posts 752 karma points
    Dec 13, 2015 @ 22:23
    Ian
    0

    @nicholas good to know

Please Sign in or register to post replies

Write your reply to:

Draft