Why I Stopped Using Backend Frameworks

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 116

  • @t3dotgg
    @t3dotgg 9 หลายเดือนก่อน +102

    Thankful more people are saying this. The future is full stack, and these tools make it so much better

    • @Metruzanca
      @Metruzanca 9 หลายเดือนก่อน +10

      Wild Theo appears. Ben's getting attention he deserves.

    • @pawel_890
      @pawel_890 9 หลายเดือนก่อน +2

      Fullstack is back to the past :)

    • @aadarshkumarshah8795
      @aadarshkumarshah8795 9 หลายเดือนก่อน

      Don't tell me about the future...people know nothing

    • @eptic-c
      @eptic-c 8 หลายเดือนก่อน

      "The future is full stack". It always was, client side rendering is, was and will always be dumb.

  • @pawel_890
    @pawel_890 9 หลายเดือนก่อน +41

    Oh shit, here we go again. 1-2 years and we will find that decoupled services are better.

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +6

      If they make a way for me to get end to end typesafety from Go to TS then yea 100%, but with what is here now? Fullstack all day

    • @mpiorowski
      @mpiorowski 9 หลายเดือนก่อน

      There is an option for typesafety between Go and TS - gRPC :) It generates types for both Go and TS, and it is the data that is beeing send, so nothing is beeing ommited here@@bmdavis419

    • @dyto2287
      @dyto2287 9 หลายเดือนก่อน +1

      @@bmdavis419 **cough** code generation **cough** gRPC **cough** OpenAPI **cough** 😂

    • @Mikenight120
      @Mikenight120 9 หลายเดือนก่อน +9

      Not an expert, but wouldnt gRPC provide you type safety end to end between Go and Typescript?

    • @pawel_890
      @pawel_890 9 หลายเดือนก่อน +3

      @@Mikenight120 author removes comments like this

  • @lcarv20
    @lcarv20 9 หลายเดือนก่อน +17

    The only downside is when you want to go beyond web (like mobile, tv or whatever) Then you will have to maintain two separate “backends”. But if it’s only web I agree

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +6

      yea expect a video about this soon, mobile does need a seperate backend, go might be coming back lol

    • @strmchsr1537
      @strmchsr1537 9 หลายเดือนก่อน +2

      Why, you can add api routes in your routes folder like /routes/api/v1/whatever/+server.ts to make external api routes. They'll perhaps have some different (authentication) logic but it still all in your one environment.

    • @Leeway4434
      @Leeway4434 9 หลายเดือนก่อน +1

      You just architect your code with repository pattern and you can have a json API adapted from what your html API already uses

    • @captainnoyaux
      @captainnoyaux 8 หลายเดือนก่อน +2

      why would mobile need a specific backend ? I never encountered that case (10+ years of experience)

    • @Leeway4434
      @Leeway4434 8 หลายเดือนก่อน

      @@captainnoyaux we are talking about using something like htmx for a web app. Unless you want to render your mobile app in a web view, you will need a json adapter for your API to build out the mobile screens with native UI components for iOS/android

  • @tobias--
    @tobias-- 9 หลายเดือนก่อน +17

    SvelteKit is great, and the idea of building fullstack apps with good SSR experience is definitely something worth giving a try. The thing is, the more bussiness logic you have, the less applicable the fullstack technologies are. Using such fullstack frameworks for something more complex than e-commerce sounds like a complete madness to me.

    • @readywhen
      @readywhen 9 หลายเดือนก่อน

      When I look at software architects and how cleanly they implement smth like monoliths in .NET, I just feel like a total mess working with a framework -- or at least if I imagine scaling up. It makes me want to learn more and more and more... but I'm at the point where I just got to pick a technology and stick with it.

    • @jatiquep5543
      @jatiquep5543 9 หลายเดือนก่อน +1

      I do not agree with you

    • @tobyCornish
      @tobyCornish 9 หลายเดือนก่อน +1

      I don't remember him saying "this is the best solution in all circumstances without exception"

    • @ooijaz6063
      @ooijaz6063 9 หลายเดือนก่อน

      What about handling bff data in full stack framework and business logic inside of proper backend language?

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +6

      it definitely has a limit, but I would argue that the ceiling is a lot higher than you think, at work we have some MASSIVE projects in fullstack JS t3 stack projects that work great (one was basically a linkedin clone)

  • @eileennoonan771
    @eileennoonan771 9 หลายเดือนก่อน +8

    I’m a fan of go+htmx atm but I totally agree full stack / monolith is the way to go unless and until there’s some pressing reason to change

    • @n8o_
      @n8o_ 9 หลายเดือนก่อน +1

      Is Go+HTMX... not fullstack/a monolith itself?

    • @eileennoonan771
      @eileennoonan771 9 หลายเดือนก่อน +1

      @@n8o_ yes it is. The "but" is just in contrast to Ben having recently moved from Go to Sveltekit and saying he just isn't into HTMX, which is all good. Different strokes and whatnot

    • @dovh49
      @dovh49 8 หลายเดือนก่อน +2

      What's nice about HTMX is that you can make your back end into microservices and still use HTMX, so HTMX doesn't necessitate a monolith on the back end. Also, you can have the SPA on the front end with HTMX and have the front end be a micro front end - it is much easier to have a micro front end with HTMX than it is with React, et. al., where with React you are creating monoliths on the front end. Yes, you can break up React, but it is much more difficult.

  • @austincodes
    @austincodes 9 หลายเดือนก่อน +13

    Full stack is the only way to go with small teams

  • @readywhen
    @readywhen 9 หลายเดือนก่อน +5

    5:00 I agree. I'd say having fullstack devs where each has a distinct strength within the spectrum is the way to go. So for example, more of a back-end-like full-stacker vs more of a front-end/designer-like full-stacker.

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      This is what we have, everyone has strengths, but we can each handle everything

  • @dyto2287
    @dyto2287 9 หลายเดือนก่อน +4

    I use grpc separate backend API and connect it to my sveltekit directly. Works quite well when API client gets generated and there is no duplication of code. And I can create more API endpoints on sveltekit that are needed only for web, making SvelteKit similar to BFF (backend-for-frontend) & frontend combo.

    • @yazidridwan6917
      @yazidridwan6917 9 หลายเดือนก่อน

      i dont quite know grpc and kinds of web tech, "when api client get generated" is it equivalent to api docs ? the duplication of code in the video I think it's when you typed the structure of the response api call in frontend.

    • @dyto2287
      @dyto2287 9 หลายเดือนก่อน

      @@yazidridwan6917 It basically generates client class, methods and data types you pass to those methods. You can implement server in one language and generate client for any other programming language.

  • @daveoki
    @daveoki 5 หลายเดือนก่อน +2

    This is a problem I often see with inexperienced or front-end fullstack-wannabe developers who don't know much beyond dom manipulation and API integration. Most tend to think backend development is all about building apis. Now that they have API routers they call themselves full stack developers. An API is just an interface that allows other applications to communicate with the backend. It's not thee "backend". What we have are tools so pick the best one for the job. If you understand the history of software engineering, then you'll appreciate why all these technologies exist.

  • @The6DAZ6
    @The6DAZ6 9 หลายเดือนก่อน +61

    Answer: because you are a frontender

    • @georgiyanev7822
      @georgiyanev7822 9 หลายเดือนก่อน

      Did you even watch the video? The dude prefer the FullStack framework, a FS framework is still a backend(Laravel is also a FS framework what you write there? FE code?).
      What he means is that in the server you fetch the data from the DB and send it as a response and in the client you again fetch the same data and parse it and he is saying that it is better to skip second step, which is leading us to SSR which is the traditional way to create apps. You fetch the data and send the HTML directly and you don't need to fetch again on the FE.
      He likes Meta Frameworks for JSX because he doesn't like HTMX(which can be used in PHP, GO, Python and so on), that way he can return JSX instead of HTML.
      What is so hard to understand lol.

    • @The6DAZ6
      @The6DAZ6 9 หลายเดือนก่อน +7

      @@georgiyanev7822 I did.
      The problem with all the statements is that the frameworks you quoted (just for example, is not for saying that are bad choices or to go against you) run on interpreter sacrificing speed and control over the machine for dx. The reason why he is going for full-stack frameworks is that he needs and want to create a website. He doesn't really care of the rest nor the speed nor the scalability.
      Basically he is approaching the problem as a frontender and creating first the client and then the infrastructure. Personally I would made a go server and serve the page statically /using templates, as the application scales you can detouch an API part and the fe into separate threads and use the apis for mobile apps ecc... 😅

    • @theuser384
      @theuser384 8 หลายเดือนก่อน +1

      @@georgiyanev7822 Inertia and its (even GO is there) adapters can solve that, it works as a glue for both sides and reduces a lot of complexity.

    • @Ahduciekwndnbbbsvvvghhhyyyyy
      @Ahduciekwndnbbbsvvvghhhyyyyy 6 หลายเดือนก่อน

      @@The6DAZ6great comment. interesting to see it from that perspective.

    • @The6DAZ6
      @The6DAZ6 6 หลายเดือนก่อน

      @@Ahduciekwndnbbbsvvvghhhyyyyy Thanks ^^

  • @viniciusmachadorodrigues1724
    @viniciusmachadorodrigues1724 9 หลายเดือนก่อน +11

    I dont believe js should be used to on the server

    • @Zuranthus
      @Zuranthus 4 หลายเดือนก่อน +1

      i bet you don't like pineapple on pizza either >:(

  • @iBezlepkin
    @iBezlepkin 3 หลายเดือนก่อน +1

    I agree with you completely. I did NestJs + Angular in my project, now I regret it..... I should have done MPA in PHP or NodeJs and not complicate everything

  • @ginjaturtles
    @ginjaturtles 9 หลายเดือนก่อน +2

    I definitely understand the sentiment for coupling full stack. Especially for small teams and startups, next js + backend as as service (supabase etc) allows you to hit market very fast. I've written next JS app before which had a landing page, stripe checkout etc. It's a great DX experience I personally just don't enjoy writing JS/TS everywhere (but if I have had to pay the bills this way I would)
    I definitely prefer something like C# or Go on the back end. I need to give Go + HTMX a try sometime but haven't because I really enjoy component libraries like ShadCN because I suck at design.
    Also, to remedy your frustrations couldn't use an interface on the front end for type safety or consider using something like GRPC?
    Anyways great video keep building cool stuff

  • @robpando8086
    @robpando8086 9 หลายเดือนก่อน +3

    Basically you like monoliths is what I hear you saying fullstack. I definitely agree it is the productive way that people have always done fast and amazing things with for so long, its just hilarious we have gone full circle now. I personally prefer the more backend monoliths like Elixir/Phoenix or RoR.

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      I am more arguing for full stack type safety, but yea monoliths are also better then 20 different codebases

  • @gadgetboyplaysmc
    @gadgetboyplaysmc 9 หลายเดือนก่อน +5

    Reason why I'm still writing separate backends for some apps is because I do more than just REST APIs that return data. When you need a stateful and persistent backend for usecases like websockets, server sent events, and CRON jobs, I feel like you'd still have to use it. Is this wrong? I know Vercel has those options but I still prefer to host on a VPS tbh.
    Also because sometimes of a requirement to write a different app that will consume that API.

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      This is actually a good point and something I should have probably mentioned. In serverless land (which is where I'm living more and more) most of that stuff does end up needing to be done with either a server (for stateful stuff) or with a server (websocket service). Vercel has stuff for CRON jobs which I recommend, but yea u do loose state on the server which CAN be an L, although I'd argue it is less of an L then people think

  • @TheJubeiam
    @TheJubeiam 9 หลายเดือนก่อน +11

    This is valid but only for pure landing pages

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +2

      This is the exact same thing I once thought. And it is just wrong, there are a huge number of real apps built with fullstack JS, I have built/published many myself

    • @gadgetboyplaysmc
      @gadgetboyplaysmc 9 หลายเดือนก่อน

      In what world would you ever write REST for a landing page?

  • @sleepyslothsocietyofficial2914
    @sleepyslothsocietyofficial2914 9 หลายเดือนก่อน +1

    tip: for hono you can export the type and instantiate a client which guarantees typesafety when calling your API. You can also add zod validators.

  • @enesbala5195
    @enesbala5195 4 หลายเดือนก่อน

    Funnily enough I have been using Sveltekit and been stuck with the same pain of creating API endpoints everywhere and with very little Type Safety - having to still go through the fetch(endpoint, body) dance and custom validations everywhere. I think Astro Actions that just dropped may be a good solution, but I am starting to feel that Sveltekit is failing to address this issue.
    I would love to get your opinion on this - subscribing just in case.

  • @riendlyf
    @riendlyf 9 หลายเดือนก่อน +4

    Hope there will be a good DX in go ecosystem in near future, maybe it will be htmx idk

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +1

      Its probably HTMX, unless they make something to TRPC style connect Go + TS, which seems VERY unlikely

  • @zakraw
    @zakraw 9 หลายเดือนก่อน +5

    Htmx needs a backend framework, the thumbnail is kinda confusing

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      Yea its the best stand in I could think of for fullstack Go

  • @CodeZakk
    @CodeZakk 9 หลายเดือนก่อน +1

    Yeah that is true. But if your hosting company doesn't support edge functions does it still work. Also should you use api folder in all cases when you use fullstack frameworks like nextjs?❤

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      Nah u don't need edge, just serverless (which any major hosting provider has). For nextjs I would just run my logic in my components (server components)

  • @ThingEngineer
    @ThingEngineer 9 หลายเดือนก่อน +1

    I haven't been this excited about the direction DX is starting to go since jQuery went stable and I thought I had super powers. (realized I had...)

  • @Glitch-txs
    @Glitch-txs 9 หลายเดือนก่อน +1

    The only reason I could have a separated backend is for strict security, e.g. I'm a bit scared of having backend envs around a metaframework

    • @sandersonstabo
      @sandersonstabo 9 หลายเดือนก่อน +2

      SvelteKit allows you to flag envs as backend only, and if you try to import it from the frontend you will get an error stopping you

  • @dandogamer
    @dandogamer 7 หลายเดือนก่อน +1

    I'm using astro + grpc and had no problems with it. Feels productive and I dont have to write yucky JS on the server

    • @bmdavis419
      @bmdavis419  7 หลายเดือนก่อน

      Grpc is more productive then writing db.findMany() at the top of your file? 🤨

    • @dandogamer
      @dandogamer 7 หลายเดือนก่อน

      @@bmdavis419 bit of a disappointing reply as grpc hasnt got anything to do with querying data from a database.

  • @armanradan
    @armanradan 8 หลายเดือนก่อน

    I'm on your side about using full stack frameworks but I prefer using backend languages in frontend instead of js/ts for backend. And it's possible through web assembly. My personal choice is leptos.

  • @RemotHuman
    @RemotHuman 9 หลายเดือนก่อน +2

    Is rails, php. django etc full stack as well? I think so. I think the whole backend/fronted distinction might be a relatively recent concept

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      Yea, these terms are not well defined anymore, and even saying "backend framework" in the title is kinda wrong, b/c like u can use SvelteKit or Next as a normal rest api

  • @mauricioe.matamoros8993
    @mauricioe.matamoros8993 9 หลายเดือนก่อน +1

    I prefer my backend and front end being agnostic from each. Even my db. Writing all the rules inside the db instead of the backend.

  • @Darbokst
    @Darbokst 8 หลายเดือนก่อน +1

    such an on point opinion.

  • @duznt-xizt
    @duznt-xizt 9 หลายเดือนก่อน +2

    api client generation is the way to go

  • @boccobadz
    @boccobadz 8 หลายเดือนก่อน +1

    Sveltekit is a game changer and the way to go forward. That or Go + HTMX (throw in templ). You don't need anything else. Let's retire the mess that React became and force all those "react devs" to learn proper CS/engineering practices.

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน

      templ makes a world of difference

  • @taquanminhlong
    @taquanminhlong 9 หลายเดือนก่อน

    I prefer a separate backend because js can't solve problem perfectly
    Even just proxying the request, rust helps reduce the js server's response time from 100-200ms to around 1-20ms
    Htmx with pure rust is even faster, around micro seconds

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      while true, not to be that guy but why? does 80ms really matter if it is 100x harder to build stuff?

  • @nexovec
    @nexovec 9 หลายเดือนก่อน

    You can just use a modular monolith design and use NATS for routing requests to the api running in the same app. It produces apps you can actually run a debugger on. It also makes it possible to hand roll request tracing. The event bus also functions as a storage layer so you can dump logs into it.
    Unless you have literally 100s of thousands of CONCURRENT users, this works fine. You still have too many levels of indirection for my taste(e.g. html renderer -> NATS -> logical endpoint -> ORM -> SQL - jesus), but it's way better than convoluted python javascript stacks with thousands of packages that run slower than your grandmother.

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +1

      Yea but like I would rather just use SvelteKit or NextJS or Nuxt, like JS has its problems obviously but the idea it can't handle anything above a toy app is silly

    • @nexovec
      @nexovec 9 หลายเดือนก่อน

      @@bmdavis419 well in this case you don't have to use the backend parts of your program. You don't have to touch the routing at all, for me the 'frontend' part is just a golang server, so I do my database lookups directly there. EDIT: Presumably the same can be done in js?

  • @victormendoza3295
    @victormendoza3295 9 หลายเดือนก่อน

    What are the pros and cons of adapter static on s3? Does that mean im missing the full stack backend? I think you can do go on the frontend with wasm containers. When i worked on a ship, deff had to have everything cached to the server.

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +1

      Static adapter just means that like ur serving static stuff, so full SPA, no server attached. You cannot do what I'm talking about in this video that way and would need a seperate backend

  • @dole-kf5tg
    @dole-kf5tg 3 หลายเดือนก่อน

    To solve the problem you have that is lack of expressiveness in the contract (between BE and FE), you are advocating for just getting rid of the contract and have everything into one giant tangled ball, where the alternative is having a working contract, a working process between teams.
    This will work only up to the point where the app is small enough to fit the inner workings in everyone's brains. The moment it grows bigger, nobody will have full context of anything, and development will slow to a crawl, everyone stepping on others' feet.
    In my experience, the complexity accumulates quite fast. If you just do this, I guess it would end up an unmaintainable mess by the 1 year or 2 year mark.

  • @MrJfergs
    @MrJfergs 9 หลายเดือนก่อน +1

    I suppose if you have 1 client this is likely the most efficient approach.

  • @IvanRandomDude
    @IvanRandomDude 9 หลายเดือนก่อน +3

    Laravel is king

  • @LucasAlexK
    @LucasAlexK 9 หลายเดือนก่อน

    Would you care showing some examples of business logic in your JS full stack app and it working "really freaking well" like you said?

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      Yea: github.com/bmdavis419/SvelteKit-Ecommerce, I also have multiple in development that are not public yet. Also a ton of big sites work like this (vercel, upload thing, and a lot more)

  • @berndeveloper
    @berndeveloper 8 หลายเดือนก่อน

    This is a good solution only for small teams and small projects, ideally for MVP. You need to be a backend dev to understand it. EDIT: I'm fullstack dev btw.

  • @knofi7052
    @knofi7052 9 หลายเดือนก่อน +5

    I don't get it. Who needs more than a console as a front end? 😂

  • @oussamasethoum1665
    @oussamasethoum1665 8 หลายเดือนก่อน

    what about realtime stuff? and dashboards etc?

  • @impostor8984
    @impostor8984 9 หลายเดือนก่อน

    what do you think of fastify microservices + trpc in a monorepo with frontend

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน +1

      Would work great, but still would probably be more of a pain than SvelteKit or NextJS app dir, for very little gain b/c ur not leaving TS land

    • @impostor8984
      @impostor8984 9 หลายเดือนก่อน

      @@bmdavis419 how would sveltekit or nextjs work tho if i wanted a mobile app, do i have to rewrite the backend again?

  • @sidekick3rida
    @sidekick3rida 7 หลายเดือนก่อน +1

    By "full-stack" you mean "full-stack js" or "isometric."

  • @FabuBrik
    @FabuBrik 9 หลายเดือนก่อน +1

    You lost me at the backend devs writing CSS. 😂

    • @bmdavis419
      @bmdavis419  9 หลายเดือนก่อน

      hey man I've gotten better at it

  • @darah.k3221
    @darah.k3221 5 หลายเดือนก่อน

    Go is not good for prototype

  • @mintdev
    @mintdev 9 หลายเดือนก่อน

    You should try Laravel 😊

  • @georgesava9092
    @georgesava9092 8 หลายเดือนก่อน +1

    Why would you use JS for the backend? Except as a junior trying to learn backend? JS is a horrible language for a backend language. Go, on the other hand, simple and powerful language

    • @bmdavis419
      @bmdavis419  8 หลายเดือนก่อน +1

      This just isn't true, and let me to over complicating the hell out of multiple projects, and more often then u think JS would get it done
      JS servers/backends do not explode if you have more then 5 users, I unironically thought this for a long time, its not true. They may never go quite as far as Go, but they can go pretty damn far, certainly far enough to build a business

    • @solomonogu1393
      @solomonogu1393 3 หลายเดือนก่อน

      Go is not easy

  • @BobKane-g6x
    @BobKane-g6x 9 หลายเดือนก่อน

    Typescript.. ewww..