We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.
I still use knockout. And if asked to start a new project, I do it with Knockout and I wouldn't think of anything else. I just want Knockout to stay relevant. No one comes out of school with Knockout experience. It isn't hip enough to even be in the vocabulary of new developers.
The only other framework I have looked at is VueJs, and it seems to be almost inspired from Knockout. But they have media attention. How can we keep Knockout relevant.
I love knockout, it is easy to pick up and quick to implement fence web pages. Knock me out is the most useful knowledge base I found on the internet. I still come to there to check few tips sometimes. So a big kudos to you Ryan!
Please, please, please, please implement Else and ElseIf for ko:if
For simple else functionality, ko:ifnot should be enough. If you need to start piling on ElseIf blocks, switch-case might be a better fit.
I'm still using Knockout! I've used it for super simple page interaction tasks over something like jQuery, and I've got components that fully utilize Knockout. I'm using an old webforms ASP.NET framework for a project I work on, and Knockout is wonderful for adding in more dynamic functionality without a ton of cruft. I'm all in for updates!
We're using Knockout for several new projects right now, and I've taken it to every web project I worked on that didn't already have a framework or pattern in place. I love that KO is focused on doing its thing well, instead of trying to be a bigger framework; and that it's easy to get started with a new project as well as to plug into a legacy application.
I'd love to see the project continue to grow. I have a couple of quality of life wish list items, but the tool as it is is great. Updating for modern code and build systems would be great.
P.S. Other recent projects leveraging KO include one from a little firm in Redmond: the new Azure Portal is a Knockout application. The list of members of ko.bindingHandlers is significant...
After having tried angular V1, vueJs i switched to knockout and i just started two days ago to use it for the admin of my teaching site. As i'm a complete newbie, i don't know what should be improved. Even more examples may be ! I stumble upon your blog while looking for fiddles about components :-)
What make me choose it ? One file, no compilation, no building mecanism that takes ages to set up. One file and i'm up and running. From what i've seen so far, it does the job. I far preper a library that does only what it should do than a monster trying to do everything badly.
We (Anthropos) use knockout extensively, for our dashboards and PWAs. Personally I have never had any particular problems with it that React et al solved. Main these frameworks seemed to increase complexity, which as a lean organisation I was loathed to introduce.
Knockout Components are great.
I agree with keeping it relevant. More performance is always welcome
Been using KO for a very long time, since the 2.x era and into the 3.4 (haven't been able to risk a move to 3.5 yet).
Our architecture is using RequireJS as a loader, where we follow the patter of building the KO components as an AMD module which requires the ViewModel and Template (via text! directive) as dependencies, and then the module just registers itself one time as the module loads.
One element that is comming up in our developer circles is that 'modern frameworks' support 'Hot Module Replacement' type of operation. I've found some information related to implementing reloading the module at the RequireJS level (see here), but one element that eludes me is hooking into the rendered components such that they also refresh when the underlying module gets swapped in.
Any chance we could get some guidance on that?
Hi Ryan I missed you. You are the guy bringing me to knockout. In 2019 I'm still using knockout the same way as the years before. I only add some sugar around Knockout like Typescript, Webpack, PUG and other small things, that makes lives easier. Additionally, I made a non-blocking knockout UI version myself. I have timers installed in various places to create non blocking UI components. For me the most missing plugin / feature in Knockout is to have type safety templates and code completion in your editor of choice(for me VSCODE). The same behavior like in React (TSX/JSX).
Now I have a question for you. Have you used React with MobX? And why or why not? In my opinion, MobX is almost a 100% knockout clone.
Yes, I'm still using it. Mostly for Magento 2 stuff but I use it on other applications too. Svelte > React btw.
Ryan,
Glad to see you're circling back on Knockout. Here's a short video of system I've built in Knockout.
https://marqnet-my.sharepoi...
One of my biggest struggles.....
A Routing Framework, rolled my own, it wasn't easy and isn't without issues.
Beyond that, I'd say object dependencies across modules. Not that it can't be done, but when it's done it isn't clean.
Having never created a robust application with any other Javascript framework. I'm curious what features and enhancements you'd suggest.
My startup finally moved off Knockout last year. I did move on personally. I wanted to create a modern version of Knockout and prove that the paradigm could hold up in modern JavaScript. I ended up writing arguably the fastest JavaScript modern framework, SolidJS. Thank you Ryan for your articles. I learned a ton back in the day and they helped the younger me really understand the fundamentals of fine-grained reactivity. Now I find I'm the one writing articles. All the best.
The thing that I always loved about Knockout (and didn't like about many other frameworks) was that it was, at its most basic, just some JavaScript and HTML. It was very easy to build a system on top of it that ended up with fast, clean delivery of business goals.
Honestly, until I started playing around with NextJS, I hadn't really found that "next great framework." React reminded me of the EJB days a little bit too much - I want 99% of my LOC to be business related, not boilerplate. That's what Knockout delivered (we still use it for several projects) and so far nobody else has beaten, for us at least.
Improvements? I'd love to see some kind of system that sat on top of it, the way that Next does for React. We've built our own internal page-based system but its a bit clunky and requires a "compilation" step, but something similar where you can gen-up front-ends quickly and easily without sacrificing the inherent web-ness of the web would be awesome.