Single Page Applications
The evolution of programming
With new technologies comes new opportunities
New advances in standards and the tools we have to program applications come ever more frequently. But this has not always been the case. The journey to where we find ourselves today with Angular has been a long one…
For many years what we were able to implement using the internet technologies of the day was not capable of duplicating native applications. With the exception of some special cases this is now no longer the case.A long time ago...
Combining Angular with a responsive design platform like Bootstrap we have the capability to create modern applications which work on all devices.Today
But where do we save the data?
The majority of applications require that data is shared between users and for this a server is needed.
The focus of server-side programming has changed radically – instead of attempting to execute all the application logic and present the interface to the user, now it is limited to providing web services which the browser-based applications can consume. All the modern server programming languages support the creation of web services and the generation of generic methods for whatever subsystem whether that be a database, ERP, etc… This means the same web services can be used by multiple different applications, greatly reducing the amount of programming necessary.
There are multiple benefits: better scalability, improved user experience, a simpler development environment with more powerful and automated tools which reduce development time and improve the quality of the applications.
SharePoint and Angular
A match made in the cloud
By SharePoint 2007 with the first web services based on SOAP 1.0 and XML we had the ability to interact with the information and files stored in SharePoint without having to turn to server-side programming.
Now with SharePoint Online and SharePoint 2016 we have an ample REST API which allows us to access, create and modify any information inside the environment and we also have WebPart pages to easily publish our applications. Building on sites, lists and libraries, Angular applications can take advantage of the functionality and security already present in SharePoint instead of having to reprogramme it – another important advantage permitting greatly reduced development times.
In Office 365 we have the new Graph API which allows us to interact with the other services such as OneDrive and Teams. While the functional coverage is incomplete and Microsoft keeps adding new services and capabilities to the platform, it is sure to be a powerful tool for use in applications in the near future.
Don’t touch that server
Before the cloud the traditional way to add functionality to SharePoint was server-side programming in one form or another. For stability and security Microsoft do not allow these types of solutions in SharePoint Online. The only option until recently has been ‘Add-ins’ – apps in Azure separate from SharePoint but, with a certain amount of difficulty, able to interact with data on the platform.
SPA’s created in Angular or other similar frameworks eliminate all the difficulties and additional costs related to Add-ins.
Programme once – not every time
Many companies and organizations are using previous versions of SharePoint and still require functionality specific to their needs to be added to their current platform. With applications created in Angular when the time comes to migrate to the latest version of SharePoint on-premise or make the jump to SharePoint Online no reprogramming is necessary. As all the interactions between the application and SharePoint go exclusively via web services which Microsoft must maintain in future versions it is possible to create an application for SharePoint 2007, 2010 or 2013 and copy it straight to SharePoint 2016 without any modifications.
The options are clear: pay each time to reprogramme ‘traditional’ applications in SharePoint when you migrate to the latest version or pay once for an Angular app with all the additional advantages it brings and never have to reprogramme again when you migrate.
Looking to the future
Microsoft are on the same road
The ‘Add-ins’ as an extensibility solution for SharePoint ended up being too complicated to easily implement. Microsoft has recognized this and have created a new development platform – SharePoint Framework or SPfx – to substitute it.
SPfx is client-side programming platform which allows developers to use the latest technology and tools in their applications. At the moment there is support for applications based on the programming frameworks React, Knockout and of course AngularJS and Angular.
While SPfx is still somewhat immature as yet, Microsoft is working hard to improve it and complete the support documentation which is critical for developers to be able to use it.
Until SPfx is a tried and tested platform ready for enterprise production environments we will continue to use our development stack, secure in the knowledge that it is backed by Microsoft who are also working in the same direction.