-1
我有一个Java应用程序与此体系结构:实体+持久+业务+ REST服务。建议如何创建一个JavaScript类
我想创建没有JSF的视图层,换句话说,我只想使用HTML + CSS + JS(JQuery + Ajax)。
什么是更好的方式来创建一个JavaScript类来访问REST服务?
var Bookmark = function() {
this.id;
this.description;
this.link;
};
Bookmark.prototype._insert = function() {
// here should i put the JQuery Ajax Call?
};
Bookmark.prototype._delete = function() {
// here should i put the JQuery Ajax Call?
}
Bookmark.prototype._update = function() {
// here should i put the JQuery Ajax Call?
}
Bookmark.prototype._findById = function() {
// here should i put the JQuery Ajax Call?
}
Bookmark.prototype._findById = function() {
// here should i put the JQuery Ajax Call?
}
上述格式是可以接受的吗?
无论你为我工作,我会说。 angular.js已经为使用AJAX的服务提供支持。 – akonsu 2013-05-08 16:57:45