IBM Champion 2018

I am honoured to announce that I have been awarded the IBM advocacy award “IBM Champion” for the 5th time.

https://www.ibm.com/developerworks/community/blogs/ibmchampion/entry/2018_IBM_Champions?lang=en

I would like to thank all those who nominated me for the award. Thank you IBM for the consideration and the award itself and especially thank you PSC Group for continuing to give me the ability to do what I love doing.

Getting an award like this is not the reason I love my job, but being recognized for what I do makes it all the more special.

 

Thank you ūüôā

 

Advertisements

PSC Director of Technology Solutions

I am very humbled and excited to have been given the title of Director of Technology Solutions at PSC Group.

It has been a fascinating and varied 5 1/2 years since I joined PSC. I am very fortunate to have had the opportunity to work in almost every role at PSC and experience how client delivery excellence is achieved at all levels. I get to professionally hang out with some of the most talented people I have ever had the pleasure of working with. It’s so much fun!

I am really excited about what 2018 holds. PSC Labs is going strong and we continue to receive reassuringly positive feedback from clients who truely value our role as trusted technical advisors. In 2017 PSC successfully branched out into a number of new and challenging emerging technologies and we have plans a plenty to continue to learn, evolve and grow.

I love what I do and I am very grateful to have a job which gives me the opportunity to be the best I can be, and still challenge me to be better.

It’s going to be a fun year, but then it always is… ūüôā

Slides from MS Ignite Office Education day – Office Add-Ins Script Lab

Last month I was invited by the Office development team to present during the Office Education day at MS Ignite.

This presentation was given as part of the Office education day September 24th 2017. The presentation focused on Office Add-Ins and specifically how users could use the Script Lab Add-In to be able to get started with Office Add-Ins.

There are examples in the presentation of some of the Add-In samples available in the Script Labs and then a challenge

 

 

Speaking at SharePoint Chicago Dec 2017

I will be speaking at the 2017 SharePointFest Chicago conference December 8th, at McCormick Place, Chicago.

I will be talking about how O365 adoption can be made easier by having and internal emerging technologies team try and solve some simple business problems and lead to a broader adoption of the platform within an organization.

This will be the third time I have spoken about “the Labs team” this year and I am really honored to be able to speak at SharePointFest again this year ūüôā

————-

BV 205 – Enabling O365 adoption from within – How an emerging technologies team can make a big difference

Too often when an organization makes major technology shifts, it is often not the technology change which causes problems, it’s the people and how they adapt to change. While we often associated this to end users, the same is just as true for developers. If we want to retain our best development talent then we have to give them a part in the transition. Allow them to understand it and own it.

With so many new technologies and capabilities being exposed within Office 365 and Azure, many business are frankly overwhelmed with the possibilities and often fall back on the bare minimum of mail, calendaring and SharePoint. This talk will demonstrate cost effective measures to keep developers engaged while providing benefit to the company in a mutually beneficial manner.

An internal research and development team can create a sustainable balance of creative knowledge growth for the individual, matched with a method to future proof the overall organization. How changes in technology affect the success of a company need to be understood, managed and the effects managed. With the unrestrained freedom to explore emerging technologies and without the constraints of today’s corporate development policies your best talent can achieve great things, stay engaged, and more importantly stay.

In this presentation Mark will discuss and demonstrate how a creative ‚Äúlabs‚ÄĚ team can lead to short, medium and long term benefits for any business willing to invest in people and technology.

Office Add-Ins: Working with Tables in Word. Part 1: Creation

In this article I will show how the Word JavaScript API can be utilized to add tables to your word document using an Office Add-In. This will be a multi part blog post as there are a lot of nuances and interesting ways in which you can play with tables in Word.

Introduction

In previous articles I have written about how to interact with a Word document to search and replace and even save the word document to Salesforce. Going back to a more basic level we are going to look at how to build tables in word.

We will be using the new Script Lab  which is a new Playground Add-In which can be used for development and general tinkering with Add-Ins. This and other articles on the topic are for demonstration purposes and are not hardened for production use.

The reference

For more information on Tables and how¬†what methods/properties are available check out the¬†documentation page –¬†Table Object (JavaScript API for Word)

Creating a table 

At the most basic level a table is created by instantiating the table object and adding values to it.

insertTable(rowCount: number, columnCount: number, insertLocation: string, values: string[][])

This can be done from a number of different parents:

  • The body
  • A range
  • A contentControl
  • A paragraph

The method requires the following:

  • rowCount – a number
  • columnCount – a number
  • insertLocation – Depends on parent – either (body: Start/End/Replace) or (range: Before/After)
  • values: 2 dimentional Array – [[“This is”, “a table”], [“this is”, “a new row”]]

Using these parameters we can create a table from within the Script lab using the following code:

$("#run").click(run);

async function run() {
    try {
        await Word.run(async (context) => {

            var body = context.document.body;
            var range = context.document.getSelection();
            var myArray = [["a", "b"], ["c", "d"]];
            var table = range.insertTable(2, 2, "Before", myArray);            

            // Synchronize the document state by executing the queued commands,
            // and return a promise to indicate task completion.
                await context.sync().then(function () {
                    console.log('Table added before the start of the range.');
                });;
        });
    }
    catch (error) {
        OfficeHelpers.UI.notify(error);
        OfficeHelpers.Utilities.log(error);
    }
}

 

 

Conclusion

Using the Script Lab we have seen how we can easily insert a table into a Word document using the Office Add-In API. In future articles we will look at looking for the table we want to modify and then manipulating tables.

 

 

Interesting new release – Istio service mesh microservices management

So this is something which I came across yesterday and was announced this morning – Istio.

https://developer.ibm.com/dwblog/2017/istio/

“Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data. Istio’s control plane provides an abstraction layer over the underlying cluster management platform, such as Kubernetes, Mesos, etc.” – (Istio on github)

So this new project from Google IBM and Lyft creating the ability to manage microservices across disparate data sources and clouds/networks.

There are multiple options when it comes to API architecture like capabilities for data management and reporting, but they are generally based on the premise that you are routing your traffic through the gateway before it goes to the end user. In that manner you can control, monitor and report on all the traffic from one place.

What Istio gives you the ability to do is to insert the tool and processes which you gain from an managed gateway but distribute it as a meshed network behind the microservice feed. So instead of feeding through one central point, you can distribute the gateway architecture at the source.

Istio was created to be cloud neutral and although it has the backing of IBM and Google there should be no reason why it cannot be used with services created in AWS or Azure.

For more information follow the new @istiomesh account on twitter.

I am really curious about this one and will be watching with great anticipation.

Office Add-Ins – JavaScript control over the Content Control lock in a Word document

In this article I will show how easy it is to programmatically lock and release the lock on a content control in a word document. This is very helpful when you are populating regions of a document but do not want users to mess with the format of the contents.

Introduction

In the Word 1.3 release of the office.js model, Microsoft release the new “cannotEdit” property of a content control. This is a get and settable property. More information on the properties available are found here in the documentation

https://github.com/OfficeDev/office-js-docs/blob/WordJs_1.3_Openspec/reference/word/contentcontrol.md

Unlocking a content control for editing

Here is my locked content control called “Checklist”. I am going to use the code to get it by Tagname and then unlock it.

In your JavaScript code when you are about to update the control you need to execute the following as a minimum. It seems like a lot of code but it is due to the Promised based architecture used for the Office Add-In APIs.

    Word.run(function (context) {

        var contentControlsWithTag = context.document.contentControls.getByTag('Checklist');
        // Queue a command to load the tag property for all of content controls.
        context.load(contentControlsWithTag, 'tag');

        // Synchronize the document state by executing the queued commands,
        // and return a promise to indicate task completion.
        return context.sync().then(function () {
            if (contentControlsWithTag.items.length === 0) {
                console.log('No content control found.');
            }
            else {
                return context.sync()
                    .then(function () {
                        //the contentControlsWithTag is always returned as an array of items
                        contentControlsWithTag.items[0].cannotEdit = false;
                        contentControlsWithTag.items[0].insertHtml("<b>Hello World</b>", 'Replace');
                    });
            }
        });
    })
    .catch(function (error) {
        console.log('Error: ' + JSON.stringify(error));
        if (error instanceof OfficeExtension.Error) {
            console.log('Debug info: ' + JSON.stringify(error.debugInfo));
        }
    });    

Once you have unlocked the control your code can be inserted and the control is editable. In a real application you just have to make sure you lock averything again with

   contentControlsWithTag.items[0].cannotEdit = false;
   contentControlsWithTag.items[0].insertHtml("<b>Hello World</b>", 'Replace');
   contentControlsWithTag.items[0].cannotEdit = true

Conclusion

Nice, simple to use locking control. Yes the users cant unlock this manually and mess with the document, but if they are going there, then it is their own fault. This way no changes can be made “by mistake”.