Swift in the Cloud

Wiley (Verlag)
  • erschienen am 4. August 2017
  • |
  • 264 Seiten
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-119-36847-2 (ISBN)
Write and run Swift language programs in the Cloud
Written by the team of developers that has helped bring the Swift language to Cloud computing, this is the definitive guide to writing and running Swift language programs for cloud environment. In Swift in the Cloud, you'll find full coverage of all aspects of creating and running Swift language applications in Cloud computing environments, complete with examples of real code that you can start running and experimenting with today.
Since Apple introduced the Swift language in 2014, it has become one of the most rapidly adopted computer programming languages in history--and now you too can start benefitting from using the same programming language for all components of a scalable, robust business software solution.
* Create server applications using Swift and run them on pay-as-you-go cloud infrastructure
* Quickly write and test Swift code snippets in your own cloud sandbox
* Use Docker containers to deploy Swift applications into multiple cloud environments without having to change code
* Grasp the elements and structure of the Swift.org open technology project
* Find out how to avoid the complexities of runtime configuration by using Cloud Foundry buildpacks for Swift
* Build high performing web applications and REST APIs with an open source Swift based web server framework
* Scale up your cloud services by running Swift modules in an asynchronous, open source, 'serverless' cloud environment
Whether you are already using Swift to build mobile applications or a seasoned web developer, Swift in the Cloud will help you leverage server-side Swift to power your next generation of applications.
1. Auflage
  • Englisch
  • Newark
  • |
  • USA
John Wiley & Sons
  • 5,99 MB
978-1-119-36847-2 (9781119368472)
weitere Ausgaben werden ermittelt
LEIGH WILLIAMSON is a technical leader in the IBM Cloud team who aids clients with cloud computing strategy and execution. JOHN PONZO is an IBM Fellow and the primary technical collaborator between Apple and IBM in refining Swift for both mobile client and cloud services development. PATRICK BOHRER is technical lead for IBM's global efforts around Swift@IBM Engineering. RICARDO OLIVIERI is an expert in the adoption of the Swift language on the server and the IBM cloud. KARL WEINMEISTER helped extend Swift from its mobile roots to become a full-stack language ecosystem. SAMUEL KALLNER is technical lead of the Kitura project at the IBM Research Lab in Haifa, Israel.
  • Intro
  • Title Page
  • Copyright
  • Dedication
  • About the Authors
  • About the Technical Editor
  • Credits
  • Acknowledgments
  • Introduction
  • IBM, Apple, and Swift
  • Scope of This Book
  • Chapter 1 Swift.org, the Open Source Project
  • What's Included
  • How to Get Involved
  • Swift Evolution and Roadmap
  • Binary Downloads
  • Summary
  • Notes
  • Chapter 2 A Swift Sandbox in the Cloud
  • The IBM Cloud Platform
  • Getting Started
  • IBM Swift Package Catalog and Sandbox
  • Summary
  • Chapter 3 A Basic Introduction to Swift
  • Background
  • Let's Get Coding!
  • The Language Landscape
  • Language Timeline
  • Summary
  • Chapter 4 The IBM Bluemix Buildpack for Swift
  • Cloud Foundry Buildpacks
  • Working with the IBM Bluemix Buildpack for Swift
  • Examples of Using the IBM Bluemix Buildpack for Swift
  • Using the Latest Code of the IBM Bluemix Buildpack for Swift
  • Summary
  • Chapter 5 Using Containers on Bluemix to Run Swift Code
  • Docker Images for Swift
  • Installing Docker
  • Using Docker as a Development Tool
  • Why Use Containers on Bluemix?
  • Running Your Docker Image in the Bluemix Cloud
  • High Availability in Kubernetes Clusters
  • Binding Bluemix Services to IBM Containers
  • Summary
  • Chapter 6 Swift Package Management
  • Swift Package Manager
  • Swift Package Catalog
  • Summary
  • Chapter 7 Swift and Kitura for Web Applications
  • Kitura
  • Kitura and Data Access
  • Summary
  • Notes
  • Chapter 8 Serverless Programming with Swift
  • Microservices and Serverless Computing
  • Swift and OpenWhisk
  • Summary
  • Chapter 9 Over the Horizon: Where Do We Go from Here?
  • Bringing Swift to the Server
  • Expanding the Range of Swift
  • Swift DevOps
  • Summary
  • EULA


Since Apple introduced the Swift programming language in 2014, it has become one of the most rapidly adopted computer programming languages in history. Programmers love the modern syntax used by Swift and the way it's fun to develop code, similar to how they felt about Java a generation ago. Programming skills and experience in Swift are in high demand in the industry, with the promise of high salaries for those who invest the time to learn and practice the language.

Apple originally introduced Swift as an alternative language to Objective-C for developing iPhone, iPad, and macOS applications. The company has now expanded Swift into the realm of solutions for the Internet of Things, with support for tvOS (Apple TV) and watchOS (Apple Watch wearable devices). As illustrated in Figure 1, Swift is now one of the most popular open source projects and Swift frameworks such as Kitura are gaining ground quickly.

Figure 1: Popularity of the Swift programming language

At about the same time that Swift was first introduced, Apple and IBM formed a strategic partnership to produce innovative, industry-specific mobile applications for the Apple iOS ecosystem. IBM proceeded to embrace the Swift programming language and implemented over 100 mobile apps as part of this partnership. IBM engineers saw the value of Swift firsthand in these applications. The open source release of the Swift language in late 2014 began another chapter in the partnership, as IBM chose to invest in and support the cause of bringing the Swift language to the cloud as a result of the focus on server-side Swift environments.

Development of these applications highlights the critical, expanding role of server-side logic in powering these new experiences that users now take for granted. From syncing data across devices; to connecting people with friends and co-workers; to monitoring news and alerting us about new events based on our interests and activities; to providing cognitive insights into our applications; server-side logic is critical to creating truly brilliant apps. Now the ability to develop, debug, and deploy this logic in the same language used to create mobile experiences is a game changer for the development community.

This book, written by members of the development team at IBM who helped bring Swift to the cloud, covers everything you need to know about how to develop Swift programs that run in cloud environments. It combines technical information with the concepts that originally led to the development of the technology. This book provides plenty of examples of Swift language code, as well as a living website where a community consisting of the authors and other passionate Swift experts continues to discuss Swift and its future directions.

IBM, Apple, and Swift

On July 15, 2014, IBM and Apple announced what was at the time a very surprising partnership, with the goal of transforming business applications by building mobile enterprise and industry-specific solutions for the Apple platform. This partnership was unexpected by most industry watchers and radically altered the enterprise mobile computing landscape.

The IBM offering that resulted from the Apple partnership is called MobileFirst for iOS. It focuses on enterprise and industry transformation by providing users with the latest features of the Apple platform and user design, coupled with the back-end data center integration required to reinvent the next generation of enterprise applications. 

Key features of the IBM offering include large-enterprise-class robustness and scalability; back-end enterprise data center integration; big data and analytics integration; and a highly polished mobile front-end user interface experience.

The user interface experience was codesigned by Apple and IBM to significantly upgrade the standards for usability, elegance, and user satisfaction beyond typical enterprise software. Since 2012, IBM has been making massive investments in IBM Design Thinking philosophy and techniques, building up several large design studios in an effort to apply good design to business software. This software design emphasis by IBM was one of the natural collaboration areas of the partnership, with the strong Apple design culture being applied to all of their own products.

As IBM MobileFirst for iOS was being developed, a choice was made to use the latest iOS platform APIs for iPhone and iPad business applications. The scope was later extended to include Apple Watch. IBM leveraged many of the extended development kits provided by Apple, such as HomeKit, CloudKit, and the connected car capabilities in various new and innovative business solutions. As of December 2015, IBM had created over 100 industry-specific mobile apps for the IBM MobileFirst for iOS collection.

While Apple has pioneered the transformation of the consumer mobile app experience, IBM and Apple consider business mobile app transformation to be an underserved market and a really great design opportunity that they can uniquely address together.

Introduction of Swift

Apple introduced the Swift language at the Apple World Wide Developers Conference (WWDC) in 2014, and IBM decided to begin using the language to build the first wave of IBM MobileFirst for iOS mobile applications. IBM assembled a team of developers with expertise in building mobile solutions. Their previous programming language skills included Java, JavaScript, and Objective-C. This team of IBM programmers quickly learned Swift and began using it to implement the mobile apps in the IBM MobileFirst for iOS collection.

Working with Apple, we at IBM learned a lot about what it takes to build amazing mobile business applications. IBM also discovered the value of Swift.

Swift was designed by Apple to be a safe, interactive, and high-performance systems language. It also blends the ease of scripting language syntax with the performance of a systems language. The IBM team found that in comparison to mobile apps developed in Java for the Android mobile platform and Objective-C for iOS, Swift apps required less code. 

The IBM team appreciated everything about Swift, from its type safety-which empowered them to be agile and evolve the applications quickly while knowing that the compiler would catch any errors-to its performance and memory advantages, which are critical for application responsiveness. The concise syntax of the language also led to great developer productivity.

The IBM teams also learned to understand what is necessary to develop application-specific web services to power these business mobile applications. It significantly enhanced the overall productivity of the team to not have to switch languages away from what was used for the mobile front end (Swift) to work on the back-end services.

The developers found the Swift code easier to read, share, and evolve. What the Swift language did for legibility of the application code represented a large increase in productivity for the development team. Other languages used for mobile apps were generally more verbose. It also significantly increased code quality with Swift-based type checking. The importance of a strongly typed language in the productivity of the development team can hardly be overstated. Most of the more than 100 applications developed by IBM for various business solutions could be produced by a handful of programmers working in small teams.

Figure 2 shows a comparison of Swift with other programming languages and illustrates how Swift enables inherent application performance and developer productivity benefits through its attributes such as:

  • Modern programming language constructs
  • Error detection at compile time, not runtime
  • Code reengineering
  • Built-in performance features such as an optimized search algorithm that is up to 2.6 times faster than Objective-C and 8.4 times faster than Python 2.7
  • A compiled language with the benefits of an interpreted language

Figure 2: Benefits of Swift compared with other languages

These same benefits around ease of programming, type safety, and compiled performance are also desired on the server side of the applications. Until the release of Swift 3.0, Swift developers were forced to abandon their favorite language if they wanted to develop application logic that ran on the server. When Swift was made open source in 2015, IBM recognized the developer and business value that could be unlocked by bringing this language to the server and, by extension, to the cloud computing environment.

Swift is not just a programming language syntax, but also includes a robust compiler back-end infrastructure, based on the LLVM (originally named Low Level Virtual Machine) machine-independent intermediate code optimization. The compiler architecture includes debugging capability, read- eval-print loop (REPL) language statement interpretation, and distinct layers for binary code generation. This design of the language infrastructure is forward-looking and lends itself to flexible reuse of the basic language constructs. Swift is an up-to-date, modern programming language with support for closures, tuples, extensions, generics, type inference, custom operators, enumerations, and option types. Also, Swift execution performance is on par with modern native programming languages (that is, very fast).

Chapter 3 of this...

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)


Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.

Download (sofort verfügbar)

25,99 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen