SPFx

The Future of SharePoint in AZURE/LINUX

Posted on Updated on

INTRO

Today we live in a world of of “Services”, The real deal is have focus on a Service and integrate our products. Microsoft AZURE It’s a really example of this new way of making global deals, innovate, learn and execute..

What is a “Servicizing”?

“Servicizing” is a transaction through which value is provided by a combination of products and services in which the satisfaction of customer needs is achieved either by selling the function of the product rather than the product itself, or by increasing the service component of a product offer. The concept is based on the idea that what customers want from products is not necessarily ownership, but rather the function that the product provides or the service the product can deliver. This means that the provider of “servicizing solutions” may get paid by the unit-of-service (or product function) delivered, as opposed to the (more traditional) unit-of-products sold…

Credit: Wikipedia

When Microsoft decide to open SPFx, vscode, and now SQL Server for Linux and Windows as “open source”, a light came out to me right away.

This means, in terms of  PROFICT & LOST PROJECTIONS a major step to Corporations realize that the CLOUD is Important, and have to be demystified. I remember a few years ago, I didn’t see any constructive brainstorm with “Open Source” and “Microsoft”, you simple give your opinion and 20 people reply as you were a “virus” or someone from another world.

My Azure VM is a Standard F2 (2 cores, 4 GB memory) = ~1,51€ day (8h) West Europe, so 1,51×22 = ~33,22€ month. A Corporation with 100 SP Developers = ~3,322 month based on 1 month ~90€ (Azure Calculator)

PS: Using 1 SSD 32GB + 1 HDD disk with 1TB

SCOPE

  1. Benefits of using Linux VM’s in Azure in order to improve profits, keeping in mind the future of SharePoint.
  2. Know how prepare and configure environments for SPFx,
  3. POC your SPFx WebParts.

TO DO

  1. Profits vs benefit
  2. Azure templates
  3. Linux configuration/connection
  4. SPFx WebParts on Linux, configuration and POCs

1. Profits vs benefit

  1. Mindset on Open Source Technologies (Projection of Azure VM’s – less is more) , more profit;
  2. Open Source Challenge for newly graduates, interns and students, more opportunities, more profit;
  3. Open mind Multidisciplinary Teams – more know-how, more value, more qualification, more profit.

As a consequence you can choose more assertively what’s best for your business and have more flexibility for AZURE budget.

2. Azure templates

  1. .Variety of Linux Templates (Debian, Ubuntu, RedHat, CentoOS, openSUSE, …)
  2. Open Source Tools like azure-cli the Source, and AzureRM PowerShell on Linux and Open Source, the Source

3. Linux configuration/connection

You can use azure-cli or create a VM from several templates on Microsoft AZURE

You can connect using puTTY. My opinion goes to Debian, in this case (8 Jessie) latest stable.

After Login via puTTY run the commands bellow

Bash

I’m using MATE DESKTOP and installing GParted to manage my 1 TB HDD disk

# LINUX ROOT AND ADMINS
sudo passwd root
# UBUNTU
sudo usermod -G admin spfx

# INSTALL MATE DESKTOP
sudo apt-get update
sudo apt-add-repository ppa:ubuntu-mate-dev/ppa
sudo apt-add-repository ppa:ubuntu-mate-dev/trusty-mate
sudo apt-get install mate-desktop-environment-core
sudo apt-get install mate-desktop-environment
#sudo apt-get install mate-desktop-environment-extras
sudo apt-get update && sudo apt-get upgrade

# INSTALL XRDP
sudo apt-get install xrdp
sudo apt-get update 
echo mate-session >~/.xsession
sudo service xrdp restart

# INSTALL GPARTED
sudo apt-get update && sudo apt-get install gparted

LIN

NEXT STEPS

Overview of the SharePoint Framework OFFICE DEV CENTER

Overview of the SharePoint Framework GIT DOCS

SharePoint Framework client-side web part samples & tutorial materials

Code samples and developer content targeted towards SharePoint Framework client-side web parts

DROP 5 USERS (LINUX)

Error – ‘tslint’ sub task errored after 871 ms
Error in plugin ‘gulp-cache’
Message:
Cannot find module ‘./h6’
Details:
code: MODULE_NOT_FOUND

https://github.com/SharePoint/sp-dev-docs/issues/246#issuecomment-255311473

Git Ingnore vscode for (SPFx)

Posted on Updated on

.gitignore file

# Logs
logs
*.log
npm-debug.log*

# Dependency directories
node_modules

# Build generated files
dist
lib
solution
temp
*.spapp

# Coverage directory used by tools like istanbul
coverage

# OSX
.DS_Store

# Visual Studio files
.ntvs_analysis.dat
.vs
bin
obj

# Resx Generated Code
*.resx.ts

# Styles Generated Code
*.scss.ts 

.npmignore file

# Folders
.vscode
coverage
node_modules
sharepoint
src
temp

# Files
*.csproj
.git*
.yo-rc.json
gulpfile.js
tsconfig.json

SharePoint Framework (SPFX) and Linux

Posted on Updated on

Recently Microsoft released a the preview version of SPFx, as Microsoft say:

“The SharePoint Framework is a Page and Part model that enables client-side development for building SharePoint experiences. It facilitates easy integration with the SharePoint data, and provides support for open source tooling development.”

I’ve been use it in windows 10 1670, but in Linux also.

This Though, mini Article is a way to provide my experience and some suggestions for you. In my case I use Hyper-V with a VM for 1 processor and RAM defined for max (6GB)

Install Lubuntu, its lite and very user friendly. It’s based on Ubuntu but have a lite UI (LXDE).

For me the main problem was with the VM Screen resolution, for accomplish this, just run

Change this line

sudo nano /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT=

image

TO (in my case 1366×768)

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash video=hyperv_fb:1366×768″

Then

sudo update-grubsudo update-grub

Save and restart

At this time, you must follow some procedures in the LXTerminal

Install node.js

sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

Install Gulp and npm

sudo npm i -g yo gulp

image

Install the Compiler Tools

sudo apt-get install build-essential

Install Yeoman SharePoint Generator

sudo npm i -g @microsoft/generator-sharepoint

image

Install Visual Studio Code

https://code.visualstudio.com/#alt-downloads

image

Next just follow all procedures from the SPFx official Git and enjoy

https://github.com/SharePoint/sp-dev-docs/wiki

image

FIXES

Gulp give error installing

sudo npm install npm –g
sudo ln -s /usr/bin/nodejs /usr/bin/node

Install Gulp again and continue all points