locked
Help with the new ASP.NET MVC SPA template using Knockout RRS feed

  • Question

  • User1596489946 posted

    Hello, I have decided to try out the ASP.NET MVC SPA template for building my apps. I use the template in VS 2017 which uses Knockout and I do not seem to get how things are structured really well. I searched online but all the links am getting are related to MVC 4. I am hoping if anybody can help me with a link or a tutorial on how to use the new SPA template in VS 2017. Thanks.

    Wednesday, May 31, 2017 3:29 PM

Answers

  • User-474980206 posted

    you should review the knockout site:

     http://knockoutjs.com

    to understand knockout. and the sammy site to understand how its used.

      http://sammyjs.org

    then google knockout with sammy to understand using them together.

    note: while knockout was a popular replacement for backbone, I don't see it as popular as it once was. It use of two way binding is now considered an anti-pattern (angular was recoded to remove two binding).

    you should look at angular or vue if you like templates, or react if you like components.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 2, 2017 3:30 PM

All replies

  • User1771544211 posted

    Hi RanchoJr,

    Hello, I have decided to try out the ASP.NET MVC SPA template for building my apps.

    Which framework do you use with the template? Is .NET Framework or .NET Core?

    It seems that you are using the .NET Core framework, cause the .NET Framworks doesn't change the structure in VS 2017.

    It seems that the Microsoft doesn't have a document that shows how to use KnockOut with SPA in ASP.NET Core, however, I found a document that shows how to use Angularjs with SPA in ASP.NET Core, please take it as reference.

    https://docs.microsoft.com/en-us/aspnet/core/client-side/angular

    Best Regards,

    Jean

    Thursday, June 1, 2017 2:31 AM
  • User1596489946 posted

    Thanks Jean, The framework I use is .NET Framework, There is no template for SPA in ASP.NET Core

    Angularjs is cool but I prefer Knockoutjs to it instead

    The template creates the project and set up everything using Knockout and Sammyjs.

    But I can not seem to find my way around as to what this is and what is doing.

    Thursday, June 1, 2017 11:29 AM
  • User1771544211 posted

    Hi RanchoJr,

    But I can not seem to find my way around as to what this is and what is doing.

    What do you want to do?

    I think the following link could be helpful in your issue, it shows how to use Single-Page Application (SPA) template for ASP.NET MVC 4 in VS 2012. And it should still useful with VS2017.

    https://docs.microsoft.com/en-us/aspnet/single-page-application/overview/introduction/knockoutjs-template

    Best Regards,

    Jean

    Friday, June 2, 2017 6:11 AM
  • User-474980206 posted

    you should review the knockout site:

     http://knockoutjs.com

    to understand knockout. and the sammy site to understand how its used.

      http://sammyjs.org

    then google knockout with sammy to understand using them together.

    note: while knockout was a popular replacement for backbone, I don't see it as popular as it once was. It use of two way binding is now considered an anti-pattern (angular was recoded to remove two binding).

    you should look at angular or vue if you like templates, or react if you like components.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, June 2, 2017 3:30 PM
  • User1596489946 posted

    Thank You Bruce

    Saturday, June 3, 2017 10:06 AM