Wednesday, March 28, 2012

Difference between using code in a separate file or not

What's the difference about placing the code in the same file as interface and placing it on a separate file for an Atlas application? All documentation samples tell to unmark the option to place code in a separate file.

And how can I call a method in a class or ASP.Net page instead of using a WebService?

I don't believe there's any reason to put the code in the same file versus putting it in a separate file. My guess is that the documentation tells you to do that simply to make the code samples smaller. (I myself tend to do that for examples on my blog so there are fewer files to download or look at.)

As to calling a page method instead of a web service, please seehttp://atlas.asp.net/docs/atlas/doc/services/exposing.aspx#webpage.


hello.

just one more thing: believe me, if you can call a web service, then call it instead of calling a page method.


What are the advantages using a WebService instead of a WebPage, Luis?

Thanks.


hello again.

well, let's suppose that you're sending only a value to the server and want to receive the result of a specific calculation...using a web method will result in sending everything from the client to the server (ie, all the fields that exist on the page are packed on the msg that will be sent to the server); if you use a web service method, only the necessary parameters will be sent to the server...

No comments:

Post a Comment