Structs 42 Getting Ready 43 How to Do It

Total Page:16

File Type:pdf, Size:1020Kb

Structs 42 Getting Ready 43 How to Do It Swift 4 Programming Cookbook 50 task-oriented recipes to make you productive with Swift 4 Keith Moon BIRMINGHAM - MUMBAI Swift 4 Programming Cookbook Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: September 2017 Production reference: 1260917 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78646-089-9 www.packtpub.com Credits Author Copy Editor Keith Moon Shaila Kusanale Reviewer Project Coordinator Giordano Scalzo Ulhas Kambali Commissioning Editor Proofreader Ashwin Nair Safis Editing Acquisition Editor Indexer Larissa Pinto Mariammal Chettiyar Content Development Editor Graphics Onkar Wani Abhinash Sahu Technical Editor Production Coordinator Akhil Nair Shraddha Falebhai About the Author Keith Moon is an award-winning iOS developer, author, and speaker based in London. He has worked with some of the biggest companies in the world to create engaging and personal mobile experiences. Keith has been developing in Swift since its release, working on projects both fully Swift, and mixed Swift and Objective-C. Keith has been invited to speak about Swift development in conferences from Moscow to Minsk and London. I would like to thank my amazing and supportive wife, Alissa. Without her support and patience, this book would not have been possible. About the Reviewer Giordano Scalzo is a developer with 20 years of programming experience, since the days of the ZXSpectrum. He has worked in C++, Java, .NET, Ruby, Python, and in a ton of other languages that he has forgotten the names of. After years of backend development, over the past five years, Giordano has developed extensively for iOS, releasing more than 20 apps--apps that he wrote for clients, enterprise applications, or on his own. Currently he is a contractor in London, where through his company Effective Code Ltd, http:/​/​effectivecode.​co.​uk, he delivers code for iOS aiming at quality and reliability. In his spare time, when he is not crafting retro game clones for iOS, he writes his thoughts on http:/​/​giordanoscalzo.​com. I’d like to thank my better half Valentina, who lovingly supports me in everything I do; without you, none of this would have been possible. Thanks to my bright future, Mattia and Luca, for giving me lots of smiles and hugs when I needed them. Finally, my gratitude goes to my mum and my dad, who gave me curiosity and the support to follow my passions, which began one day when they bought me a ZXSpectrum. www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. https:/​/​www.​packtpub.​com/​mapt Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Customer Feedback Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https:/​/​www.​amazon.​com/​dp/​1786460890. If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products! Table of Contents Preface 1 Chapter 1: Swift Building Blocks 7 Introduction 7 Your first Swift program 8 Getting ready 9 Downloading Xcode 9 How to do it... 13 There's more... 17 See also 18 Strings, Ints, Floats, and Bools 18 Getting ready 19 How to do it... 19 How it works... 21 There's more... 24 See also 25 Optionals, unwrap, and force unwrap 25 Getting started 26 How to do it... 26 How it works... 27 There's more... 29 See also 31 Functions 31 How to do it... 31 How it works... 32 There's more... 34 Default parameter values 34 Parameter overloading 35 See also 36 Object classes 36 Getting ready 36 How to do it... 36 How it works... 37 There's more... 41 See also 42 Structs 42 Getting ready 43 How to do it... 43 How it works... 43 There's more... 44 See also 45 Enumerations 46 Getting ready 46 How to do it... 47 How it works... 47 There's more... 49 Methods and computed variables 49 Associated values 50 See also 51 Closures 51 Getting ready 52 How to do it... 52 How it works... 54 There's more... 56 See also 57 Protocols 58 Getting ready 58 How to do it... 58 How it works... 58 There's more... 60 See also 61 Chapter 2: Building on the Building Blocks 62 Introduction 62 Bundling variables into tuples 63 Getting ready 63 How to do it... 63 How it works... 64 There's more... 64 See also 65 Ordering your data with arrays 66 How to do it... 66 How it works... 68 There's more... 71 See also 72 Containing your data with sets 72 [ ii ] How to do it... 72 How it works... 73 Union 74 Intersection 74 Symmetric difference 75 Subtracting 76 There's more... 76 See also 80 Storing key-value pairs with Dictionaries 80 Getting ready 80 How to do it... 81 How it works... 82 There's more... 84 See also 86 Subscripts for custom types 86 Getting ready 86 How to do it... 87 How it works... 90 There's more... 91 See also 92 Changing your name with typealias 92 How to do it... 92 There's more... 93 See also 95 Getting property changing notifications using property observers 95 Getting ready 95 How to do it... 95 How it works... 96 There's more... 97 See also 97 Controlling access with access control 97 Getting ready 98 How to do it... 103 How it works... 106 There's more... 110 See also 111 Extending functionality with extensions 111 Getting ready 111 How to do it... 112 How it works... 112 [ iii ] There's more... 113 See also 115 Chapter 3: Data Wrangling with Swift Control Flow 116 Introduction 116 Making decisions with if/else 116 Getting ready 117 How to do it... 117 How it works... 118 There's more... 119 Conditional unwrap 119 Chain unwrapping Optionals 121 Enum with associated values 123 See also 124 Switch it up 124 Getting ready 125 How to do it... 125 How it works... 127 See also 130 For the love of loops 131 How to do it... 131 How it works... 132 See also 133 While loops 133 Getting ready 133 How to do it... 134 How it works... 134 There's more... 135 See also 135 Try, throw, do and, catch - Swift error handling 136 How to do it... 136 How it works... 138 There's more... 139 See also 143 Checking up front with guard 144 How to do it... 144 How it works... 146 See also 147 Doing it later with defer 147 Getting ready 148 [ iv ] How to do it... 149 How it works... 150 There's more... 151 See also 153 Bailing out with fatalError and precondition 153 Getting ready 153 How to do it... 154 How it works... 155 See also 156 Chapter 4: Generics, Operators, and Nested Types 157 Introduction 157 Using generics with types 158 How to do it... 159 How it works... 161 There's more... 162 See also 164 Using generics with functions 164 How to do it... 164 How it works... 165 There's more... 166 See also 167 Using generics with protocols 167 Getting ready 168 How to do it... 168 There's more... 172 See also 173 Advanced operators 174 Getting ready 174 How to do it... 174 See also 177 Option set 178 How to do it... 178 How it works... 179 See also 179 Create custom operators 179 Getting ready 180 How to do it... 180 How it works... 183 There's more... 184 [ v ] See also 186 Nested types 186 Getting ready 187 How to do it... 187 How it works..
Recommended publications
  • Analysis of Boundary Resources in B2B Software Platforms Maximilian Schreieck, Robert Finke, Manuel Wiesche, Helmut Krcmar EWSECO 2017, Darmstadt November 23, 2017
    Sandbox vs. Toolbox – Analysis of Boundary Resources in B2B Software Platforms Maximilian Schreieck, Robert Finke, Manuel Wiesche, Helmut Krcmar EWSECO 2017, Darmstadt November 23, 2017 Informatics 17 - Chair for Information SystemsTUM Faculty of Informatics Technische Universität München www.i17.in.tum.de Agenda 1 Motivation 2 Background & Method 3 Results & Interpretation © Prof. Dr. Helmut Krcmar 2 © Prof. Dr. Helmut Krcmar 3 Motivation Challenge • The interplay of boundary resources and value co-creation is not fully understood • Research is limited to B2C platforms although B2B platforms gain importance Goal • Identify concepts of boundary resources applied in practice by analyzing the use of boundary resources by IBM Bluemix and Salesforce • Improve our understanding of the influence of boundary resources on value co-creation © Prof. Dr. Helmut Krcmar 4 Research questions What boundary resources can be identified in literature and practice? How does the design of boundary resources impact value co- creation in B2B software platforms? © Prof. Dr. Helmut Krcmar 5 Agenda 1 Motivation 2 Background & Method 3 Results & Interpretation © Prof. Dr. Helmut Krcmar 6 Software platforms Complementor Complementor Complementor 1 2 3 Complement 1 Complement 2 Complement 3 Platform Complement 1 End User 1 Owner Complement 2 Complement 3 End User 2 Definition • Multisided (market and/or development) platform • Higher innovation rates and higher competitiveness than traditional business models • Ecosystem of third-party developers is leveraged Sources:
    [Show full text]
  • Powering an App with Swift Microservices
    Powering an App with Swift Microservices ~ Who: Jarrod Parkes What: Swift Cloud Workshop 2 When: Sept 30th, 2017 @ 2:10-2:40 PM CST Where: Amazon Inc, Austin, TX, USA Why: We Swift! Hey, I'm Jarrod I build iOS/Swift courses at Udacity I've been working on a "Server-Side Swift" course Course features "Game Night!" An iOS app powered by Swift microservices Talk Outline Developing Game Night! The ups and downs Future development Where It Started Course v1 launched @ IBM InterConnect 2017 Swift on Linux Swift Package Manager IBM Cloud Tools, ToDo app Built with Kitura We Can Do More! Course v1 was "ok", but missing a spark Let's build something compelling! Activities Microservice Student's first microservice from scratch CRUD microservice Uses MySQL client https://github.com/nicholasjackson/swift-mysql Supports pagination, transactions, and stored procedures Imperative style, easy to test MySQL Client: Init // Create connection pool var pool = MySQLConnectionPool( connectionString: connectionString, poolSize: 10, defaultCharset: "utf8mb4") // Create data accessor var dataAccessor = ActivityMySQLDataAccessor(pool: pool) MySQL Client: Querying // In data accessor... do { // Get connection let connection = try pool.getConnection() defer { pool.releaseConnection(connection!) } // Execute query let result = try connection!.execute(builder: query) let activities = result.toActivities() // Return results... } catch { /* Error */ } Activities: Data public struct Activity { public var id: Int? public var name: String? public var emoji: String? public
    [Show full text]
  • Copyrighted Material
    Contents Introduction . xxiii 1 Swift.org, the Open Source Project . 1 What’s Included . 1 Source Code Repositories . 2 How to Get Involved . 5 Mailing Lists . 7 Bug Tracking . 8 Swift Evolution and Roadmap . 12 Priorities for the Swift 4.0 Major Release . 14 Binary Downloads . 14 MacOS Binaries . 15 Linux Binaries . 16 Swiftenv, Swift Version Manager . 17 Summary . 17 2 A Swift Sandbox in the Cloud . 19 The IBM Cloud Platform . 19 Getting Started . 26 Sign Me Up!. 26 Saving and Sharing Code Samples . 28 Selecting Swift Versions and More . 30 Have You RunCOPYRIGHTED on a Mainframe Lately? . .MATERIAL . 30 IBM Swift Package Catalog and Sandbox . 32 Summary . 33 xviii Contents 3 A Basic Introduction to Swift . 35 Background . 35 Let’s Get Coding! . 35 Swift Standard Library . 35 Swift Foundation Library . 37 C Library Interoperability . 39 Concurrency Library . 41 Memory Management . 43 The Language Landscape . 48 Language Groupings . 48 Language Timeline . 50 Summary . 51 4 The IBM Bluemix Buildpack for Swift . 53 Cloud Foundry Buildpacks . 53 Buildpack Phases . 54 Working with the IBM Bluemix Buildpack for Swift . 55 Where Is the Source Code Hosted? . 55 What Version of the Buildpack Is Currently Installed? . 56 File Artifacts Required for Provisioning Your Application on Bluemix . .58 Installing Additional System-Level Dependencies . 61 Downloading Closed Source Dependencies . 68 Examples of Using the IBM Bluemix Buildpack for Swift . 69 Swift HelloWorld . 69 Kitura Starterr . 74 BluePic . 77 Using the Latest Code of the IBM Bluemix Buildpack for Swift . 87 Summary . 88 ftoc.indd 07/25/17 Page xviii Contents xix 5 Using Containers on Bluemix to Run Swift Code .
    [Show full text]
  • Ibm Cloud Service Agreement Diasend
    Ibm Cloud Service Agreement Loopy Stillman resiles or criminate some lineation pithy, however synonymical Scotty hoe possessively or strafing. Marathi and runed Tait spree her burplibertinism some swingingironers practically. torridly or resurfacing post-free, is Wilmar barelegged? Arizonian and balked Derby advertized her spruce popularise while Jephthah Manager that provides the ibm cloud service description number of service Programmers to cloud agreement with ibm cloud platform for build steps in a cloud solutions offered via the right to modernize your language. Amounts of cloud service agreement reduces duplication for build artifacts and portals have any right or discontinue features of the language. Helper chat is ibm cloud out of tones from vendor to cloud assets and maintaining system for which the preview cloud service is an easy it. Making claims against you: suitable for cloud infrastructure for resellers where prohibited, and medium businesses and to. Partners to run, service credits will treat such as paragraphs, it is the google cloud service, immediately cease using the eclipse orion web applications. Match any time a cloud service agreement, the business and licenses granted under the usage term in violation of text, along the software services or any particular purpose. License fees for either procure for open service credits will not to run your agreement, the public cloud? Governmental regulation or modify or the service or grants data for failure to build on a region go or applications. Students to help software service agreement to build your next go or implied, they can be added on the expectations. Obd error free operation of a global corporations use of binary resources as they will now! Science tools for service includes user is a real time to add a private instances.
    [Show full text]
  • IBM Cloud Paks and Red Hat Openshift on IBM Power Systems
    IBM Cloud Paks and Red Hat OpenShift on IBM Power Systems OHIO LINUXFEST 2019 November 1-2 at the Hyatt Regency Columbus, Ohio Jim Smith IBM Cloud / Cognitive Infrastructure Client Technical Specialist IBM Systems IBM Systems / November 2nd / © 2019 IBM Corporation Hybrid Cloud A hybrid cloud is a computing environment that combines a private cloud and a public cloud by allowing applications and data to be shared between them. What is Multicloud Multicloud is a cloud approach made up of more than one Hybrid cloud service, from more than one cloud vendor—public Multicloud? or private. Hybrid Multicloud = Hybrid Cloud + Multicloud A hybrid multicloud combines a private cloud, a public cloud and more than one cloud service, from more than one cloud vendor. 2 Enterprises are deploying on-premises clouds and containers as a foundation for hybrid cloud strategies 80% of organizations have migrated apps or data from public cloud to on-premises or private cloud Source: https://www.crn.com/businesses-moving-from-public- cloud-due-to-security-says-idc-survey IBM Systems / November 2nd / © 2019 IBM Corporation Digital transformation requires apps to be easy to develop and deploy anywhere at cloud scale Businesses uniquely evolve on their cloud and digital transformation journey. Clients often are forced to span multiple public and private clouds, which must be integrated to achieve the agility and speed that enterprise demands. Modernizing apps with micro-services and new software technologies to seamlessly run apps and access data from anywhere is painful without automating cloud infrastructure: • Agile DevOps require new applications built using the latest software approaches vs.
    [Show full text]
  • Swift Language
    Swift Language #swift 1 1: Swift 2 2 2 2 Examples 2 Swift 2 Swift 4 MacSwift 4 iPadSwift Playgrounds 9 10 2: 11 11 11 Examples 11 UnsafeMutablePointer 11 12 3: AES 14 Examples 14 IVSwift 3.0CBCAES 14 CBCAESIVSwift 2.3 16 PKCS7ECBAES 18 4: KituraSwift HTTP 20 20 Examples 20 20 5: OptionSet 23 Examples 23 OptionSet 23 6: PBKDF2 24 Examples 24 2Swift 3 24 2Swift 2.3 25 Swift 2.3 26 Swift 3 26 7: RxSwift 28 Examples 28 RxSwift 28 28 29 30 RxCocoaControlEvents 30 8: Swift Advance 32 32 Examples 32 32 33 9: SwiftNSRegularExpression 34 34 Examples 34 String 34 35 35 36 36 NSRegularExpression 36 10: Swift 38 Examples 38 38 38 38 39 40 11: Swift 42 Examples 42 Swift 42 12: Swift 44 44 Examples 44 44 44 47 47 - On log n 47 48 48 56 58 13: Typealias 62 Examples 62 62 62 62 14: StringUIImage 63 63 Examples 63 InitialsImageFactory 63 15: Swift 64 64 Examples 64 64 64 65 16: CObjective-C 66 66 Examples 66 Objective-CSwift 66 66 67 SwiftObjective-C 67 67 68 swiftc 68 C 69 Objective-CSwift 69 C 70 17: 72 Examples 72 72 Dependenct 72 DI 72 73 75 DI 75 76 77 77 18: 78 78 78 Examples 78 78 78 79 typealias 79 79 2 80 4 80 Switch 80 19: 82 82 82 Examples 82 82 83 83 83 @noescape 84 3 84 throwsrethrows 84 / 85 86 86 87 20: 88 88 88 weak-keyword 88 unowned-keyword 88 88 Examples 88 88 89 89 21: 91 Examples 91 91 91 92 94 init 94 initotherStringString 94 94 init 95 95 22: 96 Examples 96 96 96 97 97 98 98 98 Inout 98 98 99 99 100 100 100 101 101 23: 103 103 103 Examples 103 103 103 104 106 107 RawRepresentable 108 108 109 109 Hashable 109 24: 111 111 111 Examples
    [Show full text]
  • Swift Language
    Swift Language #swift Table of Contents About 1 Chapter 1: Getting started with Swift Language 2 Remarks 2 Other Resources 2 Versions 2 Examples 3 Your first Swift program 3 Installing Swift 4 Your first program in Swift on a Mac (using a Playground) 5 Your first program in Swift Playgrounds app on iPad 9 Optional Value and Optional enum 10 Chapter 2: (Unsafe) Buffer Pointers 12 Introduction 12 Remarks 12 Examples 12 UnsafeMutablePointer 12 Practical Use-Case for Buffer Pointers 13 Chapter 3: Access Control 15 Syntax 15 Remarks 15 Examples 15 Basic Example using a Struct 15 Car.make (public) 16 Car.model (internal) 16 Car.otherName (fileprivate) 16 Car.fullName (private) 16 Subclassing Example 17 Getters and Setters Example 17 Chapter 4: Advanced Operators 18 Examples 18 Custom Operators 18 Overloading + for Dictionaries 19 Commutative Operators 20 Bitwise Operators 20 Overflow Operators 21 Precedence of standard Swift operators 22 Chapter 5: AES encryption 24 Examples 24 AES encryption in CBC mode with a random IV (Swift 3.0) 24 AES encryption in CBC mode with a random IV (Swift 2.3) 27 AES encryption in ECB mode with PKCS7 padding 28 Chapter 6: Algorithms with Swift 30 Introduction 30 Examples 30 Insertion Sort 30 Sorting 30 Selection sort 33 Asymptotic analysis 34 Quick Sort - O(n log n) complexity time 35 Graph, Trie, Stack 36 Graph 36 Trie 43 Stack 46 Chapter 7: Arrays 50 Introduction 50 Syntax 50 Remarks 50 Examples 50 Value Semantics 50 Basics of Arrays 50 Empty arrays 51 Array literals 51 Arrays with repeated values 51 Creating
    [Show full text]
  • Swift & Bluepic Oct 25Th, 2017
    Swift & BluePic Oct 25th, 2017 Ricardo Olivieri 1 Agenda • Swift introduction • Benefits • Modern language constructs • Platforms • Why Swift on the server? • Provisioning Swift applications to the IBM Cloud • The IBM Cloud Buildpack for Swift • How to use the IBM Cloud Buildpack for Swift? • What is Kitura? • What is BluePic? • Architecture 2 • IBM Cloud Capabilities • Demo! • Resources Swift introduction • Before Swift, Objective-C was the programming language for developing iOS and macOS apps. • Swift provides a much simpler syntax than Objective-C. • As soon as Swift was released, developers started sharing their preference of Swift over Objective-C, given its support of many modern programming conventions (e.g. tuples, generics, closures, type inference, and optionals). 3 Swift introduction Objective-C: Person *person = ...; NSMutableString *description = [[NSMutableString alloc] init]; [description appendFormat:@"%@ is %i years old.", person.name, person.age]; if (person.employer) { [description appendFormat:@" They work for %@.", person.employer]; } else { [description appendString:@" They are unemployed."]; } Swift: var person = … var description = "" description += "\(person.name) is \(person.age) years old." if let employer = person.employer { description += " They work for \(employer)." } else { description += " They are unemployed." } 4 Swift introduction • Type inference • Optionals • Generics • Tuples • Extensions • … 5 The Case for Swift, a Powerful, Intuitive and Uncompromising Programming Language 600% One of the most
    [Show full text]
  • Java Magazine 2 2019
    Nummer 2 - 2019 MAGAZINE Onafhankelijk tijdschrift voor de Java-professional Een duik in Java events met de beste sprekers Scherp je veiligheid aan met Keystroke Dynamics Python voor Java developers? Word zelf een spreker Inclusief op meetups en events! vooruitblik J-spring 2019 TEQnation programmaboekje en plattegrond Features Java 12: upgraden Interview met Verslag: Uncle Bob of niet? Venkat Subramaniam in Nederland 01 COVER.indd 1 23-04-19 09:30 Powered by Foto: Frans van Bragt van Frans Foto: Bestel nu je tickets op: jspring.nl/tickets/ De line-up staat online! Uitgelichte sprekers Adam Bien Burr Sutter Peter Hilton Siren Hofvander Sven Peters Katherine Stanley JavaOne Director Independent CSO Lead Evangelist Software Engineer Rockstar @ Red Hat Consultant @ Docly @ K15t @ IBM Vind de volledige line-up op jspring.nl Main Sponsor Co-Sponsors Partners Adv J-Spring.indd 9 17-04-19 15:37 VOORWOORD Colofon Java Magazine 02-2019 Voorwoord Content manager: Stijn van de Blankevoort Java leeft in Nederland Eindredactie: Anne Camphuijsen-Wieleman Programmeertalen zijn constant in beweging en zo ook de aanverwan- Projectcoördinator: te technologieën. Dit zorgt ervoor dat je als developer continu je kennis Tedje van Gils up-to-date moet blijven houden. Auteurs: Koen Aerts, Jan-Hein Buhrman, Edwin Derks, Lennard Eijsackers, Gelukkig zijn er middelen om je hierbij te helpen: zo kun je tijdens eve- Erwin de Gier, Mathijs de Groot, Arno Koehler, Arjan Lamers, Joop nementen en meet-ups in één dag(deel) je kennis bijschaven Lanting, Philip Leonard, Sander Mak, Wouter Oet, Robert Scholte, in jouw vakgebied. Veelal gegeven door grootheden uit het vak.
    [Show full text]
  • Cloud Object Storage As a Service: IBM Cloud Object Storage from Theory to Practice
    Front cover Cloud Object Storage as a Service IBM Cloud Object Storage from Theory to Practice Anil Patil Deepak Rangarao Harald Seipp Maciej Lasota Reginaldo Marcelo dos Santos Rob Markovic Simon Casey Stephen Bollers Vasfi Gucer Andy Lin Casey Richardson Robert Rios Ryan VanAlstine Tim Medlin Redbooks International Technical Support Organization Cloud Object Storage as a Service: IBM Cloud Object Storage from Theory to Practice March 2017 SG24-8385-00 Note: Before using this information and the product it supports, read the information in “Notices” on page vii. First Edition (March 2017) This edition applies to IBM Cloud Object Storage public offering Version 1.0). © Copyright International Business Machines Corporation 2017. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . vii Trademarks . viii Preface . ix Authors. .x Now you can become a published author, too! . xiv Comments welcome. .xv Stay connected to IBM Redbooks . .xv Part 1. IBM Cloud Object Storage concepts. 1 Chapter 1. Introduction to object storage. 3 1.1 What object storage is. 4 1.2 What storage business problems object storage can address . 6 1.3 What qualifies business problems for object storage . 6 1.4 Access methods for object storage . 7 1.4.1 Access to storage through the REST API. 7 1.4.2 Access to object storage through other methods . 8 1.5 Comparison and positioning to other storage models. 9 1.5.1 Block storage . 9 1.5.2 File storage . 10 1.6 Object storage key concepts.
    [Show full text]
  • Download Tech Beacon
    A Mindtree Publication I Volume 4 I 2018 ABOUT Technology is core to Mindtree. It is extremely important in building capability and capacity for us to keep a sharp focus on emerging technologies. We also make it a point to understand the application of these technologies in the context of our customers. In this effort, we constantly explore and experiment with emerging technologies and gauge their maturity levels for consumption by enterprises. We do this by comparing and contrasting them with similar tools already in use. Tech Beacon is an initiative to compile outcomes of our experimentation and technology adoption guidance for enterprises. We group technologies under three categories: Invest, Experiment and Watch. We explain these categories in detail in this report. Direction Tech Beacon provides direction to enterprises on various technologies by categorizing them as Invest, Experiment or Watch technologies. Invest These technologies have a high potential for generating business value in the near future. Mindtree intends to build capability internally or identify a partner who can help our project teams learn to bootstrap these technologies. We arrive at these technologies by observing customer demands, industry trends, opportunities and open source community support. Most of these technologies were either implemented in production-grade applications for customers, or in internal reference implementations. Experiment These technologies have not yet seen mainstream adoption but show huge promise for the near future. We arrive at these technologies by listening to our customers’ interests, following industry buzz, and noting indications of increased activity in various forums and analyst reports. We need to experiment and build capability in these technologies to have an early adopter edge.
    [Show full text]
  • Kitura Edition
    HACKING WITH SWIFT COMPLETE TUTORIAL COURSE Learn to make web E PL apps with real-worldAM S Swift projects EE FR Paul Hudson Chapter 1 Million Hairs www.hackingwithswift.com 2 Setting up The first project of any book is always difficult, because there’s a steep difficulty ramp as you learn all the basics required just to make something simple. I’ve tried to keep it as simple as possible while still teaching useful skills, so in this initial project you’re going to create a website for the Million Hairs veterinary clinic. Along the way you’re going to learn how to create and configure a project using the Swift package manager, how to route users to different parts of your code depending on the URL they enter, how to log information, and how to separate your code from your presentation – i.e., how to keep Swift separate from HTML. Now, it’s possible you think I’m already patronizing you: surely you already know how to create a new Swift project? You have to remember that server-side Swift is designed to work across platforms, which means that it relies on Xcode far less. In fact, by default Xcode isn’t involved at all: you create your project using the Swift package manager, which comes bundled with the open-source Swift distribution. If you’re using macOS with Xcode installed, you already have access to the Swift package manager. If you’re using Docker with IBM’s Kitura container, then that pre-installs the Swift distribution and gets the package manager that way.
    [Show full text]