开发者

AJAX Web Application Design

开发者 https://www.devze.com 2022-12-25 14:20 出处:网络
I\'m working on a personal project to build a small web app that is built using AJAX requests and talks to a RESTful API rather than traditional HTML pages and form submissions.

I'm working on a personal project to build a small web app that is built using AJAX requests and talks to a RESTful API rather than traditional HTML pages and form submissions.

Are there any onl开发者_C百科ine articles or tutorials or any books that people could recommend that cover design patterns for this kind of thing?


Finished my part of a similar project on Friday which included using WCF endpoints to build parts of pages (we were calling them pods). So the pages had boilerplate and then ajaxed in the pods. From your description I think you will need a 'behavioural' pattern as they deal with the patterns of communication between objects.

The design pattern we started with was 'Chain of responsibility' (from GOF book):

"Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object handles it"

Although I don't know if this covers your precise requirements.


You are better off googling than asking here. There's a ton of stuff out there.

I recommend using jQuery to help with the client side aspect of AJAX. It does a lot of heavy lifting for you and integrates well with forms, the DOM, etc.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号