我一直在研究欧洲司法学会和JavaMVC。 我看到通过科索沃信托公司控制员及其模式(在某些情况下,即第3个政党的再融合)具有相当价值。 然而,我利用泽德等传统MVC在PHP中发展。
Typically for working with Ajax, I ll set it up just as I would any other page (model/view/controller), however instead of rendering the view, I ll return it, json_encode it and echo it out. Such as this:
echo json_encode($this->View->render( View_Name , true));
This view will have already been passed data, done it s thing, and is now returning fully rendered in a JSON object I can work with in JavaScript.
这似乎很简单。 因此,随着这种设置,使用像欧洲司法联合会这样的东西有什么好处?
It appears I would now have to not only define a new file for a view, but also continue to use the same controllers and spit out JSON instead of just the rendered view. That JSON would then contain the data used for the EJS view. Am I missing something?
感谢!