2

What are the possible ways in which we can deploys files to:-

  1. The SharePoint hive (folders in hive)
  2. The SharePoint content db (libraries, etc)

By files I mean css, js, masterpage, site page, html page, images, doc files, ppt, and other files. Ofcourse there will be ways to deploy them to hive and ways to deploy them to the content db which will depend upon the requirements. I am just making an attempt to collect the possible ways for reference and planning.

Incase you feel its broad topic it would be nice of you to list out the ways. Explanations are not expected.

Here is a sample answer:-

1. The SharePoint hive (folders in hive)

-mapped layout folders (project -> add item)

-mapped images folder (project -> add item)

-mapped folder (project -> add item)

2. The SharePoint content db (libraries, etc)

-Use modules (project -> add item -> select module, then update the elements.xml)

variable
  • 4,473
  • 13
  • 75
  • 139
  • What is the difference between thi question and this one? http://sharepoint.stackexchange.com/questions/91900/sharepoint-deployment-deployed-to-gac-weburl-global-bin – Robert Lindgren Mar 04 '14 at 14:09
  • I would like to know what are various possible options one has inorder to deploy css js images doc and all sorts of files into the hive, and also into the config db as the case maybe. The question marked as duplicate is my question itself, which is basically asking about possible ways to deploy wsps to sharepoint. What is wrong in starting another question and asking about deploying files? Is it wrong? – variable Mar 04 '14 at 18:22
  • 1
    I think that even if this is not doomed a duplicate, it is still much to broad to be fully solvable in ages paragraphs (which is a rule if thumb for how widely scoped questions we allow). You are better of splitting in to different, much more specific and limited questions :) – Robert Lindgren Mar 04 '14 at 18:28
  • 2
    Also, you should take some time and accept answers or upvote some good efforts on your previous questions, where applicable, to premier the users that has tried to help you – Robert Lindgren Mar 04 '14 at 18:32
  • I wonder what the moderators are upto because some people have lethargically closed the question. Its broad, but not so much to prevent someone from listing out the methods... I have not asked for explanation. – variable Mar 04 '14 at 18:43
  • I am not yet satisfied with previous answers and still researching on them.. thats the reason for not accepting. – variable Mar 04 '14 at 18:44
  • This is a very simple question for a knowledgeable sp developer. If someone cannot answer then I will research myself and post answer here but the point is that this is a very important question with regards to deploying various files to sp hive/content db – variable Mar 04 '14 at 18:49
  • 2
    As the person that stands to gain here on at least 2 of your questions I second Robert's question to upvote good efforts ;). Thanks Robert! – Cameron Verhelst Mar 04 '14 at 18:50
  • Also note that in your question you mention CONTENT DB and in your comment you mention CONFIG db, which are not the same. – Cameron Verhelst Mar 04 '14 at 18:51
  • Sorry im on mobile will correct right away.. it wont allow me s comment is 5mins old :) I didnt know of a config db existence :p – variable Mar 04 '14 at 18:59
  • I don't think this a duplicate with the post in the duplicate warning. It is very broad and perhaps unanswerable without more edits and comments, but mapping files to the 14 hive and using Powershell to install .wsp file are not the same thing. – lwbecker2 Mar 04 '14 at 20:16
  • yes it is a broad question but not duplicate it will be good to know the possibilities of deploying the files to hive and content db – luckydeveloper Mar 05 '14 at 04:30

1 Answers1

2

That's a very broad question.

  • data = content like List Items or Documents
  • definitions = content types, site columns, spwebs, spsites, sptimerjobs, workflows
  • when I say "Add" I don't mean you can't change or delete stuff.

I'm not sure this list is conclusive or correct, but of the top of my head:

  1. SharePoint Hive
    1. Farm Solutions
      • Layouts folder mappings
      • Other mapped folders
      • Features
      • Resource files
      • Application Pages
      • ControlTemplates
      • ...
  2. SharePoint Content DB
    1. User / Farm Solution (Server Object Model)
      • Configure definitions through Code
      • Add data through Code
      • Configure some types of definitions through CAML
      • Add data through Code
    2. PowerShell (Server Object Model)
      • Add data through Code
    3. Client Object Model
      • Add some definitions through Code
      • Add data through Code
    4. Web Services
      • Add data through Code
    5. SharePoint Designer
      • Add code in specific cases (mostly client side stuff)
      • Some definitions can be added
      • Add data
    6. UI
      • Configure Definitions
      • Add data

Web Services might allow some definitions to be added but I'm not sure.

EDIT: So what you're really asking is: What options do we have to put files and how do you decide which to take ?

I suggest not to think too much in terms of Content DB vs Hive, I find it easier to just decide on what the use case is and how to make it available, for example, is it just needed in one Subsite ? Use a Library or something (Content DB), is it more of a global kinda thing, like a masterpage, you want to have it in a solution, only one real option here is the master page gallery (Hive, as it's accessed through _layouts and thus a virtual folder).

You'll find that depending on your use case, usually there's just one place to put it, and sometimes you have options:

  • Images
    • Content DB (meaning, Site Collection or Site really)
      • Site Collection Images Library
      • Style Library (very common to use this)
      • Publishing Images Library
      • Custom libary
    • Hive
      • Layouts/Images I believe ?
  • Style files (CSS,JS)
    • Content DB (ditto)
      • Style Library
      • So far it's the only agreed upon place to put these I believe
    • Hive
      • Don't know by heart but maybe there's a layouts folder where some JS and css is stored ?
  • Web Parts
    • Hive
      • Web Part Gallery
  • Master Pages / Page Layouts
    • Hive
      • Master Page Gallery
  • Control Templates
    • Hive
      • Layouts/ControlTemplates or something :)

In some cases your javascript code is maybe so specific you decide to put it directly in the page (although not advised), so this could be considered another option (Content DB).

Another Stack Exchange question with some good insights: CSS Files in _Layouts or Document Library?

Cameron Verhelst
  • 1,404
  • 9
  • 11
  • I appreciate your attempt to answer my question. You have provided valuable inputs. I wonder what the moderators are upto because some people have lethargically closed the question.. the question that they say is duplicate is not at all related to this question.. I know its broad, but its not so broad that one cannot list out the methods... I have not asked for explanations. – variable Mar 04 '14 at 18:28
  • 1
    Is there reason you dismiss my answer as an attempt ? Do you require specifics on each or do you not feel I have listed all possible scenarios as to how you might deploy your files ;)? – Cameron Verhelst Mar 04 '14 at 18:49
  • 1
    For example, it's unclear to me if you're looking to find out the options in the deploy method or the options in the deploy destination for putting these files. – Cameron Verhelst Mar 04 '14 at 18:52
  • Sorry but I am researching on the methods provided by you, definitely helpful hence upvoted. – variable Mar 04 '14 at 18:54
  • I feel like I'm nagging, but again, why do you feel it's not qualified as an answer ? – Cameron Verhelst Mar 04 '14 at 18:55
  • Destination would be either into hive or content db. Within hive we can have many folderd where the file can be destined to. Also with in content db file can go into various libraries. At the moment I am researching on possible and available ways. You can definitely contribute more to your answer if you wish.. not expecting much as 3 people have decided to close this down – variable Mar 04 '14 at 18:57
  • 2
    I don't think I will, as you indeed seem to be asking to just give you the documentation of every possible SharePoint Hive folder one is able to put data in as a SP Developer. You will find that while developing, you will research your requirement and may or may not find a certain folder useful for the purpose, thus I don't see the value in listing a description of every folder on here. Are you dealing with a specific problem or are you researching because you need to make a proposal for something big and complex ? If this is the case and you supply more info we may be of more help. – Cameron Verhelst Mar 04 '14 at 18:59
  • Ok. I have deployed files to library (content db) as well as hive (layouts). But then, I didnt find an article listing out the possible places we can destine files to. The question is out of curiosity. Thats all – variable Mar 04 '14 at 19:04
  • Hi Cameron, can you check the sample answer I have provided in my question (edited) itself, probably it will give you more clear picture of what I am asking. – variable Mar 05 '14 at 05:32