<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Librar &#8211; 隨心所欲</title>
	<atom:link href="https://doeverythingiwant.com/tag/librar/feed/" rel="self" type="application/rss+xml" />
	<link>https://doeverythingiwant.com</link>
	<description>iOS Developer 的隨筆記錄</description>
	<lastBuildDate>Sun, 17 Dec 2023 10:02:32 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://doeverythingiwant.com/wp-content/uploads/2025/08/cropped-0802.png</url>
	<title>Librar &#8211; 隨心所欲</title>
	<link>https://doeverythingiwant.com</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SDK, Framework and Library</title>
		<link>https://doeverythingiwant.com/sdk_framework_library/</link>
					<comments>https://doeverythingiwant.com/sdk_framework_library/#respond</comments>
		
		<dc:creator><![CDATA[艾普利]]></dc:creator>
		<pubDate>Sun, 17 Dec 2023 09:47:07 +0000</pubDate>
				<category><![CDATA[寫程式]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[Librar]]></category>
		<category><![CDATA[SDK]]></category>
		<guid isPermaLink="false">https://doeverythingiwant.com/?p=2206</guid>

					<description><![CDATA[Photo by Safar Safarov on Unsp&#8230;]]></description>
										<content:encoded><![CDATA[
<p class="has-text-align-center wp-block-paragraph">Photo by <a href="https://unsplash.com/@safarslife?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash" target="_blank" rel="noopener">Safar Safarov</a> on <a href="https://unsplash.com/photos/turned-on-gray-laptop-computer-MSN8TFhJ0is?utm_content=creditCopyText&amp;utm_medium=referral&amp;utm_source=unsplash" target="_blank" rel="noopener">Unsplash</a></p>



<p class="wp-block-paragraph">前些日子突然和同事聊起了 SDK、Framework 和 Library 差別在哪裡? </p>



<p class="wp-block-paragraph">就我所知 SDK 包含了一堆東西，UI、function …等等，就範圍來說是最大的，Framework 和 Library 很像，都是有一些funcation 可以讓開發人員呼叫。</p>



<p class="wp-block-paragraph">嗯…感覺好像不是很清楚，還記得以前有找過資料，但是後來都忘記了，想說正好有個機會重新再把這三個東西了解更多一點</p>



<span id="more-2206"></span>



<h2 class="wp-block-heading">SDK</h2>



<p class="wp-block-paragraph">SDK(<em>Software Development Kit</em>) 軟體開發套件，感覺只要有帶 Kit 這個字的總是有一群東西…</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">A software development kit (SDK) is a collection of software development tools in one installable package. They facilitate the creation of applications by having a compiler, debugger and sometimes a software framework. They are normally specific to a hardware platform and operating system combination. To create applications with advanced functionalities such as advertisements, push notifications,etc; most application software developers use specific software development kits.</p>
<cite>Wikipedia</cite></blockquote>



<p class="wp-block-paragraph">SDK 除了包含 Framework 外還有compiler、 debugger。</p>



<p class="wp-block-paragraph">舉例的話，對開發者來說，我們常常在工作時說的 iOS 就是一個 SDK，iOS SDK 提供 iOS App 的開發環境，當然要透過 Xcode 這個IDE (<em>integrated development environment</em>)工具來開發，同理也有 Android SDK。</p>



<p class="wp-block-paragraph">這和使用者常常指的iOS 不一樣，iPhone 的iOS 是 Operating Systems 是負責管理App的系統，不要搞錯了喔~</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Framework</h2>



<p class="wp-block-paragraph">Framework 就如其名，是一個框架，一個package</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard way to build and deploy applications and is a universal, reusable software environment that provides particular functionality as part of a larger software platform to facilitate the development of software applications, products and solutions.</p>
<cite>Wikipedia</cite></blockquote>



<p class="wp-block-paragraph">Framework 基本上提供了許多可以幫助你完成應用程式的一些元件。</p>



<p class="wp-block-paragraph">舉例來說，SwiftUI &amp; UIKit 它們都是Framework ，它們提供了很多 UI 相關框架(元件)讓開發者只需要加上一些程式碼就可以完成畫面，至於像是 Text 是怎麼處理多語系與字型、List 是怎麼讓畫面可以下拉更新，這些都不需要開發者處理。</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Library</h2>



<p class="wp-block-paragraph">Library 就是一堆函式的集合，最早在學習 C++ 的時候就知道的名詞</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p class="wp-block-paragraph">Library is a collection of non-volatile resources used by computer programs, often for software development. These may include configuration data, documentation, help data, message templates, pre-written code and subroutines, classes, values or type specifications.</p>
<cite>Wikipedia</cite></blockquote>



<p class="wp-block-paragraph">Library &#8230; 嗯…看來就是一堆可以提供你呼叫用的function、class、 data ，這個就有點難舉例了…</p>



<hr class="wp-block-separator has-alpha-channel-opacity"/>



<h2 class="wp-block-heading">Library vs Framework</h2>



<p class="wp-block-paragraph">說起來其實 Library 和 Framework 很像，上網找了一下多數說二者之間的差別在於<em> Inversion of Control</em> </p>



<p class="wp-block-paragraph">Library 的話，開發者可以呼叫 Library 裡的 function 做一些處理，最後會得到結果，然後再由開發者決定要做些什麼處理，控制權是在開發者手上的</p>



<pre class="wp-block-code"><code>You own the control</code></pre>



<p class="wp-block-paragraph">Framework提供了框架並擁有內建行為，開發者可以依照Framework 提供的框架，填入一些程式碼，讓 Framework 來幫你處理後面的事情，你只需要在框架指定的地方寫上程式碼就行了，控制權反而是在 Framework 手上，這種情況就稱為 <em>Inversion of Control</em> </p>



<pre class="wp-block-code"><code>The framework calls you</code></pre>



<h2 class="wp-block-heading">總結</h2>



<p class="wp-block-paragraph">SDK : 包含 Libraries、Frameworks、Tools、Documentation ，所表示的概念比較大範圍</p>



<p class="wp-block-paragraph">Framework: 提供框架(包含現成可用的程式)，呼叫時通常只需要再寫上一些程式碼即可，控制權是屬於 Framework的</p>



<p class="wp-block-paragraph">Library: 提供可讓開發者呼叫的 function、data、class…等，控制權是屬於開發者的</p>



<p class="wp-block-paragraph">最後照慣例祝大家 Coding 愉快!!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://doeverythingiwant.com/sdk_framework_library/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
