this post was submitted on 11 Jun 2023
4 points (100.0% liked)

Programming

14184 readers
14 users here now

All things programming and coding related. Subcommunity of Technology.


This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.

founded 2 years ago
MODERATORS
 

top 5 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 years ago

Used to be a frontend dev, switched over in the last year. My god how did I sleep at night without unit tests

[–] [email protected] 1 points 2 years ago

I agree. backend is a nice pretty, organized place.

Frontend is chaos.

[–] [email protected] 0 points 2 years ago (1 children)

Oh, absolutely the opposite for me too. I've written the backend for a project I'm working on, it was smooth sailing the entire time. Define your data model, build an API, think about business logic and security, all very rational and step by step.

Now I have to make the UI. It's a horrible slog to do basic things. Drag and drop? More like drag my corpse because I've dropped dead

I refuse to use JS anymore, so I'm doing everything in WASM (Rust/yew). It's better, but still pretty high friction.

[–] [email protected] 0 points 2 years ago (1 children)

What's rust like for web interface? I assume it's still HTML based? No oop? Also, how do you feel about typescript?

[–] [email protected] 2 points 2 years ago

It takes some getting used to, but for me it's much better than JavaScript and even TypeScript. TypeScript is a little better than using JavaScript, but not by much. I still find it very frustrating to use. The ecosystem is a mess, IMO.

In Rust when doing web work, at least when using the Yew framework, you return an Html type from functions. Kinda like this:

fn hello_world(props: &Props) -> Html {
  // do logic
   html!{
      <div>{ props.username }</div>
   }
}

It's very similar to using React, with various state / hook things that have been developed pretty directly with reference to how React does things.