dengjunior / chuangge Goto Github PK
View Code? Open in Web Editor NEWiOS 邓
License: MIT License
iOS 邓
License: MIT License
原文地址:http://kb.cnblogs.com/page/512047/
1. 什么是REST
REST全称是Representational State Transfer,中文意思是表述(编者注:通常译为表征)性状态转移。 它首次出现在2000年Roy Fielding的博士论文中,Roy Fielding是HTTP规范的主要编写者之一。 他在论文中提到:“我这篇文章的写作目的,就是想在符合架构原理的前提下,理解和评估以网络为基础的应用软件的架构设计,得到一个功能强、性能好、适宜通信的架构。REST指的是一组架构约束条件和原则。” 如果一个架构符合REST的约束条件和原则,我们就称它为RESTful架构。
REST本身并没有创造新的技术、组件或服务,而隐藏在RESTful背后的理念就是使用Web的现有特征和能力, 更好地使用现有Web标准中的一些准则和约束。虽然REST本身受Web技术的影响很深, 但是理论上REST架构风格并不是绑定在HTTP上,只不过目前HTTP是唯一与REST相关的实例。 所以我们这里描述的REST也是通过HTTP实现的REST。
2. 理解RESTful
要理解RESTful架构,需要理解Representational State Transfer这个词组到底是什么意思,它的每一个词都有些什么涵义。 下面我们结合REST原则,围绕资源展开讨论,从资源的定义、获取、表述、关联、状态变迁等角度,列举一些关键概念并加以解释。
https://developer.github.com/v4/guides/migrating-from-rest/
后台在学习
github 写接口的 风格
Differences in API logic
Migrating from REST to GraphQL represents a significant shift in API logic. The differences between REST as a style and GraphQL as a specification make it difficult—and often undesirable—to replace REST API calls with GraphQL API queries on a one to one basis. We've included specific examples of migration below.
好,那就接着看NSURLResponse,发现他的属性方法中没有能获取头文件的。倒是他的子类中有一个属性挺顺眼的。
果真是,这下就好办多了,直接强转,获取数据就好了
NSHTTPURLResponse *response = (NSHTTPURLResponse *)task.response;
NSDictionary *allHeaders = response.allHeaderFields;
iOS开发常用国外网站清单 http://blog.sina.com.cn/s/blog_4b55f6860101hi53.html
即便过了入门阶段,还是要经常看看一些不错的实例教程。
1.http://mobile.tutsplus.com/category/tutorials/iphone/
比较新的一个网站,以前没注意到。
其中有一篇文章着重推荐,学习iOS游戏开发可以参考的10个实例(源代码都在github上):
http://mobile.tutsplus.com/tutorials/iphone/learn-ios-game-development-by-example-10-projects-to-get-you-started/
2.http://www.raywenderlich.com
这个就不用说了,基本每个学iOS开发的都知道
问题解决:
这个算是平时最需要用的了,虽然第一反应是用google,但也有些搜不到,就只能求人帮忙了
1.http://stackoverflow.com
最强大的编程问答网站
2.http://www.developerfeed.com/profile/ios-developer
有点类似stack overflow
苹果官方开发者论坛,有很多苹果的黄马甲在,不光是技术层面的,曾经帮我们解决了不少上线相关的问题
4.http://iphonedevsdk.com/forum
最常去的苹果开发论坛之一。
这个网站清单长期更新中,需要不断补充完善,google虽然强大,但要找到特定的内容还是要花时间。如果有个开发用的垂直搜索引擎就好了,可以省掉不少时间。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.