4 ms·
On the one hand, all these web tech products are interesting. On the other hand, I've recently discovered that writing desktop apps with web tech is just about
by biocomputation 10y ago
On the one hand, all these web tech products are interesting. On the other hand, I've recently discovered that writing desktop apps with web tech is just about as awful as doing it in C++, albeit awful in different ways.
- wishinghand 10y agoCould you elaborate? I've never done either and I'd be interested in hearing some more details about why it's not working out for you.
- biocomputation 10y agoWhere would I even begin? Doing anything with web tech is much faster at first, but web app debugging ( if you can even call it that ) is utterly dreadful so development ends up being slower. It makes me think that the people who designed a lot of this stuff simply weren't in their right minds, were willfully ignorant, or just didn't care. As a result, it's easy to get held up for hours finding bugs that won't even make it past the compiler if I'm working in Visual Studio. It's like being in the dark ages! I just can't fathom doing anything large scale without access to real tools, real abstractions. I mean, in JS, abstraction means using separate JS files that people actually believe represent real modules or something! Yeah, separate files are not actually abstractions. Separate directories doesn't mean that something is a module. Everything is so disparate and cobbled together. It's like people think that the ability to glue JS "libraries" together in "interesting" ways is a smart way to develop software. I think, as a C++ programmer, that design decisions that appear strange and stressful to me are behind a lot of the JS fatigue that people talk about these days. In the C++ world, such Frankenstein creations would be thought of as weird or incompetent, or only ever done as a last resort ( like when you don't have access to source code and you never will ). Like, the idea of passing so much stuff around as strings or JSON 'objects'. Let's see, I need a graph. But instead of writing an actual graph that uses pointers and objects that are actually separate nodes, I'll use the DOM. It'll be like a tree, except it's made of text. I'll make a 'tree' of objects with the DOM. Or maybe I'll use JSON, which is also just text. I'll write some other tools that allow me to insert JS into these 'objects' so that I can modify them. Yeah, it won't be weird that I combine my data structures and my code, because I'll just use more JS to parse the file and then write another file that will actually be fed to the browser. Text transformation as application development is just totally batshit. In fact, despite all the shiny new toys, the fact that text is used for just about everything makes it all seem like a huge technical debt factory. I think a good analogy is as follows: "modern" web development is like if I were to write a C++ application without using the type system. You know, I could just use std::string for everything. Numbers are strings. Objects and their fields can be represented by strings. I would just pack everything into strings. Then of course, I'll have to parse everything to make sure things add up afterwards. I can write all sorts of interesting libraries to help me work with all my text, without ever realizing that these libraries wouldn't have to exist if I had done things right. It seems like web tech forces you to do things that would have been regarded as utterly foolish 40 years ago, never mind today. The last two weeks have left me struck with the following notion: "this is all just text". Everything is text. It's like an utterly incompetent C++ programmer just did everything with strings. "My data structures are just text!" "My objects are objects because they're in separate text files." "My modules are modules because they're in separate directories." It makes no sense at all.
- easong 10y agoWhat stack are you using? The description you give doesn't match my experience with modern javascript (react, webpack, flow/typescript, etc). If you have to build a desktop app with jquery soup (or even angular), I definitely feel for you.
- biocomputation 10y agoI'm using Electron ( shell? ) to make a simple desktop app. Certain things are much nicer, such as the ability to have everything be "owner draw" in a way that isn't as frustrating as using owner draw in the usual context. IE, I can easily at a bitmap background to whatever component I want. I can control a lot of the look/feel of the UI with style sheets. IMHO, React is another way of covering up 20 years of bad design decisions that went into web tech. React is the natural reaction to using a tree of text to represent data structures. If things were done right, React wouldn't exist. By 'real modules' I mean things like DLLs that can be hot swapped at app start or at runtime. The more I look into things like Atom, the more I am disturbed by what constitutes 'state of the art' in web tech.
- thecolorblue 10y agoHave you used webpack? It allows for hot swapping and a bunch of other module features.
- easong 10y agoI mean, react (and associated frontend technologies) are just a way of making it easier to write code within the constraints of browsers, which are honestly a small miracle. Yes, they're a pile of hacks upon hacks (the web was designed to share physics papers, not deliver complicated multimedia applications), but they let you write the same code for every major operating system, device, and form factor that exists and deploy it seamlessly over an unreliable network. It's shocking that everything works as well as it does. And as programmers, everything we use is just papering over the horror of writing network-connected cat-sharing apps on weird-shaped bits of metal - why worry about a light abstraction over the JS build step? My experience with Atom has also been sub-par, but Visual Studio Code is pretty cool and built on the exact same platform (electron). I think you're the exact target audience for typescript, for what it's worth. It will give you type checking, IDE integration, compiler errors, modules, etc basically for free and is (not exclusively, and IMHO) built for people who find javascript distasteful.
- Everlag 10y agoPersonally, the appeal of electron is that most of my knowledge for writing web apps is immediately portable to desktop apps as well. Using the same tooling, language, and with more control over the environment, you can build good enough applications. Are there gray areas where everything is an awful hellscape of trying to mix node apis and a browser? Oh yes. Is the experience not the absolute best? Yeah. However, I feel the trade is worth it to defer sinking time into native desktop applications.
- biocomputation 10y agoYeah, so with no extra work, I can run on Linux and Mac... >> awful hellscape In my opinion, there are just a few not so insignificant problems with web tech, not the least of which is that the incredibly serious flaws and limitations of the text-as-data-structures programming model in web tech seems to be a like a perpetual motion machine for technical debt. I cannot be the only one who is deeply unsettled by the notion that the web tech world is populated by thousands of libraries designed to help paper over incredibly serious problems/limitations with the basic programming model. Even stuff like Angular just exists to help paper over problems that had already been solved in the 1980s. But yeah, maybe it's cool for doing stuff that's good enough. I can definitely see that!