SMA256403: WebParts that use Xslt transforms to display data |
In SharePoint 2013, webparts use JSLink instead of XSLT to transform data for display. While there still is support for XSLT in farm solutions, JSLink now superceeds it, and is an integral part of SharePoint 2013
CheckId | SMA256403 |
---|---|
TypeName | WebPartWithXsltTransform |
Severity | CriticalWarning |
Type | Assembly |
Full Trust Approach | App Approach |
---|---|
XSLT
XSLT is a language designed to transform structured data from one layout to another. In SharePoint this is often used to change the way a WebPart displays information from a list or a search result. |
Client Side Rendering
The way the field type is altered from a basic field type in the new model is through Client Side Rendering (CSR). Including a JSLink file and adding it to the view allows the developer to modify the view in any way they desire. |
Impact of Full Trust Approach | Benefit of App Approach |
SharePoint 2013 has moved to Client Side Rendering
XSLT should not be used from SharePoint 2013 onwards as it is replaced by JSLink in CSR. |
Client Side Rendering Benefits
CSR moved processing from the server to the client further reducing server load when displaying a page, and making pages load faster in general. For developers, JSLink came from the need to simplify the way client side rendering was done, in order to reduce complication. |
Efforts and Benefits
Migration Impact | Critical |
Re-Design Effort | Low |
Re-Development Effort | Medium |
Long Term Benefit | Critical |
Effort Drivers
- XSLT should not be used anymore
- JavaScript based technologies drive the App Model
To suppress this violation in managed code add the following attribute to the method which contains the instruction (available since SPCAF version v5.2). Learn more about SuppressMessage here.
[SuppressMessage("SPCAF.Rules.MigrationAssessment.CollaborationCustomizationsGroup", "SMA256403:WebPartWithXsltTransform", Justification = "Provide reason for suppression here")]