9 ms·
Perfect – Server-Side Swift
- 11thEarlOfMar 11y agoI'd like to hear from Swift Devs who also need to support Android. What does the landscape for cross development look like today, and what is the prognosis? Is open source Swift going to lead to a truly cross-platform tool set any time soon?
- SneakerXZ 11y agoYou don't have many choices for cross-platform tools. You can either use C++ that is quite hard for a lot of people but I would say most popular and most stable. You can use C# or Java with Xamarin but it is very expensive, unstable and it is kind vendor lock-in. You can also use JavaScript but you will lose a lot of performance that is very important on mobile. There are other options like using Lua, RubyMotion but they suffer same problems as JavaScript Bottom line: There isn't convenient, modern, fast, open-source method for cross-platform development. Swift bridges nicely with C and it is built on LLVM so you will be able to use it on Android with Android NDK and bridge it through JNI and Microsoft recently also adopted LLVM so you will be also able to use it there.
- o_____________o 11y ago> Bottom line: There isn't convenient, modern, fast, open-source method for cross-platform development. React Native
- SneakerXZ 11y agoIt is far from perfect, maybe one day. Currently it still suffers a lot of problems. Try to write a big application in it and you will soon discover it.
- netheril96 11y agoCare to elaborate?
- deleted 11y ago[deleted]
- rhodysurf 11y agoYou can use Go with gomobile https://github.com/golang/go/wiki/Mobile#sdk-applications-and-generating-bindings https://github.com/golang/go/wiki/Mobile#sdk-applications-an... . It works okay but the lack of support for exporting slices really limits things.
- smt88 11y ago> You can also use JavaScript but you will lose a lot of performance that is very important on mobile. I've used Appcelerator Titanium fairly extensively. The performance difference vs. native code is undiscernible. Unfortunately, JavaScript is an awful language to use, so there are tradeoffs. Maybe Titanium + TypeScript would be the sweet spot.
- SneakerXZ 11y agoIt depends what you do but once you have a complex application you will see problems with JavaScript.
- Einherji 11y agoI've had the complete opposite experience with Titanium, to the point where it was completely unusable.
- smt88 11y agoI found some things about it to be frustrating and buggy, but it was still less work than writing two different apps. My code was about 90% shared between devices.
- zensavona 11y agoHow does RubyMotion suffer the same (performance) problems as JavaScript? Doesn't it compile to C# bytecode?
- jsmith0295 11y agoIt actually uses the MacRuby stuff to compile to native. But the compiler can't optimize nearly as well as it can for statically typed languages, so there's a pretty significant performance hit on the ruby code itself, though once you've called a native library there won't be any difference.
- zwetan 11y ago> Bottom line: There isn't convenient, modern, fast, open-source method for cross-platform development. There is ActionScript 3 even if you think that "flash is dead" in the browser, for mobile and Desktop you can use Adobe AIR for server-side, command-line and shell scripts you use Redtamarin https://github.com/Corsaair/redtamarin https://github.com/Corsaair/redtamarin I'm the dev behind redtamarin but I welcome other projects like perfect. Even if the tech and language are different, different pros and cons, a lot of ideas and features are shared.
- s73v3r 11y agoYou're never going to have a truly cross platform tool set. The UI/UX paradigms are just too different. There are already several solutions for sharing library code for business logic between the platforms, either using C++, or compiling Java to Objective-C, and that's about as good as you're gonna get.
- fleitz 11y agoIt's pretty easy, on iOS we use swift, my Android team uses java, my web team uses ruby. I switch fluidly between rails and swift, and I leave the java dev to those who enjoy it.
- josch 11y agoI haven't really used it myself, but there is RemObjects Elements (http://www.elementscompiler.com/elements/silver/ http://www.elementscompiler.com/elements/silver/).
- icodestuff 11y agoMaybe Apportable will eventually have Swift support.
- dplgk 11y agoAn obnoxious name but nice work securing the domain.
- mahyarm 11y agoI would of done Swift with Sails. It would of been a great pun on Ruby on Rails.
- benbayard 11y agoSails is a library already for Node. (that doesn't invalidate your name, I just thought I would let you know if you didn't already).
- thegayngler 11y agoI think Swift Aviator is a better name.
- Albright 11y agoI'm excited about the idea of server-side Swift and this seems to be the most ambitious implementation of it so far, but who is this awful web site targeted to? Developers? With its fading and sliding? Really? Just give us the information without all the wank, please.
- ruddct 11y agoSwift, especially with its recent developments, is a hugely promising language for building servers. Type safety? Check, with great type inference. Like functional programming? Functions are first class citizens. Immutable data structures? Available and always encouraged. OO? Classes are there. Structs, kickass enums and interfaces? Fine by Swift. Predictable memory management? Check, ARC rocks. Plus lots of nice language features like guard, do/try, optionals, etc. Really the only thing that's missing as a language feature is some kind of concurrency support, though I'm hopeful future iterations will include this. In the mean time, it might be a bit of a blocker for serious server-side adoption.
- fleitz 11y agoReflection sucks in swift which makes many web patterns tedious to implement.
- joslin01 11y agoYa, I was just gonna post this. Scala has more powerful generics and an eco-system of, oh I don't know, every java library ever created. It's also got the Play framework and Akka. When it comes to rationally planned web development, Swift is very low on the totem pole and a bunch of cute language features aren't gonna change that.
- falsedan 11y agoSwift's biggest advantage over Scala is its tight coupling with a commendable IDE. Perfect doesn't seem to address how debugging a server-side app will work with Xcode…
- joslin01 11y agoI agree with you and that's a nice rebuttal. I use XCode daily since I code in Swift for an iOS project. Great tool. However, I really wouldn't trade so much away just to stay in the same IDE and I certainly wouldn't construct a plan to do so. All the people down-voting me are just Swift fanatics who probably haven't touched the language all that deep. Good language, love the replacement for Objective-C, and you could argue GCD makes Akka unnecessary (though I wouldn't go that far), but again not fit for web development in my humble opinion..
- phaedryx 11y agoOne language to rule them all. One language to find them. One language to bring them all, and in the darkness bind them?
- phaedryx 11y agoI'm questioning their marketing message of "one language to rule them all". This is how I complete it. I'm surprised other people don't and that I'm getting downvoted.
- deleted 11y ago[deleted]
- Doctor_Fegg 11y ago> Websites need servers to harness and share data. The languages that were developed to do this (PHP, Python, Rails, etc.) Common misconception perhaps, but the _language_ is called Ruby, not Rails...
- zmanian 11y agoI'm intensely looking forward to Swift for Linux. I'd love to contribute more to open source iOS targeted project but I'm really unwilling to learn languages that I can't use on Linux at all because I don't want to make a Mac my daily driver.
- nateabele 11y ago> What is Perfect? > [Hype] [Hype] [Hype] [Hype] [Hype] > Features > - JSON encoding and decoding Okay! Well, moving on.
- earlz 11y agoMeanwhile, I'm still waiting on Apple to keep their promise of open sourcing Swift "by the end of the year"
- erydo 11y agoChris Lattner did comment less than a month ago they were still on track: https://www.reddit.com/r/swift/comments/3q2zqa/when_is_swift_going_open_source/cwbu0be https://www.reddit.com/r/swift/comments/3q2zqa/when_is_swift... > We are still on track to open source Swift (including Linux support) > "by the end of 2015" as promised, more details will come > out when they can. > -Chris
- Tloewald 11y agoIn Apple-speak "by the end of x" means "just before the end of x".