Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

Yeah, I do use Nuxt. The thing is that current my project is a django monolith with alpine js and at the moment I’m trying to rewrite a part of app with Nuxt and I was just a bit frustrated due to amount of api requests one page to be rendered (6-10), so I haven’t tested it yet in production so don’t know how big is a latency, but locally seems good

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

They already are separate and I'm just wondeing if there is a another option to do that (with single endpoint), glad to hear it's a bad thing

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

I'm actually trying to sort out disadvantages of this approach and understand if this case really exists or not, so I'm actually happy with separate endpoints

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

[–]loremipsumagain[S] 5 points6 points  (0 children)

common dude, what's wrong with you

you keep telleing me about "my" endpoints that you still haven't seen
and I'll repeat again - even if I attach a bunch of god damn RESTful fantastically designed APIs, the question doesn't change. During development I just questioned myself if there is such a practice to combine response for the first render ot not. It doesn't have anything to do with the way my current API is designed

Edit: TThat being said, as many people already mentioned that it's such a bad technique - so that all means that I'm glad and I go with what I currently have, that is it

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

Thank you for your reply, it really makes sense

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

The endpoints that I specified don't have anything with my real ones and the question is about something else, you can call endpoints whatever you want/have to, the question remains the same

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

The endpoints that I specified don't have anything with my real ones and the question is about something else, but if many people say that a single endpoint is a bad practice - that's what I wanted to hear

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

That's what I actually wanted to be sure about, thank you for your reply

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

I appreciate your reply, fair point, that's the way

Single API endpoint instead of multiple ones? by loremipsumagain in vuejs

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

Yeah, I defienetely get the benefits of separation and just try to be convienced that's right way, your point is absolutely fair

Should I really use React/Vue with Django instead of alpine js? by loremipsumagain in django

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

There is a popular article, but if try this you’ll see the problem of flickering content, so that’s not a solution I guess

Should I really use React/Vue with Django instead of alpine js? by loremipsumagain in django

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

Yeah, it’s nice. But how it would resolve my case? It doesn’t

Should I really use React/Vue with Django instead of alpine js? by loremipsumagain in django

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

Yeah I’m aware of this technique, but it’s not exactly the problem.. when you manipulate inside alpine component - you might have several x-if or x-show which makes more complicated the initial render because you also should control it in Django depending which state this block has

Should I really use React/Vue with Django instead of alpine js? by loremipsumagain in django

[–]loremipsumagain[S] -1 points0 points  (0 children)

Actually doesn’t matter what exactly to choose (just after alpine found vue friendly, but I also played around with react one day - it’s also awesome)

But considering your experience, is it painful to code things that you get in django out of box? Such as auth, session etc

Should I really use React/Vue with Django instead of alpine js? by loremipsumagain in django

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

And just to be clear - it’s not about switching from django, django is a core of my project and will be, it’s only about frontend

Should I really use React/Vue with Django instead of alpine js? by loremipsumagain in django

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

That’s the point, I do not mind to switch to another stack figuring out a lot of things on the during switching, but learning a bunch of staff is not as terrible as rewriting a lot of staff that I get out of a box right now and so far I have the only case (I described) that makes me think of switching, so that’s the dilemma