Removed jekyll specific code from the workbook files.

This commit is contained in:
Jocelyn Fiat
2017-02-15 17:11:07 +01:00
parent a90780fde2
commit 7dbecc7f38
11 changed files with 30 additions and 80 deletions

View File

@@ -28,7 +28,7 @@
<a href="{{ page.base_url }}community">Community</a> <a href="{{ page.base_url }}community">Community</a>
</li> </li>
<li{% if page.title == "Documentation" %} class="active"{% endif %}> <li{% if page.title == "Documentation" %} class="active"{% endif %}>
<a href="{{ page.base_url }}workbook/workbook">Documentation</a> <a href="{{ page.base_url }}workbook/readme">Documentation</a>
</li> </li>
</ul> </ul>
<h3 class="muted">EiffelWeb</h3> <h3 class="muted">EiffelWeb</h3>

View File

@@ -1,9 +1,4 @@
--- Nav: [Workbook](../workbook.md) :: [Handling Requests: Form/Query Parameter](../handling_request/form.md)
layout: default
title: basics
base_url: ../../../
---
Nav: [Workbook](../../workbook) :: [Handling Requests: Form/Query Parameter](../../handling_request/form)
## EWF basic service ## EWF basic service
@@ -97,11 +92,11 @@ The **WSF_RESPONSE** provides features to define the response with information s
**APPLICATION** is the root class of our example, it launches the application, using the corresponding connector, Which connector? this depends how do you want to run it `cgi`, `fcgi`, `standalone`. For development is recommended to use a standalone web server written in Eiffel, and run the execution within the EiffelStudio debugger. For production fcgi (or cgi) using Apache or another popular web server. **APPLICATION** is the root class of our example, it launches the application, using the corresponding connector, Which connector? this depends how do you want to run it `cgi`, `fcgi`, `standalone`. For development is recommended to use a standalone web server written in Eiffel, and run the execution within the EiffelStudio debugger. For production fcgi (or cgi) using Apache or another popular web server.
![Launcher Hierarchy](../Launcher Hierarchy.png "Launcher Hierarchy") ![Launcher Hierarchy](./Launcher Hierarchy.png "Launcher Hierarchy")
**WS_LAUNCHABLE_SERVICE** inherit from **WS_SERVICE** class, which is a marker interface in EWF. And also provides a way to launch our application using different kind of connectors. The class **WSF_DEFAULT_SERVICE_I**, inherit from **WS_LAUNCHABLE_SERVICE** and has a formal generic that should conform to **WSF_SERVICE_LAUNCHER [WSF_EXECUTION]**. Below a [BON diagram](http://www.bon-method.com/index_normal.htm) showing one of the possible options. **WS_LAUNCHABLE_SERVICE** inherit from **WS_SERVICE** class, which is a marker interface in EWF. And also provides a way to launch our application using different kind of connectors. The class **WSF_DEFAULT_SERVICE_I**, inherit from **WS_LAUNCHABLE_SERVICE** and has a formal generic that should conform to **WSF_SERVICE_LAUNCHER [WSF_EXECUTION]**. Below a [BON diagram](http://www.bon-method.com/index_normal.htm) showing one of the possible options.
![Standalone Launcher](../WSF_SERVICE_LAUNCHER_STANDALONE.png "Standalone Hierarchy") ![Standalone Launcher](./WSF_SERVICE_LAUNCHER_STANDALONE.png "Standalone Hierarchy")
Other connectors: Other connectors:
**WSF_STANDALONE_SERVICE_LAUNCHER** **WSF_STANDALONE_SERVICE_LAUNCHER**
@@ -114,7 +109,7 @@ The **APPLICATION_EXECUTION** class inherits from **WSF_EXECUTION** interface,
In the **APPLICATION_EXECUTION** class class you will need to implement the **execute** feature, get data from the request *req* and write the response in *res*. In the **APPLICATION_EXECUTION** class class you will need to implement the **execute** feature, get data from the request *req* and write the response in *res*.
![Execution Hierarchy](../APPLICATION_EXECUTION.png "Application Execution ") ![Execution Hierarchy](./APPLICATION_EXECUTION.png "Application Execution ")
The WSF_EXECUTION instance, in this case ```APPLICATION_EXECUTION``` is created per request, with two main attributes request: ```WSF_REQUEST``` and response: ```WSF_RESPONSE```. The WSF_EXECUTION instance, in this case ```APPLICATION_EXECUTION``` is created per request, with two main attributes request: ```WSF_REQUEST``` and response: ```WSF_RESPONSE```.
@@ -215,5 +210,5 @@ Just double click on the simple_html.ecf file and select the simple_html_standal
```estudio -config simple_html.ecf -target simple_html_standalone``` ```estudio -config simple_html.ecf -target simple_html_standalone```
Nav: [Workbook](../../workbook) :: [Handling Requests: Form/Query Parameter](../../handling_request/form) Nav: [Workbook](../workbook.md) :: [Handling Requests: Form/Query Parameter](../handling_request/form.md)

View File

@@ -1,9 +1,4 @@
--- Nav: [Workbook](../../../workbook.md) :: [Basic concepts](../../../basics/basics.md)
layout: default
title: Readme
base_url: ../../../../../
---
Nav: [Workbook](../../../../workbook) :: [Basic concepts](../../../../basics/basics)
## Run simple_html example on Apache with FCGI on Windows. ## Run simple_html example on Apache with FCGI on Windows.
@@ -63,4 +58,4 @@ Check the application
> http://localhost:8888/simple > http://localhost:8888/simple
``` ```
Nav: [Workbook](../../../../workbook) :: [Basic concepts](../../../../basics/basics) Nav: [Workbook](../../../workbook.md) :: [Basic concepts](../../../basics/basics.md)

View File

@@ -1,9 +1,4 @@
--- Nav: [Workbook](../workbook.md)
layout: default
title: readme
base_url: ../../../
---
Nav: [Workbook](../../workbook)
EWF Deployment EWF Deployment
============== ==============
@@ -200,4 +195,4 @@ http://perishablepress.com/stupid-htaccess-tricks/
Replace $service with the name of your executable $service, for example app_service.exe Replace $service with the name of your executable $service, for example app_service.exe
You will need to create an service.ews file, this file will be located at the same place where you copy your app service executable. You will need to create an service.ews file, this file will be located at the same place where you copy your app service executable.
Nav: [Workbook](../../workbook) Nav: [Workbook](../workbook.md)

View File

@@ -1,10 +1,5 @@
---
layout: default
title: generating response
base_url: ../../../
---
Nav: [Workbook](../../workbook) :: [Handling Requests: Header Fields](../../handling_request/headers) :: [Handling Cookies](../../handling_cookies/handling_cookies) Nav: [Workbook](../workbook.md) :: [Handling Requests: Header Fields](../handling_request/headers.md) :: [Handling Cookies](../handling_cookies/handling_cookies.md)
## EWF Generating Response ## EWF Generating Response
@@ -1009,4 +1004,4 @@ There are four categories for response header fields:
Nav: [Workbook](../../workbook) :: [Handling Requests: Header Fields](../../handling_request/headers) :: [Handling Cookies](../../handling_cookies/handling_cookies) Nav: [Workbook](../workbook.md) :: [Handling Requests: Header Fields](../handling_request/headers.md) :: [Handling Cookies](../handling_cookies/handling_cookies.md)

View File

@@ -1,9 +1,4 @@
--- Nav: [Workbook](../workbook.md) :: [Generating Responses](../generating_response/generating_response.md)
layout: default
title: handling cookies
base_url: ../../../
---
Nav: [Workbook](../../workbook) :: [Generating Responses](../../generating_response/generating_response)
# Handling Cookies # Handling Cookies
@@ -296,4 +291,4 @@ end
``` ```
Nav: [Workbook](../../workbook) :: [Generating Responses](../../generating_response/generating_response) Nav: [Workbook](../workbook.md) :: [Generating Responses](../generating_response/generating_response.md)

View File

@@ -1,9 +1,4 @@
--- Nav: [Workbook](../workbook.md) :: [Basic Concepts](../basics/basics.md) :: [Handling Requests: Header Fields](./headers.md)
layout: default
title: form
base_url: ../../../
---
Nav: [Workbook](../../workbook) :: [Basic Concepts](../../basics/basics) :: [Handling Requests: Header Fields](../headers)
# Handling Requests: Form/Query Data # Handling Requests: Form/Query Data
@@ -325,4 +320,4 @@ The GET example is located in the directory $PATH/ewf/doc/workbook/form/get, and
>Note: replace <ecf_name> and<target_name> with the corresponding values. >Note: replace <ecf_name> and<target_name> with the corresponding values.
Nav: [Workbook](../../workbook) :: [Basic Concepts](../../basics/basics) :: [Handling Requests: Header Fields](../headers) Nav: [Workbook](../workbook.md) :: [Basic Concepts](../basics/basics.md) :: [Handling Requests: Header Fields](./headers.md)

View File

@@ -1,9 +1,4 @@
--- Nav: [Workbook](../workbook.md) :: [Handling Requests: Form/Query parameters](./form.md) :: [Generating Responses](../generating_response/generating_response.md)
layout: default
title: headers
base_url: ../../../
---
Nav: [Workbook](../../workbook) :: [Handling Requests: Form/Query parameters](../form) :: [Generating Responses](../../generating_response/generating_response)
# Handling Requests: Headers # Handling Requests: Headers
@@ -192,7 +187,7 @@ included in the Referer header when the browser requests Web page B.
#### Building a Table of All Request Headers #### Building a Table of All Request Headers
The following [EWF service](../headers/header_fields/application.e) code simply uses an ```html_template``` to fill a table (names and values) with all the headers fields it receives. The following [EWF service](./headers/header_fields/application.e) code simply uses an ```html_template``` to fill a table (names and values) with all the headers fields it receives.
The service accomplishes this task by calling ```req.meta_variables``` feature to get an ```ITERABLE [WSF_STRING]```, an structure that can be iterated over using ```across...loop...end```, then it checks if the name has the prefix ```HTTP_``` and if it is true, put the header name and value in a row. (the name in the left cell, the value in the right cell). The service accomplishes this task by calling ```req.meta_variables``` feature to get an ```ITERABLE [WSF_STRING]```, an structure that can be iterated over using ```across...loop...end```, then it checks if the name has the prefix ```HTTP_``` and if it is true, put the header name and value in a row. (the name in the left cell, the value in the right cell).
@@ -307,7 +302,7 @@ To be completed.
#### Detecting Browser Types #### Detecting Browser Types
The User-Agent header identifies the specific browser/client that is sending the request. The following code shows an [EWF service](../headers/browser_name/application.e) that sends browser-specific responses. The User-Agent header identifies the specific browser/client that is sending the request. The following code shows an [EWF service](./headers/browser_name/application.e) that sends browser-specific responses.
The examples uses the ideas based on the [Browser detection using the user agent](https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent) article. The examples uses the ideas based on the [Browser detection using the user agent](https://developer.mozilla.org/en-US/docs/Browser_detection_using_the_user_agent) article.
Basically the code check if the header `user_agent` exist and then call the ```browser_name (a_user_agent: READABLE_STRING_8): READABLE_STRING_32``` feature to retrieve the current browser name or Unknown in other case. Basically the code check if the header `user_agent` exist and then call the ```browser_name (a_user_agent: READABLE_STRING_8): READABLE_STRING_32``` feature to retrieve the current browser name or Unknown in other case.
@@ -451,8 +446,8 @@ As an exercise, try to write a similar service to retrieve the OS family using t
* [SERVER_SOFTWARE](https://tools.ietf.org/html/rfc3875#section-4.1.16) * [SERVER_SOFTWARE](https://tools.ietf.org/html/rfc3875#section-4.1.16)
**Example** **Example**
An [EWF service](../headers/cgi_variables/application.e) that shows the CGI variables, creates a table showing the values of all the CGI variables. An [EWF service](./headers/cgi_variables/application.e) that shows the CGI variables, creates a table showing the values of all the CGI variables.
Nav: [Workbook](../../workbook) :: [Handling Requests: Form/Query parameters](../form) :: [Generating Responses](../../generating_response/generating_response) Nav: [Workbook](../workbook.md) :: [Handling Requests: Form/Query parameters](./form.md) :: [Generating Responses](../generating_response/generating_response.md)

View File

@@ -1,8 +1,3 @@
---
layout: default
title: readme
base_url: ../../
---
# EWF Workbook # EWF Workbook
##### Table of Contents ##### Table of Contents
@@ -28,34 +23,34 @@ Before reading (or walking throught) the workbook, to get a quick overview of EW
<a name="introduction"></a> <a name="introduction"></a>
## Introduction ## Introduction
[Basic Concepts](../basics/basics). [Basic Concepts](./basics/basics.md).
<a name="form_query_parameters"></a> <a name="form_query_parameters"></a>
## Handling Requests: Form/Query Parameter ## Handling Requests: Form/Query Parameter
[Handling Requests: Form/Query Parameter](../handling_request/form). [Handling Requests: Form/Query Parameter](./handling_request/form.md).
<a name="header_fields"></a> <a name="header_fields"></a>
## Handling Requests: Header Fields ## Handling Requests: Header Fields
[Handling Requests: Header Fields](../handling_request/headers). [Handling Requests: Header Fields](./handling_request/headers.md).
<a name="generating_responses"></a> <a name="generating_responses"></a>
## Generating Response ## Generating Response
[Generating Responses](../generating_response/generating_response) [Generating Responses](./generating_response/generating_response.md)
<a name="wui"></a> <a name="wui"></a>
## Web User Interface ## Web User Interface
[Web User Interface](../wui/readme) [Web User Interface](./wui/readme.md)
<a name="handling_cookies"></a> <a name="handling_cookies"></a>
## Handling Cookies ## Handling Cookies
[Handling Cookies](../handling_cookies/handling_cookies) [Handling Cookies](./handling_cookies/handling_cookies.md)
<a name="deployment"></a> <a name="deployment"></a>
## EWF Deployment ## EWF Deployment
[EWF Deployment](../deployment/readme) [EWF Deployment](./deployment/readme.md)

View File

@@ -1,7 +1,2 @@
--- See [README](./readme.md)
layout: default
title: workbook
base_url: ../../
---
See [README](../readme)

View File

@@ -1,8 +1,3 @@
---
layout: default
title: readme
base_url: ../../../
---
# Web User Interface (WUI) # Web User Interface (WUI)
When it comes to web user interface, HTML, CSS and Javascript are part of the solution. When it comes to web user interface, HTML, CSS and Javascript are part of the solution.
@@ -116,7 +111,7 @@ new_login_form: WSF_FORM
## Handling web form data ## Handling web form data
When a form is submitted, the code can access the request data thanks to the `request: WSF_REQUEST` attribute. When a form is submitted, the code can access the request data thanks to the `request: WSF_REQUEST` attribute.
See [Handling requests section](../../handling_request/form) See [Handling requests section](../handling_request/form.md)
The `wsf_html` library, thanks to the `WSF_FORM`, provides a more powerful solution. The `wsf_html` library, thanks to the `WSF_FORM`, provides a more powerful solution.
Indeed `WSF_HTML.process (request, .., ..)` analyze the request, fill the form fields, and process various validations, and submissions automatically. Indeed `WSF_HTML.process (request, .., ..)` analyze the request, fill the form fields, and process various validations, and submissions automatically.