In retrospect,I am now off and on since May begin to learn language Swift are nearly six months,From the program have no feeling at all,To the present"Open practice",Experienced a lot of。Might say for a master who worked for many years,These are too shallow,The phrase "you needProject experience"You can kill me blood slot-1,But for most, like me, "small white",I think I just came past six months can be replicated。
对于 OPEN(Object Oriented Programming)Entry,I started learning from Swift。So far,I can still remember all the learning process,What's hard to know who is a self-study,No one has ever encountered a problem and answer,Fortunately, I met nice people,Google can find the answer,If other weird problems,That almost exclusively reserved。Some people say that often push:"For the programming language,Only two,One is the relatively new language,Another is outdated language "--Swift is that the former,This article about it doomed the Chinese do not have much information,So there are a lot of peoplewronglythink:"I want to learn Swift,We must learn OC (Objective-C) "。
Swift and OC
Swift is not the OC,Instead it Objective-C and Apple relationship one o'clock early years are not。Although the relationship between Swift in Cocoa to compromise from the beginning to the OC,Point it was only the interest of time,Now Swift has come to version 2.1,Inside OC shadow less and less。So,If you really want to learn is Swift ,So go ahead and do this again OC is not necessary。
- "The OC, and do business in the development of hybrid Swift how to do?"
This is probably the biggest reason people insist on learning the OC,Further stresses "Now most companies do in fact still in development with Objective-C",Yes,This is a fact,Swift also need time to iterate,But does have a lot of companies are doing to migrate to Swift,Mixed-use development is also necessary,But somebody has to do ...... Swift section is not it? If you ask me how to do part of the OC,I answer you:"When you learn to OC,OC that developers learned Swift,Wait till you learn Swift ...... "。
Words and short,Swift is an independent and complete a compiled language,Swift is not the future of open source is OC,If you grammar-grounds,I think you might as well go to learn Python ,This is a dynamic language,But the syntax and almost Swift -At least not semicolon。
Maybe - the only reason is to learn Cocoa OC ,This is the foundation of Apple's platform(Such as OS X has Cocoa ,iOS 有 Cocoa Touch ),Why this is the only reason for it? Because OC is written in Cocoa,Swift will do it to optimize migration done right,However, in terms of years,Whether Chinese literature on the frame or English,They are some more OC。Ok,About this a reason,I could not argue - I do not have contact with the frame,Because I'm still learning design patterns。This section,I will come back to in the future。
Video and books
reading!
Do not look at my record video lectures online、In live,But I was really very little to see the video to learn。One is hard for you to come across really good courses,Another video is talking about will be very slow - could I just kind of so-called visual learners,I find it hard to digest the knowledge to listen,Whether watching the video Ye Hao,Or classroom attendance。
Another point is the content of the book will be relatively stringent,But also ease of reference。But unfortunately noon pitiful about Swift's books,In addition, as Swift itself in the rapid iteration of,The publication also has hysteresis,So you can not buy is the latest entry-books grammar - and this is the same video,You find video,I think,Almost no Swift 2.1 of。
Anyway,Or to continue learning,Then I will talk about, respectively,,Both ways:
video
With respect to the difficult issue of,A set of video much easier,It also determines the instructional video on the Internet now a dime a dozen Swift,But you should still have the ability to distinguish between video and Swift's syntax version,My college often have to ask why the old syntax to hold error of,so,With respect to the study outdated syntax and then correct - we want to learn as much as possible the new syntax - so that at least the cost of correction is small。
If a video posted time,Then it should at least within six months,exceeded,Do not read - especially the stuff about grammar。But there are exceptions,For example, there is a Stanfordcs106a courses,Almost 10 years ago,But you can still see,why? The reason is that it tells of object-oriented,This theoretical stuff,For decades it may be difficult to change,So even programming languages,Old grammar,But the same will not become obsolete。
The other is to see a version of Xcode,By the time this article was first published in,Xcode version is 7.1.1,Swift compiler supports version 2.1,If Xcode 6.4,Then the corresponding should be Swift 1.2,so,If you see the video version of Xcode 6.0,Or less,That turned away please。- Unless you have the ability to troubleshoot according to grammatical features - and this certainly is a good exercise method。
The last video is recommended,In fact, the link has been given above,,yesNetease open classlink,That is what I said of course cs106a,Very old,Java language,But it does not prevent us from learning object-oriented programming ideas and。
Other than that,There is a well-known open class is thatDeveloping iOS 8 Apps with Swift(Open class at Stanford University:iOS 8 development) But unfortunately this but I did not have the opportunity to see - began to feel a level enough so I did not see,Later it has been no care - now appears on,Estimated grammar obsolete,But like a friend also worth a look:)。
At last,Now there are many online special teaching about Swift's website,APP chestnuts to look at the actual video is also a good choice。
books
So talking about books,There's talk,Let's talk about the publication of books,Domestic basic publishing books you do not look - we have a kind of level,Those "21 days Started Swift" "xx with you Fun Swift" "Swift laugh it off," "Deep learning Swift" "xx teacher highly recommended Swift"(Note:The title is my own invented,We do not pigeon-holing,To understand the spirit?)Look like a name,If you really have a favorite author(Such as the future ofTen Steps to a milk manA book of words?)Then it is like a collection to buy。
Well books published abroad,Since the publication lag,Coupled with the translation and publication ...... I think,And so it into your hands,It is not a good book we ignore,At least it is not up to date syntax。so,If in the future you have a book on Swift framework,Then they may buy to read,Even if the grammar,We can not keep up。
Say the following e-books,As the fast e-book distribution,And easy to modify,So most of them are able to do with the times,We do not require authors to catch up with the latest Swift 2.1,But at least the author will continue to update,That people are moving up。the following,I put my book learning to share for everyone to read Swift。
This is actually a Java-entry books,It tells the Java syntax,Also explain in more detail the object-oriented! --in factOO is a world language,Swift is also very similar to Java。I Started Swift,In addition to the door of the old video cs106a,This is it《Head First Java》。
Further a good book is AppCoda of Chicken《Beginning iOS 9 Programming with Swift》The price a bit touching,But really worth the price,The author APP as a chestnut,Start from scratch,The APP is a complete development process over again with you! I study in the second month of Swift spent a whole month to do this out APP from start to finish! --Ok,Probably the only regret is that it isEnglishof,Currently there is no Chinese translation,But language is not complicated,Uh - if you are not particularly poor English words。
For Advanced,So I recommend Wang Wei heroes《Swifter – 100 A Swift essential tips (second edition)》,I think they get to know this 100-related knowledge,You can carry on sending troops。The book is not expensive,Also continuously updated,Is the work of conscience。I bought a genuine,After reading a special print look down slowly,Really great。
At last,Natural and ultimately Apple's official manual,"Swift Programming Language"Here I want to Tucao is that it is not in fact the latest ...... Keke,Yes,Latest depends Xcode,but,This is the latest authoritative document we could find a。Unfortunately, it is useless Chinese version,There are versions 1.0 and 2.0 on the networktranslation,Unfortunately, as it is the open source version,Not quickly update,Translation error a lot - so I opened a project,Currently basics section has been translated,You cancome hereLook。
Grammar and theory
Learning a programming language,Our aim is that how you want to use it to develop software (or service),Instead of developing a calculator,A small game。So you have to learn those things in theory,Because these things have a guiding significance for the development of cooperation。
We say Swift language is an OO language,In fact, that it is an object-oriented language,Then it and Java,And almost Python,You learn Swift,You will not Java,But if you learn object-oriented,It may OC、Java、Python will be able to read the。So please do not ignore the object-oriented theory of learning,Only the syntax of the language proficiency is of little use!
Students often have to ask why do so here,There is not as it not? Why I'll see you lecture,But what you have to do to get started, then there is no clue? Why you one pair will be able to analyze any application can speak design?
In fact, I would rather you not flicker(error),In fact, you do not understand the object-oriented,No design program analysis capabilities。For such a problem not even be able to split it into basic units,There is talk about what it written in code? Yes, if the language is not even able to understand object-oriented analysis is useless,But if you do not understand these basic OO,How we can understand the framework and design pattern here?
Do not understand the framework and design patterns,Stable program is the inevitable will not happen。You do not know mvc,How can a good framework? How good can the wheels of others? And how to work with the team?
- learn OOP ah,Otherwise, write code that is not,A bug。
Baidu and Google
This thing for Baidu,My personal opinion is that even the gossip do not use it to search,I've never had to use Baidu to find something useful,You might say about the privacy of Google and Baidu will be the same as peeping,But I think just those included Google does something useful - in most cases,If you write code encountered an error,The wrong content posted in Google,Martyrs will be able to find it。
As for access,There is a link to the upper right corner of my blog "How can science online”,This side collection of recent generations can use Google's Anti,Just pick one worked not on the list?
At last
Ok,Currently there is only so much,With the deepening of my learning,I will come back filled with more content,I hope these things help your self-study of the road!
Original article written by LogStudio:R0uter's Blog » How to learn programming language Swift?
Reproduced Please keep the source and description link:https://www.logcg.com/archives/1358.html