Wednesday, November 22, 2017

Swift 4 Book I Chapter 0: Introduction

Chapter 0: Introduction



Introducing Swift

Swift programming language is the new programming language use to develop application for the Apple ecosystem.  It was developed to replaced the older programming language Objective-C. We can use Swift to program iPhone, iPad, Apple TV and Apple Watch apps. In addition to the Apple devices,  we can also develop application for MacOS using Swift.


In 2016, Apple decided to open source Swift programming language. This creates potential for the language to be adopted by other platform such as Windows, Linux and Android. Development for other platform is at the beginning phase. We won't expect to see Swift for another platform for a while.


Audience

The audience for this book is for any IT professional who had learned programming before and has no problem understanding the basic concept of variables, control flow and object oriented programming. Since object oriented programming is an important subject, we will still cover the concept in greater detail. However, we would not explain the difference between constant and variable. We will not explain in detail what are data types.


Structure

Although the series of books are intended for people with programming experience, we will still adopt the gradual approach where basic concept and frequently use features will cover first and advance feature will be covered at the later stage.


This book is the first book of the series Introduction to Swift Programming and iOS Development. This book contains the basics of Swift programming. We will be covering basic features that are common in other programming language and we refrain from introducing features that are unique to Swift. The objective for this part is to introduce enough basics that one can start to write program using the language. For persons with other programming language experience, you will find this book familiar. Please be aware that although the syntax is similar to other programming languages, this does not mean that the implementation will be the same.


The second book will introduces additional features that are unique to Swift. We will introduce data type such as tuples and optionals. We will also cover additional collection type, advance operator and more complex function. We will also cover control flow mainly on the more complex type of application. In addition, we will introduce concepts such as optional binding and object oriented programming.


Subsequent books after the second book will cover much more advance topics. We will also cover the basic topics with more depth.


Book I

This book consist of 6 chapters starting from Swift basics and data type to control flow and functions. After completing this book, we would be able to write a basic program that perform simple tasks. The chapters we covered are as follows:
  1. Swift Basics

  2. Data Type

  3. Operators

  4. Collection Type

  5. Control Flow

  6. Functions



 

Tools and Equipment Requirement

To learn Swift programming for the Apple ecosystem, we need the following:
  • MacBook, MacBook Air, MacBook Pro, MacMini, iMac or MacPro

  • Xcode installed in the above system

  • Once Xcode is installed, we need to create a playground file to test the code will learning.



Note: This book will not cover the basics of using MacOS and installing Xcode.


Syntax


The syntax is similar to other programming books. Syntax is in bold. Anything within and including this bracket <italics> with italics must be replace by programmer defined data or label.


*** End ***

No comments:

Post a Comment