{"id":139646,"date":"2021-04-29T14:39:25","date_gmt":"2021-04-29T13:39:25","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?p=139646"},"modified":"2021-04-29T15:21:30","modified_gmt":"2021-04-29T14:21:30","slug":"cross-platform-development-with-kmm-and-ktor","status":"publish","type":"post","link":"https:\/\/blog.jetbrains.com\/zh-hans\/2021\/04\/29\/cross-platform-development-with-kmm-and-ktor\/","title":{"rendered":"\u7f51\u7edc\u7814\u8ba8\u4f1a\uff1a\u4ee5 KMM x Ktor \u6253\u9020\u5168\u5e73\u53f0\u5e94\u7528"},"content":{"rendered":"Kotlin \u652f\u6301\u591a\u5e73\u53f0\u5f00\u53d1\u7684\u7279\u6027\u4e00\u76f4\u53d7\u5230\u4f17\u591a\u5f00\u53d1\u8005\u7684\u671f\u5f85\uff0c\u6bd5\u7adf\u80fd\u7528\u4e00\u79cd\u8bed\u8a00\u5f00\u53d1\u524d\u7aef\uff08Kotlin\/JS\uff09\u3001\u540e\u7aef\uff08Kotlin\/JVM\uff09\u3001Android\uff08Kotlin\/JVM\uff09\u53ca iOS\uff08Kotlin\/Native\uff09\u662f\u591a\u4e48\u5438\u5f15\u4eba\u30022020 \u5e74 8 \u6708\uff0cKotlin \u56e2\u961f\u6b63\u5f0f\u53d1\u5e03 1.4 \u7248\uff0c\u5e76\u63a8\u51fa KMM\uff08Kotlin Multiplatform Mobile\uff09\u63d2\u4ef6\uff0c\u4f7f Kotlin \u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u540c\u4e00\u4e2a IDE \u91cc\u65b9\u4fbf\u7684\u5f00\u53d1 Android\u3001iOS \u53cc\u5e73\u53f0\u7684 App\u3002\u540c\u65f6\uff0cKotlin \u751f\u6001\u7cfb\u91cc\u7684\u5404\u4e2a\u6269\u5c55\u5e93\u53ca Ktor \u6846\u67b6\u4e5f\u4e00\u5e76\u63a8\u51fa\u5bf9\u5e94\u7684\u66f4\u65b0\uff0c\u4e3a Kotlin \u5168\u5e73\u53f0\u5e94\u7528\u6784\u5efa\u51fa\u826f\u597d\u7684\u57fa\u7840\u3002\n\n\u60f3\u50cf\u4e00\u4e0b\uff0c\u82e5\u7528 KMM \u5f00\u53d1\u53cc\u5e73\u53f0 Mobile App\uff0c\u518d\u52a0\u4e0a Ktor \u5f00\u53d1\u670d\u52a1\u7aef API\uff0c\u4e00\u4e2a\u5168\u5e73\u53f0\u5e94\u7528\u53ef\u4ee5\u4ec5\u7528\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\u6253\u9020\uff0c\u662f\u4e0d\u662f\u5f88\u7f8e\u597d\uff1f\n\n\n\n\u4e3a\u4e86\u8ba9\u5f00\u53d1\u8005\u66f4\u5177\u4f53\u7684\u770b\u5230\u4ee5 Kotlin \u6253\u9020\u5168\u5e73\u53f0\u5e94\u7528\u7684\u6d41\u7a0b\uff0c5\/22 (\u516d) 15:00-17:00 \u6211\u9080\u8bf7\u5230  Kotlin \u4e2d\u6587\u793e\u533a\u6838\u5fc3\u6210\u5458\u4e54\u79b9\u6602\u4e0e\u6211\u4e00\u540c\u76f4\u64ad\u3002\u5728\u8fd9\u573a\u5206\u4eab\u91cc\uff0c\u79b9\u6602\u4f1a\u5728\u4e24\u4e2a Mobile \u5e73\u53f0\u4e0a\u5b9e\u73b0\u4e00\u4e2a\u65b0\u95fb\u9605\u8bfb\u5668\u7684 UI\uff0c\u5e76\u901a\u8fc7 KMM Share Module \u7684\u8bbe\u8ba1\u5411\u540e\u7aef\u6293\u53d6\u6570\u636e\u3002\u800c\u5723\u4f51\u5219\u4f1a\u7528 Ktor \u6293\u53d6 RSS \u65b0\u95fb\u6765\u6e90\uff0c\u5e76\u6574\u7406\u6210\u524d\u7aef\u6240\u9700\u7684 JSON API\u3002\u542c\u5b8c\u8fd9\u573a\u5206\u4eab\u540e\uff0c\u60a8\u5c06\u4f1a\u5bf9\u5168\u5e73\u53f0\u5f00\u53d1\u6709\u66f4\u660e\u786e\u7684\u6982\u5ff5\uff0c\u5e76\u5b66\u4f1a\u4f7f\u7528 Kotlin \u6253\u9020 Android\u3001iOS App \u53ca Restful API\uff0c\u9ad8\u6548\u5f00\u53d1\u5168\u5e73\u53f0\u5e94\u7528\uff01\n\n\u672c\u6b21\u6d3b\u52a8\u4f7f\u7528\u817e\u8baf\u4f1a\u8bae\u5e76\u5728 BiliBili \u76f4\u64ad\uff0c\u6f14\u793a\u5185\u5bb9\u5168\u7a0b\u5f55\u5f71\uff0c\u5f85\u526a\u8f91\u540e\u4f1a\u516c\u5e03\u89c6\u9891\uff0c\u76f8\u5173\u6750\u6599\u4e5f\u4f1a\u53d1\u9001\u81f3\u4e0e\u4f1a\u8005\u90ae\u7bb1\uff0c\u8bf7\u9884\u5148\u62a5\u540d\u4ee5\u6536\u53d6\u6d3b\u52a8\u4fe1\u606f\u3002\n\u7acb\u5373\u6ce8\u518c\u53c2\u52a0\n\n\u5609\u5bbe\u7b80\u4ecb\n\u8303\u5723\u4f51 - JetBrains \u6280\u672f\u5e03\u9053\u5e08\n\n\n\n\u5723\u4f51\u662f JetBrains \u6280\u672f\u5e03\u9053\u5e08\uff0c\u8d1f\u8d23\u63a8\u5e7f JetBrians \u76f8\u5173\u6280\u672f\u4e0e\u4ea7\u54c1\uff0c\u5305\u62ec\uff1aKotlin \u7f16\u7a0b\u8bed\u8a00\u3001 IntelliJ IDEA \u7cfb\u5217 IDE \u53ca Space\u3001YouTrack\u3001TeamCity\u3001Upsource \u7b49\u56e2\u961f\u5408\u4f5c\u89e3\u51b3\u65b9\u6848\uff0c\u534f\u52a9\u5f00\u53d1\u8005\u5584\u7528\u5de5\u5177\u8f85\u52a9\u6765\u63d0\u5347\u751f\u4ea7\u529b\uff0c\u540c\u65f6\u7ef4\u62a4\u4ee3\u7801\u54c1\u8d28\u3002\n\n\u4e54\u79b9\u6602 - \u643a\u7a0b\u673a\u7968\u79fb\u52a8\u7aef\u8d44\u6df1\u5de5\u7a0b\u5e08\n\n\n\n\u79b9\u6602\u662f Kotlin \u4e2d\u6587\u793e\u533a\u6838\u5fc3\u6210\u5458\uff0c\u66fe\u591a\u6b21\u5728 Kotlin \u7528\u6237\u7ec4\u3001GDG \u7b49\u6280\u672f\u5206\u4eab\u6d3b\u52a8\u62c5\u4efb\u8bb2\u5e08\u3002\u9664\u4e86\u79ef\u6781\u63a8\u5e7f Kotlin \u6280\u672f\u5916\uff0c\u4e5f\u662f\u56fe\u4e66\u300aKotlin \u7f16\u7a0b\u5b9e\u8df5\u300b\u8bd1\u8005\uff0c\u5e76\u5728\u5de5\u4f5c\u4e0a\u6301\u7eed\u63a2\u7d22 Kotlin \u5728\u4e0d\u540c\u5e73\u53f0\u4e0a\u7684\u5e94\u7528\u6f5c\u529b\u3002","protected":false},"excerpt":{"rendered":"Kotlin \u652f\u6301\u591a\u5e73\u53f0\u5f00\u53d1\u7684\u7279\u6027\u4e00\u76f4\u53d7\u5230\u4f17\u591a\u5f00\u53d1\u8005\u7684\u671f\u5f85\uff0c\u6bd5\u7adf\u80fd\u7528\u4e00\u79cd\u8bed\u8a00\u5f00\u53d1\u524d\u7aef\uff08Kotlin\/JS\uff09\u3001\u540e\u7aef\uff08Kotlin\/JVM\uff09\u3001Android\uff08Kotlin\/JVM\uff09\u53ca iOS\uff08Kotlin\/Native\uff09\u662f\u591a\u4e48\u5438\u5f15\u4eba\u30022020 \u5e74 8 \u6708\uff0cKotlin \u56e2\u961f\u6b63\u5f0f\u53d1\u5e03 1.4 \u7248\uff0c\u5e76\u63a8\u51fa KMM\uff08Kotlin Multiplatform Mobile\uff09\u63d2\u4ef6\uff0c\u4f7f Kotlin \u5f00\u53d1\u8005\u53ef\u4ee5\u5728","protected":false},"author":{"name":"\u8303\u5723\u4f51","link":"https:\/\/blog.jetbrains.com\/zh-hans\/author\/shengyou-fanjetbrains-com"},"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[4113,30],"tags":[156,915,5434,6294,5320,5788,1368],"cross-post-tag":[6355],"acf":[],"featured_image":null,"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/posts\/139646"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1069"},{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=139646"}],"version-history":[{"count":5,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/posts\/139646\/revisions"}],"predecessor-version":[{"id":139715,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/posts\/139646\/revisions\/139715"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=139646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=139646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=139646"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=139646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}