Live data from Hacker News

Swifton: Ruby on Rails-inspired web framework for Swift

github.com

11–20 of 74 posts

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#11
post #9
post #7

Earlier quoted context omitted.

What 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?

https://news.ycombinator.com/item?id=4973383

I've seen the blog post, I was just wondering if there was more to it than that.

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#13
post #9
post #7

Earlier quoted context omitted.

What 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?

https://news.ycombinator.com/item?id=4973383

I 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 .

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#14
post #8

Seems 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,…

I wish Apple had not ditched NeXT's EOF. It would make a fine open source project these days.

WebObjects was open sourced, was it not? (Although I don't know about the objective-c component).

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#15
post #8

Seems 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,…

I wish Apple had not ditched NeXT's EOF. It would make a fine open source project these days.

I 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.

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#17
post #6
post #3

You 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.

Seivan, 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?

Sure, here 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") :)

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#18

Earlier quoted context omitted.

I wish Apple had not ditched NeXT's EOF. It would make a fine open source project these days.

WebObjects was open sourced, was it not? (Although I don't know about the objective-c component).

Not that I know of, nor the Objective-C EOF. They switched to Core Data which is not the same.

Re: Swifton: Ruby on Rails-inspired web framework for Swift

#19
post #15

Earlier quoted context omitted.

I wish Apple had not ditched NeXT's EOF. It would make a fine open source project these days.

I 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 concurr…

> I 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).

EOF is not Core Data and Core Data is not from the NeXT era.

Post reply on HN