popcorn-desktop icon indicating copy to clipboard operation
popcorn-desktop copied to clipboard

Optimize the Stack

Open rafaell-lycan opened this issue 4 years ago • 14 comments

Hi PopcornTime team, how are you guys doing?

I'd like to ask if there are any plans regarding update the stack as Butter does.

  • From Gulp to Webpack?
  • From Node-Webkit to Electron?
  • From Backbone+Marionette to React? (oh boy, this might take ages...)

I'd say that the community can help you guys with a proper roadmap. I mean, probably just a few of you'll actually know the whole app specs and I'm not 100% sure if the current stack is easy to maintain.

Let us know if we can help improve it.

Cheers.

rafaell-lycan avatar Mar 19 '20 21:03 rafaell-lycan

We would be happy to see the migration from Backbone to React but i guess it gonna take ages as you said any help is welcome

Work was started here https://github.com/butterproject/butter-desktop/tree/devel/src but never get to see the light

team-pct avatar Mar 19 '20 21:03 team-pct

I see, but no plans to continue on it? What's the simplest path to go for an MVP/Beta version?

Take a look at this initiative for instance, I'd say that's a great start to help guys on it and then the community can start following a beta version of PCT and not only test but also contribute and evolve with it.

Cheers.

rafaell-lycan avatar Mar 19 '20 22:03 rafaell-lycan

What about alternatives? I see Butter uses the ones you mentioned but there's rollup and parcel instead of webpack, I would rather use a lighter version such as neutralino, ultralight and not have yet another Electron app taking hundreds of megabytes, and there's Vue and Svelte. I think Flutter for desktop apps is in beta and could be also a good option, but that one I don't know.

ranisalt avatar Mar 20 '20 07:03 ranisalt

@ranisalt the only issue I see with neutralino is that it still new and the community behind is quite small yet. I'd prefer to use something that will generate a bigger bundle but I'll know that it will evolve fast and be sure that is going to be maintained for a long period over-relying on something unsure.

I'm an early adopter myself and for a proof of concept could be nice to give a try, but again it's still growing and lack o documentation for now compared with NW.js and Electron.

Totally agree with using something like Rollup/Vue instead though, but unsure about Svelte for the same reason of avoiding neutralino. 👍

I rather use React overall 'cuz it would be easier to have more people collaborating (as FOSS sometimes have lack of maintainers) and also because it's very community-driven and also active AF. IMO even RN (Expo maybe?) + Electron would be a great choice, but no hard feelings on it, Vue + whatever sound nice to me as well.

rafaell-lycan avatar Mar 20 '20 13:03 rafaell-lycan

@rafaell-lycan Based on the fork you mentioned i created a fully working one with React here, it also has a react native version here.

If you really want to build a react version and don't want to redo everything you could start there, I do note that it are older projects with a lot of outdated deps etc.

TriPSs avatar Mar 20 '20 13:03 TriPSs

@TriPSs quite like it, although both need tons of love (not only outdated dependencies, but also lots of things that probably not needed, like Flow and a bunch of Babel loaders for instance).

Is it something that you're looking forward to continue or not?

rafaell-lycan avatar Mar 24 '20 10:03 rafaell-lycan

@rafaell-lycan The react native version became part of something new (PCT env running on local network), I do want to continue on that.

Regarding the desktop app, I have no intensions in continuing it as like you said it's bloated; It would likely be faster to redo it and use the popcorn-sdk which does the searching / API intergration for the most part.

TriPSs avatar Mar 24 '20 10:03 TriPSs

Hi, about a few points talked previously: While webpack is fine, if you want a faster build system you should not use rollup/esbuild directly but use the wrapper https://vitejs.dev/ which use esbuild and rollup behind the seen and offer much more plugins/support/comfort.

Secondly, no you should not use neutralinojs or any similar tech, it is a very bad taste. Yes Electron induce a 40-50MB overhead on desktop (which is ridiculously small, e.g in comparison to the size of a movie or of modern SSDs), hence it is more of an ivory tower/purity/virtue signaling issue than a real issue. The major issue about neutralinojs is that it uses the OS default webview. Which means a great experience on windows but mac users and even worse, Linux users are screwed because it will use webkit-gtk which is almost in an abandonware state, has many bugs and sub-par performance. As an example of how insanely mediocre and abandoned webkit gtk is: https://www.phoronix.com/scan.php?page=news_item&px=WebKit-WPE-Wayland-Perf-Fix So no making platforms inconsistencies and subpar performance to end users to shave a few MBs is not a rational decision. Popcorn time should migrate to Electron and call it a day.

Note that on Android/Ios however Cordova/ionic use the default OS webview though.

LifeIsStrange avatar Jul 04 '22 12:07 LifeIsStrange

While build process (vite, parcel, webpack) and Electron migration have to be done at once, the React migration can be done incrementally, React 17 became more stable on integrating React with non-React code, we can start migrating small UI components and as soon as possible merge those small migrations at the development branch.

yassernasc avatar Aug 30 '22 14:08 yassernasc

Hello, I have read this thread as well as issue #1493.

I am interested in contributing to the migration to TS + Vue, but it seems like the discussion is dead and there are no plans to go forward with this? am I correct

raniceyue avatar Dec 27 '23 14:12 raniceyue

@raniceyue yes, no plans for change stack, i think would be easy to rewrite, because many old unsupported libs

ivan1986 avatar Dec 27 '23 14:12 ivan1986

@ivan1986 is there any way I can help out with rewriting the old files? or where is a good starting point?

raniceyue avatar Dec 28 '23 08:12 raniceyue

i think need take versions from comments and check it's for support api https://github.com/amilajack/popcorn-time-desktop https://github.com/popcorn-official/popcorn-time-desktop https://github.com/pct-org/native-app when this versions write was many issues with api support and now all of this solve, if add support to this versions it will be perfect

ivan1986 avatar Dec 28 '23 09:12 ivan1986

How about porting it over to Tauri in combination with ReactJS/NextJS?

I think that if server actions (NextJS) could be gotten to work, it might be very effective. Beyond that, because of Tauri being Rust based it might increase the performance drastically (Although the performance is already decent, except the startup time is quite hefty).

Reference: https://tauri.app/v1/guides/getting-started/setup/next-js/

Azoraqua avatar Feb 19 '24 01:02 Azoraqua