Skip to content

Feature Request: Sub folders in Resources #48

@gregmoser

Description

@gregmoser
Contributor

It would be nice to be able to organize resources into sub-folders. Basically all that would need to change is the loadBeansFromPath in the factory.cfc would just have to be updated slightly to look recursively through sub-folders. What are your thoughts on an enhancement like this?

Activity

atuttle

atuttle commented on Aug 12, 2011

@atuttle
Owner

Sounds reasonable. I'll put it on the roadmap for 1.2.

atuttle

atuttle commented on Aug 17, 2011

@atuttle
Owner

What do you think Taffy should do about beans with the same file name (bean name)? Just throw an exception?

/resources/fooMember.cfc
/resources/foostuff/fooMember.cfc

gregmoser

gregmoser commented on Aug 17, 2011

@gregmoser
ContributorAuthor

Im asumming that the issue with the same resource name has to do with how caching works and generating bean names for the factory. But you just cache the bean with the folder included as part of the key? So in the example above... the bean names would be something like

fooMember
foostuff_fooMember

In my mind then you don't have to worry about duplicate resource names. The other benifit of this is that it would make it really easy to write permission logic in the onTaffyRequest() method. For example you might make a public and private subfolder and then just do if(listFirst(arguments.resource,"_")) == "private"){... //check access

Thats really just an idea. If there are other issues with duplicate resource names, then i think throwing an exception is completley reasonable.

atuttle

atuttle commented on Aug 17, 2011

@atuttle
Owner

Seems like it could be useful, but needs more thought. I just don't want to introduce something half-baked. :)

Let's keep thinking about it...

gregmoser

gregmoser commented on Aug 17, 2011

@gregmoser
ContributorAuthor

I agree, those ideas literally came to me only after your last post. More thought is definitively in order, I might play around with trying different options and l'll let you know if I have any major revelations.

atuttle

atuttle commented on Jun 26, 2012

@atuttle
Owner

Hey Greg, I'm starting the planning process and development for 1.2 now. Want to discuss this more? Got any new ideas?

gregmoser

gregmoser commented on Jul 12, 2012

@gregmoser
ContributorAuthor

Hey Adam, sorry I'm just now getting back to you I've been under water try to get Slatwall 2.0 launched (which just happened today). Anyway, I actually no longer have a need for this feature because we are doing our resources somewhat implicitly so I don't need to store as many resource files as I used to. Not sure if this functionality is really necessary in general now that I understand REST a bit better. Feel free to close the issue if you see fit.

-Greg

atuttle

atuttle commented on Jul 12, 2012

@atuttle
Owner

Thanks Greg. Congrats on Slatwall! I've been eagerly awaiting v2 myself, going to be setting it up very soon. :)

I'll run it by the mailing list and see if anyone thinks it would be useful.

atuttle

atuttle commented on Oct 8, 2012

@atuttle
Owner

There have been a number of replies on the mailing list thread in favor of this feature, so I'm officially marking it as planned. :)

added a commit that references this issue on Nov 8, 2012
added 2 commits that reference this issue on Nov 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @atuttle@gregmoser

        Issue actions

          Feature Request: Sub folders in Resources · Issue #48 · atuttle/Taffy