神刀安全网

Introduction to Swift for Non-Programmers

Introduction to Swift for Non-Programmers

Do you keep hearing about Swift and want to know more about it? Then you’re in the right blog post. Today we’re going to give you that complete introduction you’ve been looking for including what exactly Swift is, and why it’s so important in technology right now. Not only that but we’ll be providing info on the best places to learn as a beginner, a list of great online resources on iOS development and mobile app programming, and the low-down on what you can use this sought-after programming language for.

Think you’re ready to dive deeper? Then check out our brand new iOS Development Course – launched today! With this course you’ll learn all the skills you need to get started in mobile app development and launch your new programming career. 

What is Swift?

Swift is a general-purpose , multi-paradigm , compiled programming language created for iOS, OS X, watchOS, tvOS and Linux development by Apple Inc. It is an alternative to the Objective-C language which was the recommended and most popular language for building apps for Apple’s ecosystem of devices.

Swift, rightly named after the Swift bird (which is among the fastest fliers in the animal kingdom), was developed to be a faster alternative to Objective-C. Other than speed, Swift offers other advantages over Objective-C , including ease of learning, safety, requires less code, is interactive, among other things.

For beginners or those completely new to the field, I’m going to be explaining Swift and and Objective-C in more detail so you know the advantages and disadvantages of each.

Introduction to Swift for Non-Programmers

Compared to Objective-C, Swift has a simpler syntax that makes it easier to learn for beginners or for anyone coming from another programming language. According to Wikipedia, the language took language ideas "from Objective-C, Rust, Haskell, Ruby, Python, C#, CLU, and far too many others to list". This means that programmers coming from other languages or from other platforms (such asweb development) will find a lot of concepts in Swift similar to what they were used to.

Swift is also easier to read and maintain that Objective-C. In Objective-C, you have to maintain two code files for each class you write — a header file with a .h extension and an implementation file with a .m extension. Sometimes changes made in one file affect the other, so you have to make sure to keep the files in sync. Swift, just like other programming languages like Java, C#, JavaScript, et c. manages with just one file.

[Want to learn some hands on skills? Then check out our brand new iOS Development Course – launched today!]

Introduction to Swift for Non-Programmers Objective-C’s syntax is quite verbose. It is also quite different from other programming languages. Take the below code comparison as an example. The first two statements shows some code in Objective-C and the other two statements shows the same code in Swift.

Objective-C:

NSString *str = @"hello,";
str = [str stringByAppendingString:@" world"];

Swift:

var str = "hello,"
str += " world"

If you are coming from another programming language, you will be able to understand the second piece of code as it is similar (with slight differences here and there) to how variables are declared in other programming languages. Even for a beginner, the second example code seems less intimidating than the first.

Swift is still a rather new programming language but its popularity and adoption has been increasing faster than any other language. It is now the most popular language to develop for Apple devices. Some popular apps built using Swift include Lyft, Khan Academy, Clear, Sky Guide, LinkedIn, Strava, Yahoo Weather and Hipmunk. Because it was open sourced by Apple, we are bound to see its use spread to include development for other platforms other than Apple devices. As of now, there is already a compiler for it for Linux. This is a huge step-up from Objective-C which could only be used on a Mac OS machine. Swift was released under the Apache 2.0 license , which means developers can use it as they like — even in commercial products.

Introduction to Swift for Non-Programmers

This is still really new and speculative, but rumor has it that Google might be considering making Swift a “first class” language in Android development . This would be good news to anyone who already knows Swift since porting their app to Android will now be an easier process that won’t require acquiring additional skills. Facebook and Uber are also apparently looking to make Swift more central to their operations.

A benefit of Swift is that it can serve as both a forward-facing language as well as a server-side one. For a product like Facebook, that’s beneficial; apps and servers can speak to one another seamlessly, and it potentially gives the company a wider scope to write APIs for services.

Introduction to Swift for Non-Programmers

Swift is still evolving and it will be interesting to see what it grows up to be and what it will be used for in the future. Since its announcement at WWDC 2014, Apple developers have continued working on it, releasing incremental versions. Swift 3.0 is expected to be announced at this year’s WWDC 2016 conference with an official release set for Fall . The major goal of this release is said to be portability, meant to make it more portable to other platforms. Whatever the future has in hold for Swift, its growth and popularity has increased job demands for it . It is a good time to be or to consider becoming a Swift developer.

Introduction to Swift for Non-Programmers

Where to start when learning Swift

There are numerous resources you can use when learning Swift. We cannot give an exhaustive list, but we’ll mention some resources that you might find useful.


  • Each year, Apple hosts the World Wide Developer Conference, where they announce new devices and changes to their SDK. They also hold different talks that teach developers how to implement the newly introduced libraries and technologies. Videos of these talks are available on the WWDC website . They are a valuable resource to developers.

Introduction to Swift for Non-Programmers

  • You can also find some free and premium courses online to learn from. Some of them are: Stanford’s’ CS193P iOS Development Class (this is available on iTunes for free. The only disadvantage is that the latest class posted is on iOS 8. It’s still useful in learning Swift though), Hacking with Swift is a Swift book that is free to read online, with premium options for offline viewing, Coursera offers some courses on iOS development that are free to take with premium options for code review and certifications, Udacity offers free video courses on iOS development with premium options for mentorship and certification.
  • Finally, here at CareerFoundry, we’ve launched a 6 month iOS course that will take you from a beginner to having created apps that you can launch on the App Store by the end of the course. The course offers one-to-one mentorship with experienced developers that are there to lead you through your learning journey and help you out whenever you get stuck.Check it out here! 


转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Introduction to Swift for Non-Programmers

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址