Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2017, 08:04 PM
Authorized User
 
Join Date: Mar 2017
Posts: 55
Thanks: 12
Thanked 0 Times in 0 Posts
Default Ch 10 - Web Services

I ran the Web Service examples in the book, and everything worked fine. And I do understand that the simple function HelloWorld() is not a real-world example.

So I understand the technical aspect of it (well, maybe not all the registering attributes - thank Heavens .NET automates most of that.

But what I still need to understand is - Are Web Services simply used when you want to code JavaScript?

What are examples of when a Web Service is mandatory? When you're accessing databases? Or what else. Can you please provide a laymen's term example(s) of why I'm using web services?.

For example, the book say - on page 352, top - "But at the same time, it's also possible to exchange data between an ASP.NET or PHP website and a client browser using JavaScript"
If my website is ASP.NET based, doesn't it contain JavaScript already? Or are we talking about "another" website other than my own that uses JavaScript??

Last edited by papadan; April 8th, 2017 at 08:08 PM..
 
Old April 9th, 2017, 02:10 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Web services are great for server-to-server communication, but also for client-to-server communication. In the book's example, the browser makes a request for data coming from the server using a web service. You could have done the same using a full postback, but that typically takes more time, and causes the screen to refresh completely. Not so with services. As a very concrete example, consider Google's auto-suggest. When searching on google.com you see a list of potential matches which are retrieved by making calls to the server.

Note, though, that web services are a broad term. For .NET, ASMX services, WCF and Web API would all fall in that category.

There's plenty of stuff written about web services that may give you more ideas: https://www.google.nl/?gfe_rd=cr&ei=...f+web+services

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
papadan (April 9th, 2017)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Reporting Services - Web Services URL Colm Bear BOOK: Professional Microsoft PowerPivot for Excel and SharePoint 0 February 21st, 2012 11:02 AM
CH.14 - Web Services Example Site Down Dexor BOOK: Beginning iPad Application Development 1 July 5th, 2010 10:11 PM
Ch 10 tixrus BOOK: Beginning JavaScript and CSS Development with jQuery 0 April 10th, 2010 01:27 PM
Ch 9 Web services Serialization pramed BOOK: Professional .NET 2.0 Generics 1 July 18th, 2007 12:11 AM
Web Services Error (Ch18) - No Web Disc. Info. ElPato BOOK: Beginning ASP.NET 1.0 2 April 13th, 2005 03:27 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.