7 ms·
Swifton: Ruby on Rails-inspired web framework for Swift
- coldcode 11y agoSo many of these now. I wonder which one will eventually become the node of Swift.
- aroman 11y agoNot which; if any, I think. Node's tight coupling to JavaScript seems like more of an exception than a rule — look at Java, Ruby, Python, etc.
- fleshweasel 11y agoNode isn't a JavaScript framework so much as a platform to run JavaScript on. Express is maybe more analogous to Swifton here.
- deleted 11y ago[deleted]
- seivan 11y agoYou could have made it better by using protocols for the actions. So the methods for adding routes would ensure that the methods for new and update exists using a where clause checking protocol conformance. There is potential here, I like a "full" package like "Omakase", granted its built using Swifts strength and a pipeline model like Express.js and/or Rails and its rack middlewares.
- necolt 11y agoSeivan, thanks. Yes, Rails "Omakase" is driving Swifton development. I'm not sure that protocols will help here, because Swifton supports before/after filter. Could you explain more your idea about how protocols could help here to implement actions with filters?
- ihuman 11y agoWhat do you mean by Rails Omakase? All I could find is a blog post by DHH saying that "Rails is Omakase." Is there more to it than that?
- necolt 11y agohttps://news.ycombinator.com/item?id=4973383 https://news.ycombinator.com/item?id=4973383
- ihuman 11y agoI've seen the blog post, I was just wondering if there was more to it than that.
- necolt 11y agoI believe DHH first started to use "Omakase" term in Rails context, so his blog post and discussions afterwards is good place to check. You can alse check original Omakase https://en.wikipedia.org/wiki/Omakase https://en.wikipedia.org/wiki/Omakase .
- steveklabnik 11y agoOthers have given you good links behind the idea; I wrote a blog post about one of the ecosystem effects a while back: http://words.steveklabnik.com/rails-has-two-default-stacks http://words.steveklabnik.com/rails-has-two-default-stacks
- seivan 11y agoSure, here https://gist.github.com/seivan/6b6bb19c899dd46f599e https://gist.github.com/seivan/6b6bb19c899dd46f599e I might fork and do my own version where I try to adhere to Swifts strengths while still staying close to Rails API where I can, e.g same naming scheme and pipeline design as Rails. Rails biggest weakness is Ruby. Leveraging Swifts strengths with protocol extension, where clauses and generics could actually improve on Rails current API. Edit[0]: Added an idea for filter API. Not happy with it, but it's a start. Before/After filters could just be a list of "stuff" (selectors, closures, etc) to be called before any action. It could also use group_dispatch to ensure that filters are called in sequence and only call the method once all filters are done. group_dispatch (think semaphores, but not as "dangerous") :)
- autoreleasepool 11y agoIt seems that, outside of what's used in Cocoa, the Swift language is pretty volatile right now. I would hesitate to commit to a large project that didn't involve the App Store.
- sdegutis 11y agoI think the hope of projects like these is partly to try to advance interest in Swift which draws in more users who then help contribute to making the language more cross-platform, and partly to be f1rst in the project's niche when the language finally crosses that barrier, so that it becomes the de facto standard. (Think Compojure for Clojure, in the same problem domain.)
- PakG1 11y agoMy personal hope is that a lot of the long-term risk is mitigated due to IBM's partnership with Apple and alleged goals to use Swift in enterprise. Admittedly, that may not deal with the short-term risk.
- bsaul 11y agoSeems to me like the real challenge in those framework (excepting performance, of course) will be in the orm component. Having a library that can query a db in a typesafe way is a must. Another will be in the concurrency patterns ( promises ? Coroutines ?, etc). But i get a great hope that they will succeed. Having a strong open source community will help. In fact, i'm so fed up with the sad state of uikit right now, that i see a brighter future for swift on the server side than on the client. Maybe an android sdk for swift would be a great idea...
- protomyth 11y agoI wish Apple had not ditched NeXT's EOF. It would make a fine open source project these days.
- AlphaSite 11y agoWebObjects was open sourced, was it not? (Although I don't know about the objective-c component).
- protomyth 11y agoNot that I know of, nor the Objective-C EOF. They switched to Core Data which is not the same.
- bsaul 11y agoI never used this framework, but everything i know from the next era is starting to show its age (including coredata, with its messed up support for multi threading access). The more i think about it, the more i think golang approach is the right one : the only hard part today is concurrency. As long as swift ( and rust for that matter) hasn't standardized patterns that people would use on the whole stack for concurrent access to ressources,as well as asynchronicity, they won't have made the necessary step to truely advance the state of the art.
- protomyth 11y ago
- harunurhan 11y agoNow I think swift has enough web frameworks and somebody should build an ORM.
- supster 11y agohttps://github.com/tannernelson/fluent https://github.com/tannernelson/fluent
- hagmonk 11y agoThe project banner depicting a damsel in distress on the railway tracks is going to make some people twitch. I'd avoid that distraction by picking something gender neutral. My 2c.
- mrits 11y agoIt is Swift on Rails. If it was Kanye on Rails no one would be offended to see a picture of a man on the railroad.
- PKop 11y agoIt's fun. You don't have to get offended. It's just a silly picture. No one was harmed in it's making. Stop wasting people's time, let them focus on productive aspects of the project.
- hagmonk 11y agoI'm not offended in the slightest. Except by your misuse of the apostrophe. I agree that nobody was hurt in "it is making." Note that this is my idea of fun, and you don't have to be offended by it. The purpose of my comment was to point out that gender charged images are going to draw attention in the tech industry, and that is worth avoiding. I made no commentary that suggested the image was not fun, or was offensive. You made those extrapolations all by yourself. Someone out there will make a very similar mistake to yours, by extrapolating a nonexistent gender message in the logo of this project. That's where the real time wasting starts. My advice to the project maintainer is to skip all that bullshit by picking something neutral. I genuinely wish this was not the kind of stuff we have to worry about, but I have at least one friend whose industry reputation was needlessly tarnished by people who didn't see the same joke he did.
- vortico 11y agoIs Swift still OS X-only, or can I use this on Linux?
- supster 11y ago> A Ruby on Rails inspired Web Framework for Swift that runs on Linux and OS X.
- steveklabnik 11y agoThe open source release provided the ability to build Swift on Linux.
- yeskia 11y agoThere's a lot of strings being thrown around for a type-safe language.
- Pxtl 11y agoHooray for being stringly typed.
- Razengan 11y agoI am mainly a hobbyist/newbie that recently started to learn Ruby, and Ruby on Rails. While I like them both, I would prefer to just work in Swift. How soon does HN expect a Swift-based framework that is comparable to the maturity of Rails, or other powerful frameworks for that matter? Do you think Apple might jump in and introduce one of their own?
- deleted 11y ago[deleted]
- herbst 11y agoYears, if ever. Things like Rails are very major based on the experience of thousands of developers.
- muhmi 11y agoSo, why would you write systems requiring concurrency and fault tolerance in Swift? What happens when a request explodes? Can it do hot code loading?
- jernfrost 11y agoThere seems to be so many web frameworks popping out for Swift, how does this compare with other languages such as C#, Scala and Go?