I am used to differentiate the MVC pattern, controller and model, and now how I implemented in many models I can see the model in the controller and for me this practice does not respect the MVC pattern.
In my case, what I want is for example:
a POJO car:
car of the public class {private int value; Private Gate Doors; Public car (int px, int draw) {this.price = px; This.doors = dr; }}
and after the instanciation in my Java program
car car = new car (1000, 4);
Now, how can I put this object in an angular model?
Thank you in advance.
Angel's MVC tab means that all the layers (M, V, C) are in the client side. . In this method, the server side returns the normal Jason file, which is requested by AJAX, whether you apply your server side code with MVC pattern.
So if you want to use POJO on your server side code, then I recommend converting POO to Jason format and giving it as a JSN file. In client client code, you can convert json to javascript simple object and use it as a model.
No comments:
Post a Comment