News for hackers. Stuff that matters.
Re:Electron is flash for the desktop (2016) by mlsarecmg on Tuesday April 11, 2017 @12:08PM (#14089434)
No one is scared of C# and Swift, XAML and so on, but these technologies aren't even close to what you have available on the web. React and Redux make apps possible that you wouldn't get with older technologies, not even with 10 times the effort and code. The animation possibilities, transitions, the flexibility overall, the eco system, debugging capabilities, hot module reload - if you have worked with it, you will not want to go back. Case in point, modern apps like VSCode, Atom, Hyperterm, Discord do things that would be very hard for a native app to mimic, and they do that with absolute ease.

I agree though that Electron is a problem. React native will probably be the best way forward. Microsoft has recently taken over RN-Windows and ReactXP, a RN-web clone. RN runs natively, doesn't need a browser, while being able to tap into the JS eco system.

Re:Electron is flash for the desktop (2016) by LeoNatan25 on Tuesday April 11, 2017 @12:41PM (#14089808)
Ah, the wonders of discovering the observer pattern. It's really a life "changer". How did the computer world survive for so many decades without it.
Re:Electron is flash for the desktop (2016) by mlsarecmg on Tuesday April 11, 2017 @05:07PM (#14092453)
Explain? Redux isn't even close to observables in other systems. It's the immutable pattern that's a life changer if anything.
Re:Electron is flash for the desktop (2016) by Sophistifunk on Tuesday April 11, 2017 @09:18PM (#14094024)
Redux and co are still the same pattern fundamentally, it's just that the implementing code is spread throughout your stack, instead of in an "Observable" implementation. That combined with an optimisation allowing identity and state equality to be conflated.
Re:Electron is flash for the desktop (2016) by mlsarecmg on Wednesday April 12, 2017 @03:32AM (#14095562)
I don't know what you're saying, this is the complete opposite. Redux was made to centralize, because observables are literally spread throughout the stack. The entire logic is combined in composeable containers, later wrapped in a single store. Flux pattern is also completely different in how it works, there's almost no similarity whatsoever.

http://iweave.com/assets/blog/mvc_v_flux.png

Re:Electron is flash for the desktop (2016) by Sophistifunk on Wednesday April 12, 2017 @08:46AM (#14097079)
Redux makes every single component check nextProps.foo !== this.props.foo, instead of just having them notified when it changes.
Re:Electron is flash for the desktop (2016) by mlsarecmg on Wednesday April 19, 2017 @06:43AM (#14146798)
That is the whole point of immutable state, and it is very effective because parent props are also notified through shallow checks, while observables have to bubble up and keep track of their relations.

You also seem to agree now that both are completely different.

Re:Electron is flash for the desktop (2016) by LeoNatan25 on Wednesday April 12, 2017 @06:31AM (#14096341)
That's not MVC. That's the MVC Facebook attempts to show in a ridiculous presentation that finally convinced me how much they had to misinform to get these silly concepts any legitimacy.
Re:Electron is flash for the desktop (2016) by mlsarecmg on Wednesday April 19, 2017 @06:44AM (#14146803)
That is exactly how a .NET WPF application worked, and that's also how MVC communicates in general. The flux pattern is very different from it.
Re:Electron is flash for the desktop (2016) by true_religion on Tuesday April 11, 2017 @12:16PM (#14089532)
What is VSCode doing that's impossible to do in a native application?

I'm curious, since I use PyCharm and I wonder what I could be missing out on.

Re:Electron is flash for the desktop (2016) by zo1 on Tuesday April 11, 2017 @12:59PM (#14089994)
You get to write plugins for it in Javascript. That seems to be the big thing about it. I've tried it, the hype is just fluff.
Re:Electron is flash for the desktop (2016) by mlsarecmg on Tuesday April 11, 2017 @05:18PM (#14092538)
See the wider picture, how flexible they are and how fast they grow. Their freedom in making things possible that would be very hard to realize.

The shell that i'm using for instance, Hyperterm, it does things no other shell can do, and they had more than a decade to evolve. JS doesn't have a problem displaying json as json, display webpages on link clicks, moving up git logs with my trackpad, adding tabs with a plugin that contains a few lines of code and a little css, ... it just comes easy to JS.

The same flexibility you see in Atom, VSC and the others.

Re:Electron is flash for the desktop (2016) by FridgeSeal on Monday April 17, 2017 @10:31AM (#14131103)
> JS doesn't have a problem displaying json as json...

You know what else doesn't have a problem doing this? Literally any other programming language or tool that I've ever used to look at/edit Json.

> Hyperterm, it does things no other shell can do...display webpages on link clicks moving up git logs with my trackpad, adding tabs with a plugin that contains a few lines of code and a little css, ... it just comes easy to JS....

Any pretty much any other terminal built with flexibility and extensibility in mind (even the base terminal in Linux can handle links lol, that's definitely not exclusive to js). ZSH springs to mind, with the benefit of being written in Case, so that you know, it's actually fast...

> The same flexibility you see in Atom, VSC and the others.

Ah yes, including the freedom to not open any binary file, or any file >2mb in size!

Re:Electron is flash for the desktop (2016) by mtberatwork on Tuesday April 11, 2017 @12:43PM (#14089839)
> React native will probably be the best way forward. ... RN runs natively, doesn't need a browser, while being able to tap into the JS eco system.

Similar arguments were made when Java first came on the scene. "Write once, run anywhere." [1] Years later, here we are again with "native" Javascript libraries. I'm sure in another 20 years or so we'll be rehashing this again, just with some other language.

[1] https://en.wikipedia.org/wiki/Write_once,_run_anywhere

Re:Electron is flash for the desktop (2016) by dangoor on Tuesday April 11, 2017 @01:15PM (#14090166)
Java Swing wasn't native, though. SWT is more comparable.

React Native isn't "native" (in quotes), it's native... it uses the actual widgets provided by the host OS. You use similar techniques to create your UI for each platform, but you do generally need to create separate UI for each platform with React Native.

Re:Electron is flash for the desktop (2016) by douche on Tuesday April 11, 2017 @02:05PM (#14090750)
> these technologies aren't even close to what you have available on the web

Yeah, they're that much better, that we grumpy old non-JS programmers keep wondering what the big deal is when somebody comes along and rewrites something that existed 20 years ago.

Re:Electron is flash for the desktop (2016) by mlsarecmg on Tuesday April 11, 2017 @05:10PM (#14092480)
That isn't the point. JS does something the others can't. It has flexibility and a community that's larger than anything you know plain and simple. Btw, i am a grumpy non JS developer, or used to be. Started with assembler, c/c++, then c#. That sums up most of my professional career. I was wrong judging JS too fast, that's all i'm saying. Many of my colleagues are still grumpy about it, they'll get over it over stay behind. If they do move on they will see what they're missing soon enough.