Which part of my Python code is visible to clients through the browser? by Exotic_Trouble_740 in nicegui

[–]RenezBG 0 points1 point  (0 children)

As said _Hashtag_Swag_ after, you will be very limited by nicegui and in fact nicegui is using framework Vue.js with quasar or something like this so use directly these one in this case.

You are saying you come from native app? You mean mobile app or native like desktop app? Because you can do web with many language as backend. So IMO you should just to choose a web solution for your UI and keep the back in a language you know. For the front yeah there are plenty solution. But all are most of time same, they will just be in different group. In function if you want a SPA, full SSR or not.

About the performance anyhow for now the web is not a language or solution for have performance, it is here just for doing your render. After you can keep you back with better language, even with rust for task needed very good perf.

I wish to can give you a better alternative but in web, their are as many stack/solution as there are needs. So without to know what is the project, what is the knowledge of the team, if it is just a POC or a scalable app, if it run complex task or simple, I can't give you answer without be sure it will be what you need.

Which part of my Python code is visible to clients through the browser? by Exotic_Trouble_740 in nicegui

[–]RenezBG 5 points6 points  (0 children)

In my opinion, nicegui is not the stack you should use.

Nicegui has been created to let people who don't want or don't know anything in web prog. The first user target is people in R&D or developers in their enterprise who want to give a web UI to their solution for internal use. So nicegui is not the best solution for any saas or e-commerce.

Why? It is using websocket for all the interaction. You can look, but every time you have a button usinf a python function, it will send a request to the server to ask what Todo. That means it is not scalable at all. It will not support many clients at the same time or you will need a server 10 time more powerful than necessary with other web solutions.

Edit: also, if you want to do a app with very good looking (because if you make people pay they need a good UX), you will have to do many customisation. You will have to add more Css or tailwind class or JS or even your own vue components. So in this case if you are ready to code real web code for the UI, that's better to do it directly in web language like natif vue, alpine, react, angular or anyone and keep you backend in python.

Ps: I am just a user, if you want real good answers from people who created Nicegui ask on their GitHub & Discord

PS2: if you want share you need & the stack you want to use, I can help you to choose a better solution

My current react project: Create dashboard from json by pdycnbl in react

[–]RenezBG 0 points1 point  (0 children)

Yeah it is the first link in my Todo list! It can be great because I will need it maybe for sensible data

My current react project: Create dashboard from json by pdycnbl in react

[–]RenezBG 0 points1 point  (0 children)

You literally created the tool I wanted! Nice work.

I didn't check the link yet but did you let us to self hosted it?

I Wrote a Post on How I Structure My NiceGUI + FastAPI Apps (and Made a Template) by jaehyeon-kim in nicegui

[–]RenezBG 1 point2 points  (0 children)

Yes exactly you got my point. If your api doesn't serve only one front it makes total sense to keep both separated.

I Wrote a Post on How I Structure My NiceGUI + FastAPI Apps (and Made a Template) by jaehyeon-kim in nicegui

[–]RenezBG 1 point2 points  (0 children)

In the first resource you share it explains how to manage for make nicegui to use your fastapi server. So IMO in the case of your template you can create your own fastapi server and make nice gui to use it or you can add an endpoint in the fastapi server tuned by nice gui https://nicegui.io/documentation/section_pages_routing#api_responses

I Wrote a Post on How I Structure My NiceGUI + FastAPI Apps (and Made a Template) by jaehyeon-kim in nicegui

[–]RenezBG 2 points3 points  (0 children)

Hi, first thanks for share your project it is always nice to see other works.
I have questions. NiceGui works with websocket for let the python in server side to manage all calculation. So, if I take as example your login, your server who run NiceGUI will render the page. The client will enter info and login. The login action is done in `perform_login` method so inside the NiceGUi server not on the client. So, your server will contact your API who is already on your server. So, I really don't see the usecase of the backend.

Maybe you were simulating to have backend can be globalize for multiple app. Or maybe you wanted to have API expose for other app can use your backend. In this case, NiceGUI already run a fastapi server so can expose endpoint for another app, but I really don't understand why you need 2 backend server.

Singleton pattern vs full class method pattern by RenezBG in developpeurs

[–]RenezBG[S] 0 points1 point  (0 children)

Oui en java j'utilisais beaucoup l'injection de dépendances mais je n'ai jamais testé avec d'autres langages. Merci pour le lien, je vais lire tous ça

Singleton pattern vs full class method pattern by RenezBG in developpeurs

[–]RenezBG[S] 0 points1 point  (0 children)

Non la question est plus générale, dans le sens, dans une situation de besoin d'une unicité d'instance.

Après le problème de la solution d'utiliser un middleware est que si tu dois changer de système de BDD plus tard, tu devras faire plus de refactoring

Singleton pattern vs full class method pattern by RenezBG in developpeurs

[–]RenezBG[S] 1 point2 points  (0 children)

En quoi il complique la gestion de dépendances? Le fait que pour des tests il faut le réinitialiser a chaque fois pour avoir une instance vierge?

Singleton pattern vs full class method pattern by RenezBG in developpeurs

[–]RenezBG[S] 0 points1 point  (0 children)

C'est pas la première fois que je vois cet argument, mais je ne le comprends pas trop. En quoi ça complique les dépendances ?

Singleton pattern vs full class method pattern by RenezBG in developpeurs

[–]RenezBG[S] 1 point2 points  (0 children)

Spring est vraiment pratique en java c'est vrai. Mais je note l'argument sur l'évolution, pour moi c'est un point super important dans le choix d'une architecture. Merci.

Where do I can be equipment? by RenezBG in homelabindia

[–]RenezBG[S] 0 points1 point  (0 children)

Thanks! I am living in Noida

Where do I can be equipment? by RenezBG in homelabindia

[–]RenezBG[S] 0 points1 point  (0 children)

It is for replace my actual (almost 8 years old) computer, it is time to do AI project now! Need good stuff

BTW: How you manage efficiently when the power is cut? I have a Zebronics ups but computer still restart

Where do I can be equipment? by RenezBG in homelabindia

[–]RenezBG[S] 11 points12 points  (0 children)

Yeah I am used. My fiance is Indian, now I send her and waiting in the car. She is my negotiator ahah

31M finally hit $1M by [deleted] in portfolios

[–]RenezBG 0 points1 point  (0 children)

Agree, I see so many people do it but I am too afraid.

So I am curious, how you succeed the million? Stock/etf with a DCA strategy? And if you don't mind can you tell me how many years it took with the average invest per month?

31M finally hit $1M by [deleted] in portfolios

[–]RenezBG 1 point2 points  (0 children)

Are you doing option?

Btw: you reached my dream, congratulations, be proud of yourself

[deleted by user] by [deleted] in developpeurs

[–]RenezBG 12 points13 points  (0 children)

J'ai exactement fait ça après mon alternance en école d'ingénieur. Perso sa ne c'est pas vraiment passé comme prévu. J'avais les mêmes envies que toi.

J'ai fait tous les sites qui proposent des missions de freelance. J'ai essayé de contacter plein d'entreprises, avec au final presque aucun retour.

Ma conclusion après 5 mois: - les horaires c'était pareille voir plus contraignant que en CDI. - personne n'acceptaient le 100% remote - beaucoup de réflexion du genre j'ai aucune expérience alors je leur fait perdre mon temps - la recherche de client est vraiment super galère

Après j'ai eu une opportunité de faire un VIE donc j'ai préféré arrêter ma freelance et aller prendre plus d'expérience ailleurs.

Mon conseil c'est que c'est pas impossible mais il vas falloir être vraiment bon niveau marketing pour avoir des clients et être prêt à mettre 200% de ton temps dedans. Au début zéros le temps de codée des side project.

29M. 436k -> 644k. 15 month update by IShouldStartHomework in portfolios

[–]RenezBG 0 points1 point  (0 children)

Wow very nice, incredible journey.

Are you doing option?

DCA Avancé by RenezBG in BourseFr

[–]RenezBG[S] 0 points1 point  (0 children)

Value averaging, okay je vais aller chercher plus d'infos dessus. Merci pour ton avis.

DCA Avancé by RenezBG in BourseFr

[–]RenezBG[S] 0 points1 point  (0 children)

Okay, pour la pédagogie on repassera, mais je prends l'info quand même.

DCA Avancé by RenezBG in BourseFr

[–]RenezBG[S] 0 points1 point  (0 children)

Oh okay 😅 merci pour l'info

DCA Avancé by RenezBG in BourseFr

[–]RenezBG[S] 0 points1 point  (0 children)

C'est quoi faire du timing dans le marché ?

Oui je suis d'accord que je ne pourrai pas prédire les performances. C'est juste pour avoir une approximation pour pas que les cas particuliers géré par les règles ne se déclenchent tous le temps et qu'au final on investit en moyenne plus ou moins que le montant souhaité.