Hacker News new | past | comments | ask | show | jobs | submit login

I just wish Web wasn't such a frustrating development experience. While it has improved leaps and bounds in the last decade, I still find it to be suboptimal when compared to native offerings.

Most of that frustration comes down to tooling and more specifically TypeScript. I'm not sure how to succinctly express my pain here but I have found generally that I wrestle with the type system in TypeScript far more than native offerings.




    > I just wish Web wasn't such a frustrating development experience
It's got to be better than building to target two totally different platforms (and even more once you factor in tablets, Windows desktop/Linux/macOS) and then jumping through hoops to get your app packaged, reviewed, and updated consistently onto the target devices.

    > Most of that frustration comes down to tooling and more specifically TypeScript
I think that a lot of folks get frustrated with TS because they are coming at it from the wrong perspective. Instead of thinking about it like a static type system, think about it like "JavaScript with shape definitions". Give this a shot:

https://chrlschn.dev/blog/2023/09/typescript-is-not-a-progra...


There are plenty of options e.g. React Native, Flutter if you want one codebase.

And if you want to have a lowest common denominator user experience that's fine but you shouldn't expect users to reward you for it. That's why successful apps tailor the experience for each platform.


Neither solution takes away the fact that you have to jump through hoops for distribution.

Web apps and PWA's built with HTML and JavaScript are likely to work as-is for a decade or more given we are likely to see minimal incompatibilities with existing HTML, JavaScript, and CSS in that time and likely to see more net new capabilities.

    > if you want to have a lowest common denominator user experience...
One is a native app with a budget in the millions built by dozens of engineers. One is a web app built by...me:

https://youtube.com/shorts/bxs9ZpIJ6RM

Not sure that there's that much sacrifice when it comes to modern web apps.


I enjoy building for the web using "native" tooling, writing CSS and JavaScript "by hand."

Years ago I tried to up my game and learn to use grunt and babble and other build tools. However, I found the process extremely complex, only to end up with finicky systems that made me even more stressful, not less.

I decided to ditch all that PoS and do things the easy (and logical) way. Never looked back.


The TypeScript type system is obscenely complicated because it has to be able to type almost any weird pattern people used when there was no type system.

Most dynamically typed languages are adding type systems right now, and they all face the choice between rewriting/wrapping the whole ecosystem or build a very complex and ultimately unergonomic type system.


It’s too bad that Swift → JS compiler projects are all stalled. Swift syntax is similar and I think it’d be a nice step up for people who don’t care for compatibility with legacy JS and want uncompromised static typing on the web.


I came from the much cleaner, simpler type system of AS3, but I don't really see a problem with the complexity of TS. There are a lot of aspects of its type system I will probably never use... but I don't have to. I've written a lot of fairly complex business and game software for the web, and never found myself reaching for a conditional type. Meanwhile, keyof and union types are handy for autocomplete hints. And to me that's all TS is really about. It's just there to make large scale javascript less of a dynamic, chaotic, untyped mess.


Keep your business logic on the server and use whatever language you want. I stick to vanilla JS and only use it for DOM manipulations. I try and leverage CSS for simple manipulations when I can. I don't go out of my way to, but it can do a lot these days.


Keeping this mindset, I encourage you try liveview in any language of your choice [1]. This approach allows you to handle business logics on the server, and update the screen in browser from the server as well.

[1] https://github.com/liveviews/liveviews


Ha, I’ve been a Phoenix LiveView zealot from almost day one, thank you much ;) <3


> I just wish Web wasn't such a frustrating development experience.

I have to say, having recently gone back to doing some web dev work (doing some dashboards with lots of D3 visualisations), I was pleasantly surprised to see how better things have gotten. working with CSS is better (with stuff like grid, flex, nested selectors), and JS is also much much better (import maps, fetch API).

I'd say for developing cross-platform apps it's a pretty good deal.


I stopped wanting to write SwiftUI because the compiler there is the worst I’ve ever used. It uses some kinds of complicated inference for ViewBuilders, and the inference can get confused if you have a type error and deadlock checking a View. It’ll put an error squiggle on an entire function and say “sorry we timed out trying to typecheck this, can you figure it out?” I’ve never used any typed language compiler that gives up on 100 line or less functions.


That's because you're doing something much harder with web dev. You're making something that works almost everywhere. It's actually insane this is even possible. I bet one day, computronium will run Javascript.


Nah, the shitty parts of web dev are in basic building blocks other ecosystems handle without a problem. The fact that javascript can run anywhere doesn't mean it needs to have crappy build systems. It doesn't mean it needs to have constant breaking changes and flaky dependencies. CSS is crap for layouts. I've build apps with at least 10 layout systems, and CSS is the worst of all of them.


Correct, but HTML + JS + CSS is the standard we seem to have settled on, and having a globally accepted standard for anything is a unique and historic achievement, let alone for free, fast, and robust global distribution of Turing-complete computation and content delivery.

Now we can hope that those building blocks improve over time, but the current situation is so much better than it could have been.


> having a globally accepted standard for anything is a unique and historic achievement, let alone for free, fast, and robust global distribution of Turing-complete computation and content delivery.

It really is amazing.

> Now we can hope that those building blocks improve over time, but the current situation is so much better than it could have been.

I think the web is under-appreciated in part because most people have never used internet connected GUI computers without it, but it's important to remember that there's no a priori reason for why the web had to exist.

In an alternate timeline we could be living in a world where all interactive software has to be reviewed by a gatekeeper. I wasted an inordinate amount of time playing with this a few days ago: https://news.ycombinator.com/item?id=39205020 and I remember thinking, it's pretty cool that you don't need anyone's approval to release something like this, nor do you need to pay excessive fees to distribute it, nor does it take any meaningful time to download/install, and yet it works on all my devices, and it's relatively secure.


This is beautifully put! I hope more people are able to understand the point you're making, especially how "having a globally accepted standard for anything is a unique and historic achievement".


Thank you!

I guess I can make myself more clear - the good thing about CSS is not the way it does layouts, but that it can do layouts on almost any device.

You can come up with a better system that runs on your own machine (1 unit of effort), but then you have to convince everyone and their dog to adopt your new standard (1 billion units of effort).


Developing in native GUI frameworks is just as frustrating. Using QT for complex GUIs is more frustrating than HTML5/react or whatever




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: