What is a good and famous JavaScript MVC pattern?

What is the best way to manage JavaScript files and the context of functions / objects in an ASP.NET MVC application?

+3
source share
5 answers
+5
source

If you are looking for something like this, you should definitely check out MooTools , as they implement the classes almost exactly as you describe. Overall, I found that their approach is very clean, extensible, and convenient. For example, here is a template template that I use to write all my classes (note that it uses some syntax specific to MooTools):

var className = new Class ({

    Implements: [Events, Options],

    options: {
        option1: 'option1',
        option2: 'option2'
    },

    initialize: function(options){
        this.setOptions(options);
    },

    function1: function(){

    },

    function2: function(){

    }
});
+1

js Content/Js. URL, . , Rob Conery MVC Commerce demo.

, "... / ASPp MVC"

, , / . JS .

0

js, js, :

mainApp = function(){

   return {

       init: function(){

       },

       function1: function(){

       }

   };

};

, mvc.

0

, MooTools,

Object literal pattern.

I am looking for a way to manage my ajax application according to the current state of asp.net mvc

0
source

Source: https://habr.com/ru/post/1698452/


All Articles