このアーキテクチャの Java アプリがあります: エンティティ + 永続性 + ビジネス + REST サービス。
ビューレイヤーをJSFなしで作りたい、つまりHTML+CSS+JS(JQuery+Ajax)だけを使いたい。
REST サービスにアクセスするための JavaScript クラスを作成するより良い方法は何ですか?
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?
}
上記のフォーマットは受け入れられますか?