Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2005

Tip: Looking for answers? Try searching our database.

.asmx files vs .aspx

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
phoenix.cbe@gmail.com - 09 Nov 2005 15:15 GMT
Hi All,
    I heard a scenario from my friend who tells me that they
discourage the use of .asmx files to return XML data (AJAX), instead
they ask him to write it as .aspx page. The reason he was told, was
that .asmx services perform a tad slower than their .aspx counterparts.

    Is there any truth to this statement. I did a lot of googling, but
found no fact substantiating this statement. Any light on this issue
would be appreciated.

Thanks
RK
Scott M. - 09 Nov 2005 16:33 GMT
.asmx files are exclusively for exposing web services (not AJAX and not just
strings of XML data).
.aspx files are exclusively for exposing a user interface (a web page).
One is not a counterpart of the other, they each have specific purposes that
are different from the other.

Web pages can return XML, but that is not the same thing as a web service.
Web services are classes that can be instantiated and uses remotely over
http.

> Hi All,
>     I heard a scenario from my friend who tells me that they
[quoted text clipped - 8 lines]
> Thanks
> RK
phoenix.cbe@gmail.com - 09 Nov 2005 23:06 GMT
Let me rephrase the question, I think I was not being clear.

Say I want to return an XML stream(strings of XML data) which one
should I use.

I have seen a lot of scenarios where .asmx service returns a customized
xml string not just object's XML (Business needs)

Thanks
RK
Scott M. - 10 Nov 2005 05:04 GMT
It's not really a matter of which one to use for returning XML, that's not
the point.  They both can return XML.

It's a matter of how you want to ask for that XML string in the first place.
.aspx pages can take an input argument that is passed to it via a
querystring or form submission and return some XML as its response, or it
can just return some XML as its response without you passing anything to it
at all.  But, when you work this way, you are not using a formalized
Object-Oriented way or standardized XML way of asking for and receiving your
XML.

But, web services (.asmx) files are OBJECTS that expose functions via the
web.  If you wish to be able to remotely instantiate one of these objects so
that you can call one of its functions, you need a web service (.asmx file).
This is a much more OO way of doing things as well as following XML
standards.  Not to mention, that web services offer other benefits that
simple web pages don't like the ability to query a server to see what
services it offers and a more robust form of securing your services.

Both require processing on the server and both will return XML.  Speed isn't
really going to be much of a factor if you are talkng about returning the
same XML (more or less) in each case.

> Let me rephrase the question, I think I was not being clear.
>
[quoted text clipped - 6 lines]
> Thanks
> RK

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.