Updated wiki files

This commit is contained in:
2015-05-05 12:00:25 +02:00
parent 6cc16333d2
commit e2150754cb
38 changed files with 290 additions and 124 deletions
+138
View File
@@ -0,0 +1,138 @@
---
layout: default
title: Deployment
base_url: ../../
---
EWF Deployment
==============
##Apache on Windows
###Apache Install
- Check the correct version (Win 32 or Win64)
- Apache Version: Apache 2.4.4
- Windows: http://www.apachelounge.com/download/
###Deploying EWF CGI
####CGI overview
> A new process is started for each HTTP request. So if there are N request to the same CGI
> program, the code of the CGI program is loaded into memory N times.
> When a CGI program finished handling a request, the program terminates
1. Build EWF application.
```
ec -config app.ecf -target app_cgi -finalize -c_compile -project_path .
Note: change app.ecf and target app_cgi based on your own configuration.
```
2. Copy the generated exe file and the www content.
```
Copy the app.exe and the folder www into a folder served by apache2, for example under
<APACHE_PATH>/htdocs
<APACHE_PATH> = path to your apache installation
Edit httpd.conf under c:/<APACHE_PATH>/conf
DocumentRoot "c:/<APACHE_PATH>/htdocs"
<Directory "c:/<APACHE_PATH>/htdocs">
AllowOverride All --
Require all granted -- this is required in Apache 2.4.4
</Directory>
```
3. Check that you have the following modules enabled.
```
LoadModule cgi_module modules/mod_cgi.so
LoadModule rewrite_module modules/mod_rewrite.so
```
*Tip:*
To check the syntax of your httpd.conf file. From command line run the following.
```
$>httpd - t
```
####.htaccess CGI
http://perishablepress.com/stupid-htaccess-trics/
```
Options +ExecCGI +Includes +FollowSymLinks -Indexes
AddHandler cgi-script exe
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ $service [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !$service
RewriteRule ^(.*)$ $service/$1
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule
```
Replace $service with the name of your executable service, for example app_service.exe
##Deploying EWF FCGI
- To deploy FCGI you will need to download the mod_fcgi module.
- You can get it from here http://www.apachelounge.com/download/
###FCGI overview
> FastCGI allows a single, long-running process to handle more than one user request while keeping close to
> the CGI programming model, retaining the simplicity while eliminating the overhead of creating a new
> process for each request. Unlike converting an application to a web server plug-in, FastCGI applications
> remain independent of the web server.
1. Build EWF application
```
ec -config app.ecf -target app_fcgi -finalize -c_compile -project_path .
Note: change app.ecf and target app_fcgi based on your own configuration.
```
2. Copy the generated exe file and the www content
```
Copy the app.exe and the folder "www" into a folder served by apache2, for example under
<APACHE_PATH>/htdocs.
<APACHE_PATH> = path to your apache installation
Edit httpd.conf under c:/<APACHE_PATH>/conf
DocumentRoot "c:/<APACHE_PATH>/htdocs"
<Directory "c:/<APACHE_PATH>/htdocs">
AllowOverride All --
Require all granted -- this is required in Apache 2.4.4
</Directory>
```
Check that you have the following modules enabled.
```
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule fcgid_module modules/mod_fcgid.so
```
By default Apache does not comes with fcgid module, so you will need to
download it, and put the module under Apache2/modules
####.htaccess FCGI
http://perishablepress.com/stupid-htaccess-tricks/
```
Options +ExecCGI +Includes +FollowSymLinks -Indexes
<IfModule mod_fcgid.c>
AddHandler fcgid-script .ews
FcgidWrapper $FULL_PATH/$service .ews
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ service.ews [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteCond %{REQUEST_URI} !service.ews
RewriteRule ^(.*)$ service.ews/$1 RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
</IfModule>
```
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.
+2 -2
View File
@@ -1,4 +1,4 @@
Menu :: [[Doc_Getting_Started|Getting Started]] :: [[Doc_Community|Community]]
Menu :: [[Doc_Getting_Started.mediawiki|Getting Started]] :: [[Community-collaboration.md|Community]]
= Getting Started =
This page will help you to get started with EWF. We will first see how to install EWF and then how to compile and run the venerable Hello World example.
@@ -54,4 +54,4 @@ To do this, we will redefine the feature initialize as follows:
After one more compile, you can now launch the application and point your browser to [http://localhost:9090].
You should now see a simple page with Hello World.
You should now see a simple page with Hello World.
+2 -2
View File
@@ -1,7 +1,7 @@
Menu :: [[Doc_Getting_Started|Getting Started]] :: [[Doc_Community|Community]]
Menu :: [[Doc_Getting_Started.mediawiki|Getting Started]] :: [[community.md|Community]]
= Eiffel Web Framework =
Framework to build web applications in Eiffel
[ [http://github.com/EiffelWebFramework/EWF/zipball/ Download Current] ]
[ [http://github.com/EiffelWebFramework/EWF/zipball/release-0.3 Download v0.3] ]
[ [http://github.com/EiffelWebFramework/EWF/zipball/release-0.3 Download v0.3] ]
-6
View File
@@ -1,6 +0,0 @@
---
layout: default
title: Documentation Router
base_url: ../../
---
See WSF_ROUTER
-6
View File
@@ -1,6 +0,0 @@
---
layout: default
title: Documentation Connector
base_url: ../../
---
See WSF_CONNECTOR
-6
View File
@@ -1,6 +0,0 @@
---
layout: default
title: Documentation Request
base_url: ../../
---
See WSF_REQUEST
-6
View File
@@ -1,6 +0,0 @@
---
layout: default
title: Documentation Router
base_url: ../../
---
See WSF_ROUTER
@@ -1,6 +1,6 @@
---
layout: default
title: EWSGI Open Questions
title: Open Questions
base_url: ../../
---
## STRING_32, UTF-8, ... ? ##
+3 -3
View File
@@ -1,10 +1,10 @@
---
layout: default
title: EWSGI
title: README
base_url: ../../
---
- See proposed specifications: [EWSGI specification](../EWSGI-specification)
- See [Open questions](../EWSGI-Open-Questions)
- See proposed specifications: [EWSGI specification](EWSGI-specification.md)
- See [Open questions](EWSGI-Open-Questions.md)
- And below the various proposals and associated decision
----
@@ -1,6 +1,6 @@
---
layout: default
title: EWSGI specification difference in main proposals
title: specification difference in main proposals
base_url: ../../
---
Currently the **design of the EWSGI** is not going very fast, mainly due to conflicts for the core design.
@@ -1,6 +1,6 @@
---
layout: default
title: EWSGI specification
title: specification
base_url: ../../
---
**WARNING** **THIS PAGE IS IN PROGRESS, AS IT IS NOW, IT NEEDS UPDATE SINCE IT DOES NOT REFLECT THE FUTURE INTERFACE**
+11 -11
View File
@@ -1,6 +1,6 @@
---
layout: default
title: Home
title: README
base_url: ../../
---
# Eiffel-Web-Framework #
@@ -11,21 +11,21 @@ The official documentation/wiki is located at [https://github.com/EiffelWebFrame
## Organization ##
- Mailing list: please visit and subscribe to the mailing list page [http://groups.google.com/group/eiffel-web-framework](http://groups.google.com/group/eiffel-web-framework) ![logo](http://groups.google.com/intl/en/images/logos/groups_logo_sm.gif)
- Most of the topics are discussed on the mailing list (google group).
- For time to time we have [web meetings](../Meetings), and less frequently [physical meetings](../Meetings) that occurs usually during other Eiffel related events.
- For time to time we have [web meetings](project/Meetings.md), and less frequently [physical meetings](project/Meetings.md) that occurs usually during other Eiffel related events.
## Documentation ##
- [Documentation](../Documentation)
- [Documentation](documentation/README.md)
## Contributions ##
- You want to contribute or follow the progress/discussion, see the [collaboration page](../Community-collaboration)
- Potential tasks/projects on EWF: [Projects page](../Projects)
- You want to contribute or follow the progress/discussion, see the [collaboration page](community.md)
- Potential tasks/projects on EWF: [Projects page](project/Projects.md)
## See also ##
- [list of tasks, and a potential roadmap](../Tasks-Roadmap)
- [General source structure of this project](../Source-structure)
- EWSGI: [Eiffel Web Server Gateway Interface](../EWSGI)
- [Overview of the server side architecture](../Spec-Server-Architecture)
- This project is also a collection of [Libraries](../Libraries) related to the Web
- [list of tasks, and a potential roadmap](project/Tasks-Roadmap.md)
- [General source structure of this project](Source-structure.md)
- EWSGI: [Eiffel Web Server Gateway Interface](EWSGI/README.md)
- [Overview of the server side architecture](Spec-Server-Architecture.md)
- This project is also a collection of [Libraries](Libraries.md) related to the Web
## Note ##
- This wiki needs to be updated, in the meantime, please have a look at the presentation: [https://docs.google.com/presentation/pub?id=1GPFv6aHhTjFSLMnlAt-J4WeIHSGfHdB42dQxmOVOH8s&start=false&loop=false&delayms=3000](https://docs.google.com/presentation/pub?id=1GPFv6aHhTjFSLMnlAt-J4WeIHSGfHdB42dQxmOVOH8s&start=false&loop=false&delayms=3000)
- This wiki needs to be updated, in the meantime, please have a look at the presentation: [https://docs.google.com/presentation/pub?id=1GPFv6aHhTjFSLMnlAt-J4WeIHSGfHdB42dQxmOVOH8s&start=false&loop=false&delayms=3000](https://docs.google.com/presentation/pub?id=1GPFv6aHhTjFSLMnlAt-J4WeIHSGfHdB42dQxmOVOH8s&start=false&loop=false&delayms=3000)
@@ -1,6 +1,6 @@
---
layout: default
title: Community collaboration
title: community
base_url: ../../
---
This project is a community project
@@ -51,3 +51,6 @@ It's fairly easy to write your own connector. Just inherit from these classes:
* WGI_INPUT_STREAM
* WGI_OUTPUT_STREAM
* WSF_SERVICE_LAUNCHER
See WSF_CONNECTOR
@@ -1,6 +1,6 @@
---
layout: default
title: Documentation
title: README
base_url: ../../
---
# Current Status
@@ -32,7 +32,7 @@ This is the low level of the framework, at this point, `req` provides access to
The response `res` is the interface to send data back to the client.
For convenience, the framework provides richer service interface that handles the most common needs (filter, router, ...).
> [Learn more about service](Documentation__Service)
> [Learn more about service](Service.md)
<a name="wiki-request"></a><a name="wiki-response"></a><a name="wiki-request-and-response"></a>
<a name="request"></a><a name="response"></a><a name="request-and-response"></a>
@@ -55,7 +55,7 @@ Any incoming http request is represented by an new object of type **WSF_REQUEST*
The **WSF_RESPONSE** represents the communication toward the client, a service need to provide correct headers, and content. For instance the `Content-Type`, and `Content-Length`. It also allows to send data with chunked encoding.
> [Learn more about request](Documentation__Request) and [about response](Documentation__Response)
> [Learn more about request](Request.md) and [about response](Response.md)
<a name="wiki-connector"></a>
<a name="connector"></a>
@@ -71,7 +71,7 @@ Currently 3 main connectors are available:
At compilation time, you can use a default connector (by using the associated default lib), but you can also use a mixed of them and choose which one to execute at runtime.
It is fairly easy to add new connector, it just has to follow the EWSGI interface
> [Learn more about connector](Documentation__Connector)
> [Learn more about connector](Connector.md)
<a name="wiki-router"></a>
<a name="router"></a>
@@ -118,7 +118,7 @@ How we do that in EWF? : Router with (or without context).
Related code: wsf_router, wsf_router_context
Examples
> [Learn more about router](Documentation__Router)
> [Learn more about router](Router.md)
# EWF components
## URI Handler:
@@ -185,25 +185,26 @@ examples
External libraries are included, such as Cypress OAuth (Security), HTML parsing library, Template Engine Smarty.
## server
* __ewsgi__: Eiffel Web Server Gateway Interface read more
* __ewsgi__: Eiffel Web Server Gateway Interface [read more](../EWSGI/index.md).
* connectors: various web server connectors for EWSGI
* __libfcgi__: Wrapper for libfcgi SDK
* __wsf__: Web Server Framework [read more]
* __router__: URL dispatching/routing based on uri, uri_template, or custom read more
* __wsf__: Web Server Framework
* __router__: URL dispatching/routing based on uri, uri_template, or custom [read more](Router.md).
* __filter__: Filter chain [read more](Filter.md).
* __wsf_html__: (html and css) Content generator from the server side.
* CMS example: <https://github.com/EiffelWebFramework/cms/tree/master/example>
## protocol
* __http__: HTTP related classes, constants for status code, content types, ... read more
* __uri_template__: URI Template library (parsing and expander) read more
* __content_negotiation__: CONNEG library (Content-type Negociation) read more
* __http__: HTTP related classes, constants for status code, content types, ...
* __uri_template__: URI Template library (parsing and expander)
* __content_negotiation__: [CONNEG](Library-conneg.md) library (Content-type Negociation)
## Client
* __http_client__: simple HTTP client based on cURL readmore
* __http_client__: simple [HTTP client](HTTP-client.library.md) based on cURL
* __Firebase API__: <https://github.com/EiffelWebFramework/Redwood>
## Text
* __encoder__: Various simple encoders: base64, url-encoder, xml entities, html entities read more
* __encoder__: Various simple encoders: base64, url-encoder, xml entities, html entities
## Utils
* __error__: very simple/basic library to handle error
+22
View File
@@ -0,0 +1,22 @@
---
layout: default
title: Request
base_url: ../../
---
See WSF_REQUEST
## About parameters
Note that by default there is a smart computation for the query/post/... parameters:
for instance
- `q=a&q=b` : will create a **WSF_MULTIPLE_STRING** parameter with name **q** and value `[a,b]`
- `tab[a]=ewf&tab[b]=demo` : will create a **WSF_TABLE** parameter with name **tab** and value `{ "a": "ewf", "b": "demo"}`
- `tab[]=ewf&tab[]=demo` : will create a **WSF_TABLE** parameter with name **tab** and value `{ "1": "ewf", "2": "demo"}`
- `tab[foo]=foo&tab[foo]=bar` : will create a **WSF_TABLE** parameter with name **tab** and value `{ "foo": "bar"}` **WARNING: only the last `tab[foo]` is kept**.
Those rules are applied to query, post, path, .... parameters.
## How to get the input data (i.e entity-body) ?
See `{WSF_REQUEST}.read_input_data_into (buf: STRING)`
## How to get the raw header data (i.e the http header text) ?
See `{WSF_REQUEST}.raw_header_data: detachable READABLE_STRING_32`
@@ -1,6 +1,6 @@
---
layout: default
title: Documentation Response
title: Response
base_url: ../../
---
See WSF_RESPONSE
@@ -5,4 +5,7 @@ base_url: ../../
---
The primary goal of the router (class _WSF_ROUTER_) is to dispatch requests according to the request URI.
**TODO**: describe the router interface
See WSF_ROUTER
**TODO**: describe the router interface
@@ -1,6 +1,6 @@
---
layout: default
title: Documentation Service
title: Service
base_url: ../../
---
EWF Services
@@ -28,4 +28,4 @@ is_system_options_forbidden.
WSF_ROUTED_SKELETON_SERVICE also inherits from WSF_PROXY_USE_POLICY. This determines if the server will require clients to use a proxy server. By default, it will do so for HTTP/1.0 clients. This is a sensible default, as the framework assumes an HTTP/1.1 client throughout. If you are sure that you will only ever have HTTP/1.1 clients, then you can instead inherit from WSF_NO_PROXY_POLICY, as RESTBUCKS_SERVER does. If not, then you need to implement proxy_server.
Next you have to [write your handler(s)](../Writing-the-handlers)
Next you have to [write your handler(s)](Writing-the-handlers.md)
@@ -223,6 +223,6 @@ This routine is called for a normal (updating) PUT request. You have to update t
## Implementing the policies
* [WSF_OPTIONS_POLICY](../WSF_OPTIONS_POLICY)
* [WSF_PREVIOUS_POLICY](../Wsf-previous-policy)
* [WSF_CACHING_POLICY](../Wsf-caching-policy)
* [WSF_OPTIONS_POLICY](WSF_OPTIONS_POLICY.md)
* [WSF_PREVIOUS_POLICY](Wsf-previous-policy.md)
* [WSF_CACHING_POLICY](Wsf-caching-policy.md)
@@ -5,5 +5,5 @@ base_url: ../../
---
# Previous and future meetings
* [Web-meeting: 2012-09-18](../Web-meeting-2012-09-18)
* [Web-meeting: 2012-09-18](meetings/Web-meeting-2012-09-18.md)
* For previous meetings, check the ["meeting" topics](https://groups.google.com/forum/?fromgroups=#!tags/eiffel-web-framework/meeting) on the [forum](http://groups.google.com/group/eiffel-web-framework)
@@ -4,7 +4,7 @@ title: Projects new suggestions
base_url: ../../
---
Use this to suggest new projects, or request features.
The content of this page will be moved to the main [Projects](../Projects) page for time to time.
The content of this page will be moved to the main [Projects](Projects.md) page for time to time.
For any entry, please use this template
----
@@ -241,4 +241,4 @@ If you are a student, don't hesitate to pick one, or even suggest a new project,
----
# Feel free to add new idea below this line
----
Use the following page [Projects new suggestions](../Projects new suggestions) to suggest new project, or request a feature.
Use the following page [Projects new suggestions](Projects-new-suggestions.md) to suggest new project, or request a feature.
@@ -3,7 +3,7 @@ layout: default
title: Tasks Roadmap
base_url: ../../
---
Check new roadmap wiki page: [roadmap](../roadmap)
Check new roadmap wiki page: [roadmap](roadmap.md)
## Future
* Focus on REST API
- Hypermedia API
@@ -37,5 +37,5 @@ Check new roadmap wiki page: [roadmap](../roadmap)
* Installation scripts
## Contributors ##
- See [the collaboration page](../Community-collaboration)
- See [the collaboration page](../community.md)
+1 -1
View File
@@ -6,4 +6,4 @@ base_url: ../../
# Upcoming versions
# Current state: oct-2013
- check previous wiki page: [Tasks roadmap](../Tasks roadmap)
- check previous wiki page: [Tasks roadmap](Tasks-roadmap.md)