7

Web-dev advice for building a localhost app w/o a steep learning curve?

 3 years ago
source link: https://lobste.rs/s/sxhylb/web_dev_advice_for_building_localhost_app
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Web-dev advice for building a localhost app w/o a steep learning curve?

TL;DR: I am a C++/ObjC guy with a basic knowledge of HTML/CSS/JS. I want to build a dynamic web-app (to be served on localhost) quickly. What client-side library can I use that will save me from doing everything by hand, but without having to learn & master a complicated framework like React or Elm?

I’m primarily a desktop/mobile developer, and in recent years I’ve focused on non-UI C++ library code, but I’m delving back into web dev for a side project of mine. This project is client-side, cross-platform, and needs UI, so the easiest approach is to drop a little HTTP server into it and serve up a website on localhost.

I’ve dabbled in web dev off and on since 1995, but never that seriously. I know HTML, CSS, JS, DOM, XHR … but basically as they were in 2008. I’ve never used the fancy frameworks the kids are into nowadays, like React or Elm. So the logic I’ve done so far has been by typing “document.getElementById(“button1”).onclick = function() {…”, they same way I did it in 2000.

I wonder if there are better ways to do this now, that don’t require a big learning curve or reading a 500-page book. On the View side I grabbed Bootstrap, which has really helped me put together a halfway-nice looking layout. But what about the M and C?

Ironically, the ubiquity of web-dev makes it hard to learn about this by googling, because the web is full of awful clickbaity content-farm sites about the Top 50 Bootstrap Themes, or The Best React Tutorial, or Teach Yourself CSS In Two Hours… So I thought I might get better advice from the fellow brainiacs here on lobste.rs.

Some random thoughts:

  • This is a localhost-only single-user site, so I don’t care about scalability, performance or auth. Bandwidth is infinite so building a SPA seems pointless.
  • It’s more or less a social-network app: posts, feeds, user profiles…
  • I’ve already cobbled together a basic C++ server-side framework with regex routes (cpp-httplib) and templates (inja).
  • I’m agnostic about putting logic on the “client” vs. “server” side; it’s the same CPU and the same programmer.
  • I probably want to use TypeScript, as I prefer fixing bugs at compile-time.
  • What do the cool kids do for server push nowadays? (Does just saying “server push” make me sound old?)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK