none
Site collection features VS. Mange site features RRS feed

Answers

  • You can make activation hidden on site feature list using Hidden="True".

    For Airport site, activate this feature via Windows Powershell Script Enable-SPFeature.

    Thanks & Regards.


    Lily Wu
    • Marked as answer by Toomanyhats Monday, September 13, 2010 2:02 PM
    Thursday, September 9, 2010 7:39 AM

All replies

  • Hi the choice to use one or the other depends on the scope of what your feature is doing.  Below are a couple of scenarios that might help you understand which is most appropriate for which scope:

    - Site Collection Feature: This feature would be available to every site in the site collection.  You might use this type for a customization that adds custom actions to the ribbon menu of every site or that performs a specific activity whenever a content type is used in the site collection (no matter where it is used).

    - Site Feature: This feature would only affect and be available to the site where it was activated.  If your custom feature only affected a specific list on the sales site then you would deploy that feature on that site.  Similarly you might choose to use this scope if the feature is only used on a few sites and you want to give the administrator a choice as to where it is enabled.  Then the site administrator would only activate the site feature on those specific sites.

    Hope this helps!


    Amanda Perran (Murphy) | Weblog: blog.funknstyle.com | Twitter: twitter.com/amandaperran
    Wednesday, September 1, 2010 5:45 PM
  • Thanks, based on your answer, which is awesome.

    In the context I'm asking it is as a solution, with little concern as to the depth of the nodes. So an OOB sharpoint, with ever expanding node depth of sites and subsites is not really at play here.


    So we can establish the feature scope I'm concerned about is Unique application at the Server level.

    There could be two ways of governing these installations...

    Each site collection would have its own Content DB, App Pool etc. and the Server farm would have many Web Applications each running a single site collection.

    Or

    The set of all Sharepoint Apps that reside as unique Site Collections on a lone Web Application in the farm.

    So Building applications on the sharepoint farm you could have.

    FARM
    -Web Application Airport
    --Airport Application Site Collection
    -Web Application Bus
    --Bus Application Site Collection
    -Web Application GreetingCards
    --GreetingCards Application Site Collection

    OR

    FARM
    -Web Application All APPS
    --Airport Application Site Collection
    --Bus Application Site Collection
    --GreetingCards Application Site Collection

    So the most common scope for the feature would be the last node, Airport, Bus or GreetingCards Application Site Collection.
    Features for the Airport would probably not apply to the Bus, Bus would not apply to GreetingCards etc.

    So how do I pattern the target/deployment of those feature sets? I keep having to relearn this stuff everytime I take a break from programming Sharepoint. (and dealing with wss2,3,4 is making me tired.)

    According to what you have said I should use (for the majority of the time in my case)

    -Site Feature

    but I don't know how to deploy the solution containing features that way.

     

     

     

    • Edited by Toomanyhats Thursday, September 2, 2010 6:10 PM reread
    Thursday, September 2, 2010 3:58 PM
  • Hi,

     

    Since you decide to use site feature, the scope of the feature should be “web”.

    For Farm1 as you mentioned above, you can deploy the solution using the Install-SPSolution PowerShell command without -WebApplication parameter so that the solution will be deploy on SharePoint farm level.   

    For Farm2, you need to specify -WebApplication parameter when deploying the solution so that this feature can be activated on sites within this specific web application.

     

    Let me know if I misunderstand you.

     

    Thanks & Regards.

     


    Lily Wu
    Wednesday, September 8, 2010 11:23 AM
  • I think you made it clearer to me.

    In my exact case

    Farm1 i would do like this.
    Solution with feature for Airport would get installed with scope web AND get activated at the Airport Site level. How would I prevent that feature from being activated at Bus and Greetingcards?

    Farm2 i would do like this.
    Solution with feature for Airport would get installed with scope web AND additionally carry the -WebApplication parameter AND get activated at the Airport Site level.

    Farm2 seems right to me, in that the solution/feature for Airport would never be used with Bus OR Greeting Cards App and should not be available.

    Is there a way to deploy solution feature just to Airport for Farm 1 so it is unavailable for activation on Bus and Greeting Cards or is that the same as Farm2 scenerio?

     

    Wednesday, September 8, 2010 7:41 PM
  • You can make activation hidden on site feature list using Hidden="True".

    For Airport site, activate this feature via Windows Powershell Script Enable-SPFeature.

    Thanks & Regards.


    Lily Wu
    • Marked as answer by Toomanyhats Monday, September 13, 2010 2:02 PM
    Thursday, September 9, 2010 7:39 AM
  • Thank you
    Monday, September 13, 2010 2:02 PM