Developing SharePoint 2010       and Silverlight Web Parts –             Tips and Tricks                                  ...
ITCamp 2012 sponsors                                                       Architecture &                                 ...
Agenda                                                                     Architecture &                                 ...
Intro                                                                      Architecture &                                 ...
Intro                                                                      Architecture &                                 ...
The SharePoint Developer Toolbox     TOOLS@   itcampro   # itcamp12     Premium conference on Microsoft technologies
TOOLS                                                                      Architecture &                                 ...
TOOLS                                                                      Architecture &                                 ...
TOOLS                                                                      Architecture &                                 ...
TOOLS                                                                      Architecture &                                 ...
TOOLS                                                                      Architecture &                                 ...
TOOLS                                                                      Architecture &                                 ...
TOOLS                                                                      Architecture &                                 ...
Developing ASP.NET and Silverlight WebParts     WEB PARTS@   itcampro   # itcamp12     Premium conference on Microsoft tec...
Web Parts                                                                  Architecture &                                 ...
Web Parts                                                                  Architecture &                                 ...
Web Parts                                                                  Architecture &                                 ...
SharePoint 2010 Pattern & Practices Guidance     SPG@   itcampro   # itcamp12     Premium conference on Microsoft technolo...
SPG                                                                        Architecture &                                 ...
SPG                                                                        Architecture &                                 ...
SPG                                                                        Architecture &                                 ...
SPG: Service Locator pattern                                               Architecture &                                 ...
SPG: Service Locator pattern                                               Architecture &                                 ...
SPG:MVP (Model-View-Presenter)                                                 Architecture &                             ...
SPG:MVP (Model-View-Presenter)                                             Architecture &                                 ...
SPG:M-V-VM                                                                 Architecture &                                 ...
SPG:M-V-VM                                                                 Architecture &                                 ...
SPG:M-V-VM                                                                 Architecture &                                 ...
SPG:M-V-VM                                                                 Architecture &                                 ...
SPG: Repository Pattern                                                    Architecture &                                 ...
SPG: Repository Pattern                                                       Architecture &                              ...
Unit Testing in SharePoint World     UNIT TESTS@   itcampro   # itcamp12      Premium conference on Microsoft technologies
UNIT TEST                                                                  Architecture &                                 ...
UNIT TEST                                                                  Architecture &                                 ...
UNIT TEST                                                                  Architecture &                                 ...
UNIT TEST                                                                   Architecture &                                ...
UNIT TEST                                                                   Architecture &                                ...
Vă mulțumesc     Q&A@   itcampro   # itcamp12   Premium conference on Microsoft technologies
Conclusions                                                                Architecture &                                 ...
Upcoming SlideShare
Loading in …5
×

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

492 views
404 views

Published on

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

  • Be the first to like this

No Downloads
Views
Total views
492
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

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

  1. 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. 2. ITCamp 2012 sponsors Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  3. 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. 4. Intro Architecture & Best Practices What means to me developing and working with SharePoint ?@ itcampro # itcamp12 Premium conference on Microsoft technologies
  5. 5. Intro Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  6. 6. The SharePoint Developer Toolbox TOOLS@ itcampro # itcamp12 Premium conference on Microsoft technologies
  7. 7. TOOLS Architecture & Best Practices• SPM 2010@ itcampro # itcamp12 Premium conference on Microsoft technologies
  8. 8. TOOLS Architecture & Best Practices• ULS Viewer@ itcampro # itcamp12 Premium conference on Microsoft technologies
  9. 9. TOOLS Architecture & Best Practices• .NET Reflector / JustDecompile@ itcampro # itcamp12 Premium conference on Microsoft technologies
  10. 10. TOOLS Architecture & Best Practices• Fiddler2 / Firebug@ itcampro # itcamp12 Premium conference on Microsoft technologies
  11. 11. TOOLS Architecture & Best Practices• CKS – Community Kit for SharePoint@ itcampro # itcamp12 Premium conference on Microsoft technologies
  12. 12. TOOLS Architecture & Best Practices• SPSF – SharePoint Software Factory@ itcampro # itcamp12 Premium conference on Microsoft technologies
  13. 13. TOOLS Architecture & Best Practices• Linq to SharePoint DSL Extension for VS2010@ itcampro # itcamp12 Premium conference on Microsoft technologies
  14. 14. Developing ASP.NET and Silverlight WebParts WEB PARTS@ itcampro # itcamp12 Premium conference on Microsoft technologies
  15. 15. Web Parts Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  16. 16. Web Parts Architecture & Best PracticesMy GOLDEN RULE (GOAL)It would be so much easier if we could avoid usingSharePoint server to develop Web Part / anything The F5 Build/Deploy/Test cycle is slow….@ itcampro # itcamp12 Premium conference on Microsoft technologies
  17. 17. Web Parts Architecture & Best PracticesWhen 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 tohandle personalisation The F5 Build/Deploy/Test cycle is slowww..@ itcampro # itcamp12 Premium conference on Microsoft technologies
  18. 18. SharePoint 2010 Pattern & Practices Guidance SPG@ itcampro # itcamp12 Premium conference on Microsoft technologies
  19. 19. SPG Architecture & Best Practices(Coding) Challenges when creating enterpriseapplications:• 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. 20. SPG Architecture & Best Practices(Coding) Challenges when creating enterpriseapplications:• 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. 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. 22. SPG: Service Locator pattern Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  23. 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. 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 theMVC controller-View is responsible for handling UI events-Model becomes strictly a Domain Model@ itcampro # itcamp12 Premium conference on Microsoft technologies
  25. 25. SPG:MVP (Model-View-Presenter) Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  26. 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. 27. SPG:M-V-VM Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  28. 28. SPG:M-V-VM Architecture & Best PracticesThe Model - which provides a view-independentrepresentation of your business entitiesThe View - which is the user interface. It displays informationto the user and fires events in response to user interactionsThe ViewModel - which is the bridge between the view and themodel.@ itcampro # itcamp12 Premium conference on Microsoft technologies
  29. 29. SPG:M-V-VM Architecture & Best Practices How about JavaScript / HTML5?@ itcampro # itcamp12 Premium conference on Microsoft technologies
  30. 30. SPG: Repository Pattern Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies
  31. 31. SPG: Repository Pattern Architecture & Best Practices Choosing a SharePoint Data Access Technology@ itcampro # itcamp12 Premium conference on Microsoft technologies
  32. 32. Unit Testing in SharePoint World UNIT TESTS@ itcampro # itcamp12 Premium conference on Microsoft technologies
  33. 33. UNIT TEST Architecture & Best PracticesOnly Integration Tests with MSTest - Visual Studio 2010 SP1SPListCollection – internal ctors.Isolation Frameworks: -Typemock – not free -Pex and Moles – free@ itcampro # itcamp12 Premium conference on Microsoft technologies
  34. 34. UNIT TEST Architecture & Best Practices Mocking the ‘Principle of Isolation’@ itcampro # itcamp12 Premium conference on Microsoft technologies
  35. 35. UNIT TEST Architecture & Best PracticesTDD and SharePoint-reducing the cost of change-in a typical SharePoint project, the portionwhere TDD is actually applicable is very smallwhich is the writing code part Sahil MalikTDD + SharePoint ? Not worth it IMHO.@ itcampro # itcamp12 Premium conference on Microsoft technologies
  36. 36. UNIT TEST Architecture & Best PracticesTDD and SharePointa 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. 37. UNIT TEST Architecture & Best Practices Pex and Moles - Peli de Halleux – Microsoft Research@ itcampro # itcamp12 Premium conference on Microsoft technologies
  38. 38. Vă mulțumesc Q&A@ itcampro # itcamp12 Premium conference on Microsoft technologies
  39. 39. Conclusions Architecture & Best Practices@ itcampro # itcamp12 Premium conference on Microsoft technologies

×