You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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.
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.
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.
Activity
atuttle commentedon Aug 12, 2011
Sounds reasonable. I'll put it on the roadmap for 1.2.
atuttle commentedon Aug 17, 2011
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 commentedon Aug 17, 2011
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 commentedon Aug 17, 2011
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 commentedon Aug 17, 2011
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 commentedon Jun 26, 2012
Hey Greg, I'm starting the planning process and development for 1.2 now. Want to discuss this more? Got any new ideas?
gregmoser commentedon Jul 12, 2012
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 commentedon Jul 12, 2012
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 commentedon Oct 8, 2012
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. :)
#48 well that wasn't so hard
atuttle#48 well that wasn't so hard
atuttle#48 well that wasn't so hard