<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[SwiftLover - Medium]]></title>
        <description><![CDATA[SwiftLover Board. - Medium]]></description>
        <link>https://medium.com/swiftlover?source=rss----bf7b4887bc2e---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>SwiftLover - Medium</title>
            <link>https://medium.com/swiftlover?source=rss----bf7b4887bc2e---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 02:17:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/swiftlover" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Deploy Swift ( Vapor ) ขึ้น Heroku]]></title>
            <link>https://medium.com/swiftlover/deploy-swift-vapor-%E0%B8%82%E0%B8%B6%E0%B9%89%E0%B8%99-heroku-a787959e1383?source=rss----bf7b4887bc2e---4</link>
            <guid isPermaLink="false">https://medium.com/p/a787959e1383</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[heroku]]></category>
            <category><![CDATA[vapor]]></category>
            <dc:creator><![CDATA[Issarapong Poesua]]></dc:creator>
            <pubDate>Mon, 10 Jul 2017 06:07:17 GMT</pubDate>
            <atom:updated>2017-07-10T06:14:05.774Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*3MaG1StsLBxg4cFvT1Vtqg.png" /></figure><p>หลายๆ คนที่เขียน Swift มาก็น่าจะเคยได้ยินมาบ้าง ว่า Swift สามารถนำมาเขียนเป็น server-side ได้ แต่อาจจจะไม่รู้ว่าเริ่มยังไง หรือ มันมีความพิเศษกว่าการขึ้นโปรเจค iOS App / macOS App ยังไง ยากกว่าหรือเปล่า</p><p>ผมเลยเริ่ม Google ดูก็เจอกับบทความนี้ ว่ามี Framework อยู่ 4 ตัวที่บทความนี้กล่าวถึง</p><p><a href="https://medium.com/@rymcol/benchmarks-for-the-top-server-side-swift-frameworks-vs-node-js-24460cfe0beb">Benchmarks for the Top Server-Side Swift Frameworks vs. Node.js</a></p><p>ค้นต่อไปก็เจอกับบทความนี้ ดีเลย ท่าน <a href="https://medium.com/u/3f7363e0e721">Kittisak Phetrungnapha</a> เขียนไว้แล้ว</p><p><a href="https://itopstory.com/introduction-server-side-written-by-swift-with-vapor-1b1eb7d9b988">มาหัดใช้ Swift 3 เขียน Server Side ด้วย Vapor กันเถอะ</a></p><p>อ่าวงั้นจะเขียนอะไรดีหละ ขึ้นโปรเจคกันไปแล้ว ก็ Deploy ขึ้น server แล้วกัน</p><ol><li>project vapor Swift side-sever ที่เสร็จสมบูรณ์แล้ว ( ต้องมี git ด้วยนะ )</li><li>Heroku account และ <a href="https://devcenter.heroku.com/categories/command-line">Heroku CLI</a></li></ol><p>ในส่วนของ Swift on Server-Side</p><pre>/GET getPerson</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1ce8850467a89cf2e0f787bc13aa78ee/href">https://medium.com/media/1ce8850467a89cf2e0f787bc13aa78ee/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tyJkyYDrzhMhx3OLrFzSvQ.png" /><figcaption>ทดสอบ /GET getPeople ( port 8080 )</figcaption></figure><p>เมื่อทดสอบแล้วสามารถใช้งานได้ ก็ทำการ Login Heroku Account บน Heroku CLI</p><pre>$ heroku login</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*T-nNmd4mTcaQxpEBgQDNRw.png" /></figure><p>เข้าไปยัง directory ของ Project และทำการ Init vapor heroku</p><pre>$ vapor heroku init</pre><p>ทำการตั้งชื่อ Heroku App Name และอื่น ๆ ตามความต้องการ</p><p>เมื่อสั่งให้ทำการ push to heroku เรียบร้อย ก็จะใช้เวลารอประมาณ 5–10 นาที</p><pre>Building on Heroku ... ~5-10 minutes [Done]</pre><p>ในขั้นตอนการ deploy นั้น Heroku CLI จะบอกว่า Heroku App URL คือ อะไร</p><pre>Would you like to deploy to other than US region server?<br>y/n&gt; n<br><a href="https://vapor-swift-heroku.herokuapp.com/">https://vapor-swift-heroku.herokuapp.com/</a> | <a href="https://git.heroku.com/vapor-swift-heroku.git">https://git.heroku.com/vapor-swift-heroku.git</a></pre><p>เมื่อเสร็จแล้วก็มาทดสอบยิง request กันที่ port 80 ได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5rm-ZI27QBqpVg0wdzOvqg.png" /><figcaption>ทดสอบ /GET getPeople บน Heroku App ( port 80 )</figcaption></figure><p>สามารถดู source code demo project ได้ที่ <a href="https://github.com/Dekablade01/demo-swift-on-vapor">https://github.com/Dekablade01/demo-swift-on-vapor</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a787959e1383" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swiftlover/deploy-swift-vapor-%E0%B8%82%E0%B8%B6%E0%B9%89%E0%B8%99-heroku-a787959e1383">Deploy Swift ( Vapor ) ขึ้น Heroku</a> was originally published in <a href="https://medium.com/swiftlover">SwiftLover</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ลองใช้ RxSwift ร่วมกับ TableView ไม่ได้ยากอย่างที่คิด แถมชีวิตง่ายขึ้น]]></title>
            <link>https://medium.com/swiftlover/%E0%B8%A5%E0%B8%AD%E0%B8%87%E0%B9%83%E0%B8%8A%E0%B9%89-rxswift-%E0%B8%A3%E0%B9%88%E0%B8%A7%E0%B8%A1%E0%B8%81%E0%B8%B1%E0%B8%9A-tableview-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%84%E0%B8%94%E0%B9%89%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%B4%E0%B8%94-%E0%B9%81%E0%B8%96%E0%B8%A1%E0%B8%8A%E0%B8%B5%E0%B8%A7%E0%B8%B4%E0%B8%95%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%82%E0%B8%B6%E0%B9%89%E0%B8%99-cc597525b530?source=rss----bf7b4887bc2e---4</link>
            <guid isPermaLink="false">https://medium.com/p/cc597525b530</guid>
            <category><![CDATA[rxswift]]></category>
            <category><![CDATA[uitableview]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Issarapong Poesua]]></dc:creator>
            <pubDate>Sat, 08 Jul 2017 14:25:44 GMT</pubDate>
            <atom:updated>2017-07-08T14:27:40.428Z</atom:updated>
            <content:encoded><![CDATA[<p>ในบทความนี้ หยิบ TableView มาเป็นตัวอย่างให้ดู เพื่อให้เห็นความแตกต่างอย่างชัดเจน ระหว่าง TableView แบบปกติ และแบบ RxSwift</p><p>ถ้าพูดถึง TableView แล้ว การสร้างจะต้องทำยังไงบ้าง iOS Developer ทุกคนมีคำตอบอยู่ในใจ</p><ol><li>สร้าง dataSource ให้กับ UITableView</li><li>numberOfItemsInSection</li><li>cellForRowAtIndexPath</li><li>cast UITableViewCell</li><li>set dataSource ให้กับ UITableView</li></ol><p>ในบทความนี้จะลองสร้าง TableView จาก RxSwift ให้ดูเป็นตัวอย่างครับ</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4dff9dac5f39720a2b5909dd11549bb8/href">https://medium.com/media/4dff9dac5f39720a2b5909dd11549bb8/href</a></iframe><p>ผมสร้าง Model ของ Person ขึ้นมา และทำการสร้าง array ของ Person เพื่อเตรียมนำไปแสดงใน TableView</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/029cbde31a8cbf58cc231967a359fc0c/href">https://medium.com/media/029cbde31a8cbf58cc231967a359fc0c/href</a></iframe><p>จากนั้นก็ทำการสร้าง Observable ของ array ของ Person ( Observable&lt;[Person]&gt;) ขึ้นมาจาก array ของ Person ( [Person] )</p><p>และทำการ bind เข้ากับ items ของ tableView จะได้รับ callback กลับมา 3 ค่า คือ</p><pre>(row, element, cell) in ...</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b95711030ec0af3bf1afccad9717e21/href">https://medium.com/media/0b95711030ec0af3bf1afccad9717e21/href</a></iframe><p>แต่เข้า method tableView.rx.items นั้น return Disposable ออกมาจึงนำ disposeBag มารับ Disposable นั้นเพื่อนำไปจัดการต่อไป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*HMRHg_EWVj7nNN2C2odmmA.png" /></figure><p>นอกจากนี้ ยังสามารถใช้แทน didSelectItemAtIndexPath ใน UITableViewDelegate และใช้งานร่วมกับ UIKit อื่น ๆ ได้อีกมากมาย</p><p>สามารถดู source demo ได้ที่ <a href="https://github.com/Dekablade01/DemoTableView-RxSwift/tree/master">https://github.com/Dekablade01/DemoTableView-RxSwift/tree/master</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc597525b530" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swiftlover/%E0%B8%A5%E0%B8%AD%E0%B8%87%E0%B9%83%E0%B8%8A%E0%B9%89-rxswift-%E0%B8%A3%E0%B9%88%E0%B8%A7%E0%B8%A1%E0%B8%81%E0%B8%B1%E0%B8%9A-tableview-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%84%E0%B8%94%E0%B9%89%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B8%AD%E0%B8%A2%E0%B9%88%E0%B8%B2%E0%B8%87%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%84%E0%B8%B4%E0%B8%94-%E0%B9%81%E0%B8%96%E0%B8%A1%E0%B8%8A%E0%B8%B5%E0%B8%A7%E0%B8%B4%E0%B8%95%E0%B8%87%E0%B9%88%E0%B8%B2%E0%B8%A2%E0%B8%82%E0%B8%B6%E0%B9%89%E0%B8%99-cc597525b530">ลองใช้ RxSwift ร่วมกับ TableView ไม่ได้ยากอย่างที่คิด แถมชีวิตง่ายขึ้น</a> was originally published in <a href="https://medium.com/swiftlover">SwiftLover</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>