Este documento apresenta novidades para desenvolvedores .NET na plataforma SharePoint 2010. Apresenta recursos como Web Parts, Ribbon, Silverlight e ADO.NET Data Services que melhoram a experiência de desenvolvimento. Demonstra como utilizar essas novas funcionalidades por meio de exemplos práticos.
5. Globalcode – Open4education
Ratings
Blogs and Wikis
Activity Feeds
Tagging, Tag Cloud
Social
Bookmarking
Blogs and Wikis
My Sites
Activity Feeds
Profiles and
Expertise
Org Browser
Audio and Video Content
Types
Remote Blob Storage
List Enhancements
Enterprise Content Types
Metadata and Navigation
Document Sets
Multi-stage Disposition
Social Relevance
Phonetic Search
Navigation
FAST Integration
Enhanced Pipeline
PerformancePoint Services
Excel Services
Chart Web Part
Visio Services
Web Analytics
SQL Server Integration
PowerPivot
Business Connectivity Services
External Lists
Workflow
Client Object Model
SharePoint Designer
Visual Studio
API Enhancements
REST/ATOM/RSS
InfoPath Form Services
Composições
Microsoft SharePoint 2010
Ribbon UI
SharePoint Workspace
SharePoint Mobile
Office Client and Office Web App Integration
Standards Support
7. Globalcode – Open4education
Desenvolvimento no SP 2007
A experiência com o Visual Studio é limitada
Visual Studio Extensions for WSS
Visual Studio Tools for Office with VS2008
Dificuldade em desenvolver aplicativos cliente*
Desenvolvedores precisam se preocupar com
coisas chatas
Edição manual de arquivos CAML
Edição manual do arquivo manifest.xml
Criação de arquivos .wsp para implantação da solução
8. Globalcode – Open4education
Desenvolvimento no SP2010
Experiência rica com o usuário
SharePoint Explorer para exploração de sites
Projetos e itens do SharePoint 2010
Designer visual
Novas API de cliente
Benefícios para os desenvolvedores SharePoint
Abstração na criação de arquivos WSP (deploy)
Facilidade no deploy de features
Diminuição/eliminação de utilitários externos
9. Globalcode – Open4education
Ambiente de Desenvolvimento
Utilização de desktops 64 bits
Opções de ambiente
Remoto
Virtualizado
Desenvolvimento local
SP 2010 poder ser instalado no Windows 7 e Vista
11. Globalcode – Open4education
WebParts
ASP.NET WebParts
System.Web.UI.WebControls.WebParts.WebPart
Modelo mais comum de desenvolvimento
Modelos de WebParts suportados
Standard WebPart
Visual WebPart
Conexão entre WebParts
Exemplo: grid conectado a um formulário
12. Globalcode – Open4education
WebParts
Standard WebParts:
Modelo existente no SharePoint 2007
O layout deve ser feito manualmente em C#
Muitas vezes são criadas para servir de container para
User Controls
Visual WebParts:
Novo modelo do SharePoint 2010
Layout feito através de User Controls (ASP.NET)
O User Controls faz parte da WebPart, não é um
componente separado
15. Globalcode – Open4education
Ribbon
Começou a ser usada no Office 2007
Experiência do usuário
Menus contextuais e destacados
Agilidade na execução de tarefas
Executar ações para vários itens
18. Globalcode – Open4education
Silverlight
API de cliente para Silverlight (subset)
O Silverlight poder ser utilizado em páginas
ASPX ou Web parts
O Client OM poder ser utilizado no Silverlight
para criar aplicações SharePoint
19. Globalcode – Open4education
Criando Silverlight Web Parts
Uma Web Part poder ser um host para o
Silverlight
SharePoint possui uma web part de Silverlight
A web part pode conter propriedades
customizadas para serem enviadas ao Silverlight
via propriedade InitParameters
O arquivo XAP poder ser instalado no dirétorio
LAYOUTS e carregado em tempo de execução
20. Globalcode – Open4education
Funcionamento do COM
Client.svc
Server
OM
Content
database
ECMAScript OM
Proxy
Managed OM
Proxy
Managed Controls and Logic
ECMAScriptControls and Logic
XML Request
XML Request
JSON Response
JSON Response
Navegador
Client OM
Servidor SharePoint
23. Globalcode – Open4education
ADO.NET Data Services
ListData.svc provê acesso REST
Operações de leitura, criação, update e exclusão são mapeadas
diretamente nos verbos HTTP GET, POST, PUT, e DELETE
ListData.svc
Carrega o assembly manipulador do ADO.NET Data Services
Microsoft.SharePoint.ListDataService.dll
Implementa a interface IDataServiceProvider
Microsoft.SharePoint.Linq.dll
Implementa o provider Linq to SharePoint
24. Globalcode – Open4education
ADO.NET Data Services
Obtendo as listas do site
http://.../_vti_bin/listdata.svc/
Obtenção da lista Projects
http://.../_vti_bin/listdata.svc/Projects
Obtenção do projeto 2
http://.../_vti_bin/listdata.svc/Projects(2)/Description
Obtenção dos projetos ordenados pelo título
http://.../_vti_bin/listdata.svc/Projects?$orderby=Title
Connect and Empower People
Making people more productive is a direct result of enabling them to access resources and knowledge regardless of where they are and what device they use, through a user experience optimized for usability and adoption. Learn more
Cut costs with a Unified Infrastructure
Driving cost efficiencies and accomplishing more with the same resources is possible through the consolidation of all the key business collaboration solutions into SharePoint 2010 and using this common platform to deploy solutions for your intranet, extranet, or for your Internet web presence. Learn more
Rapidly Respond to Business Needs
When time-to-market is key, SharePoint 2010 enables people to customize the out-of-box platform and deploy solutions that enable them to address specific business requirements quickly and in a secure manner. Learn more
Sites: Share information seamlessly and securely with employees, partners and customers
Comunidades: Empower people to work together in new ways
Conteúdo: Manage content lifecycle from creation to disposition
Busca: Find people and information anywhere
Insights: Make informed business decisions
Composites: Rapidly create dynamic business solutions
Sites: SharePoint Sites delivers a single infrastructure to provide portal and collaboration capabilities across intranet, extranet, and Internet sites. Bring users together to share information, data, and expertise across organizations.
Comunidades: SharePoint Communities empowers people to work together in ways that are most effective for them. Allow people to collaborate in groups, share knowledge and ideas, connect with colleagues, and find information and experts easily
Conteúdo: SharePoint Content enables all users to participate in a governed, compliant content management lifecycle. SharePoint Content makes it possible to expertly balance user experience with policy and process.
Busca: SharePoint Search give users the ability to find the content, information, and people they need by combining an integrated, easy-to-manage platform with best-of-breed enterprise search technology.
Insights: SharePoint Insights enables users to access and interact with information across unstructured and structured data sources. Empower users to discover the right people and expertise to make better and more agile business decisions
Composites: SharePoint Composites empowers users to rapidly respond to business needs by creating their own no-code solutions on-premises or in the cloud, through a rich set of building blocks, tools, and self-service capabilities.
The developer experience for SharePoint 2007 has been less than ideal due to a lack of tool support, wizards and designers. Many developers coming from a background with .NET and ASP.NET development have been frustrated at the need to write batch files, work in the command line and write XML in a under-documented language know as Collaborative Application Markup Language (CAML).
The functionality of Visual Studio Extensions for WSS 3.0 was much improved as it evolved from version 1.0 to 1.3. Although even the latest version does not provide an end-to-end solution for SharePoint development. Many SharePoint 2007 developers have an arsenal of community tools to accomplish many of the required tasks within SharePoint development.
The Visual Studio 2010 SharePoint Tools (SPT) represents a significant step forward for professional developers using SharePoint.
SharePoint Explorer fallows quick exploration through a site
This makes it possible to launch browser at specific place within site
SharePoint 2010 introduce a new project structure as well as project tmplates and project item templates. There are designers to create things like features and solution packages.
One of the most appealing aspects of SPT is that it is extensible
You can add your own custom project templates and item templates
You can add menu commands into the Visual Studio UI.
By default, the managed client object models authenticate users by using their Windows credentials (DefaultCredentials). Optionally, you can change the authentication mode on the ClientContext object and specify using Forms authentication instead. A user must then supply a user name and password through properties on ClientContext. Behind the scenes, Windows SharePoint Services “14” calls the Authentication Web service, obtains the correct cookie, and then makes the necessary object model calls. To run managed client code against a Forms authentication server, you must change to Forms authentication. This requirement does not apply to the JavaScript object model.
The managed client object models provide a ClientAuthenticationMode enumeration whose values are Anonymous, Default, and FormsAuthentication. To specify Forms authentication, use code similar to the following:
clientContext.AuthenticationMode = ClientAuthenticationMode.FormsAuthentication;
In addition to setting the authentication mode, you must specify the user name and password information, such as follows:
FormsAuthenticationLoginInfo formsAuthInfo = new FormsAuthenticationLoginInfo("MyUser", "MyPassword");
clientContext.FormsAuthenticationLoginInfo = formsAuthInfo;
Note: Currently, the account name and password in formsAuthInfo are sent in clear text, so you must use HTTPS protocol instead of HTTP.
Here we explain the basics of creating a Silverlight web part and how to create a feature that deploys the XAP file and web part. We also explain how the XAP file is loaded at run time and how web part properties may be passed to the Silverlight application.
For Silverlight client installations, Microsoft SharePoint Foundation deploys Microsoft.SharePoint.Client.Silverlight.dll and Microsoft.SharePoint.Client.Silverlight.Runtime.dll into a special "Scripts only" folder of the /_layouts virtual directory named clientbin. This folder is designed to be a standard place for hosting assemblies that are used in Silverlight.
Este diagrama mostra como o mecanismo de transporte funciona
Manage client OM = .NET / Silverlight
Todas as comunicações são feitas através do serviço WCF client.svc
Microsoft implemented the client OM by decorating the core SharePoint OM with attributes if it was “client aware”
[ClientCallableType(Name=“Web”,[…]),[…]]
public class SPWeb {}
Then a code gen tool generates the client OM assemblies and JavaScript
This ensures that there’s fidelity between all the client OM’s and the server equiv
Can run LINQ queries against lists because the client object model does not support LINQ queries against lists.
You can use LINQ in the client OM to return object (e.g., list title is not null), but you can’t return items with the client OM (e.g., all tasks whose due date is past)
That’s why we need ADO.NET data services and that’s why we’re discussing it here
Can run LINQ queries against lists because the client object model does not support LINQ queries against lists.
You can use LINQ in the client OM to return object (e.g., list title is not null), but you can’t return items with the client OM (e.g., all tasks whose due date is past)
That’s why we need ADO.NET data services and that’s why we’re discussing it here