SOLID SharePoint Apps in MVC

Log In to Watch How to Video Now
SOLID SharePoint Apps in MVC


Please log-in to view this video. Sign up for FREE ACCESS HERE

SOLID SharePoint Apps in MVC

Presenters Name: Stefano Tempesta
Presenters Title: VP of Engineering
Company: EF Education First
Practical code examples of ASP.NET MVC applications that connect to a SharePoint Server and comply with the SOLID principles.

 

Video Transcript:

hello i’m Stefano Tempesta vice president of engineering at EF education first and now I’m recording this video from our bangle office in India in this video I’m presenting a code samples and best practices for building solid SharePoint application in embassy what is solid so the principles of solid are guidelines that can be applied software development to improve the reliability and maintainability your software applications so in this video I want to explore a few of these best practices and design patterns for developing NBC applications that connect the Treasury point server and comply with the five solid principles if you have ever checked in chibitalia you may have found something like this and a hair dryer that is connected directly to the wall to the unit and cannot be removed in the software engineering practice this is equivalent to writing large classes of objects that perform several operation soften with strong dependency on other types for example assuming that we are writing an application for registration of students to university course we may be tempted to define a big course oh and the enrolment process in a single classes you notice this class is actually effective and gets to the point given our current requirements or whether as business model extends we immediately encounter some limitations what if the university wishes to offer online courses in addition to traditional classroom based ones the principle of single responsibility teaches us to keep our object a simple and limb bollard possible irrespective of what the sign methodology you go for limiting the scope of classes in your application increases TMNT in breach of your software let ‘stalk about the open and closed principle that is open to extension close to change simple as that so simply put it means that you should not be forced to make changes to your classes every time you want to add capability to your application but rather a stand this functionality by endings something around early stage of the base class so the___16 options are classic sanctions or program me by contract interface and binding the interface your complete implementation that’s also point principle of the dependency injection or working with some patterns for example composite pattern or the decorator design pattern the composite pattern for example in respect of the single responsibility principle we have separated the functionality of registration on waitlist management and have defined the following two interfaces for in-service the I registration service and the I waitlist service now we want to combine both functionalities into a composite object say for ease of execution elope rule of thumb use this pattern with moderation you may end up in tangle code very easily the decorator decide powder issued to add the functionality around an existing object in our case we want to check that the person registering student or calls is authorized to do sound upon successful enrolment artifice student security check and notifications are two typical cross-cutting concerns that find it plays in a Opie aspect-oriented programming asking for explaining the solid principles is atypical question during the reviews for software engineering position and when it comes to the annular I see most candidate struggling even with the pronunciation of the name the American scientist and professor Barbara Loskop the risk of substitution principle says that similar objects are better objects deriving from the same definition or implementing the same contract can be replaced without causing interruption service on either end of the connection entire books have been written about the principle of inversion of control and its implementation by the dependency injection design Tata motors software engineering cannot escape adopting our technique for avoiding object dependency and providing centralized location for object composition that can be done manually or by adopting applauded by di container our field of next train works existence and can help implementing the dependency injection pattern in your applications as you can see now on screen I would love to provide the same polls for each of them by not principle of users and scene ducks are very similar so I’ll stick to lean chapter for the sake of our university application and now it’s time to introduce embassy and SharePoint in a mix in our solution we want to connect our MVC application to a SharePoint server back-end we use the Anshar object model of SharePoint available on you get in the Microsoft SharePoint dot client package the SharePoint into season exposes a client context that allows connection to our SharePoint server from the MVC application and as we have learned in the video before we are not hard coding the dependency to ship point in our controllers rather we will use injector define the dependency in the object composition root of the application in the MVC controller let’s make an example of a course action that is accessible by their outer core / ID and displays the course detail page for the identified by the ID parameter a few things worth noticing here there is reference to a local context it disposes the metal find for retrieving an instance of an instructor-led course class in this case context is reference to the SharePoint kind context and it’s built with an injector a bit more in a moment there are two ways of injecting dependencies in this case by providing the dependency in the constructor so that is a constructor injection the dependencies passed as parameter to the constructor of the controller or buy property injection the dependency is a site or property of the controller and then use internally different schools of thought assist on which method is more appropriate and each of them has pros and cons good news whatever strategy decide for dependency injection our di container of choice inject supports both the use of a Container helps maintaining centralized location for setting all the dependencies and then inject them a runtime in the consuming object the central location is called the composition roots how does mean jet work the ninja framework works around two main classes the injection container and the dependency resolve well the injection container represents the entry point for the DI engine to resort dependencies by programming by interface we built our application with a number of services for registration when its management as well as obstructed the reference to the SharePoint client context now it’s time to specify the concrete class that implements the interface and bind them in the dependency resolver of ninja hope you show this video if you have any further questions or doubts or fears about the solid principle please feel free to reach me on my own blog www tempest dot space thank you for watching

Share this on...
Log In

Rate this Post:

Share:

Topics:

Apps SharePoint

You might also like ...