Answered Best book or sample to show how a complete SharePoint solution comes together ?

  • Tuesday, January 13, 2009 11:58 PM
     
     
    I have plenty of books to read about using a particular feature of sharepoint.. But now I have all these solutions doing small things.. It seems I should be combining them under the same solution... so that got me thinking.. is there a book that goes from start to finish creating a complete sharepoint solution?

    Or samples??

    The best I could find is the Patterns and practice samples.... anything like that? Maybe not as complex? 


    www.mattherb.com with new improved CATcam!

Answers

  • Thursday, January 15, 2009 7:19 PM
     
     Answered Has Code

    #1 - in your feature.xml file you can call an element manifest.  If this is for an item event receiver you could use the element manifest to bind it to the list.  Here's an example of the how you'd use the element manifest:

    <?xml version="1.0" encoding="utf-8" ?> 
    <!-- _lcid="1033" _version="12.0.4017" _dal="1" --> 
    <!-- _LocalBinding --> 
    <Feature  Id="823C3BE6-2D6E-412b-81EC-4576C513C8BF" 
        Title="Faq Content Type" 
        Description="Faq Content Type" 
        Version="1.0.0.0" 
        Scope="Site" 
        DefaultResourceFile="core" 
        xmlns="http://schemas.microsoft.com/sharepoint/" 
        Hidden="TRUE">  
        <ElementManifests> 
            <ElementManifest Location="faqContentType.xml" /> 
        </ElementManifests> 
    </Feature> 

    You could simply add another line here if you had another file to call.

    #2 --  What I'm referring to here is that you could do all this in an XML file.  However you could do it in code if you wanted.  There's really a few ways to approach this.  You don't need to use the element manifest to do anything if you are doing it 100% in code.  But yes, in your case you'd need to make sure everything is called in the FeatureActivated method.
    John
    SharePoint911: SharePoint Consulting
    http://www.rossonmoss.com
    • Marked As Answer by punkouter Thursday, January 15, 2009 9:32 PM
    •  

All Replies

  • Wednesday, January 14, 2009 1:42 AM
     
     

    That's a really tough question.  A complete SharePoint solution includes a cross function of stuff: Administrative, Development, Configuration of OOTB tools, Search, and even customization topics involving SPD and InfoPath.  I don't really think it is possible to everything in one book.  No one would buy it!  :-)

    That being said, the "MVP Book" has the best cross section of stuff I've seen.  Real World SharePoint 2007 - Indispensible Experiences From 16 MOSS and WSS MVPs.  For my take prefer the specialized books because they go into far greater detail than some all encompassing book could.


    John
    SharePoint911: SharePoint Consulting
    http://www.rossonmoss.com
  • Wednesday, January 14, 2009 1:43 AM
     
     
    There's some good samples here: http://www.microsoft.com/click/SharePointDeveloper/
  • Wednesday, January 14, 2009 3:55 AM
     
     
    Gary, actually I have seen those and I have the sample code and it is the single best resrouce I have found..

    What I am look for is a sample similar but combines the different pieces of deployment .

    I know there are 10000 parts.. but I was thinking for example A solution that has some itemevent hanlers.. webparts.. content type.. and then see how it is all combined and deployed..

    I just started sharepoint dev work and the hardest part for me isnt the actually code.. it is how to go about packing things up .
    If you do SharePoint dev and have MSN add me!! punkouter@hotmail.com We can help each other out.
  • Thursday, January 15, 2009 2:39 AM
     
     
     

    Hello,

     

    It seems that you are seeking the article about how to pack code as solution to be deployed. Then, please check the following link to see whether it can help:

     

    Creating a SharePoint Solution Package (.wsp) in 5 steps:

    http://geekswithblogs.net/evgenyblog/archive/2008/01/27/118966.aspx

     

    Regards,

    Jerry


    Xing-Bing Yu
  • Thursday, January 15, 2009 3:23 PM
     
     
    This is helpful to review

    But what I mean is ... for example my current project is a 3 differnt solutions files right now

    1. Itemevent receiver
    2. Custom field
    3. Custom field

    I should be making them all ONE solution and ONE feature file.. right ?

    If you do SharePoint dev and have MSN add me!! punkouter@hotmail.com We can help each other out.
  • Thursday, January 15, 2009 3:32 PM
     
     
     Yes.  But remember there's a feature.xml file and then you can call multiple element manifests if you want. Or if you wanted you could have a single element manifest where you bind the item event receiver to and also add the fields.  As long as they are all seprate modules you can just list them there.


    John
    SharePoint911: SharePoint Consulting
    http://www.rossonmoss.com
  • Thursday, January 15, 2009 3:44 PM
     
      Has Code
    IYou mention 2 methods..

    #1 you say

    But remember there's a feature.xml file and then you can call multiple element manifests if you want

    you mean adding more of these?

    <Feature Id="0a7d0213-a8fa-4024-a4e5-dbb5cb634eea"

    Title="LeeFeatureWithReceiver"

    Description="Description for LeeFeatureWithReceiver"

    Version="12.0.0.0"

    Hidden="FALSE"

    Scope="Web"

    DefaultResourceFile="core"

    ReceiverAssembly="LeeFeature1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=11dc69a7c11af7a8"

    ReceiverClass="LeeFeature1.LeeFeatureWithReceiver"

    xmlns="http://schemas.microsoft.com/sharepoint/">

    </Feature>





    #2 you say

    Or if you wanted you could have a single element manifest where you bind the item event receiver to and also add the fields.  As long as they are all seprate modules you can just list them there.

    You mean just goto the featureactivated method and add all the event recievers there right? like

    public override void FeatureActivated(SPFeatureReceiverProperties properties)

    {

    SPWeb web = (SPWeb)properties.Feature.Parent;

    SPList list = web.Lists[listName];

    list.EventReceivers.Add(SPEventReceiverType.ItemAdding, assemblyName, className);

    list.EventReceivers.Add(SPEventReceiverType.ItemAdded, assemblyName, className);

    }




    If I understand those 2 ways correctly.. then is there any advatage/disadvantage to using one over the other?

    Still wish I could find something besides the Contoso SP demo that packed them all in.. thats too complex



    If you do SharePoint dev and have MSN add me!! punkouter@hotmail.com We can help each other out.
  • Thursday, January 15, 2009 7:19 PM
     
     Answered Has Code

    #1 - in your feature.xml file you can call an element manifest.  If this is for an item event receiver you could use the element manifest to bind it to the list.  Here's an example of the how you'd use the element manifest:

    <?xml version="1.0" encoding="utf-8" ?> 
    <!-- _lcid="1033" _version="12.0.4017" _dal="1" --> 
    <!-- _LocalBinding --> 
    <Feature  Id="823C3BE6-2D6E-412b-81EC-4576C513C8BF" 
        Title="Faq Content Type" 
        Description="Faq Content Type" 
        Version="1.0.0.0" 
        Scope="Site" 
        DefaultResourceFile="core" 
        xmlns="http://schemas.microsoft.com/sharepoint/" 
        Hidden="TRUE">  
        <ElementManifests> 
            <ElementManifest Location="faqContentType.xml" /> 
        </ElementManifests> 
    </Feature> 

    You could simply add another line here if you had another file to call.

    #2 --  What I'm referring to here is that you could do all this in an XML file.  However you could do it in code if you wanted.  There's really a few ways to approach this.  You don't need to use the element manifest to do anything if you are doing it 100% in code.  But yes, in your case you'd need to make sure everything is called in the FeatureActivated method.
    John
    SharePoint911: SharePoint Consulting
    http://www.rossonmoss.com
    • Marked As Answer by punkouter Thursday, January 15, 2009 9:32 PM
    •