[–] [S] 1 point 1 year ago (2 children)

fairly static HTML generated by a backend

I don't think this is a scalable, futureproof option. Neither is pure HTML/CSS/JS. I know you can get far with those things, but as another comment mentioned, what if I at some point want to turn it into a mobile app? What if I want to do some complicated thing that I didn't anticipate ahead of time? An established framework seems more futureproof in that aspect.

  • source
  • parent
  • context
  • [–] [S] 3 points 1 year ago (1 child)

    component library

    Yea definitely. But even here there are many choices. I've tried Bulma before and it's "okay" but I feel it still takes a whole lot of tweaking with lots of small classes to get something that looks decent.

    when you say “Frontend” we don’t know [what exactly you need]

    As I said above, I have no special requirements. Think about any "usual" website you visit, even something like Lemmy or Piefed, or other social media, or Wikipedia or YouTube or whatever. I don't need anything particularly fancy. Probably closest to the "content-heavy web page" thing you mentioned?

  • source
  • parent
  • context
  • [–] 3 points 1 year ago (9 children)

    The backend you are working on can also help narrow down what front end you may want to try. I am a “full-stack” .NET (i.e. I do backend but I’m stubborn enough to touch and make choices on our front end vs other members on my team). Naturally, our apps are ASP.NET MVC/Razor pages, and I’ve dragged a few things over to Blazor for some of our new apps. One could still add vanilla JS / Browser APIs on top of this and cover most needs. Bootstrap consider what you need to keep you app mobile-friendly (usually described as “responsive”), and can be used with just data- attributes.

    My opinion is the front end should be quick and should also be light on business logic. Then you are just making http requests for data retrieval or requesting the server to do something. Then you can break out your backend methods/services to handle your data persistence > business logic > shaping the results for what your front end needs

    Sorry that got long TL;DR see what front end usually seems paired with your backend and start there. For example, try .NET/ASP.NET Core

  • source
  • [–] 2 points 1 year ago (3 children)

    I would first ask what you expect your frontend to do. Will your UI get live updates? What do you expect will be an average session time, minutes or hours?

    I forgot to elaborate why. My point being you might get what you need from fairly static HTML generated by a backend, with a sprinkling of JavaScript for interactivity (Progressive enhancement, gov.uk has more on that as an approach )

  • source
  • parent
  • context
  • [–] 1 point 1 year ago (4 children)

    I would first ask what you expect your frontend to do. Will your UI get live updates? What do you expect will be an average session time, minutes or hours?

    I “just” want to build a pretty standard, responsive, modern-looking UI.

    You can accomplish that with plain HTML, CSS and JavaScript. https://developer.mozilla.org/en-US/docs/Learn_web_development can be a good place to start.

    Ideally without too much boilerplate

    What is considered boilerplate, and too much of it, is a bit subjective.

    in a framework that “feels good”

    That is very much subjective. Also, you might not need a framework.

    in a way that might at some point attract other contributors as well

    Now you're considering your own tastes, as well as the tastes of an unknown future stranger :D I'd say don't worry about it.

  • source
  • [–] [S] 6 points 1 year ago (11 children)

    Sorry, I should've made myself clearer. I am an experienced backend developer but I know basic HTML, CSS and JS/TS. My problem is not with learning the basics of these foundational technologies, or learning anything actually. My problem is what should I even learn and what is a good stack-choice, taking into account not just my own enjoyment and what is popular/cool, but futureproofing and maintainability as well. I don't have time to go through all frontend frameworks. There are simply too many and it is not an exercise I find enjoyable.

  • source
  • parent
  • context
  • [–] 6 points 1 year ago (2 children)

    Maybe you are looking for a component library, something like Bulma or Bootstrap, rather than a JS framework. Your primary problem may be design, UX layout and learning basic CSS/HTML.

    But if you want one of the lighter frameworks, I'd try Vue. But it is increasingly possible to do stuff without a framework, especially if your needs are not too complex. I'd start by looking into Vite, and use one of its simpler templates. You may want to select typescript instead of JS if you get the option.

    Also... when you say "Frontend" we don't know if you're going to do a visualization-rich 3D application with touch gestures, or a business CRUD applications with lots of forms and tables and paginated lists filtered server-side, or a content-heavy web page with lots of articles to read...?

  • source
  • [–] 5 points 1 year ago (1 child)

    I am also not a frontend dev, but you got me curious, so I did a little digging. Sounds like if you think you may ever turn it into a mobile app, choose React. Otherwise flip a coin between Vue or Svelte.

  • source
  • [–] 17 points 1 year ago* (last edited 1 year ago) (18 children)

    First get the basics with HTML and CSS. Learn JavaScript then Typescript. Figure out if you want to learn SaSS, styled components (for JavaScript based applications), or a library like Tailwind. Do YouTube searches and research on React, Vue, and Angular. See which one gels with you.

    I suggest Udemy for that and if you're interested I can suggest specific teachers.

    If you or your company are hiring UI/UX developers then DM me, hopefully then I'll train you myself.

  • source
  • [–] 1 point 1 year ago* (last edited 1 year ago)

    Does Leptos pass the FRP guidelines? Seems like a pretty good language and I've dabbled in it a couple times but not yet created anything serious in it yet.

    It appears to take after React which I fear.. or does it pave it's own way?

    EDIT: Want to add that I know it takes after react but not sure if it follows the guidelines in continuous development.

  • source
  • parent
  • context
  • [–] [S] 9 points 1 year ago (1 child)

    Oh shoot, I did not know that! :0
    That means I should keep Contexts small and all values related to another, instead of having "Page Contexts" that just store all things I need in any child. Good to know!

  • source
  • parent
  • context
  • [–] 4 points 1 year ago

    React has changed a lot with the addition of contexts but that's the modern way to handle it without using some kind of state management.

    I think most state management libraries are far more expensive to use than people realize. Contexts are pretty straightforward and Just Work so I'd keep using them unless you have a very good reason to switch.

  • source
  • [–] 10 points 1 year ago* (2 children)

    Using Context is fine, but you have to keep in mind that if any state in a Context is updated, all components that uses that Context will re-render, even if they don't use the state that has been updated.

    Redux and Zustand allow to subscribe only to the values you need, reducing the amount of re-renders. There are also library-free alternatives like this one from romgrk.

  • source
  • [–] [S] 5 points 1 year ago

    Okay nice, thank you!
    Yeah, I use the value in a lot of deeply nested places, and it usually isn't even just one value, but a set of filterModel, sortModel and paginationModel that are always used together but need their separate states. Directly passing those through parameters even just one or two levels down really messes with the readability the code. But yeah, if it's just one-off states only used in one child I do pass them as regular parameters :)

  • source
  • parent
  • context
  • view more: ‹ prev next ›