diff --git a/7.1/manual/basics-server.html b/7.1/manual/basics-server.html index 81573dfd..6ad59c5e 100644 --- a/7.1/manual/basics-server.html +++ b/7.1/manual/basics-server.html @@ -243,14 +243,15 @@ above, plus one POST parameter of type string, named "mypostparam".

~meth:(Eliom_service.Post (Eliom_parameter.((string "s" ** int "i"),
                                             (string "mypostparam"))))

Eliom: Other kinds of services

Pathless services

Pathless services are not identified by the path in the URL, -but by a name given as parameter. This name can be specified manually +but by a name given as parameter, regardless of the path. +Use this to make a functionality available from all pages +(for example: log-in or log-out actions, add something in a shopping basket ...). +The name can be specified manually using the ~name optional parameter, otherwise, a random name is generated automatically. -This is used to implement server functions (see below). -If you are programming a client-server Eliom app, you will probably prefer server functions. -If you are using traditional service based Web programming, -use this to make a functionality available from all pages -(for example: log-in or log-out actions, add something in a shopping basket ...). +This is also used to implement server functions (see below). +If you are programming a client-server Eliom app, you will often prefer +remote procedure calls (`let%rpc`).

let pathless_service =
   Eliom_service.create
     ~name:"pathless_example"
@@ -311,7 +312,7 @@
 

The following Eliom reference will count the number of visits of a user on a page:

let%server count_ref =
   Eliom_reference.eref
-    ~scope:Eliom_common.session
+    ~scope:Eliom_common.default_session_scope
     0 (* default value for everyone *)

And somewhere in your service handler, increment the counter:

let%lwt count = Eliom_reference.get count_ref in
 Eliom_reference.set count_ref (count + 1);
diff --git a/7.1/manual/basics.html b/7.1/manual/basics.html
index 8b07d170..0be950a7 100644
--- a/7.1/manual/basics.html
+++ b/7.1/manual/basics.html
@@ -464,7 +464,7 @@
 

The following Eliom reference will count the number of visits of a user on a page:

let%server count_ref =
   Eliom_reference.eref
-    ~scope:Eliom_common.session
+    ~scope:Eliom_common.default_session_scope
     0 (* default value for everyone *)

And somewhere in your service handler, increment the counter:

let%lwt count = Eliom_reference.get count_ref in
 Eliom_reference.set count_ref (count + 1);
diff --git a/dev/manual/basics-server.html b/dev/manual/basics-server.html
index e928e953..29fbc2b2 100644
--- a/dev/manual/basics-server.html
+++ b/dev/manual/basics-server.html
@@ -243,14 +243,15 @@
 above, plus one POST parameter of type string, named "mypostparam".
 

~meth:(Eliom_service.Post (Eliom_parameter.((string "s" ** int "i"),
                                             (string "mypostparam"))))

Eliom: Other kinds of services

Pathless services

Pathless services are not identified by the path in the URL, -but by a name given as parameter. This name can be specified manually +but by a name given as parameter, regardless of the path. +Use this to make a functionality available from all pages +(for example: log-in or log-out actions, add something in a shopping basket ...). +The name can be specified manually using the ~name optional parameter, otherwise, a random name is generated automatically. -This is used to implement server functions (see below). -If you are programming a client-server Eliom app, you will probably prefer server functions. -If you are using traditional service based Web programming, -use this to make a functionality available from all pages -(for example: log-in or log-out actions, add something in a shopping basket ...). +This is also used to implement server functions (see below). +If you are programming a client-server Eliom app, you will often prefer +remote procedure calls (`let%rpc`).

let pathless_service =
   Eliom_service.create
     ~name:"pathless_example"
@@ -311,7 +312,7 @@
 

The following Eliom reference will count the number of visits of a user on a page:

let%server count_ref =
   Eliom_reference.eref
-    ~scope:Eliom_common.session
+    ~scope:Eliom_common.default_session_scope
     0 (* default value for everyone *)

And somewhere in your service handler, increment the counter:

let%lwt count = Eliom_reference.get count_ref in
 Eliom_reference.set count_ref (count + 1);
diff --git a/dev/manual/basics.html b/dev/manual/basics.html
index 4a1c8bda..cd23b4e2 100644
--- a/dev/manual/basics.html
+++ b/dev/manual/basics.html
@@ -464,7 +464,7 @@
 

The following Eliom reference will count the number of visits of a user on a page:

let%server count_ref =
   Eliom_reference.eref
-    ~scope:Eliom_common.session
+    ~scope:Eliom_common.default_session_scope
     0 (* default value for everyone *)

And somewhere in your service handler, increment the counter:

let%lwt count = Eliom_reference.get count_ref in
 Eliom_reference.set count_ref (count + 1);