New to KO, recommendations needed for advanced UI

651 views
Skip to first unread message

Haddicus

unread,
Mar 27, 2012, 5:07:30 PM3/27/12
to KnockoutJS
So, I've been researching knockout, went through the tutorials on
learn.knockoutjs.com, and have looked at different examples online,
and been pretty impressed so far. As with any new technology I use, I
always like to ask the experts to determine best way possible to deal
with certain situations. I currently have a system I've been writing
to manage and maintain a cloud-based offering for my employer. The
system is designed within ASP.NET MVC, and I've been using Javascript
and Jquery to do all of my client interaction. I really would like to
get some direction on how to implement Knockout within my situation.

Currently, I have management views that are used to maintain model
data on my backend database. There's a lot going on my client side..
essentially what I want to do with Knockout is have a gridded
interfaces that is filled by data presented by my controller. Each
item is displayed in a row, and below the grid, when a line is
selected, I would like a form(popup below my grid) to be filled with
the underlying data associated with this item, and have the ability to
modify the code here, and save back once updated (asynchronously, area
would close & clear once new item was inserted, or record was
updated), I also would like to use that same form to insert new
records upon insert request.

I'm wondering the best way to handle these things within KO: Hiding/
showing the form on different requests, clearing form values once
saved or canceled, and displaying the different buttons when needed
(Update, Cancel, Insert, Add)... What is the best way to handle an
advanced UI like this within Knockout?

Thanks for your help in advance.

Chris Marisic

unread,
Mar 28, 2012, 8:56:18 AM3/28/12
to knock...@googlegroups.com
I'm certainly no expert but we've been having tremendous success with KO.

Review: http://learn.knockoutjs.com/#/?tutorial=webmail

Goto step 3, then click Fix My Code. This tutorial is what sold me on KO. The concepts this uses should give you alot of ideas of how you can structure your models to make your UI behave how you wish.

When we read from the server we use ko.mapping to turn our asp.net mvc models into fully observable objects.

We use the project https://github.com/bbyars/RestMvc/ for creating amazing urls and the project https://github.com/caelum/restfulie/wiki for allowing us to actually make our application behave like a true web server, support content negotiation and returning proper responses.

Creating urls that are truly resources has been an epic win, with the capability to move to true hyper media and HATEOAS in the future if we need it, we have the most amount of flexibility for building our app that we've ever had.

Chris Marisic

unread,
Mar 28, 2012, 9:06:38 AM3/28/12
to knock...@googlegroups.com
Also view my recent comment: https://groups.google.com/d/msg/knockoutjs/cSoM_zRTwjM/CUd51oHGRnQJ as you might find this relevant as this was in response to another ASP.NET MVC user.
Reply all
Reply to author
Forward
0 new messages