First Steps With SharePoint Technologies

Similar presentations


Presentation on theme: "First Steps With SharePoint Technologies"— Presentation transcript:

1 First Steps With SharePoint Technologies
Good morning. As introduced… David Cattanach, Microsoft Limited

2 What we’ll cover Common things WSS/SPS customers do Install
Customise the look and feel Create some funky web parts Connect one or more web parts together Deploy them onto another server Monitor what people are doing with SPS Take advantage of events Pull/push remote data using Web Services Set up multiple sites Size the servers SharePoint Bingo - 86 Now I must admit I moved away from random top tips into more of a ‘what do people want to do with SharePoint after they’ve installed it?’ kind of session. So we’ll go through some common things to get you started. Each of these could fill an entire session so I’ll only be touching some of the main points to really give you a taster of what you can do. There will of course be a pointer to some more in-depth resources at the end of the slidedeck.

3 Session Prerequisites
Overview knowledge of SharePoint Portal Server (e.g. previous session) Good personal hygiene An idea about some sort of dev stuff such as C# being a programming language or you once owned a Sinclair Spectrum or Commodore 64 If you owned a BBC Micro… get out! (No you can stay… both of you…)

4 Windows Server 2003 (required)
Architecure Recap Office 2003 HTTP IIS 6.0 (Reqd) FrontPage SharePoint requires Windows 2003 server and an NTFS drive. You can use any edition of Windows 2003 but if you use Web Server edition you must use a remote SQL server for the storage as WSS won’t install WMSDE. Windows 2003 comes with IIS6 which acts as the HTTP Listener, provides the domain, port, IP Resolution, virtual servers, authentication, application pools, etc. All WSS sites are stateless, making load balancing not only easy but a recommended configuration. SQL is also required, and WSS ships with a cut down version called WMSDE which is installed by default unless you tell it not to be. Unlike SharePoint Team Services, all content is now stored in the database which greatly improves the scalability and availability of the product. This includes configuration information that was previously stored in the registry (the only registry entry now is the db connection string). WSS is a web server extension providing collaboration functionality. As such it extends IIS with an ISAPI filter (or in IIS6 terms an HTTP module) which looks at the requested URL to determine whether the request is for a SharePoint managed path. There is an administrator controlled list of included and excluded paths (implicit and explicit) that the ISAPI Filter bases its decision on. Assuming the request is for a SharePoint managed path, the ISAPI Filter then passes the request either to the ASP.NET Handler or handles the request through a SharePoint ISAPI Extension call. Office 2003 is required for features such as online presence info, multiple document upload, grid control and some picture library functions. ISAPI ASP.Net SPS WSS OLEDB Windows Server 2003 (required) NTFS drive WSMDE (Reqd)

5 78 – Installation FrontPage Server Extensions
Required by VS.Net web projects Cannot exist on any virtual servers you wish to extend with WSS There are certain choices that you must make either before or during your installation of Microsoft Windows SharePoint Services. Some of these choices, such as the database type you use, can be changed later without causing a lot of extra work. Other choices [such as the user account mode you will use] can’t be changed unless you uninstall and reinstall WSS. If you are installing Windows SharePoint Services in a large scale environment, such as a server farm, it is critical that you make the right choices at the very beginning. Be sure that you carefully consider the following before you install Windows SharePoint Services. WSS is essentially an updated version of FPSE and you can’t install them onto the same virtual server. You can have IIS6 with more than one virtual server and FPSE and WSS can exist quite happily on separate virtual servers. So ensure FPSE are uninstalled from any virtual server before you extend it with WSS.

6 28 – SQL vs MSDE vs WMSDE SQL Server 2000 SP3a MSDE WMSDE
Full RDBMS Server product Personal, Standard, Enterprise versions Plus BI, Reporting, etc… MSDE Ships with various products such as Access, SPS Limited to 2Gb RAM and 2GB DB size Throttled to 5 concurrent users Can upgrade or migrate to full SQL Server WMSDE Specifically for Windows Server 2003 Installed with products such as WSS and UDDI Slight differences above MSDE SQL Server is our mainstream database engine. We do have others, such as the Rushmore engine in FoxPro, Jet in Access and JetBlue for Exchange but with Yukon, the next version of SQL Server, pretty much most of our storage will be handled by SQL Server. It’s a full RDBMS product available in several versions alongside add-on technologies such as Business Intelligence and Reporting Services. MSDE is… WMSDE over MSDE: setup is slightly different, throttling removed, database size restriction removed, can’t perform DDL to any database other than tempdb. Neither allow searching. If you don’t want WSS to install WSMDE, then use the remotesql=yes property So the big question is, if I’m using say, Access with MSDE and I install WSMDE, will it break my access data projects? The answer is that by default WSS installs WMSDE as a new instance named sharepoint. So your existing MSDE instance will be unaffected. Unless you called it Sharepoint in which case I really don’t know what would happen! Both MSDE and WMSDE can be upgraded in-place to SQL Server or you can migrate the data to a remote SQL in the case of scaling up your sites. The latter is pretty straightforward but not as easy as an in-place upgrade. An important note is that SPS ships with MSDE, not WSMDE. So your upgrade strategy from WSS to SPS should really include SQL Server.

7 14 - Customising your Site
Browser-based Editing Creating lists, libraries, surveys, etc Placing web parts Personal vs public views FrontPage 2003 Earlier versions of FP may be incompatible Radical look and feel alterations More granular modifications to web parts Useage reports Pretty much 90% of modifications you’ll want to do to your portal can be performed through the browser. Creating and modifying lists, libraries, placing and connecting web parts, personal view and public view or the mysites. However you may want to use FP2003 to make radical changes to the look and feel of the sites and maybe bring it closer to your corporate standard. When you edit your Microsoft Windows SharePoint Services Web site or your Microsoft Office SharePoint Portal Server 2003 Web site, use Microsoft Office FrontPage Earlier versions of FrontPage may break SharePoint features or functionality. [Some of the common tasks, actions, and processes that can (or should) only be done in FrontPage 2003 to enhance your Web sites that are created by using Windows SharePoint Services or SharePoint Portal Server 2003 include the following: Replace, enhance, or add icons and images. Implement consistent banner treatments across pages. Create custom page layouts. Implement dynamic Web templates. Implement advanced design elements, sound, and interactivity. Create data driven solutions in SharePoint Web sites by using XML data in files, programs, OLE databases, and Web services. Change the source properties, parameters, and formatting of dynamic XML data sources to create new instances of the Data View Web Part. Format live XML data by using the XSLT editing feature. Apply conditional formatting to XSLT data views on XML and other data sources, such as SQL Server or XML Web services. Connect Web Parts on the same page or on different pages (cross-page connections). Create and deploy Web Packages of your SharePoint Web sites for reuse and sharing. Track SharePoint Web site usage and performance by using FrontPage reporting and measurement tools.]

8 Demo Using FrontPage to Modify a SharePoint Site

9 92– Build a web part in VS.Net
Similar to Custom Web Controls Download the Web Part Templates Add the UI controls and Functionality Render the HTML Mark as Safe Extensible UI through tool parts & menus WSS is great out of the box. There’s no code required for immediate value and you get features such as collaboration and list management built-in. However, you also have the capability, through web parts, of assembling powerful composite applications out of pre-built components. It’s like a giant Lego set. Web parts are essentially asp.net custom controls, but they inherit from microsoft.sharepoint.webpartpages.webpart instead of directly from microsoft.web.ui.control. Any Web Part can also be used as a standard Web Form Control. For example, a Web Part can be placed directly on a .aspx page. They can be a little daunting for first time users because, as with custom controls, you don’t build them with a drag-and-drop WYSIWYG interface. You need to build them entirely in code and render the UI manually. You can use the standard web control template in VS.Net but the specific ready-to-roll Web Part templates are free to download so you may as well start from there. Just search for “Web Part Templates for Visual Studio” on msdn. Custom Web Parts allow developers to make full use of .NET without spending time on coding the ‘plumbing’. Each web part can create a whole design time UI as well through the use of the tool pane and menus. There’s also a full web part Object Model, which you can explore through the sdk. SharePoint minimises the risk of users accidentally or naively installing malicious web parts. Only registered custom controls will run in SharePoint pages and only the server Administrator can install the assembly. Also inline server script on the page will not execute and you can utilise all the benefits of ASP.NET Code Access Security so you know where the control has come from and can guarantee it hasn’t been tampered with. It is important to realise however that a control may be safe but if it’s badly written, one web part can bring down a whole site so the recommendation is to test all custom Web Parts carefully by using code profiling, database profiling, and load simulation before deploying to production servers. [There are 2 wpresources and you choose the one according to where your web part is run from. If the wp is run from the web application’s bin folder, then store the resources in However if you’re running the wp from the GAC, place them in the virtual root. Either way you can use the ClassResourcePath property of the WebPart class to determine your WPs resource folder.” ] Emphasis on Safety A Bad Web Part Can Destroy a Site

10 Demo Building a ‘Hello World’ Web Part

11 74 – Connected Web Parts Allows Web Parts to Send & Receive Basic Types of Data 6 Connection Interfaces Connection Chain Must be Homogenous No Circular Connections Can Set Maximum Connections Connecting Private Parts Cross-page Connections Cell, Row, List, Filter, ParameterIn, ParameterOut One huge benefit of web parts is that you can connect them so they can interact and share basic types of data using a standardised set of interfaces. This allows completely independent parts to connect no matter who developed them. There are 6 standard connection interfaces that allow Web Parts to connect at runtime. For example, the List Web Part can provide (send) a row of data to any other Web Part that can consume (receive) it, such as a form Web Part that displays more detail. Web Part that support connection interfaces can be connected by an end user through either the browser or FrontPage. At any given time, Web Parts are allowed to run on the client or the server. Some Web Parts, if designed accordingly, can detect the conditions under which they are running and dynamically switch to run on the client or the server. Web Parts can only be connected to other Web Parts running in the same location. The Web Part-to-Web Part infrastructure calls methods of the Web Parts to discover the connectable Web Parts that are available on each page. As we saw, it makes these connection options available to the user by populating menu items that are added to each connectable part. There are a few rules for connecting web parts: No Circular Connections (either directly or through a chain of connections) Maximum Number of Connections can be specified Connecting Private Parts (A shared Web Part can be connected to a private Web Part, if the private Web Part is a consumer). Cross-page connections (some parts can be connected across different web pages. This can only be done in FrontPage however) Connections must also either be the same type, i.e. cell provider to cell consumer, row provider to row consumer, or you can place transformers in between to change between certain connection types. [1) EnsureInterfaces Notification to the Web Part that is should ensure that all its interfaces are registered using RegisterInterface. 2) CanRunAt Called by the framework to determine whether a part thinks that it can be run on the client or server based on the current configuration. 3) PartCommunicationConnect Notification to the Web Part that it has been connected. The framework uses this to inform a part that the part is connected as soon as the Framework connects up the appropriate events for the connection. 4) PartCommunicationInit At this time, a part should fire any events that end with 'Init' if they can. 5) PartCommunicationMain At this time, a part can fire any events that it wants to. 6) GetInitEventArgs This method is only needed for interfaces that require transformers, e.g. ICellConsumer, IRowProvider, IFilterConsumer, IParametersOutProvider, and IParametersInConsumer. The GetInitArgs method is called by the Authoring environment for all the initial data required for creating a connection that involves a transformer. The method returns the InitArgs object and takes in the interface name.]

12 Demo Connecting Web Parts

13 52 - Package and Deploy it Can be Located in \bin or the GAC
Wpresources Build a Web Part Package (.cab) Manifest.xml (mandatory) Web Part assemblies (optional) Class resource files (optional) DWP files (optional) Deploy Using stsadm.exe A key point for old dashboard developers is that code doesn’t travel with the web part, you deploy a compiled assembly either manually, via a .CAB, or via an MSI. When deploying Web Parts to a SharePoint server, you’ll normally install them into the web application’s \bin folder or the GAC. Web Parts installed in the GAC will run with Full Trust whereas web parts in the \bin folder must be marked as safe in the web config. So when deciding, ask yourself ‘Do you want to make this package available to all virtual servers on your computer?’ and ‘Do you trust the assemblies and resources of the package completely?’. If yes to both, install the Web Part package to the GAC. To deploy a web part, you create a Web Part Package which is a CAB file that contains: Manifest.xml - this must be part of any deployment package as it has the necessary information to install the web part. You only need one manifest per package and it can contain information about multiple assemblies. Web Part assemblies – the web part itself Class resource files - Resources for the web part can be deployed in the wpresources folder and you can assume that you will have sufficient rights to this folder when your web part code runs. DWP files - XML file that holds the reference to the assembly and class used to create it. In previous versions of Web Part technology, the .dwp file contained the code or a link to the code. If you change the namespace or class name after creating the project, you will also need to update the same information in the .dwp file. A regular .cab file is created using VS.net or the MakeCab.exe command-line program available with Windows .NET Server 2003.

14 Demo Creating a Web Part Package

15 90 - Monitoring SPS 2003 Site Usage Data
Must be configured via the admin page Must have rights to view usage data Stored in system32 \LogFiles\STS and the Webs table (for 31 days/months) Data Viewed through WSS or FrontPage Other tools Diagnostic logs Event viewer IIS log files WSS includes features that analyse the usage of your site and provide information such as: Number of page hits for each individual page Number of unique users Browser and operating system information Referring domains and URLs In addition to site usage statistics, you can also keep track of how much storage space your site is taking up and the level of activity your site is generating. You must be a member of the administrator role or have the View Usage Data right for a site in order to view the site usage statistics. Windows Server 2003 Event Logs Windows Server 2003 maintains logs about application, security, and system events on your computer. For example the security log records events such as valid and invalid logon attempts, as well as events related to resource use such as creating, opening, or deleting files or other objects. SPS diagnostic logs: You can obtain detailed information about diagnosing and troubleshooting problems. You can configure the amount and type of information collected in the logs. Usage analysis is not enabled by default. If you want to use the usage analysis features for your server, you must enable the usage analysis logging process. Windows SharePoint Services log files are created daily to track usage information. When the log files are processed, a flag is added to indicate that the log file has been processed. You can check whether the log file has been processed by opening the file using Notepad or any other text editor. When usage analysis processing takes place, the Windows SharePoint Services logs are merged into the content databases on the computer running SQL Server or the Microsoft SQL Server Desktop Engine (Windows) (WMSDE). The log data is a summary record of transactions on your website. The IIS logs contain a complete overview of Web traffic, including calls to Web services, requests for images, and so on; the summary record contains only the information necessary to provide a usage overview. Usage data is kept for a limited time in the content database for historical purposes. Daily information is stored for 31 days and monthly information for 31 months. All usage data is stored as a binary image in the Webs table. Daily information is stored in the DailyUsageData column, and monthly information is stored in the MonthlyUsageData column. Internet Information Services (IIS) Logs IIS logs include detailed information—such as who has visited sites and what was viewed—in terms of total visits, average visits, page views, and trends over time. The SharePoint Products and Technologies log files contain a subset of the data available in the IIS logs. This subset contains the information that is most relevant to the SharePoint Products and Technologies administrator. The IIS logs, however, contain valuable information as well. Careful analysis of the IIS logging data helps you to discover how much traffic is going to portal sites, how much is going to Windows SharePoint Services sites, and how much is going to search operations. The IIS logs also contain hits to pages that are excluded in the Windows SharePoint Services logs, specifically pages in the _layouts folders. These folders contain Windows SharePoint Services application pages, which are not important to users trying to track the use of the content in their site.

16 84 - Monitoring SPS 2003 Microsoft Usage Analysis
Total Number of Sites: 148,457 Total Number of In-Use Sites: 81,634 Total Number of Unused Sites (never modified): 66,823 Total Number of Large Sites (250MB+): 1,710 Total Number of Medium Sites (5-250MB): 23,875 Total Number of Small Sites (5MB-): 56,049 Total Number of In-Use Lists: 308,007 Total Size: MB (2.1 TB) Average Size of a Site: 26MB Most prolific SharePoint World Wide File Types: .doc, 711,834, 31% of total documents, average size 361Kb Total Number of personal sites: 31,001 Total Number of In-Use Team Sites: 24,625 Total Number of In-Use Meeting Workspace Sites: 8,805 Just some background on some recent metrics that Microsoft came up with on our worldwide WSS/SPS usage.

17 Demo Monitoring SharePoint

18 68 – Handling SPS Events Server-side/Client-side Events
SPS Specific Events Events are supported on document libraries. Operations such as add, update, delete, check-in, check-out, etc are asynchronous and call a managed interface. Creating an event sink is as easy as creating a custom .NET class that implements the IListEventSink interface and provides implementation for the single method, OnEvent.  The OnEvent method accepts a single argument, an SPListEvent object, that contains all relevant information about the event that was fired. You can identify the type of the event from the Type property. You can use the Site property to access the object model of the Microsoft.SharePoint namespace within the handler. To deploy an event handler on a server, you must enable event handling on the Virtual Server General Settings page in SharePoint Central Administration. [A strong name consists of the assembly's identity — its simple text name, version number, and culture information (if provided) — plus a public key and a digital signature. It is generated from an assembly file (the file that contains the assembly manifest, which in turn contains the names and hashes of all the files that make up the assembly), using the corresponding private key. Microsoft® Visual Studio® .NET and other development tools provided in the .NET Framework SDK can assign strong names to an assembly. Assemblies with the same strong name are expected to be identical. You can ensure that a name is globally unique by signing an assembly with a strong name. In particular, strong names satisfy the following requirements: Strong names guarantee name uniqueness by relying on unique key pairs. No one can generate the same assembly name that you can, because an assembly generated with one private key has a different name than an assembly generated with another private key. Strong names protect the version lineage of an assembly. A strong name can ensure that no one can produce a subsequent version of your assembly. Users can be sure that a version of the assembly they are loading comes from the same publisher that created the version the application was built with. Strong names provide a strong integrity check. Passing the .NET Framework security checks guarantees that the contents of the assembly have not been changed since it was built. Note, however, that strong names in and of themselves do not imply a level of trust like that provided, for example, by a digital signature and supporting certificate. When you reference a strong-named assembly, you expect to get certain benefits, such as versioning and naming protection. If the strong-named assembly then references an assembly with a simple name, which does not have these benefits, you lose the benefits you would derive from using a strong-named assembly and revert to DLL conflicts. Therefore, strong-named assemblies can only reference other strong-named assemblies.] Build Class to Implement IListEventSink Strongly Name and Place in the GAC Attach the Event Class to Doc Library

19 Demo Handling a Document Library Event

20 88 – Writing a Custom Web Service for SPS
Consume existing web WSS/SPS services Usergroups, webs, lists, meetings, views, subscription, portal, userprofileservice, areaservice, search, etc Create custom web services So, as you probably know, a Web Service is an application that can be called over the Web using standards such as SOAP over HTTP. There are a number of built-in web services provided by WSS and SPS or you can create and consume custom web services from SPS. WSS UserGroups.asmx – users and groups Webs.asmx – Web information Views.asmx – View information Subscription.asmx – Subscriptions Portal UserProfileService.asmx AreaService.asmx Search.asmx

21 58 – Setting Up Multiple Sites
Scalable Hosting Mode No Need to use Host Headers in IIS Populate Hosts file Config db must be created with the –hh switch Cannot use IP-bound virtual servers (Q830342) Another feature of particular interest to ISP’s is the Host-header mode capability of SharePoint. It allows for the creation of vanity-named sites to be recognized by SharePoint instead of the virtual server. Each of these sites can have its own content, users, site owner, etc. They simply share the same virtual server using the same IP address. SPS will make the appropriate content available according to the URL. The windows\system32\drivers\etc\hosts requires each site to be set up e.g. IP bound virtual servers are not supported in SPS Either use host headers and All Unassigned or use scalable hosting mode.

22 36 – Sizing Recommendations Single server
Specification 1Gb+ RAM 100Gb+ free hard disk space A 2 GHz+ P4 processor Capacity Process 20 Web pages per second Process two search queries per second Index five documents per second Store more than 100,000 documents Include more than 1 million documents in indexes Host more than 10,000 team and personal sites SPS stores data in SQL Server, and stores full-text indexes on the file system on search and index servers.

23 98 – Sizing Recommendations Server Farm
Server Type RAM Hard Disk CPU Web server 1 GB 50 GB 1 GHz for every 10 pages per second (or for every 10,000 named users) SQL server 4 GB 2x total document storage requirements 25% total GHz of all Web servers Search server ½ total document space 1 GHz for every 20 pages per second Index server 2 GB ¼ total document space 1 GHz for every 1 million indexed objects In general, the most important characteristic that determines the amount of storage space required is the total size of the documents stored on the portal site and the total size of the documents included in the portal site index. The SQL Server must have sufficient disk space to store 200 percent of the total size of all documents stored within the portal site. Each search server must have sufficient disk space to store 50 percent of the total size of all documents included in the portal site index. Each index server must have sufficient disk space for 25 percent of the total size of all documents included in the indexes on that server. For example, a portal site that stores 1 million documents with an average document size of 100 kilobytes (KB) will store 100 gigabytes (GB) of document data, and thus requires 200 GB of storage space. If that same portal site also includes an index that covers a total of 1 terabyte of document data, then each search server requires 500 GB of storage space. If the portal site uses two different index servers, each index server must have 125 GB of storage space.

24 For More Information… SharePoint Developer Center msdn.microsoft.com/SharePoint Web Component Directory Training 2014: Customizing Microsoft SharePoint Products and Technologies 2003 1881-X: Microsoft SharePoint Products and Technologies Resource Kit Capacity Planning (WSS, SPS) Technet website


Download ppt "First Steps With SharePoint Technologies"

Similar presentations


Ads by Google