[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What does SOAP really add?
Hello Mark, Mark said: > With REST, you turn a lightbulb on with PUT, because the request is > attempting to explicitly set the state of a resource; the same PUT > used for saving preferences, turning on the TV, or just "editing a > file". > > Any task that can be coordinated with RPC, can be coordinated with > REST in a manner more suitable for Internet scale distribution. If > you're doing anything over the Internet with people that you haven't > previously met and may not trust, RPC is the wrong technology. > Didier replies: No problems Mark, show me - with your solution - how the calling program made any economies of code in the following example: Example (off course, this is a fictitious problem just for the sake of the discussion): We want to set a switch to ON from a remote location. The possible states are ON, OFF, ERROR. The ERROR state is more precisely defined as: - error_scheduling_task - error_power too low - error_circuit_malfunction - error_already_set_to_on - error_already_set_to_off. All errors loged in a time-stamped log-file. Ok let's take a simple procedural language now to resolve this problem if set_switch(ON) != OK then { start_log(time()); switch error { case error_scheduling_task: log("error_scheduling_task"); case error_power too low: log("error_power too low"); case error_circuit_malfunction: log("error_circuit_malfunction"); case error_already_set_to_on: log("error_already_set_to_on"); case error_already_set_to_off: log("error_already_set_to_off"); } end_log(); } else .... Do not forget that you have to log in a local file someting like: ----------------------------------------------- time: 12 feb 2002; 22:34:22 error_circuit_malfunction ----------------------------------------------- Based on the assurance of your reply, you have surely something good to propose. I am anxious to expand my knowledge. cheers Didier PH Martin
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|