Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I started off like you on the backend development. When I had to build small webapps, I looked at the various frameworks and then settled on KnockoutJS. KnockoutJS is a very small and simple JS library. This is several years ago and at that time I didn't even know Javascript. The reason I say that is because even for a JS newbie, the KnockoutJS library was simple to use. (I read somewhere that MS Azure used KnockoutJS for their frontend dashboards in their earlier version. Not sure if they still do.)

If you are comfortable with plain HTML + CSS + Javascript, adding KnockoutJS will give you a minimal app building capability that you will find useful for several usecases.

You get to manage your application's data model in javascript on the client side and the UI can be bound to your datamodel (bidirectionally) without having to manage it yourself. That is more than sufficient for many usecases.

If you don't want to be fiddling around with CSS too much, you can use something like Bootstrap or Material Design's CSS templates to get some decent looking UI (without getting lost in CSS minutiae).

For your development workflow, start without any bundler (like WebPack or Parcel) first. Once, you have your application working, you can then introduce it as a final step.



I was a huge fan of Knockout for many years. Durandal was neat at the time, too, as a very simple "SPA framework" on top of just Knockout.

I find it a bit unfortunate that Knockout 3 seems to be showing its age at this point and is maybe not something I'd recommend in 2022. I think you can almost do more, easily and handier, with Vanilla ES2020+ than Knockout.

Though I certainly wouldn't recommend against Knockout either today. It's one of the few toolkits of that age that is still seeing somewhat active security maintenance, at least. There's also rumors that there may still be a production-ready "Knockout 4" in the pipeline one day. I'm still somewhat curious to see Knockout further modernized. (Search for "TKO.js" to see a preview. Allegedly, some groups are using TKO in Production already today, though it is under-documented and "unfinished".)


One of the issues I had with KnockoutJS is that it's pretty easy to leak memory and quite easy to use a lot of CPU. Maybe we were "using KnockoutJS wrong" (entirely possible!), but we had several independent teams working on different products and they all suffered from these problems. Eventually we switched most things to VueJS and the performance difference was remarkable.

I'm not a dedicated front-end dev, although I did write plenty of KnockoutJS code (I was less involved with the VueJS rewrites; I mostly moved to work on backend code and other things), but overall I'd be a bit wary of KnockoutJS. I'm sure there is a way to avoid these issues, but I was never quite able to figure out how.


Great advice. Thank you. What have you been doing to help with page layouts, if anything?


I mostly use Bootstrap for prototypes. For most of my use cases, I just use card styled divs. There is basic support for different types of container divs in bootstrap. There's card-group, card-deck and even card-columns. Never had to go beyond these for my requirements. Forms are a breeze and come out looking great, right out of the box.

Bootstrap has a flex (https://getbootstrap.com/docs/5.0/utilities/flex/) for managing layout, alignment, grid sizing etc.,

Also, targeting multiple form-factors and building responsive UIs is easy once you start with the mobile-first styling classes and then start setting the various breakpoints for larger device form-factors.

If you already know HTML and some basic CSS, getting up to speed on Bootstrap or Material Design basics might be just a day or so. Their documentation is very good and you can go straight to the section you want (eg: tables) and try it out in your HTML.


My own advice, on the other hand, is to use Tailwind. Tailwind is far more flexible than Bootstrap and it's super easy to understand. If you pair it with the Intellisense plugin, it's a total game changer. I've been writing CSS for over a decade and I'll never go back to normal CSS after trying it.




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

Search: