SlideShare une entreprise Scribd logo
1  sur  39
Developing SharePoint 2010
       and Silverlight Web Parts –
             Tips and Tricks
                                      Ovidiu Becheș-Puia
                                    SharePoint Developer
                                             EBS Romania
                                    ovidiu.beches@ebs.ro


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
ITCamp 2012 sponsors                                                       Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
Agenda                                                                     Best Practices




•   SharePoint Developer Tools
•   ASP.NET and Silverlight Web Parts
•   SPG (SharePoint Pattern&Practices Guidance)
•   Unit Testing in SharePoint
•   DEMOS



@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
Intro                                                                      Best Practices




 What means to me developing and working with SharePoint ?




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
Intro                                                                      Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
The SharePoint Developer Toolbox

     TOOLS


@   itcampro   # itcamp12     Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• SPM 2010




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• ULS Viewer




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• .NET Reflector / JustDecompile




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• Fiddler2 / Firebug




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• CKS – Community Kit for SharePoint




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• SPSF – SharePoint Software Factory




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
TOOLS                                                                      Best Practices


• Linq to SharePoint DSL Extension for VS2010




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Developing ASP.NET and Silverlight WebParts

     WEB PARTS


@   itcampro   # itcamp12     Premium conference on Microsoft technologies
Architecture &
Web Parts                                                                  Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
Web Parts                                                                  Best Practices




My GOLDEN RULE (GOAL)

It would be so much easier if we could avoid using
SharePoint server to develop Web Part / anything




                                The F5 Build/Deploy/Test cycle is slow….


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
Web Parts                                                                  Best Practices




When not to use SharePoint:
-if your WebPart does not use SharePoint calls
-use a simple ASP.NET Web Application – test harness
-statically declare WebParts in aspx – so no need to
handle personalisation




                                  The F5 Build/Deploy/Test cycle is slowww..

@   itcampro   # itcamp12   Premium conference on Microsoft technologies
SharePoint 2010 Pattern & Practices Guidance

     SPG


@   itcampro   # itcamp12     Premium conference on Microsoft technologies
Architecture &
SPG                                                                        Best Practices


(Coding) Challenges when creating enterprise
applications:
• Testability
     – can you isolate your classes
• Flexibility
     – Can you update or replace code without
       recompiling
• Configuration
     – How do you manage configuration settings?


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG                                                                        Best Practices


(Coding) Challenges when creating enterprise
applications:
• Logging and exception handling
     – How do you log ? Consistent across the team
• Maintainability
    - How can you maintain code that is always
      evolving
• Can your code run in the Cloud (Office 365)
    - Without Full trust proxy


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG                                                                        Best Practices



• Main patterns illustrated (with reference
  applications in the SPG)

-Service Locator pattern
-MVP pattern (Model-View-Presenter)
-MVVM pattern (Model-View-ViewModel)
-Repository pattern



@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG: Service Locator pattern                                               Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG: Service Locator pattern                                               Best Practices



                                                    Mappings add on Farm level

                                                    Can be added using only:
                                                    -farm feature / CA Web App
                                                    -console app
                                                    Mappings add on Site Coll. level




                                                    Get Service Locator

                                                    -Site Collection (if SPContext )
                                                    -Farm




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG:MVP (Model-View-Presenter)                                                 Best Practices


-MVP originated in early 1990s
-MVP is a derivative of MVC
-Two types of implementation
     – Passive View
     – Supervising Controller

-Presenter assumes the functionality of the
MVC controller
-View is responsible for handling UI events
-Model becomes strictly a Domain Model


@   itcampro   # itcamp12       Premium conference on Microsoft technologies
Architecture &
SPG:MVP (Model-View-Presenter)                                             Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG:M-V-VM                                                                 Best Practices


• Largely based on MVC
• Specialization of the MVP pattern known as
  Presentation Model
• Build specifically for the WPF and Silverlight
• ViewModel is a “Model of the View”
     -it extends the Model with Behaviours the View
     could use
     -Data binding between View and Model
     -Passes commands between the View and Model


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG:M-V-VM                                                                 Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG:M-V-VM                                                                 Best Practices




The Model - which provides a view-independent
representation of your business entities
The View - which is the user interface. It displays information
to the user and fires events in response to user interactions
The ViewModel - which is the bridge between the view and the
model.


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG:M-V-VM                                                                 Best Practices




                                                        How about JavaScript / HTML5?




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG: Repository Pattern                                                    Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
SPG: Repository Pattern                                                       Best Practices

                Choosing a SharePoint Data Access Technology




@   itcampro   # itcamp12      Premium conference on Microsoft technologies
Unit Testing in SharePoint World

     UNIT TESTS


@   itcampro   # itcamp12      Premium conference on Microsoft technologies
Architecture &
UNIT TEST                                                                  Best Practices




Only Integration Tests with MSTest
      - Visual Studio 2010 SP1



SPListCollection – internal ctors.

Isolation Frameworks:
       -Typemock – not free
       -Pex and Moles – free


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
UNIT TEST                                                                  Best Practices


         Mocking the „Principle of Isolation‟




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
UNIT TEST                                                                  Best Practices




TDD and SharePoint

-reducing the cost of change
-in a typical SharePoint project, the portion
where TDD is actually applicable is very small
which is the writing code part                                             Sahil Malik




TDD + SharePoint ? Not worth it IMHO.



@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
UNIT TEST                                                                   Best Practices




TDD and SharePoint
a typical SharePoint project:
• Customer communication and prototyping
• Plenty of attention to the IT Pro side, where you
  decide logical and physical layouts of your servers,
  networks, and your site collections
• A significant effort in branding                                          Sahil Malik

• Focus on scalability
• Writing some code
• Establishing roles within your team (overlap with IT
  Pro guys)
• Training required
• large portions of XML

@   itcampro   # itcamp12    Premium conference on Microsoft technologies
Architecture &
UNIT TEST                                                                   Best Practices


                      Pex and Moles - Peli de Halleux – Microsoft Research




@   itcampro   # itcamp12    Premium conference on Microsoft technologies
Vă mulțumesc

     Q&A


@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Architecture &
Conclusions                                                                Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies

Contenu connexe

Similaire à Developing SharePoint 2010 and Silverlight web parts

ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...ITCamp
 
ITCamp 2011 - Stephen Forte - Kanban
ITCamp 2011 - Stephen Forte - KanbanITCamp 2011 - Stephen Forte - Kanban
ITCamp 2011 - Stephen Forte - KanbanITCamp
 
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...ITCamp
 
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp
 
Patterns for Scalability in Windows Azure Applications (Alex Mang)
Patterns for Scalability in Windows Azure Applications (Alex Mang)Patterns for Scalability in Windows Azure Applications (Alex Mang)
Patterns for Scalability in Windows Azure Applications (Alex Mang)ITCamp
 
How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)ITCamp
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSITCamp
 
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp
 
ITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefield
ITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefieldITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefield
ITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefieldITCamp
 
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp
 
The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)ITCamp
 
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#ITCamp
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp
 
ITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp
 
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...ITCamp
 
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5ITCamp
 
ITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to AzureITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to AzureITCamp
 
Azure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex MangAzure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex MangITCamp
 
Resume: DevOps/Technology Architect - Satya Prakash
Resume: DevOps/Technology Architect   -  Satya PrakashResume: DevOps/Technology Architect   -  Satya Prakash
Resume: DevOps/Technology Architect - Satya PrakashSatyaPrakash454
 
Corporate Presentation Synergetics India
Corporate Presentation Synergetics IndiaCorporate Presentation Synergetics India
Corporate Presentation Synergetics IndiaMahesh Shinde
 

Similaire à Developing SharePoint 2010 and Silverlight web parts (20)

ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
ITCamp 2013 - Martin Kulov - Agile Project Management with Team Foundation Se...
 
ITCamp 2011 - Stephen Forte - Kanban
ITCamp 2011 - Stephen Forte - KanbanITCamp 2011 - Stephen Forte - Kanban
ITCamp 2011 - Stephen Forte - Kanban
 
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
ITCamp 2012 - Ovidiu Stan - Social media platform with Telligent Community, W...
 
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to StrengthenITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
ITCamp 2012 - Paula Januszkiewicz - Stronghold to Strengthen
 
Patterns for Scalability in Windows Azure Applications (Alex Mang)
Patterns for Scalability in Windows Azure Applications (Alex Mang)Patterns for Scalability in Windows Azure Applications (Alex Mang)
Patterns for Scalability in Windows Azure Applications (Alex Mang)
 
How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)How # (sharp) is Your Katana (Ciprian Jichici)
How # (sharp) is Your Katana (Ciprian Jichici)
 
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JSMihai Tataran - Building Windows 8 Applications with HTML5 and JS
Mihai Tataran - Building Windows 8 Applications with HTML5 and JS
 
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitchITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
ITCamp 2013 - Melania Danciu - HTML5 apps with LightSwitch
 
ITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefield
ITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefieldITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefield
ITCamp 2012 - Sergiu Damian - Architectural decisions on the battlefield
 
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud StoryITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
ITCamp 2019 - Andrea Saltarello - Modernise your app. The Cloud Story
 
The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)The New Era of Code in the Cloud (Bogdan Toporan)
The New Era of Code in the Cloud (Bogdan Toporan)
 
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
ITCamp 2012 - Adam Granicz - Web development with WebSharper in F#
 
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows AdministratorsITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
ITCamp 2011 - Paula Januszkiewicz - 10 deadly sins of Windows Administrators
 
ITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile apps
 
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
ITCamp 2013 - Lorant Domokos - Chasing the one codebase, multiple platforms d...
 
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
ITCamp 2011 - Raul Andrisan - What’s new in Silverlight 5
 
ITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to AzureITCamp 2011 - Mihai Tataran - Migrating to Azure
ITCamp 2011 - Mihai Tataran - Migrating to Azure
 
Azure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex MangAzure SQL Database From A Developer's Perspective - Alex Mang
Azure SQL Database From A Developer's Perspective - Alex Mang
 
Resume: DevOps/Technology Architect - Satya Prakash
Resume: DevOps/Technology Architect   -  Satya PrakashResume: DevOps/Technology Architect   -  Satya Prakash
Resume: DevOps/Technology Architect - Satya Prakash
 
Corporate Presentation Synergetics India
Corporate Presentation Synergetics IndiaCorporate Presentation Synergetics India
Corporate Presentation Synergetics India
 

Dernier

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 

Dernier (20)

How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 

Developing SharePoint 2010 and Silverlight web parts

  • 1. Developing SharePoint 2010 and Silverlight Web Parts – Tips and Tricks Ovidiu Becheș-Puia SharePoint Developer EBS Romania ovidiu.beches@ebs.ro @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 2. Architecture & ITCamp 2012 sponsors Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 3. Architecture & Agenda Best Practices • SharePoint Developer Tools • ASP.NET and Silverlight Web Parts • SPG (SharePoint Pattern&Practices Guidance) • Unit Testing in SharePoint • DEMOS @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 4. Architecture & Intro Best Practices What means to me developing and working with SharePoint ? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 5. Architecture & Intro Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 6. The SharePoint Developer Toolbox TOOLS @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 7. Architecture & TOOLS Best Practices • SPM 2010 @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 8. Architecture & TOOLS Best Practices • ULS Viewer @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 9. Architecture & TOOLS Best Practices • .NET Reflector / JustDecompile @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 10. Architecture & TOOLS Best Practices • Fiddler2 / Firebug @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 11. Architecture & TOOLS Best Practices • CKS – Community Kit for SharePoint @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 12. Architecture & TOOLS Best Practices • SPSF – SharePoint Software Factory @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 13. Architecture & TOOLS Best Practices • Linq to SharePoint DSL Extension for VS2010 @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 14. Developing ASP.NET and Silverlight WebParts WEB PARTS @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 15. Architecture & Web Parts Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 16. Architecture & Web Parts Best Practices My GOLDEN RULE (GOAL) It would be so much easier if we could avoid using SharePoint server to develop Web Part / anything The F5 Build/Deploy/Test cycle is slow…. @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 17. Architecture & Web Parts Best Practices When not to use SharePoint: -if your WebPart does not use SharePoint calls -use a simple ASP.NET Web Application – test harness -statically declare WebParts in aspx – so no need to handle personalisation The F5 Build/Deploy/Test cycle is slowww.. @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 18. SharePoint 2010 Pattern & Practices Guidance SPG @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 19. Architecture & SPG Best Practices (Coding) Challenges when creating enterprise applications: • Testability – can you isolate your classes • Flexibility – Can you update or replace code without recompiling • Configuration – How do you manage configuration settings? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 20. Architecture & SPG Best Practices (Coding) Challenges when creating enterprise applications: • Logging and exception handling – How do you log ? Consistent across the team • Maintainability - How can you maintain code that is always evolving • Can your code run in the Cloud (Office 365) - Without Full trust proxy @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 21. Architecture & SPG Best Practices • Main patterns illustrated (with reference applications in the SPG) -Service Locator pattern -MVP pattern (Model-View-Presenter) -MVVM pattern (Model-View-ViewModel) -Repository pattern @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 22. Architecture & SPG: Service Locator pattern Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 23. Architecture & SPG: Service Locator pattern Best Practices Mappings add on Farm level Can be added using only: -farm feature / CA Web App -console app Mappings add on Site Coll. level Get Service Locator -Site Collection (if SPContext ) -Farm @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 24. Architecture & SPG:MVP (Model-View-Presenter) Best Practices -MVP originated in early 1990s -MVP is a derivative of MVC -Two types of implementation – Passive View – Supervising Controller -Presenter assumes the functionality of the MVC controller -View is responsible for handling UI events -Model becomes strictly a Domain Model @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 25. Architecture & SPG:MVP (Model-View-Presenter) Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 26. Architecture & SPG:M-V-VM Best Practices • Largely based on MVC • Specialization of the MVP pattern known as Presentation Model • Build specifically for the WPF and Silverlight • ViewModel is a “Model of the View” -it extends the Model with Behaviours the View could use -Data binding between View and Model -Passes commands between the View and Model @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 27. Architecture & SPG:M-V-VM Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 28. Architecture & SPG:M-V-VM Best Practices The Model - which provides a view-independent representation of your business entities The View - which is the user interface. It displays information to the user and fires events in response to user interactions The ViewModel - which is the bridge between the view and the model. @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 29. Architecture & SPG:M-V-VM Best Practices How about JavaScript / HTML5? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 30. Architecture & SPG: Repository Pattern Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 31. Architecture & SPG: Repository Pattern Best Practices Choosing a SharePoint Data Access Technology @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 32. Unit Testing in SharePoint World UNIT TESTS @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 33. Architecture & UNIT TEST Best Practices Only Integration Tests with MSTest - Visual Studio 2010 SP1 SPListCollection – internal ctors. Isolation Frameworks: -Typemock – not free -Pex and Moles – free @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 34. Architecture & UNIT TEST Best Practices Mocking the „Principle of Isolation‟ @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 35. Architecture & UNIT TEST Best Practices TDD and SharePoint -reducing the cost of change -in a typical SharePoint project, the portion where TDD is actually applicable is very small which is the writing code part Sahil Malik TDD + SharePoint ? Not worth it IMHO. @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 36. Architecture & UNIT TEST Best Practices TDD and SharePoint a typical SharePoint project: • Customer communication and prototyping • Plenty of attention to the IT Pro side, where you decide logical and physical layouts of your servers, networks, and your site collections • A significant effort in branding Sahil Malik • Focus on scalability • Writing some code • Establishing roles within your team (overlap with IT Pro guys) • Training required • large portions of XML @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 37. Architecture & UNIT TEST Best Practices Pex and Moles - Peli de Halleux – Microsoft Research @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 38. Vă mulțumesc Q&A @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 39. Architecture & Conclusions Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies

Notes de l'éditeur

  1. -class A uses Service A & B – high coupling-can not replace easy, at runtime the Service classes
  2. If a type mapping for a particular interface is defined at both the site collection scope and the farm scope, then the site collection mapping will take precedence. If an SPContextobject is not available—in a timer job, for example—then the GetCurrent() method will return a service locator that loads farm-only type mappings. A second overload, GetCurrent(SPSite), will load type mappings from the specified site collection and merge them with the farm-scoped type mappings. This method overload is useful when an SPContext object is not available but you want to use type mappings defined in a particular site collection.
  3. The Model-View-ViewModel (MVVM) pattern is an application pattern that isolates the user interface from the underlying business logic. MVVM belongs to a class of patterns called Separated Presentation. These patterns provide a clean separation between the UI and the rest of the application. This improves the testability of the application and allows the application and its UI to evolve more easily and independently. The MVVM pattern consists of the following parts:The Model, which provides a view-independent representation of your business entities. The design of the model is optimized for the logical relationships and operations between your business entities, regardless of how the data is presented in the user interface. The View class which is the user interface. It displays information to the user and fires events in response to user interactions. The ViewModel class, which is the bridge between the view and the model. Each View class has a corresponding ViewModel class. The ViewModel retrieves data from the Model and manipulates it into the format required by the View. It notifies the View if the underlying data in the model is changed, and it updates the data in the Model in response to UI events from the View.