0
Code Tax: ProgrammingWith The Taxonomy API  In SharePoint 2010       PATRICK TUCKER
About Me• PATRICK TUCKER   • STRATEGIC DATA SYSTEMS, MS GOLD PARTNER   • PRINCIPAL CONSULTANT, SHAREPOINT   • MCT, MCTS, M...
The Managed Metadata      ExperienceHOW DO WE INTERACT WITH MANAGED METADATA IN SHAREPOINT?
Managed Metadata in SharePoint• A WAY TO DO CLASSIFICATION OF CONTENT    BASED ON ATTRIBUTES• APPLIES TO DOCUMENTS, LIST I...
Where Is Managed Metadata Surfaced?• MANAGED METADATA COLUMNS   • THE TAXONOMY PICKER CONTROL                             ...
Managed Metadata and Taxonomy• MANAGED METADATA SERVICE APPLICATION• TAXONOMY TERM STORE• TERM SETS• MANAGED METADATA COLU...
Taxonomy Term Store• AVAILABLE THROUGH MANAGED  METADATA SERVICE• COMPRISED OF SYSTEM OR ADMIN  CREATED TERM SETS• TERM SE...
Behind the Scenes• TAXONOMIES ARE STORED IN A SINGLE DATABASE• EACH ROOT SITE IN A SITE COLLECTION CONTAINS A “TAXONOMYHID...
Managed Metadata Limitations   • PRACTICAL LIMITATIONS:       • NOT SUPPORTED IN INFOPATH FORMS       • NOT SUPPORTED IN S...
The Taxonomy APIWORKING WITH THE MANAGED METADATA SERVICE PROGRAMMATICALLY
Options• SERVER SIDE OBJECT MODEL (MICROSOFT.SHAREPOINT.TAXONOMY)   • SORRY, NOT AVAILABLE TO SANDBOXED SOLUTIONS• THE TAX...
Object Model• NEED TO REFERENCE MICROSOFT.SHAREPOINT.TAXONOMY DLL• ENTRY POINT IS A NEW TAXONOMY SESSION, CONNECTS   TO   ...
So The Hierarchy Is… MMS Instance   Term Store   Groups   Term Sets   Terms
Terms, Keywords and Synonyms                               • TERMS ARE EITHER MANAGED TERMS OR                            ...
Creating New Term Store Items In Code• GET A REFERENCE TO SESSION . . . TERM STORE• THE TERMSTORE CLASS CONTAINS A CREATEG...
DEMO• TRAVERSE THE HIERARCHY OF GROUPS, TERM SETS AND TERMS• DISPLAY THE HIERARCHY IN A TREE VIEW CONTROL VIA A CUSTOM WEB...
The Taxonomy Client Service• THE TAXONOMYCLIENTSERVICE.SVC IS AVAILABLE, BUT LIMITED• OPERATIONS TO RETRIEVE TERM STORE IT...
Taxonomy Client Service• NAVIGATE TO HTTP://SITECOLLECTIONURL/_VTI_BIN/TAXONOMYCLIENTSERVICE.ASMX• DO YOU KNOW THE GUIDS O...
The Taxonomy Field Type• CUSTOM LIST DEFINITIONS WILL NEED TO CREATE THE FIELD – DECLARATIVELY OR  PROGRAMMATICALLY (OR BO...
Implementing a Taxonomy Field in a Custom List                                  Create            Link the   Create site c...
The Taxonomy Picker Control• ALLOWS THE USER   TO SELECT TERM(S) TO TAG CONTENT• THE CONTROL SHOWS UP ON NEW AND EDIT FORM...
DEMO• USE THE TAXONOMY WEB SERVICE TO DISPLAY TERM STORE   ITEMS• CREATE A CUSTOM LIST DEFINITION THAT CONTAINS A MANAGED ...
The Undiscovered Country WHAT’S NEW WITH MANAGED METADATA IN SHAREPOINT 2013?
So What’s Changed in 2013?• MANAGED METADATA NAVIGATION   • TERMS INTENDED USE MAY BE FOR NAVIGATION   • TARGET PAGES ARE ...
Q and A• PATRICK.TUCKER@SDS-CONSULTING.COM | TUCKERSNET@LIVE.COM• BLOG: WWW.TUCKERSNET.COM• TWITTER: @TUCKERSNET
Upcoming SlideShare
Loading in...5
×

Programming with the SharePoint 2010 Taxonomy API - SPTechCon 2013

1,075

Published on

presented at SPTechCon San Francisco 2013

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,075
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Programming with the SharePoint 2010 Taxonomy API - SPTechCon 2013"

  1. 1. Code Tax: ProgrammingWith The Taxonomy API In SharePoint 2010 PATRICK TUCKER
  2. 2. About Me• PATRICK TUCKER • STRATEGIC DATA SYSTEMS, MS GOLD PARTNER • PRINCIPAL CONSULTANT, SHAREPOINT • MCT, MCTS, MCPD, MCITP, MCSD, MCAD, MCDBA • PATRICK.TUCKER@SDS-CONSULTING.COM | TUCKERSNET@LIVE.COM • BLOG: WWW.TUCKERSNET.COM • TWITTER: @TUCKERSNET
  3. 3. The Managed Metadata ExperienceHOW DO WE INTERACT WITH MANAGED METADATA IN SHAREPOINT?
  4. 4. Managed Metadata in SharePoint• A WAY TO DO CLASSIFICATION OF CONTENT BASED ON ATTRIBUTES• APPLIES TO DOCUMENTS, LIST ITEMS & PAGES AT THE COLUMN LEVEL• ASSISTS SHAREPOINT IN BEING A DOCUMENT MANAGEMENT & COLLABORATION PLATFORM• TAXONOMY AND FOLKSONOMY
  5. 5. Where Is Managed Metadata Surfaced?• MANAGED METADATA COLUMNS • THE TAXONOMY PICKER CONTROL • THE DOCUMENT INFORMATION PANEL • SEARCH
  6. 6. Managed Metadata and Taxonomy• MANAGED METADATA SERVICE APPLICATION• TAXONOMY TERM STORE• TERM SETS• MANAGED METADATA COLUMN TYPE
  7. 7. Taxonomy Term Store• AVAILABLE THROUGH MANAGED METADATA SERVICE• COMPRISED OF SYSTEM OR ADMIN CREATED TERM SETS• TERM SETS MAY BE GLOBAL OR LOCAL, OPEN OR CLOSED• HIERARCHICAL • GROUPS CONTAIN TERM SETS • TERM SETS CONTAIN TERMS • TERMS MAY HAVE A DEFAULT LABEL AND OTHER LABELS (SYNONYMS)
  8. 8. Behind the Scenes• TAXONOMIES ARE STORED IN A SINGLE DATABASE• EACH ROOT SITE IN A SITE COLLECTION CONTAINS A “TAXONOMYHIDDENLIST”• THE “TAXONOMY UPDATE SCHEDULER” TIMER JOB SYNCS HOURLY TO UPDATE THIS LIST• TAXONOMY FIELD VALUES ARE IMPLEMENTED AS LOOKUP COLUMNS• THE “MANAGED METADATA” FIELD IS ACTUALLY COMPRISED OF MULTIPLE COLUMNS • TAXONOMYFIELD • TAXKEYWORDTAXHTFIELD • “TAXCATCHALL” • “TAXCATCHALLLABEL”
  9. 9. Managed Metadata Limitations • PRACTICAL LIMITATIONS: • NOT SUPPORTED IN INFOPATH FORMS • NOT SUPPORTED IN SHAREPOINT WORKSPACE • NOT SUPPORTED IN DATASHEET VIEWS • LIMITED SUPPORT IN SPD WORKFLOWS • PER TECHNET, THE RECOMMENDED STORAGE GUIDELINES ARE: • MAX 7 LEVELS OF NESTING IN A TERM STORE • MAX 1000 TERM SETS IN A TERM STORE • MAX 30,000 TERMS IN A TERM SET • MAX 1 MILLION TOTAL ITEMS IN A TERM STORE
  10. 10. The Taxonomy APIWORKING WITH THE MANAGED METADATA SERVICE PROGRAMMATICALLY
  11. 11. Options• SERVER SIDE OBJECT MODEL (MICROSOFT.SHAREPOINT.TAXONOMY) • SORRY, NOT AVAILABLE TO SANDBOXED SOLUTIONS• THE TAXONOMY CLIENT SERVICE• DECLARATIVE XML• POWERSHELL
  12. 12. Object Model• NEED TO REFERENCE MICROSOFT.SHAREPOINT.TAXONOMY DLL• ENTRY POINT IS A NEW TAXONOMY SESSION, CONNECTS TO MMS INSTANCE• CLASSES IN TAXONOMY NAMESPACE MIRROR HIERARCHY SEEN IN TERM STORE MANAGEMENT TOOL • TAXONOMYSESSION CLASS • TERMSTORE CLASS (TAKES NAME OF MMS PROXY) • GROUP CLASS • TERMSET CLASS • TERM CLASS (MAY CONTAIN NESTED TERMS)
  13. 13. So The Hierarchy Is… MMS Instance Term Store Groups Term Sets Terms
  14. 14. Terms, Keywords and Synonyms • TERMS ARE EITHER MANAGED TERMS OR ENTERPRISE KEYWORDS • EACH TERM MAY BE MARKED AS AVAILABLE FOR TAGGING • EACH TERM HAS A DEFAULT LABEL • SYNONYMS ARE ADDED UNDER THE “OTHER LABELS” SECTION • SYNONYMS ARE EXPOSED IN CODE THROUGH A LABELS COLLECTION ON EACH TERM. THE DEFAULT LABEL IS THE FIRST TERM IN THE COLLECTION.
  15. 15. Creating New Term Store Items In Code• GET A REFERENCE TO SESSION . . . TERM STORE• THE TERMSTORE CLASS CONTAINS A CREATEGROUP METHOD• THE GROUP CLASS CONTAINS A CREATETERMSET METHOD• THE TERMSET CLASS CONTAINS A CREATE TERM METHOD Tips to Remember . . .• ADDING ITEMS TO THE TERM STORE IS TRANSACTIONAL. WE MUST REMEMBER TO CALL “COMMITALL()”
  16. 16. DEMO• TRAVERSE THE HIERARCHY OF GROUPS, TERM SETS AND TERMS• DISPLAY THE HIERARCHY IN A TREE VIEW CONTROL VIA A CUSTOM WEB PART• CREATE A NEW GROUP, TERM SET AND TERMS PROGRAMMATICALLY• RETRIEVE AND DISPLAY THE NEWLY CREATED TERMS
  17. 17. The Taxonomy Client Service• THE TAXONOMYCLIENTSERVICE.SVC IS AVAILABLE, BUT LIMITED• OPERATIONS TO RETRIEVE TERM STORE ITEMS AND ADD TERMS ARE AVAILABLE
  18. 18. Taxonomy Client Service• NAVIGATE TO HTTP://SITECOLLECTIONURL/_VTI_BIN/TAXONOMYCLIENTSERVICE.ASMX• DO YOU KNOW THE GUIDS OF YOUR TERM STORE AND TERM SET?• XML PARSING IS IN YOUR FUTURE
  19. 19. The Taxonomy Field Type• CUSTOM LIST DEFINITIONS WILL NEED TO CREATE THE FIELD – DECLARATIVELY OR PROGRAMMATICALLY (OR BOTH)• THIS FIELD IS EXPOSED IN THE UI VIA THE TAXONOMY PICKER CONTROL• PAGE LAYOUTS MAY ALSO MAKE USE OF THIS FIELD TYPE TO TAG PAGES AS WELL AS ITEMS AND DOCUMENTS
  20. 20. Implementing a Taxonomy Field in a Custom List Create Link the Create site columns content type taxonomy field (taxonomy & note and reference up to a term field) the columns set• DECLARATIVE APPROACH • PROGRAMMATIC APPROACH • WILL NEED SSPID AND TERM SET GUIDS IN XML • ALSO WORKS WITH PARTIAL DECLARATIVE CODE
  21. 21. The Taxonomy Picker Control• ALLOWS THE USER TO SELECT TERM(S) TO TAG CONTENT• THE CONTROL SHOWS UP ON NEW AND EDIT FORMS• THE CONTROL MAY BE USED ON CUSTOM PAGE LAYOUTS
  22. 22. DEMO• USE THE TAXONOMY WEB SERVICE TO DISPLAY TERM STORE ITEMS• CREATE A CUSTOM LIST DEFINITION THAT CONTAINS A MANAGED METADATA COLUMN• VIEW A PAGE LAYOUT TO SEE THE ATTACHED TAXONOMY TERM
  23. 23. The Undiscovered Country WHAT’S NEW WITH MANAGED METADATA IN SHAREPOINT 2013?
  24. 24. So What’s Changed in 2013?• MANAGED METADATA NAVIGATION • TERMS INTENDED USE MAY BE FOR NAVIGATION • TARGET PAGES ARE ATTACHED TO TERMS AND DRIVE THE NAVIGATION OF THE SITE• CSOM – CLIENT SIDE OBJECT MODEL SUPPORT • AVAILABLE TO .NET, SILVERLIGHT AND JAVASCRIPT • PROJECTS MAY REFERENCE THE MICROSOFT.SHAREPOINT.CLIENT.TAXONOMY ASSEMBLY• DATASHEET VIEW SUPPORT FOR THE MANAGED METADATA COLUMN TYPE• CUSTOM PROPERTIES MAY BE ADDED TO A TERM TO STORE ADDITIONAL DATA • MORE THAN JUST ADDITIONAL LABELS, THIS IS A DICTIONARY OF METADATA FOR YOUR METADATA
  25. 25. Q and A• PATRICK.TUCKER@SDS-CONSULTING.COM | TUCKERSNET@LIVE.COM• BLOG: WWW.TUCKERSNET.COM• TWITTER: @TUCKERSNET
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×