Live data from Hacker News

Katana – Modern Swift framework for creating iOS apps, inspired by React/Redux

github.com

51–54 of 54 posts

Re: Katana – Modern Swift framework for creating iOS apps, inspired by React/Redux

#51
post #32

Earlier quoted context omitted.

I'd argue that "massive view controllers" aren't "normal", and if you find yourself in situations with massive view controllers, those are likely excellent candidates to refactor into smaller view controllers that can be composed together using something like iOS view controller containment. Well-disciplined iOS developers can keep this under control. I'll turn the question around - don't you see the potential for th…

You have a lot of comments on this article, with some good questions and good points. However, I think there's a theme in some of them: > Well-disciplined iOS developers can keep this under control. Well-disciplined iOS developers with good development practices were also able to manage manual reference counting. However, I think it's widely agreed that ARC was a step forward for iOS development. Similarly, the Swift…

Comparing referencing counting and following a disciplined convention in coding are not the same thing. ARC was a step forward because it eliminated a nuisance inconvenience from your development which most of the time was not related to the problem you were solving.

Following a good and disciplined programing convention is more of an overarching theme of how you solve your problems. It practically defines your style and no amount of forced framework convention will be a step forward unless you're willing to take it.

Re: Katana – Modern Swift framework for creating iOS apps, inspired by React/Redux

#52
post #7

Looking cool, I think iOS development in general could learn a lot from React + JS ecosystem. :+1:

What problems do you think the React + JS ecosystem could solve in the iOS world that haven't already largely been solved by standard iOS development approaches? I'm legitimately asking here - I been developing for iOS for years (and more recently with React from time to time for the web), and I've never once felt that standard iOS conventions/patterns were lacking compared to the React/JS ecosystem, but I would like…

I've been a Cocoa dev for 10+ years, and I have been doing React Native for a few months while the team I work in has been doing it longer. ( http://artsy.github.io/series/react-native-at-artsy/ )

The general things Cocoa could improve from JS:

* State Management * View lifecycle management * JSON -> UI (this became a lot worse with Swift) * Developer Happiness ( e.g. compare https://github.com/orta/vscode-jest to TDD in Xcode ) * Open toolchains (Swift is improving this)

The JS ecosystem focused on building apps that talk to APIs and act as simpler clients, the Cocoa one is about building apps that don't.

Re: Katana – Modern Swift framework for creating iOS apps, inspired by React/Redux

#53
post #4

The one issue I see with bringing Flux/Redux to iOS is that iOS shipped with unidirectional data flow from day 1 with KVO: view => IBAction on controller => model method (incl. any API or CoreData work) => controller is notified of changes via KVO => rerenders view via a pure function. I don't think it was struggling for a new, clean solution here in the same way the web was. That said, for people used to the React p…

Except kvo doesn't have a sane threading model, nor is it typed, and can crash your program if you fail to unregister properly. It makes the programs a lot harder to debug,not simpler.

Re: Katana – Modern Swift framework for creating iOS apps, inspired by React/Redux

#54
post #47
post #38

If you're willing to take a leap like this for an iOS project, why not just use React Native? At least with that you get a much more portable codebase, not to mention the benefits that come with its growing ecosystem.

ReactNative wraps up the native controls, often with lowest common denominator APIs that work across iOS + Android. You can get a basic app up and running quickly, but when you want to do something more advanced it really slows you down.

Any examples? I've been working with RN for the past few months and it's been pretty good. Only issues where I had to do some native wrapping were around background location polling and a client using a Microsoft websocket clone called signalr. Those things slowed me down.
Post reply on HN