popcorn-official / popcorn-desktop

Popcorn Time is a multi-platform, free software BitTorrent client that includes an integrated media player ( Windows / Mac / Linux ) A Butter-Project Fork
https://popcorn-time.site
Other
9.42k stars 622 forks source link

Optimize the Stack #1179

Open rafaell-lycan opened 4 years ago

rafaell-lycan commented 4 years ago

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.

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.

team-pct commented 4 years ago

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

rafaell-lycan commented 4 years ago

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.

ranisalt commented 4 years ago

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.

rafaell-lycan commented 4 years ago

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

TriPSs commented 4 years ago

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

rafaell-lycan commented 4 years ago

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

TriPSs commented 4 years ago

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

LifeIsStrange commented 2 years ago

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.

yassernasc commented 2 years ago

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.

raniceyue commented 9 months ago

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

ivan1986 commented 9 months ago

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

raniceyue commented 9 months ago

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

ivan1986 commented 9 months ago

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

Azoraqua commented 7 months ago

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/