add a label in for the public projects

Issue #3 resolved
Giorgio Favrin created an issue

With the label the user will then be able to store their public network in a predefined folder... e.g. if network AAAA has labels : Disease : Alzheimer's I will be able to find this network under Explore/Diseases/Alzheimers

Comments (7)

  1. Giorgio Favrin reporter

    With the label we should create a folder. e.g. if the folder is: "Alzheimers" then the networks should be stored in: www.esyn.org/alzheimers/

    if the label is: "smith-lab" then the networks should be at: www.esyn.org/smith-lab/

    this way people can add their own labs and store their networks so that they can be seen by the public.

  2. Dan Bean

    I think an easier way to achieve the same effect would be to have one esyn.org/public/ folder, in which there are pages like alzheimers.php, smith-lab.php - each of those pages can just request only data with a specific label. Otherwise if we have one folder per topic then each folder will only contain one page (which is the same as the pages we'd pool into one master folder using the other method).

  3. Giorgio Favrin reporter

    ok - will it be easy to create all the "specific-labels.php" pages ? it seems a more elegant solution

  4. Dan Bean

    It depends, if we let people make custom labels then it becomes complicated because we need another separate permissions table for who has the ability to tag networks with what labels. If we just have a predefined list of allowed labels then it's easy enough to make the pages, it's the same as the browse.php page but with a different database query. But we'd need labels in the backend and a manager.php action to filter by label.

  5. Josh

    Dan is right, it becomes tricky...

    I think there are a few questions that need to be answered before estimating how much effort this will take. Dan already touched on a few of them, so I'll consolidate everything into a list:

    • Is a published network limited to one and only one label?
    • Is the label attached to the private network before it is published, or does the user have to enter/select a label at the time of publishing?
    • Are labels case sensitive?
    • Can any user publish a network with any label, regardless if it exists yet?
    • Are labels completely uneditable for published networks?

    I think the complexity of adding labels will vary quite a bit depending on the answers. But I also think it's worth pursuing because it greatly enhances the value of public networks.

    That being said, I hate to be a stick in the mud, but I think that browsing labels based on the URL (also called clean urls), such as www.esyn.org/smith-lab/, should be a separate consideration.

    The scope of the back-end was to get up and running quickly with data storage per user, and I think we did that pretty well! We've made quite a few iterative enhancements such as sharing networks between users, allowing different levels of permissions, storage limits, etc. As with any exciting project these features branched from the main, simpler scope: allow users to save their networks online.

    I think clean urls are great, but it's the first hurdle we've come across where implementing a full PHP framework might have saved time. We originally opted out because the scope of the project was small enough where the effort to learn a framework outweighed that of modifying vanilla php to maintain the site. But as the project grows, we may want to consider revamping both the back-end and the front-end to use frameworks.

    Just some food for thought!

  6. Log in to comment