MAGAZINE. www.sdn.nl IN DIT NUMMER O.A.:



Vergelijkbare documenten
MyDHL+ Van Non-Corporate naar Corporate

2019 SUNEXCHANGE USER GUIDE LAST UPDATED

General info on using shopping carts with Ingenico epayments

ANGSTSTOORNISSEN EN HYPOCHONDRIE: DIAGNOSTIEK EN BEHANDELING (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

Activant Prophet 21. Prophet 21 Version 12.0 Upgrade Information

RECEPTEERKUNDE: PRODUCTZORG EN BEREIDING VAN GENEESMIDDELEN (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

MyDHL+ ProView activeren in MyDHL+

SAMPLE 11 = + 11 = + + Exploring Combinations of Ten + + = = + + = + = = + = = 11. Step Up. Step Ahead

ETS 4.1 Beveiliging & ETS app concept

EM6250 Firmware update V030507

Taco Schallenberg Acorel

Het beheren van mijn Tungsten Network Portal account NL 1 Manage my Tungsten Network Portal account EN 14

De grondbeginselen der Nederlandsche spelling / Regeling der spelling voor het woordenboek der Nederlandsche taal (Dutch Edition)

!!!! Wild!Peacock!Omslagdoek!! Vertaling!door!Eerlijke!Wol.!! Het!garen!voor!dit!patroon!is!te!verkrijgen!op! Benodigdheden:!!

Settings for the C100BRS4 MAC Address Spoofing with cable Internet.

Group work to study a new subject.

Shipment Centre EU Quick Print Client handleiding [NL]

Firewall van de Speedtouch 789wl volledig uitschakelen?

Hoe met Windows 8 te verbinden met NDI Remote Office (NDIRO) How to connect With Windows 8 to NDI Remote Office (NDIRO

Read this story in English. My personal story

Puzzle. Fais ft. Afrojack Niveau 3a Song 6 Lesson A Worksheet. a Lees de omschrijvingen. Zet de Engelse woorden in de puzzel.

EM7680 Firmware Update by OTA

Introductie in flowcharts

Standard Parts Installatie Solid Edge ST3

Tim Akkerman - Head of Mobile

DALISOFT. 33. Configuring DALI ballasts with the TDS20620V2 DALI Tool. Connect the TDS20620V2. Start DALISOFT

Hoe te verbinden met NDI Remote Office (NDIRO): Apple OS X How to connect to NDI Remote Office (NDIRO): Apple OS X

How to install and use dictionaries on the ICARUS Illumina HD (E652BK)

Continuous Delivery. Sander Aernouts

Procedure Reset tv-toestellen:

Handleiding Zuludesk Parent

Onder de motorkap van Microsoft Azure Web Sites. Eelco Koster Software architect ORDINA

Een vrouw, een kind en azijn (Dutch Edition)

My Inspiration I got my inspiration from a lamp that I already had made 2 years ago. The lamp is the you can see on the right.

CONTAINERIZATION OF APPLICATIONS WITH MICROSOFT AZURE PAAS SERVICES

Handleiding Installatie ADS

ICARUS Illumina E653BK on Windows 8 (upgraded) how to install USB drivers

Smar t Buildings met behulp van Azure IoT

Borstkanker: Stichting tegen Kanker (Dutch Edition)

Mobile Devices, Applications and Data

Archief Voor Kerkelijke Geschiedenis, Inzonderheid Van Nederland, Volume 8... (Romanian Edition)

A2 Workshops Grammatica Heden

Teksten van de liederen die gospelkoor Inspiration tijdens deze Openluchtdienst zingt.

Understanding and being understood begins with speaking Dutch

Preschool Kindergarten

1. Voor het installeren wordt geadviseerd een backup te maken van uw database en bestanden.

BISL EEN FRAMEWORK VOOR BUSINESS INFORMATIEMANAGEMENT (DUTCH LANGUAGE) (GERMAN EDITION) (DUTCH EDITION) BY REMKO VAN DER POLS, RALPH DONA

EM7680 Firmware Update by Micro SD card

150 ECG-problemen (Dutch Edition)

voltooid tegenwoordige tijd

NETWORK CHARTER. #ResourceEfficiency

Free time! Better skills. Free time with Brenda and Brian. Worksheet

De convergentie naar gemak. Hans Bos,

Vertaling Engels Gedicht / songteksten

WEGWIJZER VOOR METHODEN BIJ PROJECTMANAGEMENT (PROJECT MANAGEMENT) (DUTCH EDITION) BY EDWIN BAARDMAN, GERARD BAKKER, JAN VAN BEIJNHEM, FR

CBSOData Documentation

Grammatica uitleg voor de toets van Hoofdstuk 1

Appendix A: List of variables with corresponding questionnaire items (in English) used in chapter 2

LDAP Server on Yeastar MyPBX & tiptel 31xx/32xx series

LONDEN MET 21 GEVARIEERDE STADSWANDELINGEN 480 PAGINAS WAARDEVOLE INFORMATIE RUIM 300 FOTOS KAARTEN EN PLATTEGRONDEN

Virtual Enterprise Centralized Desktop

Travel Survey Questionnaires

Comics FILE 4 COMICS BK 2

HANDBOEK HARTFALEN (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

Vergaderen in het Engels

(1) De hoofdfunctie van ons gezelschap is het aanbieden van onderwijs. (2) Ons gezelschap is er om kunsteducatie te verbeteren

Duiding Strafuitvoering (Larcier Duiding) (Dutch Edition) Click here if your download doesn"t start automatically

Chapter 4 Understanding Families. In this chapter, you will learn

Stars FILE 7 STARS BK 2

Continuous testing in DevOps met Test Automation

9 daagse Mindful-leSs 3 stappen plan training

MobiDM App Handleiding voor Windows Mobile Standard en Pro

S e v e n P h o t o s f o r O A S E. K r i j n d e K o n i n g

Een vrouw, een kind en azijn (Dutch Edition)

Stefan Lamberigts Solution Advisor Data Platform. Michiel Coox Solution Advisor Productivity

/ /

Lists of words from the books, and feedback from the sessions, are on

Release notes Q3-2018

B1 Woordkennis: Spelling

It s all about the money Group work

EM7580 Firmware Update by Micro SD card

EM7680 Firmware Auto-Update for Kodi 17.2

Open Onderwijs API. De open standaard voor het delen van onderwijs data. 23 juni 2016 Frans Ward - SURFnet Architectuurraad - Utrecht

Registratie- en activeringsproces voor de Factuurstatus Service NL 1 Registration and activation process for the Invoice Status Service EN 10

Main language Dit is de basiswoordenschat. Deze woorden moeten de leerlingen zowel passief als actief kennen.

My Benefits My Choice applicatie. Registratie & inlogprocedure

OPEN TRAINING. Onderhandelingen met leveranciers voor aankopers. Zeker stellen dat je goed voorbereid aan de onderhandelingstafel komt.

Angststoornissen en hypochondrie: Diagnostiek en behandeling (Dutch Edition) Click here if your download doesn"t start automatically

Open source VoIP Networks

Maillijsten voor medewerkers van de Universiteit van Amsterdam

Security Les 1 Leerling: Marno Brink Klas: 41B Docent: Meneer Vagevuur

Zo werkt het in de apotheek (Basiswerk AG) (Dutch Edition)

open standaard hypertext markup language internetprotocol transmission control protocol internet relay chat office open xml

Value based healthcare door een quality improvement bril

Duurzaam projectmanagement - De nieuwe realiteit van de projectmanager (Dutch Edition)

FOD VOLKSGEZONDHEID, VEILIGHEID VAN DE VOEDSELKETEN EN LEEFMILIEU 25/2/2016. Biocide CLOSED CIRCUIT

Love & Like FILE 2 LOVE & LIKE BK 2

Aim of this presentation. Give inside information about our commercial comparison website and our role in the Dutch and Spanish energy market

Transcriptie:

MAGAZINE SOFTWARE DEVELOPMENT NETWORK ISSN: 2211-6486 IN DIT NUMMER O.A.: Remote debugging naar een Azure VM < Decrease dataflows between systems with CDC < SQL Server In-Memory OLTP < SCRUM is meer dan een project management methodologie < Nummer 124 februari 2015 SDN Magazine verschijnt elk kwartaal en is een uitgave van Software Development Network 124 www.sdn.nl

Colofon Uitgave: Software Development Network Drieëntwintigste jaargang No. 124 februari 2015 Bestuur van SDN: Marcel Meijer, voorzitter Rob Suurland, penningmeester Remi Caron, secretaris Redactie: Marcel Meijer (redactie@sdn.nl) Aan dit magazine werd meegewerkt door: Roel Hans Bethlehem, Bob Swart, Maarten van Stam, Arjen Bos, Alexander Meijers, Remi Caron, Marcel Meijer en natuurlijk alle auteurs! Listings: Zie de website www.sdn.nl voor eventuele source files uit deze uitgave. Contact: Software Development Network Postbus 506, 7100 AM Winterswijk Tel. (085) 21 01 310 E-mail: info@sdn.nl Vormgeving en opmaak: Reclamebureau Bij Dageraad, Winterswijk www.bijdageraad.nl 2015 Alle rechten voorbehouden. Niets uit deze uitgave mag worden overgenomen op welke wijze dan ook zonder voorafgaande schriftelijke toestemming van SDN. Tenzij anders vermeld zijn artikelen op persoonlijke titel geschreven en verwoorden zij dus niet noodzakelijkerwijs de mening van het bestuur en/of de redactie. Alle in dit magazine genoemde handelsmerken zijn het eigendom van hun respectievelijke eigenaren. Beste SDN Magazine lezer, voorwoord Hebben jullie met open mond naar de Windows 10 presentatie zitten kijken? Gezien hoe de opvolger van Windows 8 steeds volwassener wordt en alle plooien er nu wel uitstrijkt? Heb je al gespeeld met de volgende versie van Office 2015 welke meer gericht is op touch gebruik? Heb je al gekeken naar de nieuwe Visual Studio versie met daarin allerlei performance meters? Heb je de vele Microsoft applicaties op het Android en ios platform al bekeken? Dat zijn er al ruim 100. In het verleden is Microsoft vaak verweten dat ze een gesloten omgeving waren, hoewel ze als eerste ooit voor de MAC applicaties ontwikkelde. Maar tegenwoordig zijn ze nog opener en laten dat ook graag weten. In de volgende magazines en events van de SDN komen jullie naast artikelen en sessies van de andere platformen ook verhalen tegen over Microsoft. De SDN is voor alle soorten developers en alle soorten platforms. En dat blijft zo. Op vrijdag 20 maart is het volgende SDN event. Op dit event zal ook de Algemene leden vergadering weer plaats vinden. Dit is naast natuurlijk rechtstreeks met mij te mailen of ons te bellen, de uitgelezen kans om je als lid van de vereniging te laten informeren en te horen over het reilen en zeilen van de vereniging. Kom dus allemaal en laat je stem spreken. Dit magazine 124 bevat wederom een uiteenlopende hoeveelheid aan onderwerpen. Over Dynamics CRM, Remote debugging op Azure, Application Insights deel 2, CDC wat is de zin en onzin hiervan, Azure Webjobs, Microservices een mooie verhandeling, de ELK stack wat is het, In-Memory OLTP databases, SCRUM is bruikbaar in meerdere onderdelen van een organisatie, de Delphi's REST Client Library, Microsoft Test Manager beschrijving en nog een paar kleine tips en tricks. Kortom, Bas van de Sande, Cary Jensen, Eric Tummers, Hassan Fadili, Jeffrey Verheul, Marcel Meijer, Patrick Kalkman, Peter ter Braake. Piet Willem Overvoorde, Sander Hoogendoorn en Wouter de Kort hebben weer veel tijd gestoken in deze stuk voor stuk mooie verhalen. Speciaal voor jullie als SDN magazine lezer. Het volgende magazine 125 maken we iets specialer. Daarover later meer. Heel veel leesplezier en tot 20 maart bij de ALV. Groeten, Marcel Meijer eindredacteur Magazine en Voorzitter SDN Adverteerders Microsoft 2 Achmea 44 Adverteren? Informatie over adverteren en de advertentietarieven kunt u vinden op www.sdn.nl onder de rubriek Magazine. magazine voor software development 3

Agenda 2015 Inhoud 16-19 maart 2015 Microsoft Convergence 2015 Atlanta 20 maart SDN event, Zeist 29 april - 1 mei //Build San Francisco 4-8 mei Microsoft Ignite Chicago at McCormick Place 12-13 mei Techorama Belgium 2015 28-29 mei TechDays, Den Haag 12 juni SDN event 12-16 juli Worldwide Partner Conference Orlando 18 september SDN event 03 Voorwoord Marcel Meijer 04 Inhoudsopgave 04 Agenda 05 Microsoft Dynamics CRM Bas van de Sande 08 Remote debugging naar een Azure VM Eric Tummers 10 Application Insights for Visual Studio Online (Part 2) Hassan Fadili 15 Decrease dataflows between systems with CDC Jeffrey Verheul 17 Azure Webjobs Marcel Meijer 19 Microservices. The good, the bad and the ugly Sander Hoogendoorn 23 Improving traceability of distributed systems using the ELK stack Patrick Kalkman 30 SQL Server In-Memory OLTP Peter ter Braake 32 SCRUM is veel meer dan een project management methodologie Piet Willem Overvoorde 36 Delphi's REST Debugger and REST Client Library, Part 1 Cary Jensen 41 Ken jij Microsoft Test Manager? Wouter de Kort 43 API Management Marcel Meijer

GENERAL Bas van de Sande Microsoft Dynamics CRM A journey of a SharePoint developer into the world of CRM Na jarenlang software ontwikkeld te hebben in C#, SQL Server, BizTalk en SharePoint ben ik onlangs overgestapt op het Microsoft Dynamics CRM platform. In deze serie artikelen wil ik mijn ervaringen delen en jullie enthousiast maken voor dit relatief onbekende platform. In dit artikel beschrijf ik in hoofdlijnen wat CRM inhoudt en waarom de C van CRM eigenlijk een x hoort te zijn. Ten slotte werp ik een eerste blik onder de motorkap van Microsoft Dynamics CRM. Geschiedenis De eerste versie van Microsoft Dynamics CRM is uitgebracht in 2003. Microsoft was in die tijd bezig met het opkopen van een aantal spelers in de ERP en boekhoudmarkt (o.a. Great Plains, Navision) om zo een positie in de Enterprise markt te verwerven. De CRM, ERP en boekhoudproducten zijn later ondergebracht onder de noemer Microsoft Dynamics, te weten AX (ERP), NAV (boekhouding) en uiteraard CRM. Op dit moment is CRM 2015 net beschikbaar gekomen. Naast de on-premise versie is CRM ook verkrijgbaar als CRM Online. Wat is CRM? CRM staat voor Customer Relationship Management, oftewel het beheren van de relatie tussen een klant en een organisatie. Elke klantrelatie kent een levensduur die uit een aantal fases bestaat. De inzet van CRM is er opgericht om de klant in iedere fase van de relatie optimaal te kunnen bedienen om zo een maximaal rendement uit de relatie te halen. Maar niet iedereen die een relatie met een organisatie of bedrijf onderhoudt, is per definitie een customer. Je kan bijvoorbeeld lid van zijn van een vereniging, deelnemer aan een community, donateur van een goed doel, student bij een opleidingsinstituut of juist leverancier aan een bedrijf. Microsoft Dynamics CRM Net zoals bijvoorbeeld SharePoint is ook Microsoft Dynamics CRM beschikbaar als een on-premise versie (CRM 2013/2015) en online als CRM Online. Echter, in tegenstelling tot SharePoint lopen de on-premise en de online versie van CRM voor de ontwikkelaar niet ver uitelkaar en kun je de technieken die je gebruikt voor je on-premise oplossing gemakkelijk naar de online versie brengen. Zowel de on-premise als de online versie bieden een goede ondersteuning voor mobiele devices (ios, Android en Windows Phone). Microsoft Dynamics CRM integreert nagenoeg naadloos binnen de Office suite (add-in voor Outlook) en leunt technologisch zwaar op de SQL Server database, SQL Server Reporting Services, Internet Information Server en het Microsoft.Net framework (sandbox). Kortom, alle bouwstenen voor een solide applicatieplatform zijn hiermee voorhanden. Zowel de on-premise als de online versie van CRM ziet er in hoofd lijnen als volgt uit: De C in CRM moet je dus ruim zien en de essentie van CRM is het optimaal bedienen van de relatie tussen een persoon of organisatie en jouw organisatie. De C moet je dan eigenlijk ook zien als een x, waarbij de x staat voor de andere partij. Als ontwikkelaar moet je er altijd rekening mee houden dat CRM wordt ingezet om te voorzien in een functionele behoefte. CRM wordt, in tegenstelling tot andere softwareproducten, niet vanuit de IT-afdeling gepusht, maar juist geïnitieerd voor en/of door de gebruiker; vaak werkzaam op de klantgerichte afdelingen binnen het bedrijf (marketing, verkoop, ledenadministratie, klantenservice). Binnen CRM zijn de klantgegevens, en wat de organisatie wil met die klantgegevens leidend, de technologie is volgend. In projecten betekent dit dat oplossingen grotendeels door functionele consultants in samenwerking met de gebruikers in elkaar worden gezet. Daar waar nodig mogen wij - ontwikkelaars - bijspringen om de complexe onderdelen, rapportages, integraties te ontwikkelen en om de gebouwde oplossing in de vorm van een solution uit te rollen. Fig. 1: schematische weergave opbouw Microsoft Dynamics CRM De business functionaliteit van Microsoft Dynamics CRM wordt ontsloten door middel van een.net API. Daarbovenop is een web magazine voor software development 5

GENERAL API geplaatst waarmee allerlei client applicaties verbinding kunnen maken. Binnen de formulieren kan gebruik gemaakt worden van javascript om extra functionaliteit te ontsluiten. The power of SQL Server De kern van CRM zijn de SQL Server databases. Een van de data - bases bevat metadata omtrent de configuratie, verder is er nog een content database. Deze database bevat de feitelijke data. Waarin CRM hemelsbreed verschilt ten opzichte van SharePoint, is dat in de CRM data fysieke entiteiten en velden worden aangemaakt waarin de data wordt opgeslagen. Dit in tegenstelling tot SharePoint, waarbij de database bestaat uit een aantal metatabellen en data - tabellen, waar op basis van de opgeslagen meta-informatie de echte data kan worden teruggevonden. Hier ligt dan ook echt de kracht van CRM, namelijk een échte database, met fysieke relaties tussen entiteiten (referentiële integriteit). Het is echter niet de bedoeling dat gegevens rechtstreeks in de database worden aangepast; je zou daarmee een aantal ingestelde business rules kunnen overtreden (constraints). Het aanpassen van de data gebeurt via het objectmodel dat CRM je ter beschikking stelt. Nu vraag je je waarschijnlijk af: Ja maar als ik nou niet de regels overtreed, waarom mag ik dan niet rechtstreeks de tabellen vullen?. Dat heeft te maken met de manier waarop Microsoft Dynamics CRM omgaat met aanpassingen op het applicatieplatform. In de online versie is het niet mogelijk om rechtstreeks bij de onderliggende SQL Server databases te komen, waar je normaal als DBA extra indexen kan leggen om de performance te verbeteren. In dat geval zal je terug moeten vallen op Microsoft support. Zij kunnen dit voor je doen. Reporting Als CRM ontwikkelaar werk je normaal gesproken tegen het objectmodel aan. Echter, in het geval van rapportages werk je tegen een database view aan die door CRM wordt beheerd.microsoft Dynamics CRM maakt gebruik van SQL Server Reporting Services. Juist omdat CRM geheel is gebaseerd op data, gebruikt het gelukkig ook de kracht van de onderliggende SQL Server database om query s uit te voeren. Je kan dan ook in de datasets die je maakt volledig gebruik maken van de mogelijkheden van Transact SQL. De report definities die uit SSRS voort - komen, kun je later uitrollen via je eigen solution.in de online versie kun je geen gebruik maken van SQL query s, je moet hier met FetchXML werken. FetchXML is een op XMLgebaseerde querytaal voor Dynamics CRM. van de solution worden aanpassingen binnen de database gemaakt, hierbij wordt de oorspronkelijke structuur met rust gelaten. Wanneer je met bijvoorbeeld SQL Server Management Studio naar de database kijkt, zie je dat van een bepaalde entiteit (bijvoorbeeld Account) meerdere tabellen bestaan. Wanneer je de geïnstalleerde solution verwijdert, dan zullen eventuele aangemaakte tabellen of relaties verdwijnen. Het solution mechanisme van Microsoft Dynamics CRM is erg krachtig en ook gemakkelijk in het gebruik. Je hoeft geen ingewikkelde provisioning te bouwen en je kunt de solution letterlijk in elkaar klikken.solutions die zijn gemaakt op één omgeving kan je exporteren, zodat je deze op een andere omgeving kan importeren en uitrollen. Dit mechanisme leent zich uitstekend voor een OTAP straat. Autorisatie Net als ieder server platform, maakt ook Microsoft Dynamics CRM gebruik van autorisatie. Hierin gaat Microsoft Dynamics CRM erg ver - terecht trouwens, want je werkt vaak met erg gevoelige informatie. De data die in CRM is opgeslagen, wordt beschermd door middel van een zeer uitgebreide autorisatiematrix (door een beheerder instelbaar). Fig. 2: voorbeeld autorisatiematrix binnen CRM Het werken met solutions Net zoals Microsoft SharePoint is ook Microsoft Dynamics CRM een applicatieplatform, waarbij ontwikkelaars en gebruikers aanpassingen kunnen maken om zo toepassingen te maken die aansluiten op de processen binnen de organisatie. Binnen Microsoft Dynamics CRM is altijd minimaal één solution geïnstalleerd. Dit is de default solution. Als je wijzingen maakt op de default solution pas je hiermee de kern van CRM aan. De wijzigingen die je uitvoert, kunnen niet met één druk op de knop worden verwijderd. Om te waarborgen dat je aanpassingen wel ongedaan gemaakt kunnen worden, maak je gebruik van solutions. Binnen de solution wordt van alle objecten die je gaat aanpassen (die je dus toevoegt aan de solution) een kopie gemaakt en met deze kopie ga je aan het werk. Nadat je de wijzigingen hebt doorgevoerd publiceer je deze naar Microsoft Dynamics CRM toe. Tijdens het publiceren Fig. 3: autorisatieniveaus binnen CRM 6 MAGAZINE

GENERAL In de matrix wordt vastgelegd wie wat mag doen met welke data en wie eigenaar is van welke data. Dit is te vergelijken met item level security binnen SharePoint, maar dan vele malen krachtiger en uitgebreider uitgevoerd. Per gebied, rol, veld en/of entiteit kan worden vastgelegd wie wat met data mag doen en wie eigenaar is van de data. In onderstaande afbeelding geef ik aan wat de symbolen voorstellen Binnen CRM modelleer je de organisatie. Een organisatie bestaat uit business units (dit kunnen business units maar ook afdelingen zijn, en kunnen hiërarchisch worden weergegeven). Op het onderste niveau staat de gebruiker. De autorisatiematrix maakt gebruik van dit principe en de symbooltjes geven aan wie de eigenaar is van de gegevens binnen CRM. Naarmate het bolletje meer is ingekleurd, is er een grotere groep die toegang heeft tot de gegevens. Ogenschijnlijk een eenvoudig te gebruiken mechanisme, maar in de praktijk een van de lastigste onderdelen binnen CRM om te doorgronden. Ten slotte Mijn ervaringen tot zover met Microsoft Dynamics CRM is dat het een erg krachtig platform is om bedrijfstoepassingen te bouwen waarin relaties tussen organisaties en personen worden onderhouden. Wanneer je gewend bent om te ontwikkelen op een platform als SharePoint zal je aangenaam verrast worden door een aantal zaken die standaard voor je geregeld worden binnen CRM zonder dat je je hiervoor in allerlei bochten hoeft te wringen. Het prettige aan het ontwikkelen op CRM is dat het eigenlijk niet uitmaakt of je voor de on-premise of voor de online versie ontwikkelt. Het enige verschil dat ik ben tegengekomen zit hem in het moeten gebruiken van FetchXML wanneer je met SQL Server Reporting Services werkt. Microsoft Dynamics CRM is geen wondermiddel; maar wel een goed stuk gereedschap dat je moet inzetten waarvoor het bedoeld is, namelijk het onderhouden van relaties en processen die daarmee gerelateerd zijn. Bas van de Sande Bas van de Sande heeft zich sinds 1995 gespecialiseerd in softwareontwikkeling en advisering op het Microsoft platform. Hij heeft zich sinds 2005 voornamelijk bezig gehouden met SharePoint en Microsoft.Net. Op dit moment ligt zijn focus op Microsoft CRM en blogt hij zeer actief over zijn ervaringen met CRM. Bas is werkzaam als Senior Software Developer/Architect bij CRM Partners. ConnectionStrings / AppSettings Azure Zoals je op pagina 17 in dit magazine kunt lezen, wordt een Webjob gedeployed bij een Azure website. Bij de Webjob hoort ook een dashboard. Na het deployen van de Webjob waren er Errors en Warnings over een setting. Zoals de error/ warning verteld, moet je de Connectionstring toevoegen aan het Connection string gedeelte van de Azure website. Daarna is de error/warning weg. In je code gebruik je: var storageaccount = CloudStorageAccount.Parse( ConfigurationManager. ConnectionStrings[ AzureWebJobsStorage ]. ConnectionString ); Maar de Connectionstrings of App settings geef je een waarde op de Configure tab van de Azure Website. Nu lijkt het net of je deze Connectionstring op twee plekken moest configureren. Een keer op de portal en een keer in de app.config van de Webjob. Dat zou niet mooi zijn, maar dat blijkt ook niet te hoeven. En dit werkt ook voor de App.config van een Azure Webjob. Meer informatie: http://www.asp.net/identity/overview/features-api/best-practices-for-deploying-passwords-and-other-sensitive-data-to-aspnet-and-azure magazine voor software development 7

CLOUD Eric Tummers Remote debugging naar een Azure VM Je hebt OTAP met Windows Azure virtual machines ingericht. Deployment gebeurd automatisch na een nightly build. Alles is koek-en-ei totdat er een probleem optreedt dat je wil debuggen. Hoe doe je dat in Azure? Installeren van Visual Studio op de VM lijkt de enige optie? Gebruik Remote Debugging vanuit je development machine naar een Azure VM. Debugger extension Via de Server Explorer in Visual Studio kan de debugger extension op een Azure VM geïnstalleerd worden. Integratie in Visual Studio maakt het makkelijker om een debug session te starten. VPN Als jouw development machine in hetzelfde network zit, kun je een remote debugging sessie starten. Hiervoor maak je een VPN aan. Ga naar het virtual network in de azure portal. Open de Configure tab en check Configure point-to-site connectivity. Kies daarna een starting IP. Fig. 2: Point-to-site connectivity van virtual network De sectie eronder zal de melding geven dat een gateway nodig is. Klik add gateway subnet en wijzig indien nodig het starting IP. Kies Save en wacht tot alle wijzigingen zijn doorgevoerd. Fig. 1: Remote debugger extension installation Hiermee worden echter wel drie poorten geopend en dat is een optie die je mogelijk niet hebt. Dan moet een VPN gebruikt worden en de remote debugging tools. Virtual Network Een best practice is om je VM s in een virtual network te plaatsen. Hierdoor kunnen machines elkaar makkelijker vinden. Ook bied het een extra laag van beveiliging, omdat poorten voor interne communicatie niet naar de boze buitenwereld open staan. Fig. 3: Gateway van virtual network Open een Visual Studio Command prompt en maak een self-signed root certificate aan. Maak ook een authenticatie certificaat aan voor het root certificaat. 8 MAGAZINE

CLOUD makecert -sky exchange -r -n "CN=MyNetwork" -pe -a sha1 -len 2048 -ss My "MyNetwork.cer" makecert -n "CN=Developer" -pe -sky exchange -m 96 -ss My -in "MyNetwork" -is my -a sha1 Listing 1: Self-signed root certificate en authenticatie certificaat aanmaken Upload het root certificaat (MyNetwork.cer) op de Certificates tab. Dit wordt gebruikt om de client VPN te configureren. Op de Dashboard tab wordt de gateway nou weergegeven als niet aangemaakt. Klik CREATE GATEWAY, dit zal ongeveer 15 minuten duren. Als de gateway aangemaakt is, kun je de Client VPN Package downloaden en installeren. Start de VPN in Network Connections van Windows. Remote debugging Maak een Remote Desktop connectie naar de Azure VM. Download en installeer de visual studio remote debugging tools van Microsoft. Bij de eerste keer starten van de Remote Debugger moet deze geconfigureerd worden. Kies configure remote debugging om de defaults te gebruiken. Daarna opent de Remote Debugger en wacht op connectie van een machine. Fig. 4: Download client vpn package Open Visual Studio op de development machine. Ga naar Debug > Attach to Process Laat het transport op Default staan. Gebruik bij Qualifier het IP adres dat bij de machine staat op het virtual network dashboard (Figure 3) en de default poort 4018. Log in met dezelfde credentials als de Remote Desktop. Selecteer het process en klik Attach. Remote Debugging naar een Azure VM zonder poorten open te zetten. Conclusie Met remote debugging kun je ook in een Azure VM sneller bugs oplossen. OTAP in Windows Azure is de toekomst. De redenen om het niet te doen worden steeds minder. Links Remote debugging tools (http://www.microsoft.com/en-us/download/details.aspx?id=43724) Debugging a Cloud Service or Virtual Machine in Visual Studio (http://msdn.microsoft.com/en-us/library/azure/ff683670.aspx) Fig. 5: Attach to remote process Eric Tummers Eric Tummers is werkzaam als technisch consultant bij Valid en richt zich op kwaliteit in software development. Denk hierbij aan unit testen, build en deployment processen. Bloggen doet Eric voornamelijk over zijn werk, maar af en toe komt een thuis project erop te staan, een productiviteit tip of een review. Als het maar bijdraagt aan het sociale internet.in 2015 gaat Eric aan de slag met devops. Daarbij staan powershell en Windows Azure centraal. magazine voor software development 9

.NET / CLOUD Hassan Fadili Application Insights for Visual Studio Online (Part 2) In one of the previous SDN Magazines (Magazine 121), I have introduced Application Insights on VSO basics and usage of it on project level and on Visual Studio Online Dashboards. In this article, I will go a step further and explain & show How Application Insights can help by many scenarios to get more out telemetry of your Application / Systems? To make this concrete, I will walk through the following scenario: Use Application Insights to understand application behavior. To do so, I have split this scenario into the following tasks: Create MVC Web Application and Add Application Insights to It Create load / Web tests to simulate the scenarios. Use App Insights and Load test to validate the assumptions. By clicking Add Application Insights To Project, this process starts as shown below (Fig.3) where the NuGet packages needed are installed: To start, an ASP.NET MVC Web Application is created. During this creation, the Application Insights are added to that MVC Web Application as shown below (Fig 1): Fig. 3: Adding progress of AI to Project and NuGet packages Install process Once this step is finished, the Application Insights.config and Web ApplicationI Ovreview files are added to project as shown below (Fig.4): Fig. 1: Creation of MVC Web Application with Add Application Insights selected As part of the Add Application Insights Process, a resource MUST be specified to send telemetry to. This can be an existing resource or a new created one as shown below (Fig 2): Fig. 2: Add Application Insights to Project and specifying the resource to send telemetry to Fig. 4: Added Application Insights Resources to Project 10 MAGAZINE

.NET / CLOUD Beside the Application Insights Resources added to Project, there are also some Application Insights References added to the project as well. This specific references are shown below (Fig.5): Open Application Insights from Visual Studio (Solution Explorer) guides to VSO Dashboard: Fig. 7: Opening AI from Solution Explorer guides to VSO Dashboard Because the VSO Dashboard is on Microsoft Azure, the user MUST be authenticated and authorized to access the specific Azure Instance by signing to it as shown below (Fig.8): Fig. 5: Application Insights Specific References added to Project To examine the added ApplicationInsights.config, this can be opened by double click on It. The content of it is shown below (Fig.6): Application Insights Configuration file content: Fig. 8: Signing to Azure Portal for Accessing Application Insights on Project Level in Microsoft Azure By Signing into Microsoft Azure Portal with the right credentials (Email and Password), Microsoft Azure Portal is shown and Application Insights can be added as Tile on this Dashboard as shown below (Fig.9 + Fig.10) Adding Application Insights to Project from Azure Portal: Fig. 6: Application Insights Configuration File Content Once the Add process and examining the Application Insights content on Visual Studio are done, the next step can be to get into Visual Studio Online Dashboard (VSO) to see the Application Insights Information in action. This can be done in 2 ways: By right click the Web Application Overview file and select Open Application Insights (see below Fig.7) By double click on the same Web Application Overview file Fig. 9: Adding AI to Azure Project Dashboard magazine voor software development 11

.NET / CLOUD Adding Application Insights from Azure Portal Futures to Project: Progress of Adding AI to Project on Azure Portal: Fig. 10: Adding Application Insights to Project from Azure Portal Futures To be more specific on this add process, the user MUST specify the Web Application Information that can be used to be added as shown below (Fig.11) like: Application Name Application Type Resource Group Subscription Location Fig. 12: Progress of Adding Application Insights to Project on Azure Portal From this point, all Application Insights information of a specific Web Application can be analyzed from the Application Insights Dashboard like Events a shown below (Fig.13): Status of Application Insights Events on Azure Portal after Creation: Application Information Specifying for Application Insights on the Azure Portal: Fig. 13: Status of AI Events on Azure portal after Creation To monitor telemetry for the Web Application, the selected source code below (Fig.14) MUST be added to all pages that must be tracked for Application Insights telemetry like we have done below for Index.cshtml file: Adding Source code to all webpages that have to be tracked for Application Insights: Fig. 11: Application Information to be added for Application Insights on Azure Portal When all the necessary information is provided, the user can click on Create button and creation progress is shown on the Microsoft Azure Dashboard as shown below (Fig.12) Fig. 14: Code to be added to all Web Pages that have to be tracked for AI 12 MAGAZINE

.NET / CLOUD When all the specific pages are updated with the code above (Fig.14), The Web Application can be compiled and executed. At that moment the first Application Insights Events are sent to Visual Studio Online Dashboard that is configured as show below (Fig.15) Overview Page Views Information on Azure Portal: First Application Insights Events sending to Azure Portal after Adding code to Specific Page(s) that have to be tracked: Fig. 18: More Application Insights Info (Page Views) on Azure Dashboard Overview Page Views Charts Information on Azure Portal: Fig. 15: First Application Insights Events sent to Azure Portal after adding the specific source code to It Below (Fig.16, Fig.17, Fig.18, Fig.19, Fig.20 ) some specific Application Insights Information you can track from the Microsoft Azure Portal on Visual Studio Online like: TimeLine overview Pages Views Page Views Charts Diagnostic Search Overview TimeLine Information on Azure Portal: Fig. 19: Application Insights Page Views Charts Info Configuration Overview Diagnostic Search Information on Azure Portal: Fig. 20: Application Insights-Diagnostic Search on Azure Dashboard Fig. 16: Overview TimeLine Information on Azure Portal Usage TimeLine Information on Azure Portal: Creating Load Test / Web Test for the application and Instrument It: Adding Load / Performance Test Project to Solution for instrumen - tation: Fig. 17: Usage TimeLine Information on Azure Portal Fig. 21: Adding Web-Performance-Load Test Project magazine voor software development 13

.NET / CLOUD Running Web Test of AI_WebApplication: Fig. 25: WebTest Results after investigation in Visual Studio Fig. 22: Running Web Test Status of AI_WebApplication After you've deployed your web application, you can set up web tests to monitor its availability and responsiveness. Application Insights will send web requests at regular intervals from points around the world, and can alert you if your application responds slowly or not at all. So we can act directly by tracking all information needed on applica tion level and simulate the load and usage of our application / System. Because of the good integration of Visual Studio, Visual Studio Online and Microsoft Azure Dashboard, we can request all Application Insights information for our applications to track like: Application Health Diagnostics Performance Usage Analytics ( X Days) Operations Access In the next series of this articles, I will take this topic a step further and walk through other cool Application Insights futures and configurations. So I will discuss the Segmentation; Application Insights support for Multiple Environments, Stamps and App Versions; Search your logs instantly using property filters. Stay Tuned ;-). Fig. 23: Web Tests Response time (ms) NB: You can set up web tests for any HTTP endpoint that is accessible from the public internet. Overview All WebTest Response Information on Azure Portal: Links: Getting started with Application Insights: http://azure.microsoft.com/en-us/documentation/articles/ app-insights-get-started/ Channel 9: Application Insights overview: https://channel9.msdn.com/events/visual-studio/connect-event- 2014/216 Application Insights SDK: http://blogs.msdn.com/b/visualstudioalm/archive/2014/10/21/ application-insights-sdk-0-11-0-prerelease.aspx Application Insights: Exception Telemetry http://blogs.msdn.com/b/visualstudioalm/archive/2014/12/12/ application-insights-exception-telemetry.aspx Monitor any web site's availability and responsiveness: http://azure.microsoft.com/en-us/documentation/articles/ app-insights-monitor-web-app-availability/ Web tests for Microsoft Azure Websites: http://azure.microsoft.com/en-us/documentation/articles/ insights-create-web-tests/ Hassan Fadili Fig. 24: All Web Test Investigation of Failed Request Failed tests can be analyzed to determine why they failed. Drill into a failed web test and download and open Visual Studio Web Test Result File to analyze and understand why the test failed. After investigation in Visual Studio by correcting the WebTest errors, the results looks like below on the Microsoft Azure portal (Fig.25): Conclusion: With the actual Application Insights future in Visual Studio Online, we have more control on the status of our applications / Systems in terms of investigation when things goes wrong or applications / systems failed. Hassan Fadili is werkzaam als Freelance Lead Architect / Consultant en VS ALM Consultant (MVP) voor zijn eigen bedrijf FadiliCT Consultancy (http://www.fadilict-consultancy.nl). Hassan is zeer actief in de Community en mede bestuurslid van DotNed (.NET & VS ALM UG NL) en VS ALM Track Owner. Hassan houdt zijn blog op: http://hassanfad001. blogspot.com en te bereiken via: hfadili@fadilict-consultancy.nl, hassan@dotned.nl, hassanfad11 @hotmail.com en/of via Twitter op: @HassanFad 14 MAGAZINE

SQL Jeffrey Verheul Decrease dataflows between systems with CDC Dealing with data is becoming a bigger challenge every day, if you work with a wrongly designed system. And haven t we all been there? One of the senior software engineers designed the system, and tested it with 10.000 records. But in the past few years, he left, and the system increased so much in size, that it s impossible to work with it. And now a new invoice system (or a BI team for example) needs to read data from the same system. Throwing hardware at the problem isn t an option, so what do you do next? In the past, reading data from that one core production system wasn t an issue. The invoice processes ran at night, and the process used to finish before the first employee got in the office in the morning. But with the amounts of data currently being poured in the system, this becomes impossible. Redesigning the system takes up too much time and money, so that s off the table. So how do you technically solve this puzzle, without rebuilding your entire architecture? What is CDC? CDC (Change Data Capture) is a feature that s included in SQL Server Enterprise. This gives you the opportunity to capture Inserts, Updates and Deletes of records on specific objects. This can be used to perform incremental updates to the invoice system, instead of reading the entire content of the database at night. So how does it work? In SQL Server, every change you make to a record or table, is stored in the transaction log before your database is changed on disk. CDC reads the transaction log, and records all changes on the tables you have enabled CDC on. Enabling CDC Enabling CDC is as easy as running a query. First, let s create some resources: /* Create a database */ CREATE DATABASE CompanyInfo GO /* Use the database we just created */ USE CompanyInfo GO /* Create the Customer table */ CREATE TABLE dbo.customer (CustomerID INT IDENTITY(1,1), FirstName VARCHAR(50), LastName VARCHAR(50), PhoneNumber VARCHAR(50), AccountNumber VARCHAR(50), CONSTRAINT PK_Customer PRIMARY KEY(CustomerID)) GO In order to use CDC, we need to enable CDC on the database, and on the table: USE CompanyInfo GO /* Enable CDC on database */ EXEC sys.sp_cdc_enable_db GO /* Enable CDC on table */ EXEC sys.sp_cdc_enable_table @source_schema = 'dbo', @source_name = 'Customer', @supports_net_changes = 1, @role_name = NULL, @index_name = 'PK_Customer', @captured_column_list = 'CustomerID, FirstName, LastName, AccountNumber' GO The query above only captures changed on the FirstName, Last- Name and AccountNumber columns (ID needs to be included, because it s the primary key on the table). Changes on the Phone- Number column aren t interesting for the invoice system. If you do want to capture changed to that column, you can add it to the list passed into @captured_column_list parameter. Another option is to leave out the @captures_column_list parameter, so it will capture all columns in the table. After running these statements, SQL Server created a number of objects for CDC. The most important things: 2 functions you can query to get data, 2 jobs (capture and cleanup), and a Customer_CT table (system table), where the data changes are stored. Capture and Cleanup As long as the SQL Server Agent is running, changes are captured. The capture job, that is responsible for capturing all changes on CDC-enabled tables, runs every 5 seconds by default. This value can be changed, but I ve never seen a reason to change this. The cleanup job is responsible for removing old data from the Customer_CT table. By default, old data is removed after 4320 minutes (3 days). You can change this by executing this statement: magazine voor software development 15

SQL USE CompanyInfo GO /* Change the retention for cleanup */ EXEC sys.sp_cdc_change_job @job_type = 'cleanup', @retention = 7200 GO /* Check the result of the change */ SELECT job_type, retention FROM msdb.dbo.cdc_jobs In this case the retention of the data is changed to 7200 minutes. This means that old data is deleted after 5 days. This setting gives you the opportunity to feed the invoice system with data for 5 days. This could help you if there is downtime of your system, or if you have a maintenance windows for the system every week for example. If that s not needed, you could set it to a smaller value. How larger the value is, how longer you could query the change data, but also the more storage you need to store the change data. Querying the data Now that we re storing the changed data, how do we query it? There are several options, all with their own pros and cons. Before we start querying the data, let s insert and update a record in the table: USE CompanyInfo GO /* Insert a customer record */ INSERT INTO dbo.customer (FirstName, LastName, PhoneNumber, AccountNumber) VALUES ('John', 'Doe', '555-6162', 'AA-5206204855882426') GO /* Update the LastName of the customer */ UPDATE dbo.customer SET LastName = 'Smith' WHERE LastName = 'Doe' GO The best practice to query the data, is to use the build-in functions. These functions (all_changes for the entire change set, or net_changes for the combined changes), all work with LSN s (Log Sequence Numbers). An LSN uniquely identifies a record in the SQL Server transaction log. These LSN s can be translated to a readable datetime datatype. Also, a datetime datatype can be translated in an LSN. Translating can be done with the build-in functions: /* Translate LSN to datetime */ SELECT sys.fn_cdc_map_lsn_to_time(0x00000000000000000000) GO /* Translate datetime to LSN */ SELECT sys.fn_cdc_map_time_to_lsn('smallest greater than or equal', '1900-01-01') GO With these functions, you can create your own window of data extraction. In practice this means that you can start your invoice process at 10PM, and in that window query data changed from yesterday 10PM, till today 10PM. Another option is to only query changes for a specific day, for example between 10AM and 2PM on Wednesday. The possibilities are endless, and can be fully customized to work for your system. So how does this look in the 2 different functions? As you can see, the all_changes function will return the inserted record (operation code 2), and the record after the update (operation code 4). The net_changes function, returns the combined result within the window you created. In this case, the inserted and updated record are combined within a single record. Another option you have, is to retrieve data directly from the Customer_CT table. This option isn t considered a best practice, but you have the opportunity to do that if that suits you better. Design decisions If you decide to use CDC, there are some design decisions you need to take a look at. One of the first things you need to think about is storage. Data changes are captured and stored, so you need some extra storage to save these records. Another thing to think about, is the way your invoice system reads data from the primary system. If you re going to use CDC, you might need to change the way data is retrieved. But these changes might be easier, and much safer than changing your primary system. And if you use SQL Server Integration Services (SSIS) for example, there are some standard components you could use. The changed you need to make depend on the system and architecture you have in your company. Conclusion With the options you ve seen you can decide what works the best for your system. There are alternatives you could use, but these options all require system changes, or are more intrusive on your system than CDC. For example, you could use triggers on your tables, but those tend to slow down your system.one thing is certain: CDC reduces the amount of data that needs to be exchanged between systems, and the time needed to update secondary systems by a lot. And maybe even more important to the business, it saves you from a huge investment needed to re-design the entire system! Personally, I would say CDC isn t the silver bullet that solves all your cross-system dataflow problems, but it is very effective when you use it the way it was intended: capture changes in a very lightweight way. The only real downside of CDC is that it s an Enterprise-only feature. But the flexibility and compatibility (for example with SSIS and BIML) makes up for these shortcomings. CDC is definitely something to take a look at, even if you re not a data professional! Jeffrey Verheul Jeffrey Verheul is a DBA and database developer from the Netherlands, with over 10 years experience in the Microsoft stack. After a short side-track as a software engineer, he returned to his true love: SQL Server. His main focus is on database development, performance tuning and database administration. He is a member of the Friends of Red Gate, and blogs regularly on devjef.wordpress.com. You can contact him on his blog, or via Twitter (@DevJef). 16 MAGAZINE

CLOUD Marcel Meijer Azure Webjobs Tijdens de afgelopen Microsoft Techdays 2014 deed ik een sessie over Azure Cloud Services. De opname is te vinden op Channel 9. In het begin van Azure waren Cloud services de way to go. Cloud Servies is een krachtig concept, maar er kleefde ook de nodige nadelen aan. Bestaande applicaties konden niet zomaar via de Lift en Shift methode naar de Cloud gebracht worden. Meestal was dit gewoon te wijten aan de applicaties zelf. Weinig applicaties zijn of waren zuiver stateless, asynchroon in de basis en in staat als meerdere instanties naast elkaar te draaien. Zoals gezegd bestond het uit een WebRole en een WorkerRole. De WebRole voor het uploaden en bekijken van de plaatjes. In de afgelopen jaren is het Azure platform rijker geworden met verschillende diensten. In plaats van iets zelf te verzinnen of te kopieren van anderen, zijn er nu bestaande tools/producten opgepakt en in samenwerking geschikt gemaakt voor Azure (Hadoop, Docker, etc). Maar ook is IT development een stuk volwassener geworden. Developers en architecten realiseren zich steeds vaker dat Scale up niet helpt met availability, dat services/servers stuk gaan en dat een internet applicatie de potentie van een miljoenen publiek heeft. Standaard dogma s als SOA architecture, Servicebussen of SOAP webservices lijken ook hun kracht te verliezen, Microservices krijgen meer draagvlak en betere tooling. Daarover ga ik zeker nog vaker bloggen. Terug naar mijn Techdays demo. Die zag er zo uit: De flow van de applicatie zag er zo uit. Zoals je ziet, de WebRole moest naast het uploaden ook een bericht op een queue zetten voor de WorkerRole. Aan de WorkerRole kant moet er een mechanisme zijn om de queue leeg te lezen. Zoals ik vertelde in mijn sessie, moet je dan ook het Busy waiting oplossen. Het lezen van de queue is een transactie en dat kost geld. Een belangrijk onderdeel van architectuur op Azure is Cost Based design. Dus wil je het lezen van bijvoorbeeld een queue zo efficiënt en effectief mogelijk houden met het oog op de kosten. Op Azure zijn tegenwoordig Webjobs beschikbaar. Met deze webjobs is het mogelijk om deze te laten triggeren na het toevoegen van een nieuwe blob op storage. Dat scheelt in mijn geval een bericht op de queue en eigen check actie van de queue. Het hele wachten en kijken of er werk (nieuwe blob op storage) is, wordt nu door het platform verzorgd en geregeld. En wat ik niet hoef te doen, dat scheelt tijd en het platform kan dat efficiënter. Dus de WorkerRole wordt vervangen door een Webjob. De WebRole heeft ook een alternatief. Moest ik voor de WebRole toch nog iets aparts leren, zoals bijvoorbeeld het lezen van de configuratie settings. Met een Azure Website kan ik de technieken gebruiken die ik altijd al gebruikte. En voor de settings zie je in mijn vorige blogpost de oplossing. Het proces plaatje ziet er dan zo uit. De solution zag er zo uit. De code is te downloaden of op te vragen. magazine voor software development 17

CLOUD En de website ziet er na een kleine redesign zo uit. De WorkerRole besloeg ongeveer het dubbele aantal regels code, waarvan het grootste gedeelte zaken die niets met het proces te maken hebben. Op deze manier krijg je precies zoals ik altijd zeg tijdens presentaties. We kunnen ons richten op de functionaliteit en het echte werk, de rest wordt overgenomen en geregeld door het Azure platform. Nu moet de Client op een andere manier genotificeerd worden en niet op een queue hoeven te kijken. NB In dit artikel beweer ik niet dat Cloud Services niet bruikbaar zijn. Voor het hier genoemde scenario waren de uitgebreide mogelijk heden van Cloud Services niet nodig. Er is op de Azure site (http:/ /azure. microsoft.com/nl-nl/documentation/articles/choose-web-site-cloudservice-vm/) een vergelijkend overzicht van de mogelijk -heden tussen de verschillende oplossingen. En de code van de Webjob is eigenlijk alleen dit, ongeveer 55 regels. Marcel Meijer Marcel is een allround Microsoft Architect en Microsoft Cloud specialist bij Xpirit Nederland (www.xpirit.com), Marcel heeft al meerdere bedrijven geholpen met succesvolle Cloud/Microsoft Azure implementaties. Hij is voorzitter van de Software Development Network (SDN), redacteur end event organisator. Hij is ook een frequente blogger en spreker op verschillende community events en conferences in Nederland. Since 2010 mag hij zich Microsoft MVP noemen. TIP: Macro s in Excel Werken niet meer na Office update Als je Excel 2013 macro s bevat en deze werken niet meer na de laatste Office update. De oplossing hiervoor is, zoek het bestand MSForms.exd op. Deze staat normaal gesproken in de folder C:\Users\user.name\AppData\Local\Temp\Excel8.0\. Verwijder het bestand MSForms.exd. Bij het opnieuw opstarten van Excel 2013 wordt dit bestand opnieuw aangemaakt. Daarna werken alle VBA macro s werken weer. 20 maart SDN Event Zeist 18 MAGAZINE

GENERAL Sander Hoogendoorn Microservices. The good, the bad and the ugly Back in 1988, when I was first employed by a company for writing software, the world was fairly simple. The development environment we had was character-based, the database was integrated and traversed with cursors, and we built a whole new administrative system covering everything but the kitchen sink. It took us five years to complete the project, basically because the client kept changing his mind every now and then, and because every change in the code could break code elsewhere in the system. Unit testing hadn t been invented yet, and testing was done by the end users. In production.. So far for monoliths. Then in 1994 I joined a company that build desktop applications - remember the world wide web was only a couple of years old, and web applications hadn t been invented yet. We used a great tool called PowerBuilder and now we had two components to worry about; the application on the desktop and the database on the server. The applications we build usually served departments or sometimes even a whole company. Not highly complicated, but not highly scalable either. Ah well, we had fun as long as the client-server paradigm lasted. Component based development The world got more complex in the mid-nineties. Companies wanted web applications, basically running on intranets to get rid of desktop deployments. And applications needed to serve multiple departments, and sometimes even break company borders. A new paradigm set in: component based development, also known as CBD. The paradigm promised us re-use, scalability, flexibility and a way to harvest existing code (usually written in COBOL). We started breaking up our systems into big functional chunks, and tried hard to have those components communicate to each other. Java was invented and everybody now wanted to write code in Java (apparently some people still to this nowadays). Components where running in impossible technologies such as application servers and CORBA (to impress your co-workers, look that one up on Wikipedia). The good old days of object request brokers! At that time I was working for a large international bank trying to set up an methodology for doing component based development. Even with a heavily armed team of Anderson consultants it took us three years to write the damn thing. In the end both the paradigm and the technology where too complex to write decent and well-performing software. It just never took off. Service oriented architecture At that point in time, the early years of this century, I thought we got rid of distributed software development, and happily started building web applications. I guess everyone bravely ignored Martin Fowler s first law of distributed objects: do not distribute your objects. Gradually we moved into the next paradigm of distributed computing, re-packaging the promises of component based development into a renewed set of technologies. We now started doing business process modeling (BPM), and implemented these processes in enterprise services buses (ESB s), with components delivering services. Fig. 1: Scary stuff, an object request broker architecture Fig. 2: An enterprise service bus magazine voor software development 19

GENERAL We were in the age of service oriented architecture, better known as SOA. Coming from CBD, SOA seemed easier. As long as your components - the producers - were hooked into the enterprise service bus, we figured out how to build-up scalable and flexible systems. We now had much smaller components that we could actually extract from our existing systems (now not only written in COBOL, but also in PowerBuilder,.NET and Java). The mandatory design patterns books where published and the world was ready to go. This time we would crack it! I found myself working for an international transport company, and we happily build around SAP middleware delivering both ESB and BPM tooling. We now not only needed regular Java and.net developers, but we employed middleware developers and SAP consultants as well. And although agile was introduced to speed up development (I know, this is not the right argument), projects still suffered from sluggishness and moreover, when we got pieces of the puzzle in place, we started to realize that integration testing and deployment of new releases got more complicated by the day. At last: microservices! I do hope you forgive me this long and winding introduction to the actual topic: microservices. You might think: why do we need yet another article on microservices? Isn t there enough literature already on the topic. Well yes there is. But if you look closely to the flood of articles that you find on the internet, most of them only describe the benefits and possibilities of microservices (sing hallelujah), some of them take a look at the few famous path finding examples (Netflix, Amazon, and Netflix, and Amazon, and Netflix ). Only a few articles actually dig a bit deeper, and they usually consist of summing up the technologies people seem to be using when implementing microservices. It s still early in the game. That s were a little historical perspective won t hurt. I find it interesting to witness that the benefits and possibilities of the predecessors of microservices are still with us. Microservices seem to promise scalable and flexible systems, based on small components that can easily be deployed independently, and thus promote use of the best choice in technologies per component. Basically the same promises we fell for with CBD and SOA in the past. Nothing new here, but that doesn t mean that microservices aren t worthwhile investigating. Is it different this time around? So why is it different this time? What will make microservices the winning paradigm, where its predecessors clearly were not? What makes it tick? As a developer, there s no doubt that I am rather enthusiastic about microservices, but I was enthusiastic as well (more or less) when people came up with CBD and SOA. I do suppose there are differences. For the first time we seem to have the technology in place to build these type of architectures. All the fancy and complex middleware is gone, and we rely solely on very basic and long-time existing web protocols and technologies. Just compare REST to CORBA. Also we seem to understand deployment much better, due to the fact that we ve learned how to do continuous integration, unit testing, and even continuous delivery. These differences suggest that we can get it to work this time around. Still, from my historical viewpoint some skepticism is unavoidable. Ten years ago, we also really believed that service oriented architecture would be technologically possible, it would solve all our issues, and we would be able to build stuff faster, reusable and more reliable. So, to be honest, the fact that we believe that the technology is ready, is not much of an argument. Meanwhile the world also got more complex. Over the last year I ve been involved with a company that is moving away from their mainframe (too expensive) and a number of older Java monoliths (too big, and hard to maintain). Also time-to-market plays an important role. IT need to support introducing a new product in months, if not in weeks. So we decided to be hip and go micro - services. Here s my recap of the good, the bad and the ugly of microservice architectures, looking back on our first year on the road. The good Let s start with the good parts. We build small components, each offering about two to six services. Good examples of such small components are a PDF component, that does nothing more than generate PDF s from a template with some data, or a Customer component that allows users to search for existing customers. These components offer the right size. The right size of code, he right size of understandability, to right size to document, to test an to deploy. The good Our team tend to evolve towards small teams designing, implementing and supporting individual components. We didn t enforce ownership, but over time small teams are picking up the work on a specific component and start feeling responsible for it. When we outlined the basic architecture for our microservices landscape we set a number of guidelines. We are not only building small components, but are also building small single-purpose web applications. Applications can talk to other applications, and can talk to components. Components handle their own persistence and storage, and can also talk to other components. Applications do not talk directly to storage. Components do not talk to each others storage. For us these guidelines work. Microservices lives up to some of its promises. You can pick the right technology and persistence mechanisms for each of you components. Some components persist to relational databases (DB2 or SQLServer), others persist to document databases (MongoDB in our case). The hipster term here of course is polyglot persistence. We also stated that every application and component has it s own domain model. We employ the principles and patterns of domain driven design straightforward. We have domain objects, value objects, aggregates, repositories and factories. Because our components are small, the domain models are fairly uncomplicated, and thus maintainable. Although we have had quite a journey towards testing our components and services, from Fitnesse to hand-written tests, we are now moving towards testers specifying tests in SoapUI, which we are running both as separate tests and during builds. We had to learn to understand REST, but we ve got this one figured out for now. Andtesters love it. 20 MAGAZINE