KnockoutJS With WebAPI

182 views
Skip to first unread message

Prasanna Venkatesh

unread,
Dec 11, 2017, 4:26:35 AM12/11/17
to KnockoutJS
Hi,

Can anyone please help me how to call a WebAPI from KnockoutJS and also please let me know is it advisible to use KnockoutJS in MVC pattern for responsive UI(Two Way binding).

Thanks in Advance.

Jean-Sebastien Binette

unread,
Dec 12, 2017, 8:33:08 AM12/12/17
to KnockoutJS
That is all very general (and legetimate) questions.
You can call WebApi just like any other server side function using jquery. There is no difference.
MVC can be used on the server side and UI independently. Ember specialize in that for the UI.
Knockout is simply a two way binding library.
If you are a single programmer like me, MVC is probably too much overhead (I’m going to get roasted for this).

Aybars ARSLAN

unread,
Jan 6, 2018, 3:50:29 PM1/6/18
to KnockoutJS
Last days. I added a very simple project to my github repository ( https://github.com/arslanaybars/BBS ).

you can see how to call api methods from knockout. the knockout files are under the BBS/src/BBS.UI/Content/js/ folder.

all the best.

Jean-Sebastien Binette

unread,
Jan 6, 2018, 4:15:10 PM1/6/18
to KnockoutJS
I see you tried a lot of CRUD methods. Which one did you prefer?

Jean-Sebastien Binette

unread,
Jan 6, 2018, 4:19:16 PM1/6/18
to KnockoutJS
Oops sorry I misread. I see you’ve used pretty much the stack I’ve often use.
Sometimes now I bypass ASP.NET and the Entity framework by simply using Node with node sql. I add a lot of functions to my sql server to handle CRUD. With time it’s easier to maintain.
Good luck.
Reply all
Reply to author
Forward
0 new messages