From 00a88e98e59871f71a731e7f2c8e6429c588adbb Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 25 May 2012 17:47:43 +0200 Subject: [PATCH] Updated indexing notes started tutorial Sync --- contrib/library/text/parser/json | 2 +- examples/tutorial/README.md | 58 +++++++++++++++++++++++++++ library/server/wsf/src/wsf_response.e | 8 ++++ 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 examples/tutorial/README.md diff --git a/contrib/library/text/parser/json b/contrib/library/text/parser/json index c873d62e..769bb7d1 160000 --- a/contrib/library/text/parser/json +++ b/contrib/library/text/parser/json @@ -1 +1 @@ -Subproject commit c873d62efa58ab1da3223cebd8e4f4670b24cd72 +Subproject commit 769bb7d16163339b1347150ed7355aaaad9dd71f diff --git a/examples/tutorial/README.md b/examples/tutorial/README.md new file mode 100644 index 00000000..7c00dc1e --- /dev/null +++ b/examples/tutorial/README.md @@ -0,0 +1,58 @@ += Eiffel Web Framework = + +== Why would you use the Eiffel Web Framework ? == +To enjoy the advantage of the Eiffel technology (language, DbC, methods, tools) +To write once and run on any web server, on any platforms thanks to the notion of connector. + +== What is a connector? == +A connector is the layer between the underlying httpd server, and your application based on EWF. +Currently, 3 connectors are available within EWF (but others are available outside). +­ CGI: the common CGI application (apache, iis, ...) +- FastCGI: on any server supporting libfcgi handling (apache, iis, ...) +- Nino: using the standalone Eiffel Web Nino server, you can run anywhere easily, and debug simply with EiffelStudio's debugger + +Supporting a new connector is fairly simple, it just has to support the simple EWSGI specification which is really small. Then EWF will bring the power on top of it. + +So you can build your application and be sure you will be able to run it ... anywhere thanks to the conceіpt of connectors. + +== EWSGI specification == +EWF relies on a small core specification, named EWSGI (Eiffel Web Servєr Gateway Interface). +It is very limited on purpose to allow building new connector very easily. + +For now, you just need to know EWF is compliant with EWSGI specification. + += Tutorial = + +Now let's discover the Eiffel Web Framework with this tutorial. +1 - You will learn first, how to get and install EWF. +2 - build a simple Hello World application +3 - use the query and form parameter to build dynamic service +4 - And you will learn how to dispatch URL + +== Get EWF package == +=== From the archive === +- to be completed + +=== From the source === +- Requirement: install git on your machine (http://www.git-scm.org/) + + git clone --recursive https://github.com/EiffelWebFramework/EWF.git ewf + +And that's it for now. + +== Install EWF == +For now, there is nothing specific to do. + +(Note: if you want to use the "http_client" library, you will need to do a few extra steps to eventually compile Eiffel Curl.) + +== Step 1 == + +== Step 2 == + +== Step 3 == + +== Step 4 == + + + + diff --git a/library/server/wsf/src/wsf_response.e b/library/server/wsf/src/wsf_response.e index 15589d3e..146717af 100644 --- a/library/server/wsf/src/wsf_response.e +++ b/library/server/wsf/src/wsf_response.e @@ -1,6 +1,14 @@ note description: "[ Main interface to send message back to the client + + You can send part by part, i.e: + - set the status code, see: set_status_code (a_code) + - put the header's text, see: put_header_text (a_text) + - put string for the body, see: put_string (s), put_character (c) + - using put_error will eventually send error message directly to the underlying connector's log + (i.e for apache, it will go to the error log) + - And you can also send the message as "chunked", see put_chunk (..) for more details ]" date: "$Date$" revision: "$Revision$"