Script Lab is a Microsoft garage project which initiated with summer hackathon held back in 2016. Creator main focus is to build a platform where build add-ins simple and with less knowledge curve for web developers. It is simple but it does not mean it is not powerful. Let’s go through below slider where you could kick start on developing Office extended apps.
If you are finding way of integrating “Office Web Apps(OWA)” with your custom solution which built with SharePoint CSOM/ JSOM or with integration of any client site development. Specially in a scenario where you develop your own “SharePoint display template” following integration points will be useful;
View in office web apps
Following link will work; if your requirement is to open your document in OWA. This can be done with simply appending parameter as below;
If you thinking about how to build your URL; following illustration may be useful.
var owauri="_spPageContextInfo.webAbsoluteUrl" //absolute URL of the SharePoint site
+"/_layouts/15/WopiFrame.aspx?sourcedoc=" //static phrase
+"/sites/OWASite/Documents/TechCentro.docx" //Relative URL to the document
+"&action=edit //Action parameter
What is in TypeScript?
Describing on above purposely omitted since as Microsoft developers or as a developer above concepts and implementations are not new topics for us.
Develop TypeScript Application
You can be created TypeScript application as below, and you will get solution as shows in the above image which compares ts and js files which included.
File→New→Project→Templates→TypeScript→“HTML Application with TypeScript”
After you done with the templating you can develop your HTML application with using TypeScript and by integrating any client side framework like AngularJs, ReactJS or any framework you prefer. But my personal preference is Angular or React since they equipped with strong community and rich framework background.
You will use Unified APIs or more generally saying RESTful APIs to communicate with Office application data and services. If you are developing on SharePoint you may also use JSOM based libraries but the recommended way is keep the decoupled concerns with the RESTful APIs since it gives many advantages (Note: wait for explore advantages of moving towards RESTful services when Office Dev on a post in near future) .
After you done with TypeScript Application, converting app to Office Add-in is few step process. You can be pick which Office application and then all done. By clicking on “Start” you can test the application.
Note: If you developing SharePoint Add-in you are requires to give SharePoint, you requires to give relevant information to connect with it to host the application. For other application types you requires only Office installed on the machine to host the application.