ebook img

Better Living PDF

108 Pages·2016·22.6 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Better Living

THE MICROSOFT JOURNAL FOR DEVELOPERS AUGUST 2016 VOL 31 NO 8 magazine Better Living Through DevOps....16, 24, 30 All trademarks or registered trademarks are property of their respective owners. 0816msdn_CoverTip_8x10.75.indd 1 7/11/16 12:14 PM 0716msdn_CoverTip_8x10.75.indd 2 6/8/16 11:57 AM S R E P O L E V E D R O F L A N R U O J T F O S O R C I M E H T V 6 1 0 2 T S U G U A OL 31 NO 8 magazine eB et iL r iv ng gu o r h T eD0 3 h , 4 2 , 6 1 . . . . s p O v From Code to Customer: COUL M N S Exploring Mobile DevOps CUT T I N G E D G E arK igmhcskco rB itd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Beyond CRUD: Commands, Events and Bus Dino Esposito, page 6 Applying DevOps to a A P O T I N T S AD Software Development Project EF Core Change-Tracking etuo W ed r ro K iW ,t ahcS yl a bu naM d it adlökS s . . . . . . . . . . . . . . . . . 42 Behavior: Unchanged, Modifed and Added Commit to Git: Source Control Julie Lerman, page 10 in Visual Studio 2015 TES T R U N noJ aaht naW mdl an . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 03 Lightweight Random Number Generation Write Apps with Visual Studio Code James McCaffrey, page 64 and Entity Framework THE W O R K I N G elA as neD ord eloS l . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 P R O G R A M M E R How To Be MEAN: Real-World ASP.NET Core MVC Filters Exploring ECMAScript Ted Neward, page 70 etS ev mS iht . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 D O N ’ T G E T M A E R T S E T D Sing a Song of Silicon David Platt, page 80 0816msdn_C1_v1.indd 1 7/12/16 12:19 PM ROYAL PACIFIC RESORT AT UNIVERSAL DECEMBER 5-9 êĠ8OWLPDWĠ(GXFDWLRŨ'HVWLQDWLRŨ Live! 360SM is a unique conference where the IT and Developer community converge to debate leading edge technologies and educate themselves on current ones. These six co-located events incorporate knowledge transfer and networking, along with finely tuned education and training, as you create your own custom conference, mixing and matching sessions and workshops to best suit your needs. Choose the ultimate education destination: Live! 360. EVENT PARTNERS PLATINUM SPONSOR GOLD SPONSOR SUPPORTED BY Untitled-6 2 7/13/16 1:04 PM 7DNĠWKĠ7RXU Visual Studio Live!: VSLive!TM is a victory for code, featuring unbiased and practical development training on the Microsoft Platform. *UHDƜ&RQIHUHQFHƖ SQL Server Live!: This conference will leave you with *UHDƜ3ULFĠ the skills needed to Lead the Data Race, whether you are a DBA, developer, IT Pro, or Analyst. TechMentor: This is IT training that finishes first, with zero marketing speak on topics you need training on now, and solid coverage on what’s around the corner. &RQQHFƜZLWŊ/LYĠ Office & SharePoint Live!: Provides leading- twitter.com/live360 edge knowledge and training for SharePoint @live360 both on-premises and in Office 365 to maximize the business value. facebook.com Search "Live 360" linkedin.com Join the "Live! 360" group! Modern Apps Live!: Presented in partnership with Magenic, this unique conference leads the way to learning how to architect, design and build a complete REGISTER BY AUGUST 31 Modern App. AND SAVE $500! Use promo code L360AUG2 NEW! Scan the QR code to App Dev Trends: This new technology register or for more conference focuses on the makers & maintainers of event details. the software that Power organizations in nearly every industry in the world — in other words, enterprise software professionals! PRODUCED BY LIVE360EVENTS.COM Untitled-6 3 7/13/16 12:59 PM magazine AUGUST 2016 VOLUME 31 NUMBER 8 ID STATEMENT MSDN Magazine (ISSN 1528-4859) is published monthly by 1105 Media, Inc., 9201 Oakdale Avenue, Ste. 101, Chatsworth, CA 91311. Periodicals General Manager Jef Sandquist postage paid at Chatsworth, CA 91311-9998, and at additional mailing offces. Annual subscription rates Director Dan Fernandez payable in US funds are: U.S. $35.00, International Editorial Director Mohammad Al- Sabt Untitled-4 1 7/8/16 12:11 PM Editor’s NotE MICHAEL DESMOND DevOps Directive Writing good sofware is hard. Managing the process of writing, How serious is Microsof about DevOps? Based on the company’s maintaining and delivering good software is even harder— $400 million-plus purchase of Xamarin in March and the acquisition particularly when you add cross-platform mobile app development of tools-maker HockeyApp at the close of 2014—very. At the Build to the mix. Which is why Microsoft has been so busy improv- conference in March, Brown demoed the extended DevOps capa- ing and extending its DevOps solutions, addressing the sofware bilities in the cloud-based Visual Studio Team Services tool. As he development lifecycle from planning and development, to testing told the audience before showing how the DevOps tool chain can and build, to deployment and monitoring. improve a mobile app development scenario: “I’m just going to rub Donovan Brown is a senior DevOps program manager at a little DevOps on it and make it better.” Microsof. He defnes DevOps as “the union of people, process and Al Hilwa, program director for sofware development research products to enable continuous delivery of value to our end users.” at IDC, was impressed. “Microsof wants its tools for developers to Tat focus on value is important, as it goes beyond simple code be what Ofce is for knowledge workers. Tat is, they want to be metrics to emphasize the tangible impact that delivered sofware the No. 1 toolchain for cross-platform development, mobile, cloud, has on the business, its workers and customers. everything,” he says. “Tis is a tall order, but they are in fact exe- cuting on it and building a multi-platform ecosystem. Given their history with developers, you have to give them good odds on this.” Every code writing effort, Tis is exciting stuf. Features like Xamarin Test Cloud let developers test app code against ranks of cloud-hosted smartphones and devices, from traditional client-server while HockeyApp provides a way to distribute pre-release code to select groups of testers and receive both user feedback and app telemetry. applications to Android- and To help get ahead of it all, this month we’re launching the frst in a series of articles focused on mobile DevOps, starting with Kraig iPhone-based mobile apps, Brockschmidt’s feature, “From Code to Customer: Exploring Mobile DevOps.” Also this month, the ALM Rangers team at Microsof stands to improve within a robust shows how to leverage DevOps to build Visual Studio Team Services Extensions, while Jonathan Waldman explores the integration of DevOps environment. Git source code management with Visual Studio 2015. Te Microsof efort on DevOps is intriguing in that it promises to lif all boats. Every code writing efort, from traditional client-server “To continuously deliver value implies that you are able to monitor applications to Android- and iPhone-based mobile apps, stands and validate that value is actually delivered,” he says. “Just copying to improve within a robust DevOps environment. fles to a server and hoping that people use them—there is no way What are your thoughts to quantify or even qualify if I delivered value.” on Microsof’s DevOps push? iV si t su a t msdnm. isorc fmoc.to m/ agazine . euQ sit no s , moc menst ro sgu gesit no s rof MSDN Magazine ? eS nd eht m ot eht edirot : Untitled-5 1 9/28/15 4:25 PM Cutting EdgE DINO ESPOSITO Beyond CRUD: Commands, Events and Bus In recent installments of this column, I discussed what it takes to and keywords of today such as CQRS and Event Sourcing. In this build a Historical create, read, update, delete (H-CRUD). An column, I’ll take the idea of H-CRUD much further to make it merge H-CRUD is a simple extension to classic CRUD where you use with the core idea of Event Sourcing. You’ll see how H-CRUD can two conceptually distinct data stores to persist the current state of turn into an implementation made of commands, buses and events objects and all the events that happened during the lifetime of indi- that at frst might look like an overly complex way to do basic reads vidual objects. If you simply limit your vision to the data store that and writes to a database. contains the current state, then all is pretty much the same as with classic CRUD. You have your customer records, your invoices, orders and whatever else forms the data model for the business domain. The real cardinality of the event/ Te key thing that’s going on here is that this summary data store isn’t the primary data store you create, but is derived as a projection aggregate association is written from the data store of events. In other words, the essence of building a historical CRUD is to save events as they happen and then infer in the ubiquitous language of the the current state of the system for whatever UI you need to create. Designing your solution around business events is a relatively business domain. new approach that’s gaining momentum, though there’s a long way ahead for it to become the mainstream paradigm. Centering your design on events is benefcial because you never miss anything One Event, Many Aggregates that happens in the system; you can reread and replay events at In my opinion, one of the reasons sofware is sometimes hard to write any time and build new projections on top of the same core data on time and on budget is the lack of attention to the business language for, say, business intelligence purposes. Even more interesting, spoken by the domain expert. Most of the time, acknowledging with events as an architect, you have the greatest chance to design requirements means mapping understood requirements to some the system around the business-specifc ubiquitous language. Well sort of relational data model. Te business logic is then architected beyond being a pillar of Domain-Driven Design (DDD), more to tunnel data between persistence and presentation, making any pragmatically the ubiquitous language is a great help to understand necessary adjustments along the way. While imperfect, this pattern the surrounding business domain and plan the most effective worked for a long time and the number of cases where monu- architectural diagram of cooperating parts and internal dynamics mental levels of complexity made it impractical were numerically of tasks and workfows. irrelevant and, anyway, brought to the formulation of DDD, is still the most efective way to tackle any sofware projects today. Events are benefcial here because they force a diferent form of Most of the time, acknowledging analysis of the domain, much more task-oriented and without the urgency of working out the perfect relational model in which to save requirements means mapping data. When you look at events, though, cardinality is key. In H-CRUD examples I discussed in past columns, I made an assumption that understood requirements to could be quite dangerous if let go without further considerations and explanation. In my examples, I used a one-to-one event-to- some relational data model. aggregate association. In fact, I used the unique identifer of the aggregate being persisted as the foreign key to link events. To go with the example of the article, whenever a room was booked, the Te implementation of events you might have seen in my May system logs a booking-created event that refers to a given booking ID. (msdn.com/magazine/mt703431) and June 2016 (msdn.com/magazine/mt707524) To retrieve all events for an aggregate (that is, the booking) a query columns was very simple and to some extent even simplistic. Te on the events data store for the specifed booking ID is sufcient to main purpose, though, was showing that any CRUD could be get all information. It defnitely works, but it’s a rather simple sce- turned into an H-CRUD with minimal efort and still gain some nario. Te danger is that when aspects of a simple scenario become benefts from the introduction of business events. Te H-CRUD a common practice, you typically move from a simple solution to a approach has some obvious overlapping with popular acronyms simplistic solution. And this isn’t exactly a good thing. 6 msdn magazine 0816msdn_EspositoCEdge_v6_6-9.indd 6 7/12/16 12:27 PM

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.