title: Logical and Physical URLs
body: <p>This question is as an extension to my previous question here: <a href="https://webmasters.stackexchange.com/questions/49832/what-qualifies-as-a-rest-web-service">"Is this web service Restfull"</a> to an attempt to better understand the concept of a Rest Web Service.
  I read almost everything there is to be read about Rest and yet i am not able to understand if a certain Web Service is Rest or not , or why its not. The way i see it , everything is and is not Rest depending on the point of view...</p>
  
  <p>I read in a very interesting article something that may at last make me understand what is Rest. I read that Rest doesnt use physical urls but logical ones.</p>
  
  <p>I remember once i was developing an iOS application where we had to register/subscribe a user etc and i was told to make a certain Post HTTP request to our server to a URL that looked like this: <code>www.myServer/devices/device/register</code>. In the body of this request i had all the information in json format that the server needed. By that time the server for me was a black box so i didnt even care what this link meant or how it was generated. But i knew it was a web Rest service.</p>
  
  <p>This month i started devepong a mobile hybrid app , where i started to develop in native code + jquery mobile for the front end , and php + mysql for the  back end. I have more or less the same scenario here where the user needs to subscribe in an event or not. When he presses a button to subscribe to a specific event , i make an http post request with ajax call and a json file in the body , to a specific php script and that script writes/updates/deletes in the database accordingly.</p>
  
  <p>The call looks something like this :</p>
  
  <pre><code>$.ajax({
                           type: "POST",
                           url: "http://192.168.4.113/Server_CityInfo/subscribe.php",
                           data: data,
                           contentType: "application/json; charset=utf-8",
                           //dataType: "json",
                           success: function(response) {
                               $.mobile.changePage( "dialog.html", { role: "dialog" } );
                           },
                           error: function(xhr, status, message) { alert("Status: " + status + "\nMessage: " + message); }
                      });
  </code></pre>
  
  <p>As you see i do use a physical url , to point to my php script to take that action. Even the html page that the user is in , is a physical page! Is a page like myUrl.com/eventX .</p>
  
  <p>Does that mean that this web service i am building is not a Rest one?</p>
  
  <p>How did they last year point me to logical URLs and i can only point to physical php scripts? I know that their server was in java , maybe thats why the urls dont look physical?</p>
  
  <p>And in the end of the day lets say i have a 100 different events that the user can subscribe to. Of course i wouldnt make a 100 static html pages. BUT i would make 1 html page that would be dynamically generated. But still the link to that page would be physical like <code>mySite.com/event.html</code>. The only way i know to make a url to look logical is when u have an index.html file inside a folder and you point to that folder so that the url looks like <code>myWebsite.com/myFolder</code>.</p>
  
  <p>So the question here is , how to build a logical url and is this what makes a service Restfull?</p>
  
  <h2>EDIT</h2>
  
  <hr>
  
  <p>Another thing that i read a lot is that Rest is using urls that describe resources and not operations!. Again though i fail to understand. For everything in my web service i use Post Request. I want for example to subscribe a user to an event , i make a post request at the url <code>my.server.com/subscribe.php</code> and in the body of this request i have a json file with the <code>id</code> of the user and the <code>event name</code> .</p>
  
  <p>When i want to register a user i make a post request at the url <code>my.server.com/register.php</code> and a json in the body with the <code>id</code> of the user. </p>
  
  <p>Is this scenario Rest and if not what is missing?</p>