Many developers forget about good object-oriented design techniques when developing in SharePoint, most of the time because they get overwhelmed by the framework. Unit testing often gets thrown out of the window, and most of the time the application becomes very tightly coupled to the SharePoint object model. This talk will demonstrate how to overcome these obstacles and build solid SharePoint application code that is much more testable and is easier to maintain.
This talk was give at the South Shore .NET Users Group.
Unit Testing is now considered a required skill for developers. There are a ton of tools out there. However, there's nothing that shows you how to tie them all together to make your software fast, testable, and flexible. This talk will go over my toolset:
• MSTest
• Moq - Mocking framework
• NCover - for coverage
• MSBuild - for automation
• Dotcover - coverage from VS
• Unity - for dependency injection
This talk has a very long demo
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
Developing large apps is difficult. Ensuring that code is consistent, well structured, tested and has an architecture that encourages enhancement and maintainability is essential. When it comes to building large server-focused apps the solutions to this problem have been tried and tested. But, how do you achieve this when building HTML5 single page apps?
BladeRunnerJS is an open source developer toolkit and lightweight front-end framework that has helped Caplin Systems ensure that a 200k LoC JavaScript codebase hasn’t become a tangled mess of unstable spaghetti code. This codebase is packaged and delivered to customers as an SDK. Additionally customers receive a getting started application of around 50k LoC for them to build upon, and they’re expected not to turn that into a tangled … you get the idea.
In this talk you’ll learn the main concepts to apply when building a front-end app that scales and how BladeRunnerJS can support the development process.
This talk was give at the South Shore .NET Users Group.
Unit Testing is now considered a required skill for developers. There are a ton of tools out there. However, there's nothing that shows you how to tie them all together to make your software fast, testable, and flexible. This talk will go over my toolset:
• MSTest
• Moq - Mocking framework
• NCover - for coverage
• MSBuild - for automation
• Dotcover - coverage from VS
• Unity - for dependency injection
This talk has a very long demo
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014Phil Leggetter
Developing large apps is difficult. Ensuring that code is consistent, well structured, tested and has an architecture that encourages enhancement and maintainability is essential. When it comes to building large server-focused apps the solutions to this problem have been tried and tested. But, how do you achieve this when building HTML5 single page apps?
BladeRunnerJS is an open source developer toolkit and lightweight front-end framework that has helped Caplin Systems ensure that a 200k LoC JavaScript codebase hasn’t become a tangled mess of unstable spaghetti code. This codebase is packaged and delivered to customers as an SDK. Additionally customers receive a getting started application of around 50k LoC for them to build upon, and they’re expected not to turn that into a tangled … you get the idea.
In this talk you’ll learn the main concepts to apply when building a front-end app that scales and how BladeRunnerJS can support the development process.
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...Nordic APIs
In the best of all worlds, API development, testing, and operations teams always work together in perfect synchrony, delivering high-quality APIs on schedule, under budget and completely error-free. But as applications and micro-service architectures increase in complexity, teams often struggle to maintain velocity without tripping over functional dependencies and unwanted behaviours within their solutions. API Virtualization is an increasingly popular approach for speeding release cycles by developing and testing in parallel. Additionally, API virtualization enables teams to overcome 3rd party downtime, rate limits and overage fees.
Join Ole Lensmar, SmartBear CTO and creator of SoapUI, to learn how API Virtualization can help you speed up your development, testing and delivery process.
Alex Theedom Java ee revisits design patternsАліна Шепшелей
Enter "Django Channels": new way of desinging and thinking about your application. It separates transport and processing concerns in typical Django project using combination of ASGI (Asynchronous Server Gateway Interface) and worker processes, enabling your application to be "event-oriented" and implement new workflows for processing your data. How does it work? What do you need to start? Is it even useful? Learn for yourself with this introductory talk.
Selenium Testing is an open-source tool that automates with web browsers. It delivers a single interface platform that lets you write test scripts in different programming languages like Ruby, Java, NodeJS, PHP, Perl, Python, C#, and many others.
#MFSummit2016 Build: Innovation and the next generation of COBOL applicationsMicro Focus
Innovation and the Next Generation of COBOL Apps Take a look at the future. Our live demos show the way forward for modernising COBOL application development and deployment in new architectures. Presenters: Scot Nielsen, Snr Product Manager, COBOL and Alwyn Royall, Solutions Consultant
Making security software is hard. Making lots of security products is harder. Making lots of security products with a great and consistent user experience is, well, nigh on impossible. But it can be done. In this presentation you will find out exactly how to deliver not just the best security technology to your customers, but also a pretty darn good user experience to boot. And even more importantly, how you, as a designer, can personally contribute to making it even better!
A better approach for testing microservices - introducing test kits in practiceMaxim Novak
Micro-services are the new black; everyone is using them. Alas, when your system is composed of many micro-services, testing becomes more challenging. The straight-forward approach for E2E testing no longer suffices and for integration tests it doesn’t even exist. A better way to test in this kind of an environment would be to work with a test kit of the micro-service you are interacting with.
By the end of this talk, you will learn how to create a test-kit that covers your micro-service. Testing this way will grant you a much higher level of confidence, and will portray a more accurate picture of your assumptions vs. reality. Overall it will make any integration between micro-services easier, thus benefit your colleagues and make your company progress faster.
QA has always been under-rated and thus it is important to consider this equally important as the Dev. If we look at the Chatbot QA, it had been considered as a highly challenging work specially when you do not know where your bot may break while you sequentially will be only running your flow (stories). Most of the companies / tools only check the flow which are coded in a fixed format which often breaks while testing. There may be cases where bot are migrated to new version and it breaks. The presentation will discuss the possibilities to test the bots by helping folks to create their coverage matrix for your stories, efficiently looking at the logs and mine information and most importantly what to test and which components to test.
Presented by Director QA, DevOps & AIML at APTY.IO, Soumya Mukherjee at the 2021 Rasa Summit https://rasa.com/summit/
Share was originally built as a collaboration application on top of the Alfresco Platform. Because Share is a more modern interface than Alfresco Explorer, many customers have adopted customizing Share as their strategy for building solutions on Alfresco. To be successful, such solutions need to understand that Share is a complete collaboration application with a specific Information Architecture. This session will explore leveraging the Share UI while creating your own Information Architecture, including for non-collaborative use cases.
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...Nordic APIs
In the best of all worlds, API development, testing, and operations teams always work together in perfect synchrony, delivering high-quality APIs on schedule, under budget and completely error-free. But as applications and micro-service architectures increase in complexity, teams often struggle to maintain velocity without tripping over functional dependencies and unwanted behaviours within their solutions. API Virtualization is an increasingly popular approach for speeding release cycles by developing and testing in parallel. Additionally, API virtualization enables teams to overcome 3rd party downtime, rate limits and overage fees.
Join Ole Lensmar, SmartBear CTO and creator of SoapUI, to learn how API Virtualization can help you speed up your development, testing and delivery process.
Alex Theedom Java ee revisits design patternsАліна Шепшелей
Enter "Django Channels": new way of desinging and thinking about your application. It separates transport and processing concerns in typical Django project using combination of ASGI (Asynchronous Server Gateway Interface) and worker processes, enabling your application to be "event-oriented" and implement new workflows for processing your data. How does it work? What do you need to start? Is it even useful? Learn for yourself with this introductory talk.
Selenium Testing is an open-source tool that automates with web browsers. It delivers a single interface platform that lets you write test scripts in different programming languages like Ruby, Java, NodeJS, PHP, Perl, Python, C#, and many others.
#MFSummit2016 Build: Innovation and the next generation of COBOL applicationsMicro Focus
Innovation and the Next Generation of COBOL Apps Take a look at the future. Our live demos show the way forward for modernising COBOL application development and deployment in new architectures. Presenters: Scot Nielsen, Snr Product Manager, COBOL and Alwyn Royall, Solutions Consultant
Making security software is hard. Making lots of security products is harder. Making lots of security products with a great and consistent user experience is, well, nigh on impossible. But it can be done. In this presentation you will find out exactly how to deliver not just the best security technology to your customers, but also a pretty darn good user experience to boot. And even more importantly, how you, as a designer, can personally contribute to making it even better!
A better approach for testing microservices - introducing test kits in practiceMaxim Novak
Micro-services are the new black; everyone is using them. Alas, when your system is composed of many micro-services, testing becomes more challenging. The straight-forward approach for E2E testing no longer suffices and for integration tests it doesn’t even exist. A better way to test in this kind of an environment would be to work with a test kit of the micro-service you are interacting with.
By the end of this talk, you will learn how to create a test-kit that covers your micro-service. Testing this way will grant you a much higher level of confidence, and will portray a more accurate picture of your assumptions vs. reality. Overall it will make any integration between micro-services easier, thus benefit your colleagues and make your company progress faster.
QA has always been under-rated and thus it is important to consider this equally important as the Dev. If we look at the Chatbot QA, it had been considered as a highly challenging work specially when you do not know where your bot may break while you sequentially will be only running your flow (stories). Most of the companies / tools only check the flow which are coded in a fixed format which often breaks while testing. There may be cases where bot are migrated to new version and it breaks. The presentation will discuss the possibilities to test the bots by helping folks to create their coverage matrix for your stories, efficiently looking at the logs and mine information and most importantly what to test and which components to test.
Presented by Director QA, DevOps & AIML at APTY.IO, Soumya Mukherjee at the 2021 Rasa Summit https://rasa.com/summit/
Share was originally built as a collaboration application on top of the Alfresco Platform. Because Share is a more modern interface than Alfresco Explorer, many customers have adopted customizing Share as their strategy for building solutions on Alfresco. To be successful, such solutions need to understand that Share is a complete collaboration application with a specific Information Architecture. This session will explore leveraging the Share UI while creating your own Information Architecture, including for non-collaborative use cases.
Lifecycle Management with SharePoint Apps and SolutionsSPC Adriatics
A SharePoint project is just like any other software project. When creating real business SharePoint customization projects, you should carefully consider the Application Lifecycle Management (ALM). In this session you will learn what ALM is, and how ALM impacts on SharePoint projects, regardless they are SharePoint Solutions or SharePoint Apps. The session will discuss topics about gathering requirements, defining architectures, writing code, testing, releasing, and maintaining SharePoint projects. The speaker will share with you what he learned in about 12 years of real experience in creating and managing SharePoint projects.
Software Architecture and Architectors: useless VS valuableComsysto Reply GmbH
Abstract:
This talk introduces definitions of system architecture and proposes a way to achieve "good enough" architecture covers project requirements
Andrei will show several cases from real projects, where wrong, missing or over-sophisticated architecture decisions really hurt the development teams:
Painful sharing: do shared modules increase reusability or will be the source of problems?
Non-extensible extensibility: too sophisticated configuration hurts
Over fine-grained: incorrect splitting to microservices can make life even harder as with monolith
Cargo cult: blindly following patterns and rules can produce an unmaintainable system
Freestyle architecture: what happens if teams completely ignore architecture
Improve with less intelligence: smart endpoint and dumb pipes
We are looking forward to meet many of you in person and have great discussions around this topic!
https://www.meetup.com/de-DE/meetup-group-tfyvuydp/
Practical advice for using Force.com, CloudSense share their recommendations and best practice for implementation of Force.com. Featuring the CloudSense case study with the BBC 500 words competition.
Object-Relational Mapping and Dependency InjectionShane Church
Presentation for El Paso County IT on the concepts of Object-Relational Mapping and Dependency injection with a particular focus on the Microsoft Unity DI Container and the Microsoft Entity Framework. Delivered on October 2, 2012.
Build software like a bag of marbles, not a castle of LEGO®Hannes Lowette
If you have ever played with LEGO®, you will know that adding, removing or changing features of a completed castle isn’t as easy as it seems. You will have to deconstruct large parts to get to where you want to be, to build it all up again afterwards. Unfortunately, our software is often built the same way. Wouldn’t it be better if our software behaved like a bag of marbles? So you can just add, remove or replace them at will?
Most of us have taken different approaches to building software: a big monolith, a collection of services, a bus architecture, etc. But whatever your large scale architecture is, at the granular level (a single service or host), you will probably still end up with tightly couple code. Adding functionality means making changes to every layer, service or component involved. It gets even harder if you want to enable or disable features for certain deployments: you’ll need to wrap code in feature flags, write custom DB migration scripts, etc. There has to be a better way!
So what if you think of functionality as loose feature assemblies? We can construct our code in such a way that adding a feature is as simple as adding the assembly to your deployment, and removing it is done by just deleting the file. We would open the door for so many scenarios!
In this talk, I will explain how to tackle the following parts of your application to achieve this goal: WebAPI, Entity Framework, Onion Architecture, IoC and database migrations. And most of all, when you would want to do this. Because… ‘it depends’.
Patterns and practices for building enterprise-scale HTML5 appsPhil Leggetter
Developing large apps is difficult. Ensuring that code is consistent, maintainable, testable and has an architecture that enables change is essential. As is ensuring that multiple developers – across multiple teams – can efficiently contribute to the same application. When it comes to large server-focused apps, solutions to some of these challenges have been tried and tested. But, how do you achieve this when building HTML5 single-page apps?
In this session, Phil will cover the experiences his team have had when building HTML5 apps consisting of more than 250k lines of JavaScript (plus HTML templates, CSS, image, config etc) that are contributed to by multiple teams across multiple companies. He will highlight signs to watch out for as your HTML5 SPA grows, and a set of patterns and practices that help you avoid problems. He will also explain the simple yet powerful application architecture that their HTML5 apps have that is core to ensuring they scale.
Finally, Phil will demonstrate how tooling can be used to support these patterns and practices, and enable a productive developer workflow where the first line of code is feature code, features can be developed and tested in isolation, code conflicts are avoided by grouping assets by feature, and features are composed into apps.
Lean-Agile Development with SharePoint - Bill AyersSPC Adriatics
SharePoint gives us a great platform for developing sophisticated intranet portals and collaboration sites and many other workloads. But it can also be a challenge to use modern software development frameworks like Scrum and XP. Wouldn’t it be great if we could get all the benefits of Agile practices – faster development, predictable deliveries, better quality, less stress and happy stakeholders? In this session we will cover the definitions of Lean, Agile, Scrum, Kanban, XP, and TDD. Then we will look at the specific challenges around Agile SharePoint development and some development techniques to overcome these obstacles. This talk covers both project delivery and engineering. We’ll look at unit tests, integration tests, UI tests, continuous integration and, of course, test-driven development (TDD) with practical experiences from real-life Agile SharePoint projects.
Sitecore development approach evolution – destination helixPeter Nazarov
Sitecore Development Approach Evolution – Destination Helix
Sitecore officially recommended Helix as a set of overall design principles and conventions for Sitecore development around 18 month ago at SUGCON 2016 alongside with an official implementation example - Habitat. Why was it necessary? What are the benefits? Has it worked in practice? Peter Nazarov will share the outlook on why and how a combination of Sitecore Helix and Habitat benefits the business and development users of Sitecore in practice.
Similar to Writing Testable Code in SharePoint (20)
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Writing Testable Code in SharePoint
1. Writing Testable Code in SharePoint
Tim McCarthy
Senior Technical Architect
Perficient
2. Agenda
• Introduction
• Repository Pattern
• IoC and Dependency Injection Patterns
• Model View Presenter Pattern
• Unit Testing strategies
• Summary
3. Introduction
• Tightly-coupled SharePoint Code
• Difficult to test Web Parts and Pages
• Need a better way to organize the code
• The answer: Design Patterns!
4. What is the Repository Pattern?
• Isolates the domain model from data access
• Encapsulates the domain object persistence
• Persistence Ignorance is bliss!
• Works well when used with interfaces…
6. What is IoC?
• Inversion of Control
• Depend upon abstract types, not concrete
types
7. Benefits of Inversion of Control
• Can swap out implementations later (such as
different repositories)
• Allows parts of the application to be built
independently with no complicated
dependencies
• Can work in ASP.NET and switch over to
SharePoint later
8. What is DI?
• DI = Dependency Injection
• One solution to the problem instantiating
abstract types
• Available DI frameworks
– Castle
– Unity
– MEF
– Etc.
9. Benefits of Dependency Injection
• Can write more granular unit tests
• Don’t need to hit the database for testing UI
logic
• Allows parts of an application to be easily
swapped out without re-compiling
• Using a DI framework makes it almost
seamless!
11. Model View Presenter Pattern
• Gets the logic out of your UI so it can be
tested!
• Forced separation of concerns
• Can enable UI logic to be shared
• Side Point: Why not use MVC in SharePoint?
13. Unit Testing Strategies
• Test the presenters separately
• Use mock views and mock repositories when
testing the presenters
• Test the concrete repositories separately
15. Summary
• Design Patterns are the key to better
SharePoint code!
• Repository, IoC and DI patterns make testing
way easier
• MVP pattern gets the logic out of your UI code
17. Contact Info
Tim McCarthy
tim.mccarthy@perficient.com
18. We want your feedback!
Use this QR code or visit:
http://sps.la/feedback
Silver Sponsors:
19. Victory Lap- social event
"SharePoint Victory Lap" Social Event for
SPSLA will be at: 5:30pm to 8pm at
Di Piazzas (5205 E. Pacific Coast Hwy, 90804)
Editor's Notes
Many developers forget good object-oriented design techniques when developing in SharePoint, most of the time because they get overwhelmed by the framework. Unit testing often gets thrown out of the window, and most of the time the application becomes very tightly coupled to the SharePoint object model. This talk will demonstrate how to overcome these obstacles and build solid SharePoint application code that is much more testable and is easier to maintain.The vehicle for this goodness is design patterns!
Using the repository pattern will allow you to develop outside of the SharePoint environment "up until the last minute"
Depend on abstract types (interfaces) instead of concrete classes!Don’t need a big bulky 64-bit Windows 2008 Server virtual machine until much later!
MVP is good for web forms projects, which is what SharePoint is based uponModel: Defines the data to be displayed or acted upon in the UIView: UI that displays data from the Model and routes user commands to the Presenter to act upon the dataPresenter: Acts upon the model and the ViewWith MVP, the idea is to strip as much logic and code out of the UI and make it do simple things, like data binding and and acting as a facade to the various UI element properties, i.e. expose TextBox.Text property as FirstName.This pattern really pays for itself when you find bugs in the UI logic…just write a failing unit test and fix the code so it passes the test!Very difficult to use MVC in SharePoint, not worth the effort
Doing TDD by the letter takes a lot of discipline. Once you start doing it, it can become a habit. But even if you don't write your tests first, if you use DI + MVP + tests later, you still will benefit from the modularity and freedom to refactor your code.Writing tests can take up time initially, but the payoff happens in spades once you have to identify and fix bugs, or refactor your code with confidence of not breaking anything else.Mock up your views and repositories so you only test what is necessary...that way your tests are really focused. You can (and should) do integration tests later where you use the real repositories. Once you have a pretty good suite of tests developed, you can freely make changes to your code and see if your tests still pass. Refactor, compile, re-test.Rinse, lather, repeat!