SlideShare a Scribd company logo
1 of 39
Download to read offline
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
ITCamp 2012 sponsors                                                       Architecture &
                                                                           Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Agenda                                                                     Architecture &
                                                                           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
Intro                                                                      Architecture &
                                                                           Best Practices




 What means to me developing and working with SharePoint ?




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




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

     TOOLS


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


• SPM 2010




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


• ULS Viewer




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


• .NET Reflector / JustDecompile




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


• Fiddler2 / Firebug




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


• CKS – Community Kit for SharePoint




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


• SPSF – SharePoint Software Factory




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
TOOLS                                                                      Architecture &
                                                                           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
Web Parts                                                                  Architecture &
                                                                           Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Web Parts                                                                  Architecture &
                                                                           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
Web Parts                                                                  Architecture &
                                                                           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
SPG                                                                        Architecture &
                                                                           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
SPG                                                                        Architecture &
                                                                           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
SPG                                                                        Architecture &
                                                                           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
SPG: Service Locator pattern                                               Architecture &
                                                                           Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
SPG: Service Locator pattern                                               Architecture &
                                                                           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
SPG:MVP (Model-View-Presenter)                                                 Architecture &
                                                                               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
SPG:MVP (Model-View-Presenter)                                             Architecture &
                                                                           Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
SPG:M-V-VM                                                                 Architecture &
                                                                           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
SPG:M-V-VM                                                                 Architecture &
                                                                           Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
SPG:M-V-VM                                                                 Architecture &
                                                                           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
SPG:M-V-VM                                                                 Architecture &
                                                                           Best Practices




                                                        How about JavaScript / HTML5?




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




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
SPG: Repository Pattern                                                       Architecture &
                                                                              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
UNIT TEST                                                                  Architecture &
                                                                           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
UNIT TEST                                                                  Architecture &
                                                                           Best Practices


         Mocking the ‘Principle of Isolation’




@   itcampro   # itcamp12   Premium conference on Microsoft technologies
UNIT TEST                                                                  Architecture &
                                                                           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
UNIT TEST                                                                   Architecture &
                                                                            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
UNIT TEST                                                                   Architecture &
                                                                            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
Conclusions                                                                Architecture &
                                                                           Best Practices




@   itcampro   # itcamp12   Premium conference on Microsoft technologies

More Related Content

Similar to ITCamp 2012 - Ovidiu Beches - Developing SharePoint 2010 and Silverlight web parts

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 Strengthen
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 JS
ITCamp
 
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
 
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
 
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
 
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 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 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile apps
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 5
ITCamp
 
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-CardasimItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
Florin Cardasim
 
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp
 

Similar to ITCamp 2012 - Ovidiu Beches - Developing SharePoint 2010 and Silverlight web parts (20)

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...
 
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 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
 
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 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 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
 
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 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
 
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 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 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 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile appsITCamp 2011 - Melania Danciu - Mobile apps
ITCamp 2011 - Melania Danciu - Mobile apps
 
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
 
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
 
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-CardasimItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
ItCamp2012-Real-Time-Web-Web-Sockets-Windows 8- Florin-Cardasim
 
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per dayITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
ITCamp 2012 - Dan Fizesan - Serving 10 million requests per day
 
Synergetics India Corporate Presentation
Synergetics India Corporate PresentationSynergetics India Corporate Presentation
Synergetics India Corporate Presentation
 
Corporate Presentation Synergetics India
Corporate Presentation Synergetics IndiaCorporate Presentation Synergetics India
Corporate Presentation Synergetics India
 

More from ITCamp

ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp
 

More from ITCamp (20)

ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
ITCamp 2019 - Stacey M. Jenkins - Protecting your company's data - By psychol...
 
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
ITCamp 2019 - Silviu Niculita - Supercharge your AI efforts with the use of A...
 
ITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing SkillsITCamp 2019 - Peter Leeson - Managing Skills
ITCamp 2019 - Peter Leeson - Managing Skills
 
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud ResourcesITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
ITCamp 2019 - Mihai Tataran - Governing your Cloud Resources
 
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UXITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
ITCamp 2019 - Ivana Milicic - Color - The Shadow Ruler of UX
 
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean ArchitectureITCamp 2019 - Florin Coros - Implementing Clean Architecture
ITCamp 2019 - Florin Coros - Implementing Clean Architecture
 
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...ITCamp 2019 - Florin Loghiade -  Azure Kubernetes in Production - Field notes...
ITCamp 2019 - Florin Loghiade - Azure Kubernetes in Production - Field notes...
 
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...ITCamp 2019 - Florin Flestea -  How 3rd Level support experience influenced m...
ITCamp 2019 - Florin Flestea - How 3rd Level support experience influenced m...
 
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
ITCamp 2019 - Emil Craciun - RoboRestaurant of the future powered by serverle...
 
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The EnterpriseITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
ITCamp 2019 - Eldert Grootenboer - Cloud Architecture Recipes for The Enterprise
 
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal TrendsITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
ITCamp 2019 - Cristiana Fernbach - Blockchain Legal Trends
 
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data LakeITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
ITCamp 2019 - Andy Cross - Machine Learning with ML.NET and Azure Data Lake
 
ITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AIITCamp 2019 - Andy Cross - Business Outcomes from AI
ITCamp 2019 - Andy Cross - Business Outcomes from AI
 
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
ITCamp 2019 - Andrea Saltarello - Implementing bots and Alexa skills using Az...
 
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
ITCamp 2019 - Alex Mang - I'm Confused Should I Orchestrate my Containers on ...
 
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go NowITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
ITCamp 2019 - Alex Mang - How Far Can Serverless Actually Go Now
 
ITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian QualityITCamp 2019 - Peter Leeson - Vitruvian Quality
ITCamp 2019 - Peter Leeson - Vitruvian Quality
 
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World ApplicationITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
ITCamp 2018 - Ciprian Sorlea - Million Dollars Hello World Application
 
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
ITCamp 2018 - Ciprian Sorlea - Enterprise Architectures with TypeScript And F...
 
ITCamp 2018 - Mete Atamel Ian Talarico - Google Home meets .NET containers on...
ITCamp 2018 - Mete Atamel Ian Talarico - Google Home meets .NET containers on...ITCamp 2018 - Mete Atamel Ian Talarico - Google Home meets .NET containers on...
ITCamp 2018 - Mete Atamel Ian Talarico - Google Home meets .NET containers on...
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

ITCamp 2012 - Ovidiu Beches - 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. ITCamp 2012 sponsors Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 3. Agenda Architecture & 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. Intro Architecture & Best Practices What means to me developing and working with SharePoint ? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 5. Intro Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 6. The SharePoint Developer Toolbox TOOLS @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 7. TOOLS Architecture & Best Practices • SPM 2010 @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 8. TOOLS Architecture & Best Practices • ULS Viewer @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 9. TOOLS Architecture & Best Practices • .NET Reflector / JustDecompile @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 10. TOOLS Architecture & Best Practices • Fiddler2 / Firebug @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 11. TOOLS Architecture & Best Practices • CKS – Community Kit for SharePoint @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 12. TOOLS Architecture & Best Practices • SPSF – SharePoint Software Factory @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 13. TOOLS Architecture & 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. Web Parts Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 16. Web Parts Architecture & 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. Web Parts Architecture & 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. SPG Architecture & 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. SPG Architecture & 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. SPG Architecture & 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. SPG: Service Locator pattern Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 23. SPG: Service Locator pattern Architecture & 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. SPG:MVP (Model-View-Presenter) Architecture & 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. SPG:MVP (Model-View-Presenter) Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 26. SPG:M-V-VM Architecture & 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. SPG:M-V-VM Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 28. SPG:M-V-VM Architecture & 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. SPG:M-V-VM Architecture & Best Practices How about JavaScript / HTML5? @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 30. SPG: Repository Pattern Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 31. SPG: Repository Pattern Architecture & 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. UNIT TEST Architecture & 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. UNIT TEST Architecture & Best Practices Mocking the ‘Principle of Isolation’ @ itcampro # itcamp12 Premium conference on Microsoft technologies
  • 35. UNIT TEST Architecture & 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. UNIT TEST Architecture & 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. UNIT TEST Architecture & 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. Conclusions Architecture & Best Practices @ itcampro # itcamp12 Premium conference on Microsoft technologies