Geeks With Blogs
SharePoint Wiki! Sharing is gaining...
MICROSOFT SHAREPOINT ONLINE CODE ANALYSIS FRAMEWORK (MSOCAF)  is a must have for all SharePoint Vendors and Customers. Microsoft SharePoint Online introduced a new application which will streamline the custom solution review process: the Microsoft SharePoint Online Code Analysis Framework (MSOCAF). This application can be leveraged by customers, ISVs, and vendors to validate and submit custom solutions. By using MSOCAF, the engineering review process should be expedited as the customers will be able to detect and fix the code issues themselves before submitting the custom solutions to Microsoft. Optionally, MSOCAF can also be used to deploy custom solutions to the customer’s test environment or to rollback or remove components of a deployed solution. Previously the submission process was manual and thus time consuming. MSOCAF can communicate with a web service hosted on the customer’s SharePoint environment to submit the deployment package, and submit the custom solution automatically. MSOCAF analysis is required and mandatory for all custom solutions developed for deployment to SharePoint Online. MSOCAF analysis executes a set of rules against the custom solutions, prior to submission for deployment approval into the pre-production and production environments. The MSOCAF application is built using an extensible framework so that the SharePoint Online engineering team can add new rules and/or plug-ins in the future. Code analysis within MSOCAF focuses on areas like memory management, security vulnerabilities, exception management, object model usage, quality gates for unsupported features and reporting. The framework leverages existing tools like FxCop, CAT.Net, and SPDisposeCheck to analyze custom solutions. To install MSOCAF, go to the MSOCAF Download Site on MicrosoftOnline.com. The installation should be done using a local administrator account on the machine. Steps to create the report: Before submitting the custom solutions to Microsoft, customers has to validate the custom solutions using MSOCAF tool, this tool detect the code issue and also provides resolution for fixing the issues.
MSOCAF tool has four wizards:
Analyze:
Using Analyze wizard custom solution is analyzed against the set of rules. The custom solution is passed for Folder structure and its content. The code base analyze is a kind of mix of SPDisposeCheck and FxCop utitliy . It checks the custom solution and all the required parameter. If custom solution does not pass MSOCAF analysis than custom solution cannot be submitted to Microsoft for SPO deployment.
2. Test  deployment
The test deployment wizard helps in deploying the custom solution. The Test deployment wizard uses the “DeploymentManifest.xml” file for deploying the custom solution. This file will reside in the solution package.
 
3. Roll back
After deploying the custom solution using MSOCAF tool. If you feel there is some issues with deployment you can use Roll back wizard to roll back the deployment.
 
Submit
The submit wizard is used to submit the custom solution to Microsoft. User can reach to the deployment wizard only if Analysis of the package is successfully passed. While submitted user has to fill the configuration request (CR) Number and submitter’s email ID. User has to agree the agreement and then click on submit button.
 
Why create this report?
MSOCAF provides a very strong analysis for validating that the custom solution is passing/useable against various set rules. This helps in writing the custom solution which is of very high standards in terms of design, Security, performance, usage, Naming and Memory management.
THE REPORT: After reviewing the rules, click on Next to get the screen where you can locate the folder structure that holds your solution

image

Now, let me share that will be reviewed.. and be aware this is bad code!

image

Curious what the tool will be say of this? So am I!

image

And here we are, as a surprise, my code did not succeed in passing the rules. And the cool thing is that you can also where exactly (line number) the code was bad, and also in most cases there is a resolution you can click on. In this case, it’s giving me the solution to fix this and also a helpful link to a blogpost every SharePoint developer should know better than the date he/she got married..

image

There you have it.. you might wonder what the audience is for this tool. I believe that it’s good for both developer and IT Pro.. it gives the developers a nice little framework on which they can validate their code own. On the other hand, it gives the IT Pro a better understanding if the customization that has been given to them is really that good as the developers say it is. And if something is wrong with it, they can go back to the developers and demand an explanation why they should put into production.
Posted on Monday, April 30, 2012 9:00 AM | Back to top


Comments on this post: MICROSOFT SHAREPOINT ONLINE CODE ANALYSIS FRAMEWORK (MSOCAF) – A must have for all SharePoint Vendors and Customers

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © KunaalKapoor | Powered by: GeeksWithBlogs.net