jquery - Why use a web service with ajax over a static page method? -
i'm building aspx page uses jquery ajax post values, processed code behind page, , passed via json. i've created webservice better using static method on page this? pros , cons of using webservice - reference ajax?
for particular situation not matter approach using, since have few methods going consume using ajax specific pages. need server side processing , return type can consumed javascript , both web service , web page (or asp .net http handler) can used accomplish this.
from architectural perspective, should build web service if functionality being consumed multiple clients. doing encapsulate service exposed functionality , gain better control on different formats on return results, security, throttling , other aspects relevant web service.
building service directly in asp .net web application might more convenient particular case when implementing ajax methods, since avoids configuration , deployment complexity of full service.
hope helps.
regards,
florin
Comments
Post a Comment