TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Building a Production Server Swift App

137 pointsby ckuroseover 8 years ago

12 comments

iamjonoover 8 years ago
Going to chime in a bit here... &quot;Avoid #if os(Linux)… When you do this, you lose all help from Xcode. It can’t do syntax checking” ... That’s not correct. Jeff was seeing the effect of something else blocking this from happening.<p>arc4random, yeah, it doesn&#x27;t exist on Linux currently, but there are other options that are better anyway, like using TurnstleCrypto.<p>For Perfect, there&#x27;s also a macOS app that aside from helping the process of starting projects, dependencies, building etc - it also integrates a standardized Docker Ubuntu 16 image which also hooks into Xcode so when you build it&#x27;s also building in Ubuntu and therefore catches linux-specific build issues immediately.<p>Anyway, my 2c.<p>(Full disclosure, I work on the Perfect dev team)
评论 #13215178 未加载
nxc18over 8 years ago
Its cool that you can run Swift on the server, but that sure does seem like a lot of hoops to jump through, coupled with equally many gotchas. No threading on Linux, NSUnimplemented all the time, no built in random, poorly implemented foundation types, etc. seem like a lot to deal with.<p>It seems a more developed language&#x2F;runtime (e.g. C#&#x2F;F#&#x2F;VB .NET or Java 8) would do a lot better with these specific requirements (typesafe, well-tooled, x-plat, server-side app) than Swift. Especially if you&#x27;re going to be writing the UI in html&#x2F;js&#x2F;css and are thus not anchored to the Apple ecosystem anyway, Swift seems like a bizarre choice.<p>The author seems to like xcode quite a bit, but I don&#x27;t see it as more competitive or better than any other IDE. Not to mention it does window management and the like differently from everyone else, so when you&#x27;re getting into it, it feels like you have to learn IDEs, <i>and then</i> you need to learn xcode. I also don&#x27;t understand why people are so complacent about xcode crashing all the time - if VS Code or VS or Eclipse or IntelliJ <i>ever</i> crashed on me I&#x27;d be pretty darn upset.
评论 #13213279 未加载
评论 #13213058 未加载
评论 #13218152 未加载
评论 #13213216 未加载
评论 #13213243 未加载
评论 #13213074 未加载
pietrofmaggiover 8 years ago
<p><pre><code> &gt; &quot;Python works okay, but I think Xcode is great because of autocomplete and syntax checks.&quot; </code></pre> Well, just say that you wanted to try something new. That&#x27;s a much better excuse to pick a technology.<p>I think that there are some great tools around for Python, and picking a language because of XCode... I think that one of the major selling point of Xamarin is that you can avoid it altogether :-)
评论 #13213386 未加载
matthewmacleodover 8 years ago
Sounds like it&#x27;s got a bit of development to go before the language is suitable for this use case, but I must admit I&#x27;m quite excited about it.<p>Having recently been experimenting with Go and Rust in the same sort of space, my impression is that Go is a bit too verbose and lacking in features - definitely works and lots of people like that, but I don&#x27;t find it particularly powerful. Rust is great, but I&#x27;ve found that web backends end up with too much code - and it&#x27;s still quite a challenging language to use, though that may be my inexperience. Building iOS apps in Swift recently, I&#x27;ve really started to get enjoy using the language. Once the various issues are worked out, I&#x27;m optimistic about its suitability for things like that - and it&#x27;s great to have more language options to play with!
anonyfoxover 8 years ago
I still wonder <i>why</i> i would use Swift in the backend.<p>- elixir&#x2F;erlang: fault tolerance, scalability, high complexity web apps<p>- Node: npm already has what you need, SSR for SPAs, JS is accessible for frontend guys (sort of)<p>- Golang: dead-easy microservices with CLI support, single file deployments, good performance, beginner level language makes Training&#x2F;hiring easy<p>- Rust: excellent performance and great typesystem, ideal for writing Heavy core algorithms of products and use them as libs from other languages. Also all benefits of Go (except ease-of-learning).<p>- ...<p>- swift? Given that learning languages is not an issue, why should I prefer swift over other stuff? Are there real selling points?
geodelover 8 years ago
Reading about Swift on server side and looking at Swift server dev mailing list. It appears to me that most appropriate use case of Swift on server side is Apple platform where client side is already written in Swift.<p>The server side group at Apple&#x2F;IBM seems mostly looking for Swift wrappers around C&#x2F;C++ core technology for sockets&#x2F;http&#x2F;ssl related work. This might be amply sufficient for Apple or IBM developing LOB apps in Swift but I do not see how it is very convenient for generic server side applications.
评论 #13214374 未加载
评论 #13215236 未加载
komali2over 8 years ago
&gt; You don’t have to see Linux’s horrible UI.<p>lol excuse me? Actually now I&#x27;m thinking, what does he mean by &quot;Linux?&quot; Like, Ubuntu server? Is the UI for that considered bad?
eptcykaover 8 years ago
Is there a reason to use Swift over Rust?
评论 #13213378 未加载
评论 #13216428 未加载
评论 #13213452 未加载
评论 #13213484 未加载
评论 #13213315 未加载
评论 #13213183 未加载
评论 #13213198 未加载
illuminati1911over 8 years ago
&quot;In server-side Swift, you don’t use interface builder, so that reduces most of your crashes to none.&quot;<p>You don&#x27;t use that in iOS app development either unless you are completely insane or are just beginning iOS development and don&#x27;t know how to make UI properly.
评论 #13213220 未加载
评论 #13213324 未加载
评论 #13216208 未加载
bushinover 8 years ago
&gt; let data[String: Any]<p>So typesafe!
teddyknoxover 8 years ago
Scala vs. Swift vs. C#. Fight!
评论 #13213018 未加载
评论 #13217210 未加载
评论 #13215068 未加载
bigdubsover 8 years ago
butwhy.gif<p>i get that isomorphism is very helpful long term for larger code bases, and being able to share libraries between your ios and server&#x2F;backend would be very awesome, but at what cost?<p>there are proven server ecosystems that are going to be much less &quot;innovation token&quot; laiden than swift, surely?
评论 #13212982 未加载
评论 #13212956 未加载
评论 #13212970 未加载
评论 #13213032 未加载
评论 #13212889 未加载
评论 #13212919 未加载
评论 #13215112 未加载
评论 #13213067 未加载