Design Patterns for Distributed Systems
Total Page:16
File Type:pdf, Size:1020Kb
Azure, Flutter, GraphQL, Vue, NuGet SEP OCT 2019 Design Patterns for Distributed Systems codemag.com - THE LEADING INDEPENDENT DEVELOPER MAGAZINE - US $ 8.95 Can $ 11.95 - US $ 8.95 Can MAGAZINE THE LEADING INDEPENDENT DEVELOPER - codemag.com Implementing GraphQL APIs VUE.js for jQuery Developers Azure Machine Learning ASP.NET * Visual Studio * Azure * Artificial Intelligence * .NET Core * Angular Architecture * Azure Databricks * Azure IoT * Azure Sphere * Big Data * Blazor * C# 8 * Cloud Security Cognitive Services * CosmosDB * Data Science & VMs Deep Learning * DevOps Docker * IoT * Kubernetes Machine Learning * Microservices * Node.js * Python * React Security & Compliance Scalable Architectures * SignalR Core * SQL Server * Visual Studio * Xamarin * and so much more 200+ Sessions 100+ Microsoft and industry experts Full-day workshops Evening events MGM GRAND LAS VEGAS, NV NOVEMBER 18 – 21, 2019 SCOTT ERIC GUTHRIE BOYD Executive Vice President, Corporate Cloud + AI Platform, Vice President, Microsoft AI Platform, Microsoft SCOTT SCOTT RICHARD DAN MARKUS HANSELMAN HUNTER CAMPBELL WAHLIN EGGER Principal Program Director of Program Host, .NET Rocks! Google GDE, President and Chief Manager, Web Platform Management .NET, Entrepreneur, Advisor, Developer, Software Architect, Team, Microsoft Microsoft Rabid Podcaster Wahlin Consulting EPS Software Corp. JEFF JOHN ZOINER MICHELE L. KIMBERLY L. FRITZ PAPA TEJADA BUSTAMANTE TRIPP Senior Program Principal Developer CEO & Architect, CIO & Architect, President / Founder, Manager, Microsoft GET THE Advocate, Microsoft Solliance Solliance SQLskills INSIDER VIEW REGISTER EARLY for a WORKSHOP PACKAGE and receive a choice of Surface Go, Xbox One X, Xbox One S, Surface Headphones, Cortana-enabled Amazon Echo or hotel gift card! See website for details. BOB KATHLEEN ANNA ROBERT WARD DOLLARD THOMAS GREEN Principal Architect Azure Principal Program Data & Applied Scientist, Technical Evangelist, Data/SQL Server Team, Manager, Microsoft Microsoft DPE, Microsoft Follow us on: twitch.tv/devintersection Microsoft Twitter: @DEVintersection Facebook.com/DEVintersection LinkedIn.com/company/devintersectionconference/ Twitter: @AzureAIConf Facebook.com/MicrosoftAzureAIConference LinkedIn.com/company/microsoftazureaiconf/ Powered by DEVintersection.com DEVintersection.com 203-264-8220 M-F, 9-4 EDT AzureAIConf.com 203-264-8220 M–F, 9-4 EDT ASP.NET * Visual Studio * Azure * Artificial Intelligence * .NET Core * Angular Architecture * Azure Databricks * Azure IoT * Azure Sphere * Big Data * Blazor * C# 8 * Cloud Security Cognitive Services * CosmosDB * Data Science & VMs Deep Learning * DevOps Docker * IoT * Kubernetes Machine Learning * Microservices * Node.js * Python * React Security & Compliance Scalable Architectures * SignalR Core * SQL Server * Visual Studio * Xamarin * and so much more 200+ Sessions 100+ Microsoft and industry experts Full-day workshops Evening events MGM GRAND LAS VEGAS, NV NOVEMBER 18 – 21, 2019 SCOTT ERIC GUTHRIE BOYD Executive Vice President, Corporate Cloud + AI Platform, Vice President, Microsoft AI Platform, Microsoft SCOTT SCOTT RICHARD DAN MARKUS HANSELMAN HUNTER CAMPBELL WAHLIN EGGER Principal Program Director of Program Host, .NET Rocks! Google GDE, President and Chief Manager, Web Platform Management .NET, Entrepreneur, Advisor, Developer, Software Architect, Team, Microsoft Microsoft Rabid Podcaster Wahlin Consulting EPS Software Corp. JEFF JOHN ZOINER MICHELE L. KIMBERLY L. FRITZ PAPA TEJADA BUSTAMANTE TRIPP Senior Program Principal Developer CEO & Architect, CIO & Architect, President / Founder, Manager, Microsoft GET THE Advocate, Microsoft Solliance Solliance SQLskills INSIDER VIEW REGISTER EARLY for a WORKSHOP PACKAGE and receive a choice of Surface Go, Xbox One X, Xbox One S, Surface Headphones, Cortana-enabled Amazon Echo or hotel gift card! See website for details. BOB KATHLEEN ANNA ROBERT WARD DOLLARD THOMAS GREEN Principal Architect Azure Principal Program Data & Applied Scientist, Technical Evangelist, Data/SQL Server Team, Manager, Microsoft Microsoft DPE, Microsoft Follow us on: twitch.tv/devintersection Microsoft Twitter: @DEVintersection Facebook.com/DEVintersection LinkedIn.com/company/devintersectionconference/ Twitter: @AzureAIConf Facebook.com/MicrosoftAzureAIConference LinkedIn.com/company/microsoftazureaiconf/ Powered by DEVintersection.com DEVintersection.com 203-264-8220 M-F, 9-4 EDT AzureAIConf.com 203-264-8220 M–F, 9-4 EDT TABLE OF CONTENTS Features 8 Azure Machine Learning Workspace and MLOps 46 Nest.js Step-by-Step: Part 2 It’s when you’re working with lots of data that you start looking around Bilal continues showing us just how interesting, useful, and easy it is for an easier way to keep track of it all. Machine learning and artificial to integrate Nest.js with TypeORM. You’ll get to replace mock data from intelligence are the obvious answers, and Sahil shows you why. the first article with real data this time, too. Sahil Malik Bilal Haidar 16 A Design Pattern for Building WPF Business Apps: 54 Cross-Platform Mobile Development Using Part 3 Flutter In the third installment of his WPF series, Paul shows you how to get Using Flutter, Google’s latest cross-platform framework for developing feedback using an Entity Framework entity class. He also shows you how to iOS and Android apps, Wei-Meng shows you how easy developing start expanding user activities, like adding, editing, or deleting screens. mobile-apps can be. Paul D. Sheriff Wei-Meng Lee 24 Responsible Package Management in Visual 70 Add File Storage to Azure App Services: The Studio Work Around If you use a package management tool, like NuGet, Node Package Manager When maintaining the hierarchy of a file system and integrating (NPM) for JavaScript, or Maven for Java, you already know how they security limits you to a single point of access, you might have some simplify and automate library consumption. John shows you how to make heavy lifting to do while you wait for Microsoft to supply a tool to sure that the packages you download don’t cause more troubles than they automate this task. Mike and his team found a great work-around that solve. will keep you happy until the tool is available. John V. Petersen Mike Yeager 30 Moving from jQuery to Vue Even if you don’t need the enormity of a SPA, you don’t have to lose the benefits of a framework. Shawn recommends using Vue to simplify the code and make it both more reliable and more testable. Columns Shawn Wildermuth 74 Managed Coder: On Time 36 Intro to GraphQL for .NET Developers: Schema, Ted Neward Resolver, and Query Language Peter introduces you to GraphQL so your REST API client list can grow and change without a lot of pain. You can use strongly typed schema, eliminated over- and under-fetching, and you can get analytics about how clients are really using your API. Departments Peter Mbanugo 6 Editorial 42 Design Patterns for Distributed Systems Stefano explores using containers for reusable components and patterns to 38 Advertisers Index simplify making reliable distributed systems. He leans on microservices to place all functionality within a single application. Stefano Tempesta 73 Code Compilers US subscriptions are US $29.99 for one year. Subscriptions outside the US pay US $49.99. Payments should be made in US dollars drawn on a US bank. American Express, MasterCard, Visa, and Discover credit cards are accepted. Bill Me option is available only for US subscriptions. Back issues are available. For subscription information, send e-mail to [email protected] or contact Customer Service at 832-717-4445 ext. 10. Subscribe online at www.code-magazine.com CODE Component Developer Magazine (ISSN # 1547-5166) is published bimonthly by EPS Software Corporation, 6605 Cypresswood Drive, Suite 300, Spring, TX 77379 U.S.A. POSTMASTER: Send address changes to CODE Component Developer Magazine, 6605 Cypresswood Drive, Suite 300, Spring, TX 77379 U.S.A. 4 Table of Contents codemag.com EDITORIAL Code Smells Are Universal Over the years, I’ve become fluent in several programming languages: C#, JavaScript, Visual Basic .NET, Ruby, FoxPro, and a few others. Last month, I started the process of adding Python to my repertoire because my development team is currently in the process of building a data processing platform. This platform pulls data from multiple sources of At first blush, this was a good sign. This code “smells” I know that THIS is not an interesting story. The data and uses Python (with its rich ecosystem of rather nice. Upon further digging, I found some code interesting part is that I was able to identify a statistical libraries), to run various models over that has a distinctly unpleasant odor. The main pro- code smell in an unfamiliar programming lan- the data. I was tasked with integrating these Py- gram accepted a number of dynamic command argu- guage. You see: Code Smells are Universal. Let’s thon modules into our ETL pipeline, so I asked ments. These parameters read and assigned to dif- take a look at some JavaScript code used to vali- the data analyst for a copy of the code to deter- ferent memory variables. Okay, so far so good. Where date the format of a date string in Figure 1. For mine first, how it works and second, how I was was the smell? The smell came from a called module reference, the correct format of the string is as going to integrate this code into our pipeline. that reread the command line arguments: follows: 1977-05-25 01:30 pm I spent some time with the developer. The smell start_date =