From 73319dcd8011c5a151955795c055f5714aac17a5 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Fri, 27 Jul 2012 06:55:34 -0700 Subject: [PATCH 01/28] Updated Home (markdown) --- Home.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Home.md b/Home.md index 54238b40..0795fdf1 100644 --- a/Home.md +++ b/Home.md @@ -1,18 +1,26 @@ -## Eiffel-Web-Framework ## +# Eiffel-Web-Framework # +## Location ## The official documentation/wiki is located at https://github.com/EiffelWebFramework/EWF/wiki , if you are visiting a "clone/fork", please always check the [[official wiki|https://github.com/EiffelWebFramework/EWF/wiki]]. - +## Organization ## - Mailing list: please visit and subscribe to the mailing list page [[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 meeting, and less frequently physical meetings that occurs usually during other Eiffel related events. -- See also - - You want to contribute or follow the progress/discussion, see the [[collaboration page| Community-collaboration]] +## Documentation ## +- to redo + +## Contributions ## +- You want to contribute or follow the progress/discussion, see the [[collaboration page| Community-collaboration]] +- Potential tasks/projects on EWF: [[Projects page| Projects]] + +## 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]] related to the Web -- This wiki needs to be updated, in the meantime, please have a look at the presentation: https://docs.google.com/presentation/d/1aI6Yps59rEW2Ci0fSeJSXpE5-2SE2Tesyj2yu1cuQKk/edit \ No newline at end of file +## Note ## + - This wiki needs to be updated, in the meantime, please have a look at the presentation: https://docs.google.com/presentation/d/1aI6Yps59rEW2Ci0fSeJSXpE5-2SE2Tesyj2yu1cuQKk/edit \ No newline at end of file From 6a650c4a34f1813864b8d9617195c83b9aece00c Mon Sep 17 00:00:00 2001 From: jocelyn Date: Fri, 27 Jul 2012 07:41:43 -0700 Subject: [PATCH 02/28] Updated Home (markdown) --- Home.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Home.md b/Home.md index 0795fdf1..5c47ab7b 100644 --- a/Home.md +++ b/Home.md @@ -23,4 +23,4 @@ The official documentation/wiki is located at https://github.com/EiffelWebFramew - This project is also a collection of [[Libraries]] 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/d/1aI6Yps59rEW2Ci0fSeJSXpE5-2SE2Tesyj2yu1cuQKk/edit \ No newline at end of file + - 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 \ No newline at end of file From 78975fbf1cc9987658ba3fbe2706a99cabb1e803 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Fri, 27 Jul 2012 07:54:06 -0700 Subject: [PATCH 03/28] Created Projects (markdown) --- Projects.md | 107 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 Projects.md diff --git a/Projects.md b/Projects.md new file mode 100644 index 00000000..f97c53cc --- /dev/null +++ b/Projects.md @@ -0,0 +1,107 @@ +This page lists potential projects on EWF, this is open for contribution, and if you are a student, don't hesitate to pick on, you will get close support from EWF's team. + +## Evaluate EWF according to the following constraints ... +* _Suggested by **Javier**_ +* See http://www.amundsen.com/blog/archives/1130 +* Other option is take the following REST implementation toolkit as a guide to evaluate EWF http://code.google.com/p/implementing-rest/wiki/RESTImplementationToolkit. + +## Libraries: Reusable Client Design based on J.Moore Presentation +* _Suggested by **Javier**_ +* http://s3.amazonaws.com/cimlabs/Oredev-Hypermedia-APIs.pdf +* video http://vimeo.com/20781278 + +## Hypermedia API library to work with XHTML +* _Suggested by **Javier**_ +* http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html + +## HAL browser +* _Suggested by **Javier**_ +* written in Eiffel inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/ +* see http://stateless.co/hal_specification.html + +## Collection-JSON browser +* _Suggested by **Javier**_ +* similar to HAL browser but focused on Collection JSON +* see http://www.amundsen.com/media-types/collection/ + +## Build a video to demonstrate how an Hypermedia API works, and how to build it using EWF +* _Suggested by **Javier**_ +* (maybe based on our graphviz example) or and extension to RestBucksCRUD + +## Create a Client Cache based on Apache commons Client Cache. +* _Suggested by **Javier**_ +* http://hc.apache.org/httpcomponents-client-ga/httpclient-cache/index.html +* http://labs.xfinity.com/benchmarking-the-httpclient-caching-module + +## Security: provide popular authentication mecanisms +* _Suggested by **Jocelyn**_ +* OAuth: consumer and provider +* OpenID +* Google Connect +* Facebook Connect +* ... + +## Build clients to consume popular RESTful APIs +* _Suggested by **Jocelyn & Javier**_ +* **Requirement**: OAuth client eiffel component +* Google Discovery APIs +* Twitter +* Facebook +* Github +* Flickr +* ... etc + +## New EWF connectors +* _Suggested by **Jocelyn & Javier**_ +* LightHTTP connector for EWF +* nginx connector for EWF +* ... + +## Design and build something like Ruby on Rails or Grails +* _Suggested by **Javier**_ +* i.e a conventional MVC to create Web Sites +* Could be useful even if this is not the taste of everyone + +## Road to Hypermedia API +* _Suggested by **Javier**_ +* describe differents types of Web API, and how you can build them using EWF. +* Describing Pros and Cons. +* based on http://martinfowler.com/articles/richardsonMaturityModel.html + +## Design a state machine to serve response +* _Suggested by **Jocelyn**_ +* example: multipage web form + +## Template engine +* _Suggested by **Jocelyn**_ +* Get inspired by any existing template engine, and build one for Eiffel + - http://www.smarty.net/ + - http://mustache.github.com/ + - ... +* This is not specific to EWF, but it will be very useful in website context + +## Wikitext, markdown parser and renderer +* _Suggested by **Jocelyn**_ +* Support reading of wikitext, and markdown, and provide HTML rendering +* extension: render wikitext and markdown into Vision2 widget (not related to EWF, but could be useful to build editor) + +## Web component to build HTML5 widget +* _Suggested by **Jocelyn**_ +* Build set of Eiffel component to ease development of websites + - table widget (with sorting ...) + - suggestive typing widget + - tab ... + - WYSIWYG textarea widget (could reuse existing JS solution ...) + - ... + +## Eiffel Web Nino +* _Suggested by **Jocelyn**_ +* Complete implementation of Eiffel Web Nino using pool of threads +* Complete migration of Eiffel Web Nino to SCOOP +* Implement persistent connection +* Improve Nino to become a real solution to host any web services/sites +* ... + +## Concurrenty and EWF +* _Suggested by **Jocelyn**_ +* Make sure EWF is compliant with concurrency, provide example From 65c9da128851e4b5fc547d61d5720f8b1c51f2f7 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Fri, 27 Jul 2012 09:23:12 -0700 Subject: [PATCH 04/28] Updated Projects (markdown) --- Projects.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Projects.md b/Projects.md index f97c53cc..727a3d6a 100644 --- a/Projects.md +++ b/Projects.md @@ -72,7 +72,7 @@ This page lists potential projects on EWF, this is open for contribution, and if * _Suggested by **Jocelyn**_ * example: multipage web form -## Template engine +## library: Template engine * _Suggested by **Jocelyn**_ * Get inspired by any existing template engine, and build one for Eiffel - http://www.smarty.net/ @@ -80,12 +80,12 @@ This page lists potential projects on EWF, this is open for contribution, and if - ... * This is not specific to EWF, but it will be very useful in website context -## Wikitext, markdown parser and renderer +## library: Wikitext, markdown parser and renderer * _Suggested by **Jocelyn**_ * Support reading of wikitext, and markdown, and provide HTML rendering * extension: render wikitext and markdown into Vision2 widget (not related to EWF, but could be useful to build editor) -## Web component to build HTML5 widget +## library: Web component to build HTML5 widget * _Suggested by **Jocelyn**_ * Build set of Eiffel component to ease development of websites - table widget (with sorting ...) @@ -105,3 +105,14 @@ This page lists potential projects on EWF, this is open for contribution, and if ## Concurrenty and EWF * _Suggested by **Jocelyn**_ * Make sure EWF is compliant with concurrency, provide example + +## Build a simple CMS with EWF +* _Suggested by **Jocelyn**_ +* Build a simple CMS website with EWF +* features: + - user management (register, login, lost password -> send email) + - page editing + - blog + - template / theme + - persistency / storage / ... + - extension at compilation time From 600e403d9134463ed89eb510c9a5d28a58e0dee7 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 30 Jul 2012 01:49:24 -0700 Subject: [PATCH 05/28] Updated Projects (markdown) --- Projects.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Projects.md b/Projects.md index 727a3d6a..bb3ec890 100644 --- a/Projects.md +++ b/Projects.md @@ -116,3 +116,8 @@ This page lists potential projects on EWF, this is open for contribution, and if - template / theme - persistency / storage / ... - extension at compilation time + +## Provide a Websocket implementation +* _Suggested by **Jocelyn**_ +* See http://en.wikipedia.org/wiki/Websocket + From 65f9b6598b0844a385babfc98098d06f1bd2f235 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 30 Jul 2012 01:54:32 -0700 Subject: [PATCH 06/28] Updated Projects (markdown) --- Projects.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Projects.md b/Projects.md index bb3ec890..29c12ddd 100644 --- a/Projects.md +++ b/Projects.md @@ -121,3 +121,6 @@ This page lists potential projects on EWF, this is open for contribution, and if * _Suggested by **Jocelyn**_ * See http://en.wikipedia.org/wiki/Websocket +## Build P2P connector +* _Suggested by **Jocelyn**_ +* Imagine you want to publish a website running on your machine (behing firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) \ No newline at end of file From 0647d40865b3c5651f740d96dbe80c930c1e9e84 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 30 Jul 2012 05:11:18 -0700 Subject: [PATCH 07/28] Updated Projects (markdown) --- Projects.md | 162 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 99 insertions(+), 63 deletions(-) diff --git a/Projects.md b/Projects.md index 29c12ddd..e1827609 100644 --- a/Projects.md +++ b/Projects.md @@ -1,18 +1,66 @@ This page lists potential projects on EWF, this is open for contribution, and if you are a student, don't hesitate to pick on, you will get close support from EWF's team. +# Studies/Analysis/Documentation + ## Evaluate EWF according to the following constraints ... * _Suggested by **Javier**_ * See http://www.amundsen.com/blog/archives/1130 * Other option is take the following REST implementation toolkit as a guide to evaluate EWF http://code.google.com/p/implementing-rest/wiki/RESTImplementationToolkit. -## Libraries: Reusable Client Design based on J.Moore Presentation +## Road to Hypermedia API * _Suggested by **Javier**_ -* http://s3.amazonaws.com/cimlabs/Oredev-Hypermedia-APIs.pdf -* video http://vimeo.com/20781278 +* describe differents types of Web API, and how you can build them using EWF. +* Describing Pros and Cons. +* based on http://martinfowler.com/articles/richardsonMaturityModel.html -## Hypermedia API library to work with XHTML + +## Build a video to demonstrate how an Hypermedia API works, and how to build it using EWF * _Suggested by **Javier**_ -* http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html +* (maybe based on our graphviz example) or and extension to RestBucksCRUD + + +# Works related to EWF / framework / tools + +## Improve EWF +* _Suggested by **Jocelyn**_ +* Improve encoding support +∗ Better MIME handler +* Support for configuration +* Ready to use logging facilities +* Smart handler for HEAD or similar +* Added component to ease the caching functionalities +* Mass testing +* ... + +## Eiffel Web Nino +* _Suggested by **Javier & Jocelyn**_ +* Implement persistent connection +* Complete implementation of Eiffel Web Nino using pool of threads +* Complete migration of Eiffel Web Nino to SCOOP +* Improve Nino to become a real solution to host any web services/sites +* ... + +## New EWF connectors +* _Suggested by **Jocelyn & Javier**_ +* LightHTTP connector for EWF +* nginx connector for EWF +* ... + +## Concurrenty and EWF +* _Suggested by **Jocelyn**_ +* Make sure EWF is compliant with concurrency, provide example + +## Design and build something like Ruby on Rails or Grails +* _Suggested by **Javier**_ +* i.e a conventional MVC to create Web Sites +* Could be useful even if this is not the taste of everyone + + +## Provide a Websocket implementation +* _Suggested by **Jocelyn**_ +* See http://en.wikipedia.org/wiki/Websocket + +# Use of EWF ## HAL browser * _Suggested by **Javier**_ @@ -24,14 +72,30 @@ This page lists potential projects on EWF, this is open for contribution, and if * similar to HAL browser but focused on Collection JSON * see http://www.amundsen.com/media-types/collection/ -## Build a video to demonstrate how an Hypermedia API works, and how to build it using EWF -* _Suggested by **Javier**_ -* (maybe based on our graphviz example) or and extension to RestBucksCRUD +## Build a simple CMS with EWF +* _Suggested by **Jocelyn**_ +* Build a simple CMS website with EWF +* features: + - user management (register, login, lost password -> send email) + - page editing + - blog + - template / theme + - persistency / storage / ... + - extension at compilation time -## Create a Client Cache based on Apache commons Client Cache. +## Build P2P connector +* _Suggested by **Jocelyn**_ +* Imagine you want to publish a website running on your machine (behing firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) + +# Libraries + +## Hypermedia API library to work with XHTML * _Suggested by **Javier**_ -* http://hc.apache.org/httpcomponents-client-ga/httpclient-cache/index.html -* http://labs.xfinity.com/benchmarking-the-httpclient-caching-module +* http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html + +## Add support for Mediatype such as RSS, ATOM, ... +* _Suggested by **Jocelyn**_ +* Being able to generate, and also consume RSS, ATOM, ... ## Security: provide popular authentication mecanisms * _Suggested by **Jocelyn**_ @@ -41,33 +105,6 @@ This page lists potential projects on EWF, this is open for contribution, and if * Facebook Connect * ... -## Build clients to consume popular RESTful APIs -* _Suggested by **Jocelyn & Javier**_ -* **Requirement**: OAuth client eiffel component -* Google Discovery APIs -* Twitter -* Facebook -* Github -* Flickr -* ... etc - -## New EWF connectors -* _Suggested by **Jocelyn & Javier**_ -* LightHTTP connector for EWF -* nginx connector for EWF -* ... - -## Design and build something like Ruby on Rails or Grails -* _Suggested by **Javier**_ -* i.e a conventional MVC to create Web Sites -* Could be useful even if this is not the taste of everyone - -## Road to Hypermedia API -* _Suggested by **Javier**_ -* describe differents types of Web API, and how you can build them using EWF. -* Describing Pros and Cons. -* based on http://martinfowler.com/articles/richardsonMaturityModel.html - ## Design a state machine to serve response * _Suggested by **Jocelyn**_ * example: multipage web form @@ -94,33 +131,32 @@ This page lists potential projects on EWF, this is open for contribution, and if - WYSIWYG textarea widget (could reuse existing JS solution ...) - ... -## Eiffel Web Nino -* _Suggested by **Jocelyn**_ -* Complete implementation of Eiffel Web Nino using pool of threads -* Complete migration of Eiffel Web Nino to SCOOP -* Implement persistent connection -* Improve Nino to become a real solution to host any web services/sites -* ... -## Concurrenty and EWF -* _Suggested by **Jocelyn**_ -* Make sure EWF is compliant with concurrency, provide example -## Build a simple CMS with EWF -* _Suggested by **Jocelyn**_ -* Build a simple CMS website with EWF -* features: - - user management (register, login, lost password -> send email) - - page editing - - blog - - template / theme - - persistency / storage / ... - - extension at compilation time +# Clients -## Provide a Websocket implementation -* _Suggested by **Jocelyn**_ -* See http://en.wikipedia.org/wiki/Websocket +## Libraries: Reusable Client Design based on J.Moore Presentation +* _Suggested by **Javier**_ +* Generic client that can be customized (see design in slide 12) +* http://s3.amazonaws.com/cimlabs/Oredev-Hypermedia-APIs.pdf +* video http://vimeo.com/20781278 -## Build P2P connector +## Create a Client Cache based on Apache commons Client Cache. +* _Suggested by **Javier**_ +* http://hc.apache.org/httpcomponents-client-ga/httpclient-cache/index.html +* http://labs.xfinity.com/benchmarking-the-httpclient-caching-module + +## Add SSL support to Eiffel Net * _Suggested by **Jocelyn**_ -* Imagine you want to publish a website running on your machine (behing firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) \ No newline at end of file +* Currently Eiffel Net does not provide any support to SSL (thus no HTTPS). For now Eiffel application often use the Eiffel cURL wrapper, but it would be more convenient to use directly Eiffel Net. + +## Build clients to consume popular RESTful APIs +* _Suggested by **Jocelyn & Javier**_ +* **Requirement**: OAuth client eiffel component +* Google Discovery APIs +* Twitter +* Facebook +* Github +* Flickr +* ... etc +* This should reuse and improve the "http_client" provided by EWF. Eventually also write the EiffelNet implementation to be independant from cURL From 8812b660da3cf820a907c2b5400073d683ba0a11 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 30 Jul 2012 05:12:24 -0700 Subject: [PATCH 08/28] Updated Projects (markdown) --- Projects.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projects.md b/Projects.md index e1827609..ef6769d9 100644 --- a/Projects.md +++ b/Projects.md @@ -28,7 +28,9 @@ This page lists potential projects on EWF, this is open for contribution, and if * Support for configuration * Ready to use logging facilities * Smart handler for HEAD or similar -* Added component to ease the caching functionalities +* Adding component to ease the caching functionalities +* Adding Session support +* URL rewriting ? * Mass testing * ... From 8a91796d1210977221d3f0d5f47a8c8aeaf089ee Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 30 Jul 2012 05:21:14 -0700 Subject: [PATCH 09/28] Updated Projects (markdown) --- Projects.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/Projects.md b/Projects.md index ef6769d9..f6a503f8 100644 --- a/Projects.md +++ b/Projects.md @@ -1,5 +1,7 @@ -This page lists potential projects on EWF, this is open for contribution, and if you are a student, don't hesitate to pick on, you will get close support from EWF's team. +This page lists potential projects on EWF, this is open for contribution. +If you are a student, don't hesitate to pick one, or even suggest a new project, or a project being a merge of several, in any case, you will get close support from EWF's team. +---- # Studies/Analysis/Documentation ## Evaluate EWF according to the following constraints ... @@ -18,7 +20,7 @@ This page lists potential projects on EWF, this is open for contribution, and if * _Suggested by **Javier**_ * (maybe based on our graphviz example) or and extension to RestBucksCRUD - +---- # Works related to EWF / framework / tools ## Improve EWF @@ -62,7 +64,8 @@ This page lists potential projects on EWF, this is open for contribution, and if * _Suggested by **Jocelyn**_ * See http://en.wikipedia.org/wiki/Websocket -# Use of EWF +---- +# Usage of EWF ## HAL browser * _Suggested by **Javier**_ @@ -84,11 +87,13 @@ This page lists potential projects on EWF, this is open for contribution, and if - template / theme - persistency / storage / ... - extension at compilation time +* The result should be used by any user to build his own CMS, and extend it easily. ## Build P2P connector * _Suggested by **Jocelyn**_ * Imagine you want to publish a website running on your machine (behing firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) +---- # Libraries ## Hypermedia API library to work with XHTML @@ -133,8 +138,7 @@ This page lists potential projects on EWF, this is open for contribution, and if - WYSIWYG textarea widget (could reuse existing JS solution ...) - ... - - +---- # Clients ## Libraries: Reusable Client Design based on J.Moore Presentation @@ -162,3 +166,7 @@ This page lists potential projects on EWF, this is open for contribution, and if * Flickr * ... etc * This should reuse and improve the "http_client" provided by EWF. Eventually also write the EiffelNet implementation to be independant from cURL + +---- +# Feel free to add new idea below this line +---- \ No newline at end of file From 3fc493642852e7bb07881f68a86cd265446881a4 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Tue, 31 Jul 2012 00:46:23 -0700 Subject: [PATCH 10/28] Updated Projects (markdown) --- Projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects.md b/Projects.md index f6a503f8..26958eaa 100644 --- a/Projects.md +++ b/Projects.md @@ -2,7 +2,7 @@ This page lists potential projects on EWF, this is open for contribution. If you are a student, don't hesitate to pick one, or even suggest a new project, or a project being a merge of several, in any case, you will get close support from EWF's team. ---- -# Studies/Analysis/Documentation +# Study/Analysis/Documentation ## Evaluate EWF according to the following constraints ... * _Suggested by **Javier**_ From 8b33c77008b96e312242db8156c617365f2c0b98 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 8 Aug 2012 08:51:00 +0200 Subject: [PATCH 11/28] Added JSON_PRETTY_STRING_VISITOR Added converter for ARRAYED_LIST Fixed STRING_32 to JSON_VALUE issue in ejson.e Added missing new line character at the end of some files. Cosmetic --- .../visitor/json_pretty_string_visitor.e | 175 ++++++++++++++++++ library/gobo/shared_gobo_ejson.e | 2 +- .../converters/json_arrayed_list_converter.e | 30 +++ library/kernel/converters/json_converter.e | 6 +- .../converters/json_hash_table_converter.e | 8 +- .../converters/json_linked_list_converter.e | 61 ++---- .../kernel/converters/json_list_converter.e | 74 ++++++++ library/kernel/ejson.e | 12 +- library/kernel/shared_ejson.e | 24 ++- .../test_suite/json_author_converter.e | 5 +- .../json_book_collection_converter.e | 5 +- .../autotest/test_suite/json_book_converter.e | 5 +- test/autotest/test_suite/test_json_core.e | 2 +- test/getest/author.e | 2 +- test/getest/book.e | 2 +- test/getest/book_collection.e | 2 +- test/getest/json_author_converter.e | 3 +- test/getest/json_book_collection_converter.e | 3 +- test/getest/json_book_converter.e | 3 +- test/getest/test_ds.e | 2 +- test/getest/test_json_core.e | 2 +- 21 files changed, 337 insertions(+), 91 deletions(-) create mode 100644 library/extras/visitor/json_pretty_string_visitor.e create mode 100644 library/kernel/converters/json_arrayed_list_converter.e create mode 100644 library/kernel/converters/json_list_converter.e diff --git a/library/extras/visitor/json_pretty_string_visitor.e b/library/extras/visitor/json_pretty_string_visitor.e new file mode 100644 index 00000000..98b17c81 --- /dev/null +++ b/library/extras/visitor/json_pretty_string_visitor.e @@ -0,0 +1,175 @@ +note + description: "JSON_PRETTY_STRING_VISITOR Generates the JSON-String for a JSON_VALUE" + revision: "0.1" + +class + JSON_PRETTY_STRING_VISITOR + +inherit + JSON_VISITOR + +create + make, + make_custom + +feature -- Initialization + + make (a_output: like output) + -- Create a new instance + do + make_custom (a_output, 1, 1) + end + + make_custom (a_output: like output; a_object_count_inlining, a_array_count_inlining: INTEGER) + -- Create a new instance + do + output := a_output + create indentation.make_empty + indentation_step := "%T" + + object_count_inlining := a_object_count_inlining + array_count_inlining := a_array_count_inlining + end + +feature -- Access + + output: STRING_32 + -- JSON representation + + indentation: like output + + indentation_step: like indentation + + line_number: INTEGER + + indent + do + indentation.append (indentation_step) + end + + exdent + do + indentation.remove_tail (indentation_step.count) + end + + new_line + do + output.append ("%N") + output.append (indentation) + line_number := line_number + 1 + end + + object_count_inlining: INTEGER + array_count_inlining: INTEGER + +feature -- Visitor Pattern + + visit_json_array (a_json_array: JSON_ARRAY) + -- Visit `a_json_array'. + local + value: JSON_VALUE + l_json_array: ARRAYED_LIST [JSON_VALUE] + l_line: like line_number + l_multiple_lines: BOOLEAN + do + l_json_array := a_json_array.array_representation + l_multiple_lines := l_json_array.count >= array_count_inlining or across l_json_array as p some attached {JSON_OBJECT} p.item or attached {JSON_ARRAY} p.item end + output.append ("[") + l_line := line_number + indent + from + l_json_array.start + until + l_json_array.off + loop + if + line_number > l_line or + l_multiple_lines + then + new_line + end + value := l_json_array.item + value.accept (Current) + l_json_array.forth + if not l_json_array.after then + output.append (", ") + end + end + exdent + if + line_number > l_line or + l_json_array.count >= array_count_inlining + then + new_line + end + output.append ("]") + end + + visit_json_boolean (a_json_boolean: JSON_BOOLEAN) + -- Visit `a_json_boolean'. + do + output.append (a_json_boolean.item.out) + end + + visit_json_null (a_json_null: JSON_NULL) + -- Visit `a_json_null'. + do + output.append ("null") + end + + visit_json_number (a_json_number: JSON_NUMBER) + -- Visit `a_json_number'. + do + output.append (a_json_number.item) + end + + visit_json_object (a_json_object: JSON_OBJECT) + -- Visit `a_json_object'. + local + l_pairs: HASH_TABLE [JSON_VALUE, JSON_STRING] + l_line: like line_number + l_multiple_lines: BOOLEAN + do + l_pairs := a_json_object.map_representation + l_multiple_lines := l_pairs.count >= object_count_inlining or across l_pairs as p some attached {JSON_OBJECT} p.item or attached {JSON_ARRAY} p.item end + output.append ("{") + l_line := line_number + indent + from + l_pairs.start + until + l_pairs.off + loop + if + line_number > l_line or + l_multiple_lines + then + new_line + end + l_pairs.key_for_iteration.accept (Current) + output.append (": ") + l_pairs.item_for_iteration.accept (Current) + l_pairs.forth + if not l_pairs.after then + output.append (", ") + end + end + exdent + if + line_number > l_line or + l_pairs.count >= object_count_inlining + then + new_line + end + output.append ("}") + end + + visit_json_string (a_json_string: JSON_STRING) + -- Visit `a_json_string'. + do + output.append ("%"") + output.append (a_json_string.item) + output.append ("%"") + end + +end diff --git a/library/gobo/shared_gobo_ejson.e b/library/gobo/shared_gobo_ejson.e index ccc33432..9fbe9b57 100644 --- a/library/gobo/shared_gobo_ejson.e +++ b/library/gobo/shared_gobo_ejson.e @@ -29,4 +29,4 @@ feature Result.add_converter (jhtc) end -end -- class SHARED_GOBO_EJSON \ No newline at end of file +end -- class SHARED_GOBO_EJSON diff --git a/library/kernel/converters/json_arrayed_list_converter.e b/library/kernel/converters/json_arrayed_list_converter.e new file mode 100644 index 00000000..da089f7b --- /dev/null +++ b/library/kernel/converters/json_arrayed_list_converter.e @@ -0,0 +1,30 @@ +note + description: "A JSON converter for ARRAYED_LIST [ANY]" + author: "Paul Cohen" + date: "$Date$" + revision: "$Revision$" + file: "$HeadURL: $" + +class JSON_ARRAYED_LIST_CONVERTER + +inherit + JSON_LIST_CONVERTER + redefine + object + end + +create + make + +feature -- Access + + object: ARRAYED_LIST [detachable ANY] + +feature {NONE} -- Factory + + new_object (nb: INTEGER): like object + do + create Result.make (nb) + end + +end -- class JSON_ARRAYED_LIST_CONVERTER diff --git a/library/kernel/converters/json_converter.e b/library/kernel/converters/json_converter.e index bae2bd9c..796ef4eb 100644 --- a/library/kernel/converters/json_converter.e +++ b/library/kernel/converters/json_converter.e @@ -1,8 +1,8 @@ note description: "A JSON converter" author: "Paul Cohen" - date: "$Date: $" - revision: "$Revision: $" + date: "$Date$" + revision: "$Revision$" file: "$HeadURL: $" deferred class JSON_CONVERTER @@ -19,7 +19,7 @@ feature -- Access feature -- Conversion - from_json (j: attached like to_json): detachable like object + from_json (j: attached like to_json): detachable like object -- Convert from JSON value. -- Returns Void if unable to convert deferred diff --git a/library/kernel/converters/json_hash_table_converter.e b/library/kernel/converters/json_hash_table_converter.e index 8ce5260e..7971e1c2 100644 --- a/library/kernel/converters/json_hash_table_converter.e +++ b/library/kernel/converters/json_hash_table_converter.e @@ -1,8 +1,8 @@ note description: "A JSON converter for HASH_TABLE [ANY, HASHABLE]" author: "Paul Cohen" - date: "$Date$" - revision: "$Revision$" + date: "$Date$" + revision: "$Revision$" file: "$HeadURL: $" class JSON_HASH_TABLE_CONVERTER @@ -26,7 +26,7 @@ feature -- Access feature -- Conversion - from_json (j: attached like to_json): like object + from_json (j: attached like to_json): like object local keys: ARRAY [JSON_STRING] i: INTEGER @@ -41,7 +41,7 @@ feature -- Conversion until i > keys.count loop - h ?= json.object (keys [i], void) + h ?= json.object (keys [i], Void) check h /= Void end jv := j.item (keys [i]) if jv /= Void then diff --git a/library/kernel/converters/json_linked_list_converter.e b/library/kernel/converters/json_linked_list_converter.e index bcc41e49..42a1c2c4 100644 --- a/library/kernel/converters/json_linked_list_converter.e +++ b/library/kernel/converters/json_linked_list_converter.e @@ -1,63 +1,30 @@ note - description: "A JSON converter for LINKED_LIST [ANY]" - author: "Paul Cohen" - date: "$Date$" - revision: "$Revision$" - file: "$HeadURL: $" + description: "A JSON converter for LINKED_LIST [ANY]" + author: "Paul Cohen" + date: "$Date$" + revision: "$Revision$" + file: "$HeadURL: $" class JSON_LINKED_LIST_CONVERTER inherit - JSON_CONVERTER + JSON_LIST_CONVERTER + redefine + object + end create make -feature {NONE} -- Initialization - - make - do - create object.make - end - feature -- Access object: LINKED_LIST [detachable ANY] -feature -- Conversion +feature {NONE} -- Factory - from_json (j: like to_json): detachable like object - local - i: INTEGER - do - create Result.make - from - i := 1 - until - i > j.count - loop - Result.extend (json.object (j [i], Void)) - i := i + 1 - end - end - - to_json (o: like object): JSON_ARRAY - local - c: ITERATION_CURSOR [detachable ANY] - do - create Result.make_array - from - c := o.new_cursor - until - c.after - loop - if attached json.value (c.item) as v then - Result.add (v) - else - check attached_value: False end - end - c.forth - end - end + new_object (nb: INTEGER): like object + do + create Result.make + end end -- class JSON_LINKED_LIST_CONVERTER diff --git a/library/kernel/converters/json_list_converter.e b/library/kernel/converters/json_list_converter.e new file mode 100644 index 00000000..75e0f848 --- /dev/null +++ b/library/kernel/converters/json_list_converter.e @@ -0,0 +1,74 @@ +note + description: "A JSON converter for LIST [ANY]" + author: "Paul Cohen" + date: "$Date$" + revision: "$Revision$" + file: "$HeadURL: $" + +deferred class JSON_LIST_CONVERTER + +inherit + JSON_CONVERTER + +feature {NONE} -- Initialization + + make + do + object := new_object (0) + end + +feature -- Access + + object: LIST [detachable ANY] + +feature {NONE} -- Factory + + new_object (nb: INTEGER): like object + deferred + ensure + Result /= Void + end + +feature -- Conversion + + from_json (j: attached like to_json): detachable like object + local + i: INTEGER + do + Result := new_object (j.count) + from + i := 1 + until + i > j.count + loop + Result.extend (json.object (j [i], Void)) + i := i + 1 + end + end + + to_json (o: like object): detachable JSON_ARRAY + local + c: ITERATION_CURSOR [detachable ANY] + jv: detachable JSON_VALUE + failed: BOOLEAN + do + create Result.make_array + from + c := o.new_cursor + until + c.after + loop + jv := json.value (c.item) + if jv /= Void then + Result.add (jv) + else + failed := True + end + c.forth + end + if failed then + Result := Void + end + end + +end -- class JSON_ARRAYED_LIST_CONVERTER diff --git a/library/kernel/ejson.e b/library/kernel/ejson.e index de9058d5..b9931aa9 100644 --- a/library/kernel/ejson.e +++ b/library/kernel/ejson.e @@ -1,8 +1,8 @@ note description: "Core factory class for creating JSON objects and corresponding Eiffel objects." author: "Paul Cohen" - date: "$Date: $" - revision: "$Revision: $" + date: "$Date$" + revision: "$Revision$" file: "$HeadURL: $" class EJSON @@ -69,7 +69,7 @@ feature -- Access elseif attached {STRING_8} an_object as s8 then create {JSON_STRING} Result.make_json (s8) elseif attached {STRING_32} an_object as s32 then - create {JSON_STRING} Result.make_json (s32.as_string_8) -- FIXME: need correct convertion/encoding here ... + create {JSON_STRING} Result.make_json_from_string_32 (s32) end if Result = Void then @@ -253,9 +253,9 @@ feature {NONE} -- Implementation (Exceptions) -- Exception message for failing to convert `a' to a JSON_VALUE. do Result := exception_prefix + "Failed to convert Eiffel object to a JSON_VALUE" - if an_object /= Void then - Result := ": " + an_object.generator - end + if an_object /= Void then + Result := ": " + an_object.generator + end end feature {NONE} -- Implementation (JSON parser) diff --git a/library/kernel/shared_ejson.e b/library/kernel/shared_ejson.e index d08a6766..421b83a4 100644 --- a/library/kernel/shared_ejson.e +++ b/library/kernel/shared_ejson.e @@ -1,14 +1,14 @@ note description: "[ - Shared factory class for creating JSON objects. Maps JSON - objects to ELKS HASH_TABLEs and JSON arrays to ELKS - LINKED_LISTs. Use non-conforming inheritance from this - class to ensure that your classes share the same - JSON_FACTORY instance. + Shared factory class for creating JSON objects. Maps JSON + objects to ELKS HASH_TABLEs and JSON arrays to ELKS + LINKED_LISTs. Use non-conforming inheritance from this + class to ensure that your classes share the same + JSON_FACTORY instance. ]" author: "Paul Cohen" - date: "$Date: $" - revision: "$Revision: $" + date: "$Date$" + revision: "$Revision: 89185 $" file: "$HeadURL: $" class SHARED_EJSON @@ -17,16 +17,22 @@ feature json: EJSON -- A shared EJSON instance with default converters for - -- DS_LINKED_LIST [ANY] and DS_HASH_TABLE [ANY, HASHABLE] + --LINKED_LIST [ANY] and HASH_TABLE [ANY, HASHABLE] local + jalc: JSON_ARRAYED_LIST_CONVERTER jllc: JSON_LINKED_LIST_CONVERTER jhtc: JSON_HASH_TABLE_CONVERTER once create Result + + create jalc.make + Result.add_converter (jalc) + create jllc.make Result.add_converter (jllc) + create jhtc.make Result.add_converter (jhtc) end -end -- class SHARED_EJSON \ No newline at end of file +end -- class SHARED_EJSON diff --git a/test/autotest/test_suite/json_author_converter.e b/test/autotest/test_suite/json_author_converter.e index ec734045..c8f9e6d0 100644 --- a/test/autotest/test_suite/json_author_converter.e +++ b/test/autotest/test_suite/json_author_converter.e @@ -1,9 +1,8 @@ note description: "A JSON converter for AUTHOR" author: "Paul Cohen" - date: "$Date: 2010-03-08 20:46:59 -0300 (Mon, 08 Mar 2010) $" - revision: "$Revision: 82 $" - file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_author_converter.e $" + date: "$Date$" + revision: "$Revision$" class JSON_AUTHOR_CONVERTER diff --git a/test/autotest/test_suite/json_book_collection_converter.e b/test/autotest/test_suite/json_book_collection_converter.e index 06b33cd0..1c569ce3 100644 --- a/test/autotest/test_suite/json_book_collection_converter.e +++ b/test/autotest/test_suite/json_book_collection_converter.e @@ -1,9 +1,8 @@ note description: "A JSON converter for BOOK_COLLECTION" author: "Paul Cohen" - date: "$Date: 2010-03-08 20:46:59 -0300 (Mon, 08 Mar 2010) $" - revision: "$Revision: 82 $" - file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_book_collection_converter.e $" + date: "$Date$" + revision: "$Revision$" class JSON_BOOK_COLLECTION_CONVERTER diff --git a/test/autotest/test_suite/json_book_converter.e b/test/autotest/test_suite/json_book_converter.e index e355149f..de31f79e 100644 --- a/test/autotest/test_suite/json_book_converter.e +++ b/test/autotest/test_suite/json_book_converter.e @@ -1,9 +1,8 @@ note description: "A JSON converter for BOOK" author: "Paul Cohen" - date: "$Date: 2010-03-08 20:46:59 -0300 (Mon, 08 Mar 2010) $" - revision: "$Revision: 82 $" - file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_book_converter.e $" + date: "$Date$" + revision: "$Revision$" class JSON_BOOK_CONVERTER diff --git a/test/autotest/test_suite/test_json_core.e b/test/autotest/test_suite/test_json_core.e index d2faa7e1..ad8326b9 100644 --- a/test/autotest/test_suite/test_json_core.e +++ b/test/autotest/test_suite/test_json_core.e @@ -632,7 +632,7 @@ feature -- Test jrep := "%"foo\\bar%"" create parser.make_parser (jrep) if attached {JSON_STRING} parser.parse as jstring then - assert ("unescaped string %"foo\\bar%" to %"foo\bar%"", jstring.unescaped_string_8.same_string ("foo\bar")) + assert ("unescaped string %"foo\\bar%" to %"foo\bar%"", jstring.unescaped_string.same_string ("foo\bar")) end create js.make_json_from_string_32 ({STRING_32}"%/20320/%/22909/") diff --git a/test/getest/author.e b/test/getest/author.e index 81906d7d..ee78d24d 100644 --- a/test/getest/author.e +++ b/test/getest/author.e @@ -21,4 +21,4 @@ feature -- Status setting name := a_name end -end -- class AUTHOR \ No newline at end of file +end -- class AUTHOR diff --git a/test/getest/book.e b/test/getest/book.e index e896c31a..6ea57743 100644 --- a/test/getest/book.e +++ b/test/getest/book.e @@ -37,4 +37,4 @@ feature -- Status setting isbn := an_isbn end -end -- class BOOK \ No newline at end of file +end -- class BOOK diff --git a/test/getest/book_collection.e b/test/getest/book_collection.e index 816d6894..be758691 100644 --- a/test/getest/book_collection.e +++ b/test/getest/book_collection.e @@ -79,4 +79,4 @@ feature {NONE} -- Implementation book_index: DS_HASH_TABLE [DS_LIST [BOOK], UC_STRING] -end -- class BOOK_COLLECTION \ No newline at end of file +end -- class BOOK_COLLECTION diff --git a/test/getest/json_author_converter.e b/test/getest/json_author_converter.e index 39458cd3..80044e71 100644 --- a/test/getest/json_author_converter.e +++ b/test/getest/json_author_converter.e @@ -3,7 +3,6 @@ indexing author: "Paul Cohen" date: "$Date$" revision: "$Revision$" - file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_author_converter.e $" class JSON_AUTHOR_CONVERTER @@ -53,4 +52,4 @@ feature {NONE} -- Implementation create Result.make_json ("name") end -end -- class JSON_AUTHOR_CONVERTER \ No newline at end of file +end -- class JSON_AUTHOR_CONVERTER diff --git a/test/getest/json_book_collection_converter.e b/test/getest/json_book_collection_converter.e index 4a56163a..00cc2b7f 100644 --- a/test/getest/json_book_collection_converter.e +++ b/test/getest/json_book_collection_converter.e @@ -3,7 +3,6 @@ indexing author: "Paul Cohen" date: "$Date$" revision: "$Revision$" - file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_book_collection_converter.e $" class JSON_BOOK_COLLECTION_CONVERTER @@ -78,4 +77,4 @@ feature {NONE} -- Implementation create Result.make_json ("books") end -end -- class JSON_BOOK_COLLECTION_CONVERTER \ No newline at end of file +end -- class JSON_BOOK_COLLECTION_CONVERTER diff --git a/test/getest/json_book_converter.e b/test/getest/json_book_converter.e index e3e61367..53a50dc4 100644 --- a/test/getest/json_book_converter.e +++ b/test/getest/json_book_converter.e @@ -3,7 +3,6 @@ indexing author: "Paul Cohen" date: "$Date$" revision: "$Revision$" - file: "$HeadURL: https://svn.origo.ethz.ch/ejson/branches/POC-converters-factory/test/json_book_converter.e $" class JSON_BOOK_CONVERTER @@ -72,4 +71,4 @@ feature {NONE} -- Implementation create Result.make_json ("author") end -end -- class JSON_BOOK_CONVERTER \ No newline at end of file +end -- class JSON_BOOK_CONVERTER diff --git a/test/getest/test_ds.e b/test/getest/test_ds.e index 88bf0d81..b86e2cff 100644 --- a/test/getest/test_ds.e +++ b/test/getest/test_ds.e @@ -68,4 +68,4 @@ feature -- Test assert ("ucs_value.string.is_equal (%"bar%")", ucs_value.string.is_equal ("bar")) end -end -- class TEST_DS \ No newline at end of file +end -- class TEST_DS diff --git a/test/getest/test_json_core.e b/test/getest/test_json_core.e index 3396d17e..d1efa5b2 100644 --- a/test/getest/test_json_core.e +++ b/test/getest/test_json_core.e @@ -700,4 +700,4 @@ feature -- Test retry end -end -- class TEST_JSON_CORE \ No newline at end of file +end -- class TEST_JSON_CORE From b6464cf5e7dbbd82322de59a3c1f87b9bfd2913a Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Wed, 8 Aug 2012 09:13:33 +0200 Subject: [PATCH 12/28] removed "getest" since it is duplication with autotest (and we use mainly the later for regression testing) --- test/getest/author.e | 24 - test/getest/book.e | 40 -- test/getest/book_collection.e | 82 --- test/getest/ec_compile.bat | 11 - test/getest/ec_compile.sh | 5 - test/getest/ejson_test-win.cfg | 17 - test/getest/ejson_test.cfg | 17 - test/getest/ejson_test.ecf | 21 - test/getest/json_author_converter.e | 55 -- test/getest/json_book_collection_converter.e | 80 --- test/getest/json_book_converter.e | 74 -- test/getest/readme.txt | 10 - test/getest/test_ds.e | 71 -- test/getest/test_json_core.e | 703 ------------------- test/getest/test_json_custom_classes.e | 49 -- 15 files changed, 1259 deletions(-) delete mode 100644 test/getest/author.e delete mode 100644 test/getest/book.e delete mode 100644 test/getest/book_collection.e delete mode 100644 test/getest/ec_compile.bat delete mode 100755 test/getest/ec_compile.sh delete mode 100644 test/getest/ejson_test-win.cfg delete mode 100644 test/getest/ejson_test.cfg delete mode 100644 test/getest/ejson_test.ecf delete mode 100644 test/getest/json_author_converter.e delete mode 100644 test/getest/json_book_collection_converter.e delete mode 100644 test/getest/json_book_converter.e delete mode 100644 test/getest/readme.txt delete mode 100644 test/getest/test_ds.e delete mode 100644 test/getest/test_json_core.e delete mode 100644 test/getest/test_json_custom_classes.e diff --git a/test/getest/author.e b/test/getest/author.e deleted file mode 100644 index ee78d24d..00000000 --- a/test/getest/author.e +++ /dev/null @@ -1,24 +0,0 @@ -class AUTHOR - -create - make - -feature {NONE} -- Initialization - - make (a_name: UC_STRING) is - do - set_name (a_name) - end - -feature -- Access - - name: UC_STRING - -feature -- Status setting - - set_name (a_name: UC_STRING) is - do - name := a_name - end - -end -- class AUTHOR diff --git a/test/getest/book.e b/test/getest/book.e deleted file mode 100644 index 6ea57743..00000000 --- a/test/getest/book.e +++ /dev/null @@ -1,40 +0,0 @@ -class BOOK - -create - make - -feature {NONE} -- Initialization - - make (a_title: UC_STRING; an_author: AUTHOR; an_isbn: UC_STRING) is - do - set_title (a_title) - set_author (an_author) - set_isbn (an_isbn) - end - -feature -- Access - - title: UC_STRING - - isbn: UC_STRING - - author: AUTHOR - -feature -- Status setting - - set_title (a_title: UC_STRING) is - do - title := a_title - end - - set_author (an_author: AUTHOR) is - do - author := an_author - end - - set_isbn (an_isbn: UC_STRING) is - do - isbn := an_isbn - end - -end -- class BOOK diff --git a/test/getest/book_collection.e b/test/getest/book_collection.e deleted file mode 100644 index be758691..00000000 --- a/test/getest/book_collection.e +++ /dev/null @@ -1,82 +0,0 @@ -class BOOK_COLLECTION - -create - make - -feature {NONE} -- Initialization - - make (a_name: UC_STRING) is - do - set_name (a_name) - create book_index.make (10) - end - -feature -- Access - - name: UC_STRING - - books: DS_LIST [BOOK] is - local - c: DS_HASH_TABLE_CURSOR [DS_LIST [BOOK], UC_STRING] - do - from - create {DS_LINKED_LIST [BOOK]} Result.make - c := book_index.new_cursor - c.start - until - c.after - loop - Result.append_last (c.item) - c.forth - end - end - - books_by_author (an_author: UC_STRING): DS_LIST [BOOK] is - do - if book_index.has (an_author) then - Result := book_index @ an_author - else - create {DS_LINKED_LIST [BOOK]} Result.make - end - end - -feature -- Status setting - - set_name (a_name: UC_STRING) is - do - name := a_name - end - - add_book (a_book: BOOK) is - local - l: DS_LIST [BOOK] - do - if book_index.has (a_book.author.name) then - l := book_index @ a_book.author.name - else - create {DS_LINKED_LIST [BOOK]} l.make - book_index.put (l, a_book.author.name) - end - l.put_last (a_book) - end - - add_books (book_list: like books) is - local - c: DS_LIST_CURSOR [BOOK] - do - from - c := book_list.new_cursor - c.start - until - c.after - loop - add_book (c.item) - c.forth - end - end - -feature {NONE} -- Implementation - - book_index: DS_HASH_TABLE [DS_LIST [BOOK], UC_STRING] - -end -- class BOOK_COLLECTION diff --git a/test/getest/ec_compile.bat b/test/getest/ec_compile.bat deleted file mode 100644 index 1d90e40c..00000000 --- a/test/getest/ec_compile.bat +++ /dev/null @@ -1,11 +0,0 @@ -echo Compiling ejson_test (finalized) -ecb -finalize -c_compile -config ejson_test.ecf -batch -clean > NUL 2>&1 -IF %ERRORLEVEL% EQU -1 goto ERROR -copy EIFGENs\ejson_test\F_code\ejson_test.exe ejson_test.exe -goto EOF - -:ERROR -echo Error occurred during ejson_test compilation -goto EOF - -:EOF diff --git a/test/getest/ec_compile.sh b/test/getest/ec_compile.sh deleted file mode 100755 index 08dcd613..00000000 --- a/test/getest/ec_compile.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "ec -finalize -c_compile -config ejson_test.ecf > /dev/null 2>&1" -ec -finalize -c_compile -config ejson_test.ecf > /dev/null 2>&1 -cp EIFGENs/ejson_test/F_code/ejson_test . diff --git a/test/getest/ejson_test-win.cfg b/test/getest/ejson_test-win.cfg deleted file mode 100644 index 9c905c21..00000000 --- a/test/getest/ejson_test-win.cfg +++ /dev/null @@ -1,17 +0,0 @@ --- Gobo test (getest) configuration file for eJSON - -test - ejson_test - -default - class ("TEST_[A-Z0-9_]*") - feature ("test_[a-z0-9_]*") - prefix ("X") - testgen ("TESTGEN") - compile ("ec_compile.bat") - execute ("ejson_test.exe") - -cluster - test_dir: "." - -end diff --git a/test/getest/ejson_test.cfg b/test/getest/ejson_test.cfg deleted file mode 100644 index 078526ac..00000000 --- a/test/getest/ejson_test.cfg +++ /dev/null @@ -1,17 +0,0 @@ --- Gobo test (getest) configuration file for eJSON - -test - ejson_test - -default - class ("TEST_[A-Z0-9_]*") - feature ("test_[a-z0-9_]*") - prefix ("X") - testgen ("TESTGEN") - compile ("./ec_compile.sh") - execute ("./ejson_test") - -cluster - test_dir: "." - -end diff --git a/test/getest/ejson_test.ecf b/test/getest/ejson_test.ecf deleted file mode 100644 index d302b746..00000000 --- a/test/getest/ejson_test.ecf +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - //.svn - /cvs$ - /EIFGENs$ - - - - - - - - - - - diff --git a/test/getest/json_author_converter.e b/test/getest/json_author_converter.e deleted file mode 100644 index 80044e71..00000000 --- a/test/getest/json_author_converter.e +++ /dev/null @@ -1,55 +0,0 @@ -indexing - description: "A JSON converter for AUTHOR" - author: "Paul Cohen" - date: "$Date$" - revision: "$Revision$" - -class JSON_AUTHOR_CONVERTER - -inherit - JSON_CONVERTER - -create - make - -feature {NONE} -- Initialization - - make is - local - ucs: UC_STRING - do - create ucs.make_from_string ("") - create object.make (ucs) - end - -feature -- Access - - value: JSON_OBJECT - - object: AUTHOR - -feature -- Conversion - - from_json (j: like value): like object is - local - ucs: UC_STRING - do - ucs ?= json.object (j.item (name_key), Void) - check ucs /= Void end - create Result.make (ucs) - end - - to_json (o: like object): like value is - do - create Result.make - Result.put (json.value (o.name), name_key) - end - -feature {NONE} -- Implementation - - name_key: JSON_STRING is - once - create Result.make_json ("name") - end - -end -- class JSON_AUTHOR_CONVERTER diff --git a/test/getest/json_book_collection_converter.e b/test/getest/json_book_collection_converter.e deleted file mode 100644 index 00cc2b7f..00000000 --- a/test/getest/json_book_collection_converter.e +++ /dev/null @@ -1,80 +0,0 @@ -indexing - description: "A JSON converter for BOOK_COLLECTION" - author: "Paul Cohen" - date: "$Date$" - revision: "$Revision$" - -class JSON_BOOK_COLLECTION_CONVERTER - -inherit - JSON_CONVERTER - -create - make - -feature {NONE} -- Initialization - - make is - local - ucs: UC_STRING - do - create ucs.make_from_string ("") - create object.make (ucs) - end - -feature -- Access - - value: JSON_OBJECT - - object: BOOK_COLLECTION - -feature -- Conversion - - from_json (j: like value): like object is - local - ucs: UC_STRING - ll: DS_LINKED_LIST [BOOK] - b: BOOK - ja: JSON_ARRAY - i: INTEGER - do - ucs ?= json.object (j.item (name_key), Void) - check ucs /= Void end - create Result.make (ucs) - ja ?= j.item (books_key) - check ja /= Void end - from - i := 1 - create ll.make - until - i > ja.count - loop - b ?= json.object (ja [i], "BOOK") - check b /= Void end - ll.put_last (b) - i := i + 1 - end - check ll /= Void end - Result.add_books (ll) - end - - to_json (o: like object): like value is - do - create Result.make - Result.put (json.value (o.name), name_key) - Result.put (json.value (o.books), books_key) - end - -feature {NONE} -- Implementation - - name_key: JSON_STRING is - once - create Result.make_json ("name") - end - - books_key: JSON_STRING is - once - create Result.make_json ("books") - end - -end -- class JSON_BOOK_COLLECTION_CONVERTER diff --git a/test/getest/json_book_converter.e b/test/getest/json_book_converter.e deleted file mode 100644 index 53a50dc4..00000000 --- a/test/getest/json_book_converter.e +++ /dev/null @@ -1,74 +0,0 @@ -indexing - description: "A JSON converter for BOOK" - author: "Paul Cohen" - date: "$Date$" - revision: "$Revision$" - -class JSON_BOOK_CONVERTER - -inherit - JSON_CONVERTER - -create - make - -feature {NONE} -- Initialization - - make is - local - ucs: UC_STRING - a: AUTHOR - do - create ucs.make_from_string ("") - create a.make (ucs) - create object.make (ucs, a, ucs) - end - -feature -- Access - - value: JSON_OBJECT - - object: BOOK - -feature -- Conversion - - from_json (j: like value): like object is - local - ucs1, ucs2: UC_STRING - a: AUTHOR - do - ucs1 ?= json.object (j.item (title_key), Void) - check ucs1 /= Void end - ucs2 ?= json.object (j.item (isbn_key), Void) - check ucs2 /= Void end - a ?= json.object (j.item (author_key), "AUTHOR") - check a /= Void end - create Result.make (ucs1, a, ucs2) - end - - to_json (o: like object): like value is - do - create Result.make - Result.put (json.value (o.title), title_key) - Result.put (json.value (o.isbn), isbn_key) - Result.put (json.value (o.author), author_key) - end - -feature {NONE} -- Implementation - - title_key: JSON_STRING is - once - create Result.make_json ("title") - end - - isbn_key: JSON_STRING is - once - create Result.make_json ("isbn") - end - - author_key: JSON_STRING is - once - create Result.make_json ("author") - end - -end -- class JSON_BOOK_CONVERTER diff --git a/test/getest/readme.txt b/test/getest/readme.txt deleted file mode 100644 index 56294420..00000000 --- a/test/getest/readme.txt +++ /dev/null @@ -1,10 +0,0 @@ -To compile and run the test program do as follows: - -1. Make sure you have a compiled version of getest in your PATH. - -2. In this dircetory, run the command: - - $ getest --verbose --ise ejson_test.cfg - - -Note: on Windows, you should use ejson_test-win.cfg \ No newline at end of file diff --git a/test/getest/test_ds.e b/test/getest/test_ds.e deleted file mode 100644 index b86e2cff..00000000 --- a/test/getest/test_ds.e +++ /dev/null @@ -1,71 +0,0 @@ -class TEST_DS - -inherit - SHARED_GOBO_EJSON - - TS_TEST_CASE - -create - make_default - -feature {NONE} -- Initialization - - make is - -- Create test object. - do - end - -feature -- Test - - test_ds_linked_list_converter is - local - jc: JSON_DS_LINKED_LIST_CONVERTER - l: DS_LINKED_LIST [STRING] - l2: DS_LINKED_LIST [ANY] - s: STRING - jv: JSON_VALUE - do - create jc.make - json.add_converter (jc) - create l.make - s := "foo" - l.put_last (s) - s := "bar" - l.put_last (s) - jv := json.value (l) - assert ("jv /= Void", jv /= Void) - s := jv.representation - l2 ?= json.object (jv, "DS_LINKED_LIST") - assert ("l2 /= Void", l2 /= Void) - end - - test_ds_hash_table_converter is - local - tc: JSON_DS_HASH_TABLE_CONVERTER - t: DS_HASH_TABLE [STRING, STRING] - t2: DS_HASH_TABLE [ANY, HASHABLE] - s: STRING - ucs_key, ucs_value: UC_STRING - jv: JSON_VALUE - do - create tc.make - json.add_converter (tc) - create t.make (2) - t.put ("foo", "1") - t.put ("bar", "2") - jv := json.value (t) - assert ("jv /= Void", jv /= Void) - s := jv.representation - t2 ?= json.object (jv, "DS_HASH_TABLE") - assert ("t2 /= Void", t2 /= Void) - create ucs_key.make_from_string ("1") - ucs_value ?= t2 @ ucs_key - assert ("ucs_value /= Void", ucs_value /= Void) - assert ("ucs_value.string.is_equal (%"foo%")", ucs_value.string.is_equal ("foo")) - create ucs_key.make_from_string ("2") - ucs_value ?= t2 @ ucs_key - assert ("ucs_value /= Void", ucs_value /= Void) - assert ("ucs_value.string.is_equal (%"bar%")", ucs_value.string.is_equal ("bar")) - end - -end -- class TEST_DS diff --git a/test/getest/test_json_core.e b/test/getest/test_json_core.e deleted file mode 100644 index d1efa5b2..00000000 --- a/test/getest/test_json_core.e +++ /dev/null @@ -1,703 +0,0 @@ -class TEST_JSON_CORE - -inherit - TS_TEST_CASE - SHARED_EJSON - -create - make_default - -feature {NONE} -- Initialization - - make is - -- Create test object. - do - end - -feature -- Test - - test_json_number_and_integer is - local - i: INTEGER - i8: INTEGER_8 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - i := 42 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_integer (i) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"42%")", jn.representation.is_equal ("42")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn := Void - jn ?= json.value (i) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"42%")", jn.representation.is_equal ("42")) - -- JSON representation-> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_8 since the value is 42 - jrep := "42" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i8 := 0 - i8 ?= json.object (jn, Void) - assert ("i8 = 42", i8 = 42) - end - - test_json_number_and_integer_8 is - local - i8: INTEGER_8 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - i8 := 42 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_integer (i8) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"42%")", jn.representation.is_equal ("42")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn := Void - jn ?= json.value (i8) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"42%")", jn.representation.is_equal ("42")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_8 since the value is 42 - jrep := "42" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i8 := 0 - i8 ?= json.object (jn, Void) - assert ("i8 = 42", i8 = 42) - end - - test_json_number_and_integer_16 is - local - i16: INTEGER_16 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - i16 := 300 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_integer (i16) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"300%")", jn.representation.is_equal ("300")) - -- Eiffel value -> JSON with factory - jn := Void - jn ?= json.value (i16) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"300%")", jn.representation.is_equal ("300")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_16 since the value is 300 - jrep := "300" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i16 := 0 - i16 ?= json.object (jn, Void) - assert ("i16 = 300", i16 = 300) - end - - test_json_number_and_integer_32 is - local - i32: INTEGER_32 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - i32 := 100000 - -- Eiffel value -> JSON representation -> JSON value - create jn.make_integer (i32) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"100000%")", jn.representation.is_equal ("100000")) - -- Eiffel value -> JSON representation -> JSON value with factory - jn := Void - jn ?= json.value (i32) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"100000%")", jn.representation.is_equal ("100000")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_32 since the value is 100000 - jrep := "100000" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i32 := 0 - i32 ?= json.object (jn, Void) - assert ("i32 = 100000", i32 = 100000) - end - - test_json_number_and_integer_64 is - local - i64: INTEGER_64 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - i64 := 42949672960 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_integer (i64) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"42949672960%")", jn.representation.is_equal ("42949672960")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn := Void - jn ?= json.value (i64) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"42949672960%")", jn.representation.is_equal ("42949672960")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_32 since the value is 42949672960 - jrep := "42949672960" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i64 := 0 - i64 ?= json.object (jn, Void) - assert ("i64 = 42949672960", i64 = 42949672960) - end - - test_json_number_and_natural_8 is - local - n8: NATURAL_8 - i16: INTEGER_16 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - n8 := 200 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_natural (n8) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"200%")", jn.representation.is_equal ("200")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn := Void - jn ?= json.value (n8) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"200%")", jn.representation.is_equal ("200")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_16 since the value is 200 - jrep := "200" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i16 := 0 - i16 ?= json.object (jn, Void) - assert ("i16 = 200", i16 = 200) - end - - test_json_number_and_natural_16 is - local - n16: NATURAL_16 - i32: INTEGER_32 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - n16 := 32768 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_natural (n16) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"32768%")", jn.representation.is_equal ("32768")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn := Void - jn ?= json.value (n16) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"32768%")", jn.representation.is_equal ("32768")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_32 since the value is 32768 - jrep := "32768" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i32 := 0 - i32 ?= json.object (jn, Void) - assert ("i32 = 32768", i32 = 32768) - end - - test_json_number_and_natural_32 is - local - n32: NATURAL_32 - i64: INTEGER_64 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - n32 := 2147483648 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_natural (n32) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"2147483648%")", jn.representation.is_equal ("2147483648")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn := Void - jn ?= json.value (n32) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"2147483648%")", jn.representation.is_equal ("2147483648")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_64 since the value is 2147483648 - jrep := "2147483648" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - i64 := 0 - i64 ?= json.object (jn, Void) - assert ("i64 = 2147483648", i64 = 2147483648) - end - - test_json_number_and_large_integers is - local - jrep: STRING - jn: JSON_NUMBER - n64: NATURAL_64 - parser: JSON_PARSER - do - n64 := 9223372036854775808 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_natural (n64) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"9223372036854775808%")", jn.representation.is_equal ("9223372036854775808")) - jn := Void - -- Eiffel value -> JSON value -> JSON representation with factory - jn ?= json.value (n64) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"9223372036854775808%")", jn.representation.is_equal ("9223372036854775808")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- we know it is INTEGER_32 since the value is 42949672960 - jrep := "9223372036854775808" -- 1 higher than largest positive number that can be represented by INTEGER 64 - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - n64 := 0 - n64 ?= json.object (jn, Void) - end - - test_json_number_and_eiffel_real is - local - r: REAL - r64: REAL_64 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - r := 3.14 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_real (r) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"3.1400001049041748%")", jn.representation.is_equal ("3.1400001049041748")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn ?= json.value (r) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"3.1400001049041748%")", jn.representation.is_equal ("3.1400001049041748")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will always return a REAL_64 if the value - -- of the JSON number is a floating point number - jrep := "3.14" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - r64 := 0 - r64 ?= json.object (jn, Void) - assert ("r64 = 3.1400000000000001", r64 = 3.1400000000000001) - end - - test_json_number_and_eiffel_real_32 is - local - r32: REAL_32 - r64: REAL_64 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - r32 := 3.14 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_real (r32) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"3.1400001049041748%")", jn.representation.is_equal ("3.1400001049041748")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn ?= json.value (r32) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"3.1400001049041748%")", jn.representation.is_equal ("3.1400001049041748")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "3.1400001049041748" - create parser.make_parser (jrep) - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - r64 := 0 - r64 ?= json.object (jn, Void) - assert ("r64 = 3.1400001049041748", r64 = 3.1400001049041748) - end - - test_json_number_and_eiffel_real_64 is - local - r64: REAL_64 - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - do - r64 := 3.1415926535897931 - -- Eiffel value -> JSON value -> JSON representation - create jn.make_real (r64) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"3.1415926535897931%")", jn.representation.is_equal ("3.1415926535897931")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn ?= json.value (r64) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"3.1415926535897931%")", jn.representation.is_equal ("3.1415926535897931")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "3.1415926535897931" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - r64 := 0 - r64 ?= json.object (jn, Void) - assert ("r64 = 3.1415926535897931", r64 = 3.1415926535897931) - end - - test_json_boolean is - local - b: BOOLEAN - jb: JSON_BOOLEAN - jrep: STRING - parser: JSON_PARSER - do - b := True - -- Eiffel value -> JSON value -> JSON representation - create jb.make_boolean (b) - assert ("jb /= Void", jb /= Void) - assert ("jb.representation.is_equal (%"true%")", jb.representation.is_equal ("true")) - -- Eiffel value -> JSON value -> JSON representation with factory - jb ?= json.value (b) - assert ("jb /= Void", jb /= Void) - assert ("jb.representation.is_equal (%"true%")", jb.representation.is_equal ("true")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "true" - create parser.make_parser (jrep) - jb := Void - jb ?= parser.parse - assert ("jb /= Void", jb /= Void) - b := False - b ?= json.object (jb, Void) - assert ("b = True", b = True) - - b := False - -- Eiffel value -> JSON value -> JSON representation - create jb.make_boolean (b) - assert ("jb /= Void", jb /= Void) - assert ("jb.representation.is_equal (%"false%")", jb.representation.is_equal ("false")) - -- Eiffel value -> JSON value -> JSON representation with factory - jb ?= json.value (b) - assert ("jb /= Void", jb /= Void) - assert ("jb.representation.is_equal (%"false%")", jb.representation.is_equal ("false")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "false" - create parser.make_parser (jrep) - jb := Void - jb ?= parser.parse - assert ("jb /= Void", jb /= Void) - b := True - b ?= json.object (jb, Void) - assert ("b = False", b = False) - end - - test_json_null is - local - a: ANY - dummy_object: STRING - jn: JSON_NULL - jrep: STRING - parser: JSON_PARSER - do - -- Eiffel value -> JSON value -> JSON representation - create jn - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"%"null%"%")", jn.representation.is_equal ("null")) - -- Eiffel value -> JSON value -> JSON representation with factory - jn ?= json.value (Void) - assert ("jn /= Void", jn /= Void) - assert ("jn.representation.is_equal (%"null%")", jn.representation.is_equal ("null")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "null" - create parser.make_parser (jrep) - jn := Void - jn ?= parser.parse - assert ("jn /= Void", jn /= Void) - create dummy_object.make_empty - a := dummy_object - a ?= json.object (jn, Void) - assert ("a = Void", a = Void) - end - - test_json_string_and_character is - local - c: CHARACTER - js: JSON_STRING - ucs: UC_STRING - jrep: STRING - parser: JSON_PARSER - do - c := 'a' - -- Eiffel value -> JSON value -> JSON representation - create js.make_json (c.out) - assert ("js /= Void", js /= Void) - assert ("js.representation.is_equal (%"%"a%"%")", js.representation.is_equal ("%"a%"")) - -- Eiffel value -> JSON value -> JSON representation with factory - js ?= json.value (c) - assert ("js /= Void", js /= Void) - assert ("js.representation.is_equal (%"%"a%"%")", js.representation.is_equal ("%"a%"")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "%"a%"" - create parser.make_parser (jrep) - js := Void - js ?= parser.parse - assert ("js /= Void", js /= Void) - ucs ?= json.object (js, Void) - assert ("ucs.string.is_equal (%"a%")", ucs.string.is_equal ("a")) - end - - test_json_string_and_string is - local - s: STRING - js: JSON_STRING - ucs: UC_STRING - jrep: STRING - parser: JSON_PARSER - do - s := "foobar" - -- Eiffel value -> JSON value -> JSON representation - create js.make_json (s) - assert ("js /= Void", js /= Void) - assert ("js.representation.is_equal (%"%"foobar%"%")", js.representation.is_equal ("%"foobar%"")) - -- Eiffel value -> JSON value -> JSON representation with factory - js ?= json.value (s) - assert ("js /= Void", js /= Void) - assert ("js.representation.is_equal (%"%"foobar%"%")", js.representation.is_equal ("%"foobar%"")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "%"foobar%"" - create parser.make_parser (jrep) - js := Void - js ?= parser.parse - assert ("js /= Void", js /= Void) - ucs ?= json.object (js, Void) - assert ("ucs.string.is_equal (%"foobar%")", ucs.string.is_equal ("foobar")) - end - - test_json_string_and_uc_string is - local - js: JSON_STRING - ucs: UC_STRING - jrep: STRING - parser: JSON_PARSER - do - create ucs.make_from_string ("foobar") - -- Eiffel value -> JSON value -> JSON representation - create js.make_json (ucs) - assert ("js /= Void", js /= Void) - assert ("js.representation.is_equal (%"%"foobar%"%")", js.representation.is_equal ("%"foobar%"")) - -- Eiffel value -> JSON value -> JSON representation with factory - js ?= json.value (ucs) - assert ("js /= Void", js /= Void) - assert ("js.representation.is_equal (%"%"foobar%"%")", js.representation.is_equal ("%"foobar%"")) - -- JSON representation -> JSON value -> Eiffel value - jrep := "%"foobar%"" - create parser.make_parser (jrep) - js := Void - js ?= parser.parse - assert ("js /= Void", js /= Void) - ucs := Void - ucs ?= json.object (js, Void) - assert ("ucs.string.is_equal (%"foobar%")", ucs.string.is_equal ("foobar")) - end - - test_json_array is - local - ll: LINKED_LIST [INTEGER_8] - ll2: LINKED_LIST [ANY] - ja: JSON_ARRAY - jn: JSON_NUMBER - jrep: STRING - parser: JSON_PARSER - i, n: INTEGER - do - -- Eiffel value -> JSON value -> JSON representation - create ll.make - ll.extend (0) - ll.extend (1) - ll.extend (1) - ll.extend (2) - ll.extend (3) - ll.extend (5) - -- Note: Currently there is no simple way of creating a JSON_ARRAY - -- from an LINKED_LIST. - create ja.make_array - from - ll.start - until - ll.after - loop - create jn.make_integer (ll.item) - ja.add (jn) - ll.forth - end - assert ("ja /= Void", ja /= Void) - assert ("ja.representation.is_equal (%"[0,1,1,2,3,5]%")", ja.representation.is_equal ("[0,1,1,2,3,5]")) - -- Eiffel value -> JSON value -> JSON representation with factory - ja := Void - ja ?= json.value (ll) - assert ("ja /= Void", ja /= Void) - assert ("ja.representation.is_equal (%"[0,1,1,2,3,5]%")", ja.representation.is_equal ("[0,1,1,2,3,5]")) - -- JSON representation -> JSON value -> Eiffel value - -- Note: The JSON_FACTORY will return the smallest INTEGER_* object - -- that can represent the value of the JSON number, in this case - -- it means we will get an LINKED_LIST [ANY] containing the INTEGER_8 - -- values 0, 1, 1, 2, 3, 5 - jrep := "[0,1,1,2,3,5]" - create parser.make_parser (jrep) - ja := Void - ja ?= parser.parse - assert ("ja /= Void", ja /= Void) - ll2 ?= json.object (ja, Void) - assert ("ll2 /= Void", ll2 /= Void) - --ll.compare_objects - --ll2.compare_objects - assert ("ll2.is_equal (ll)", ll2.is_equal (ll)) - end - - test_json_object is - local - t, t2: HASH_TABLE [ANY, UC_STRING] - i: INTEGER - ucs_key, ucs: UC_STRING - a: ARRAY [INTEGER] - jo: JSON_OBJECT - jn: JSON_NUMBER - js_key, js: JSON_STRING - ja: JSON_ARRAY - jrep: STRING - parser: JSON_PARSER - do - -- Eiffel value -> JSON value -> JSON representation - -- Note: Currently there is now way of creating a JSON_OBJECT from - -- a DS_HASH_TABLE, so we do it manually. - -- t = {"name": "foobar", "size": 42, "contents", [0, 1, 1, 2, 3, 5]} - create jo.make - create js_key.make_json ("name") - create js.make_json ("foobar") - jo.put (js, js_key) - create js_key.make_json ("size") - create jn.make_integer (42) - jo.put (jn, js_key) - create js_key.make_json ("contents") - create ja.make_array - create jn.make_integer (0) - ja.add (jn) - create jn.make_integer (1) - ja.add (jn) - create jn.make_integer (1) - ja.add (jn) - create jn.make_integer (2) - ja.add (jn) - create jn.make_integer (3) - ja.add (jn) - create jn.make_integer (5) - ja.add (jn) - jo.put (ja, js_key) - assert ("jo /= Void", jo /= Void) - assert ("jo.representation.is_equal (%"{%"size%":42,%"contents%":[0,1,1,2,3,5],%"name%":%"foobar%"}%")", jo.representation.is_equal ("{%"size%":42,%"contents%":[0,1,1,2,3,5],%"name%":%"foobar%"}")) - -- Eiffel value -> JSON value -> JSON representation with factory - create t.make (3) - create ucs_key.make_from_string ("name") - create ucs.make_from_string ("foobar") - t.put (ucs, ucs_key) - create ucs_key.make_from_string ("size") - i := 42 - t.put (i, ucs_key) - create ucs_key.make_from_string ("contents") - a := <<0, 1, 1, 2, 3, 5>> - t.put (a, ucs_key) - jo := Void - jo ?= json.value (t) - assert ("jo /= Void", jo /= Void) - assert ("jo.representation.is_equal (%"{%"size%":42,%"contents%":[0,1,1,2,3,5],%"name%":%"foobar%"}%")", jo.representation.is_equal ("{%"size%":42,%"contents%":[0,1,1,2,3,5],%"name%":%"foobar%"}")) - -- JSON representation -> JSON value -> Eiffel value -> JSON value -> JSON representation - jrep := "{%"size%":42,%"contents%":[0,1,1,2,3,5],%"name%":%"foobar%"}" - create parser.make_parser (jrep) - jo := Void - jo ?= parser.parse - assert ("jo /= Void", jo /= Void) - t2 ?= json.object (jo, Void) - assert ("t2 /= Void", t2 /= Void) - jo ?= json.value (t2) - assert ("jo /= Void", jo /= Void) - assert ("jrep.is_equal (jo.representation)", jrep.is_equal (jo.representation)) - end - - test_json_failed_json_conversion is - -- Test converting an Eiffel object to JSON that is based on a class - -- for which no JSON converter has been registered. - local - gv: KL_GOBO_VERSION - jv: JSON_VALUE - exception: BOOLEAN - do - if not exception then - create gv - jv := json.value (gv) - else - assert ("exceptions.is_developer_exception", exceptions.is_developer_exception) - assert ("exceptions.is_developer_exception_of_name", exceptions.is_developer_exception_of_name ("eJSON exception: Failed to convert Eiffel object to a JSON_VALUE: KL_GOBO_VERSION")) - end - rescue - exception := True - retry - end - - test_json_failed_eiffel_conversion is - -- Test converting from a JSON value to an Eiffel object based on a - -- class for which no JSON converter has been registered. - local - gv: KL_GOBO_VERSION - jo: JSON_OBJECT - exception: BOOLEAN - do - if not exception then - create jo.make - gv ?= json.object (jo, "KL_GOBO_VERSION") - else - assert ("exceptions.is_developer_exception", exceptions.is_developer_exception) - assert ("exceptions.is_developer_exception_of_name", exceptions.is_developer_exception_of_name ("eJSON exception: Failed to convert JSON_VALUE to an Eiffel object: JSON_OBJECT -> KL_GOBO_VERSION")) - end - rescue - exception := True - retry - end - -end -- class TEST_JSON_CORE diff --git a/test/getest/test_json_custom_classes.e b/test/getest/test_json_custom_classes.e deleted file mode 100644 index e9d99d26..00000000 --- a/test/getest/test_json_custom_classes.e +++ /dev/null @@ -1,49 +0,0 @@ -class TEST_JSON_CUSTOM_CLASSES - -inherit - SHARED_EJSON - - TS_TEST_CASE - -create - make_default - -feature {NONE} -- Initialization - - make is - -- Create test object. - do - end - -feature -- Test - - test_custom_classes is - local - bc: BOOK_COLLECTION - jbc: JSON_BOOK_CONVERTER - jbcc: JSON_BOOK_COLLECTION_CONVERTER - jac: JSON_AUTHOR_CONVERTER - jo: JSON_OBJECT - parser: JSON_PARSER - jrep: STRING - do - create jbc.make - json.add_converter (jbc) - create jbcc.make - json.add_converter (jbcc) - create jac.make - json.add_converter (jac) - jrep := "{%"name%":%"Test collection%",%"books%":[{%"title%":%"eJSON: The Definitive Guide%",%"isbn%":%"123123-413243%",%"author%":{%"name%":%"Foo Bar%"}}]}" - create parser.make_parser (jrep) - jo := Void - jo ?= parser.parse - assert ("jo /= Void", jo /= Void) - bc := Void - bc ?= json.object (jo, "BOOK_COLLECTION") - assert ("bc /= Void", bc /= Void) - jo ?= json.value (bc) - assert ("jo /= Void", jo /= Void) - assert ("JSON representation is correct", jo.representation.is_equal ("{%"books%":[{%"title%":%"eJSON: The Definitive Guide%",%"isbn%":%"123123-413243%",%"author%":{%"name%":%"Foo Bar%"}}],%"name%":%"Test collection%"}")) - end - -end -- class TEST_JSON_CUSTOM_CLASS From 38f856a54b38772785aded8acc945054ab88b7a4 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:17:28 -0700 Subject: [PATCH 13/28] Updated Projects (markdown) --- Projects.md | 170 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 107 insertions(+), 63 deletions(-) diff --git a/Projects.md b/Projects.md index 26958eaa..7b7f8b61 100644 --- a/Projects.md +++ b/Projects.md @@ -6,62 +6,75 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Evaluate EWF according to the following constraints ... * _Suggested by **Javier**_ -* See http://www.amundsen.com/blog/archives/1130 -* Other option is take the following REST implementation toolkit as a guide to evaluate EWF http://code.google.com/p/implementing-rest/wiki/RESTImplementationToolkit. +* _Description:_ According to http://www.amundsen.com/blog/archives/1130 , evaluate the current design of EWF to see if this match the different points. An other option would be to take the following REST implementation toolkit as a guide to evaluate EWF http://code.google.com/p/implementing-rest/wiki/RESTImplementationToolkit. ## Road to Hypermedia API * _Suggested by **Javier**_ -* describe differents types of Web API, and how you can build them using EWF. -* Describing Pros and Cons. -* based on http://martinfowler.com/articles/richardsonMaturityModel.html - +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ describe differents types of Web API, and how you can build them using EWF. Describing Pros and Cons. This should be on http://martinfowler.com/articles/richardsonMaturityModel.html ## Build a video to demonstrate how an Hypermedia API works, and how to build it using EWF * _Suggested by **Javier**_ -* (maybe based on our graphviz example) or and extension to RestBucksCRUD +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ produce a audio+video+slide that demonstrates how to build an hypermedia API using EWF. This could be based on upcoming "graphviz server" example, or an extension of existing RestBucksCRUD example, or any new example. ---- # Works related to EWF / framework / tools ## Improve EWF * _Suggested by **Jocelyn**_ -* Improve encoding support -∗ Better MIME handler -* Support for configuration -* Ready to use logging facilities -* Smart handler for HEAD or similar -* Adding component to ease the caching functionalities -* Adding Session support -* URL rewriting ? -* Mass testing -* ... +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Improve existing EWF source, this is a permanent task for EWF, and this can be code, documentation, tests, ... Among others , here is a list of needed effort: +** Improve encoding support +*∗ Better MIME handler +** _Support for configuration _ +** Ready to use logging facilities +** Smart handler for HEAD or similar +** Adding component to ease the caching functionalities +** Adding Session support +** URL rewriting ? +** Mass testing +** ... ## Eiffel Web Nino * _Suggested by **Javier & Jocelyn**_ -* Implement persistent connection -* Complete implementation of Eiffel Web Nino using pool of threads -* Complete migration of Eiffel Web Nino to SCOOP -* Improve Nino to become a real solution to host any web services/sites -* ... +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ Currently Eiffel Web Nino, is a standalone httpd server written in Eiffel. It is great for development, or embedding httpd component in application. However there are room for improvement so that one can also use it as replacement for apache, iis, ... To reach this state, here are a list of task that should be achieved: +** Implement persistent connection +** Complete implementation of Eiffel Web Nino using pool of threads +** Complete migration of Eiffel Web Nino to SCOOP +** Improve Nino to become a real solution to host any web services/sites +** ... ## New EWF connectors * _Suggested by **Jocelyn & Javier**_ -* LightHTTP connector for EWF -* nginx connector for EWF -* ... +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ EWF is relying on the notion of "connector" to achieve portability on various platform and underlying httpd server, currently EWF support any CGI or libFCGI system (i.e apache, IIS, ...), and provide a standalone version thanks to Eiffel Web Nino. The goal now, would be to support specific connector for: +** LightHTTP (http://www.lighttpd.net/) +** nginx (http://nginx.org/en/) ## Concurrenty and EWF * _Suggested by **Jocelyn**_ -* Make sure EWF is compliant with concurrency, provide example +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Check that EWF is compliant with concurrency (Eiffel Thread, and SCOOP), and provide an example using concurrency. ## Design and build something like Ruby on Rails or Grails * _Suggested by **Javier**_ -* i.e a conventional MVC to create Web Sites -* Could be useful even if this is not the taste of everyone - +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ Using EWF, design and build the set of tools to provide a conventional MVC to create Web sites. This could be useful even if this is not the taste of everyone. ## Provide a Websocket implementation * _Suggested by **Jocelyn**_ +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Provide an implementation of websocket with EWF and eventually Eiffel Web Nino, then demonstrate it on a simple example. WebSocket is a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection. * See http://en.wikipedia.org/wiki/Websocket ---- @@ -69,73 +82,93 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## HAL browser * _Suggested by **Javier**_ -* written in Eiffel inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/ -* see http://stateless.co/hal_specification.html +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Build a HAL browser to discover an API using HAL mediatype. The browser will be able to follow the links, and display the transmitted data. This could be a vision2 application inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/. HAL stands for Hypertext Application Language see http://stateless.co/hal_specification.html. ## Collection-JSON browser * _Suggested by **Javier**_ -* similar to HAL browser but focused on Collection JSON -* see http://www.amundsen.com/media-types/collection/ +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ Build a Collection/JSON browser to discover an API using Collection/JSON mediatype. The browser will be able to follow the links, and display the transmitted data. This could be a vision2 application inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/. Collection+JSON is a JSON-based read/write hypermedia-type, see http://www.amundsen.com/media-types/collection/ ## Build a simple CMS with EWF * _Suggested by **Jocelyn**_ -* Build a simple CMS website with EWF -* features: +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ Using EWF, Build a simple CMS (Content Management System) framework and then an example. It should provide common features such as: - user management (register, login, lost password -> send email) - page editing - blog - template / theme - persistency / storage / ... - extension at compilation time -* The result should be used by any user to build his own CMS, and extend it easily. +* The result should be usable by any user to build his own CMS website, and extend it easily. ## Build P2P connector * _Suggested by **Jocelyn**_ -* Imagine you want to publish a website running on your machine (behing firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Imagine you want to publish a website (or web service, API) running on your machine (behind firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) ---- # Libraries ## Hypermedia API library to work with XHTML * _Suggested by **Javier**_ -* http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Use XHTML as a media type to for hypermedia API. See http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html ## Add support for Mediatype such as RSS, ATOM, ... * _Suggested by **Jocelyn**_ -* Being able to generate, and also consume RSS, ATOM, ... +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ In addition to JSON, HAL, Collection+JSON, XHTML, application might want to support (read and write) standard media type such as RSS, ATOM, ... -## Security: provide popular authentication mecanisms +## Security: provide popular authentication mechanisms * _Suggested by **Jocelyn**_ -* OAuth: consumer and provider -* OpenID -* Google Connect -* Facebook Connect -* ... +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Any web service, web site, API need a reliable authentication mechanism, the could be on the server side or the client side to build mashup service (integrate with other web API such as google, flicker, ...). So far, EWF provides only basic HTTP Authorization, and application would need more solutions such as : + - OAuth: consumer and provider + - OpenID + - Google Connect + - Facebook Connect +* The goal is to provide component to consume other popular API/service, but also component for your own service so that other can consume it. ## Design a state machine to serve response * _Suggested by **Jocelyn**_ -* example: multipage web form +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ In the world of Hypermedia API, the notion of state machine is pertinent, but this could also be used to provide a multi-page web form. ## library: Template engine * _Suggested by **Jocelyn**_ -* Get inspired by any existing template engine, and build one for Eiffel +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Get inspired by any existing template engine, and build one for Eiffel, this should be easily usable within a web application. This could be inspired, or implementation of standard template engine, this way people can reuse existing content, or migrate easily their application to EWF. For inspiration, one can look at: - http://www.smarty.net/ - http://mustache.github.com/ - - ... -* This is not specific to EWF, but it will be very useful in website context + - http://en.wikipedia.org/wiki/Template_engine_(web) ... they are plenty of them, a comparison of the different engine would help. +* This is not specific to EWF, but it will be very useful in website context. -## library: Wikitext, markdown parser and renderer +## library: Wikitext, markdown parser and render engine * _Suggested by **Jocelyn**_ -* Support reading of wikitext, and markdown, and provide HTML rendering -* extension: render wikitext and markdown into Vision2 widget (not related to EWF, but could be useful to build editor) +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Build component to support (read and write, and why not convert), lightweight markup language (see http://en.wikipedia.org/wiki/Lightweight_markup_language) such as wikitext, markdown, and other. The component should be able to read/scan, but also produce an HTML output. Focus first on wikitext, and markdown since they seems to be the most popular. +* Then , a nice addition would be to render those lightweight markup lang into Vision2 widget (not related to EWF, but could be useful to build (editor) desktop application) ## library: Web component to build HTML5 widget * _Suggested by **Jocelyn**_ -* Build set of Eiffel component to ease development of websites +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ Build set of Eiffel components to ease development of websites. First this should be based on HTML5. Idea for components: - table widget (with sorting ...) - suggestive typing widget - tab ... - - WYSIWYG textarea widget (could reuse existing JS solution ...) + - WYSIWYG textarea widget (could reuse existing Javascript solution TinyMCE, CKEditor, OpenWysiwyg, ...) - ... ---- @@ -143,30 +176,41 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Libraries: Reusable Client Design based on J.Moore Presentation * _Suggested by **Javier**_ +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: TODO _ * Generic client that can be customized (see design in slide 12) * http://s3.amazonaws.com/cimlabs/Oredev-Hypermedia-APIs.pdf * video http://vimeo.com/20781278 ## Create a Client Cache based on Apache commons Client Cache. * _Suggested by **Javier**_ +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: TODO _ * http://hc.apache.org/httpcomponents-client-ga/httpclient-cache/index.html * http://labs.xfinity.com/benchmarking-the-httpclient-caching-module ## Add SSL support to Eiffel Net * _Suggested by **Jocelyn**_ -* Currently Eiffel Net does not provide any support to SSL (thus no HTTPS). For now Eiffel application often use the Eiffel cURL wrapper, but it would be more convenient to use directly Eiffel Net. +* _Supervisor: _ +* _Suitability: TODO _ +* _Description:_ Currently Eiffel Net does not provide any support to SSL (thus no HTTPS). For now Eiffel application often use the Eiffel cURL wrapper which provide SSL, but it would be more convenient to use directly Eiffel Net. Then find solution to add SSL support to EiffelNet, or to extend EiffelNet with an EiffelNet+OpenSSL solution, or other. ## Build clients to consume popular RESTful APIs * _Suggested by **Jocelyn & Javier**_ -* **Requirement**: OAuth client eiffel component -* Google Discovery APIs -* Twitter -* Facebook -* Github -* Flickr -* ... etc +* _Supervisor: _ +* _Suitability: TODO _ +* _Description: _ Build Eiffel libraries to consume popular web APIs, such as: + - Google Discovery APIs + - Twitter + - Facebook + - Github + - Flickr + - ... etc * This should reuse and improve the "http_client" provided by EWF. Eventually also write the EiffelNet implementation to be independant from cURL +* **Requirement**: OAuth client eiffel component ---- # Feel free to add new idea below this line ----- \ No newline at end of file +---- From 2f556cb99e1def1254277e2fff9c5ef66759829a Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:26:44 -0700 Subject: [PATCH 14/28] Updated Projects (markdown) --- Projects.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Projects.md b/Projects.md index 7b7f8b61..5ce89750 100644 --- a/Projects.md +++ b/Projects.md @@ -214,3 +214,10 @@ 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 [[Project suggestions]] to suggest new project, or request a feature. +We'll move the content to this page for time to time. +Please provide: +* a short title +* a description +* eventual requirement +* "_Suggested by_": so that we know who suggested a feature. \ No newline at end of file From e861d65e999bacc29eae2467b968fc8cbd9f3811 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:32:28 -0700 Subject: [PATCH 15/28] Created Project suggestions (markdown) --- Project-suggestions.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Project-suggestions.md diff --git a/Project-suggestions.md b/Project-suggestions.md new file mode 100644 index 00000000..aac79df3 --- /dev/null +++ b/Project-suggestions.md @@ -0,0 +1,12 @@ +Use this to suggest new projects, or request features. +The content of this page will be moved to the main [[Projects]] page for time to time. +For any entry, please use this template + +---- +## Short title +* _Suggested by **your name**_": so that we know who suggested a feature. +* **Requirement**: ... if any, otherwise remove this line +* _Description: ..._ a few lines to describe the project +* _References: ..._ if any, otherwise remove this line +---- + From 764b076b886e016b73360ad6ca3e795da1d651a3 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:32:52 -0700 Subject: [PATCH 16/28] Updated Project suggestions (markdown) --- Project-suggestions.md => Projects---Suggestions.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Project-suggestions.md => Projects---Suggestions.md (100%) diff --git a/Project-suggestions.md b/Projects---Suggestions.md similarity index 100% rename from Project-suggestions.md rename to Projects---Suggestions.md From dc3a897150d5fea6098dad1637207da4fd1004e9 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:33:18 -0700 Subject: [PATCH 17/28] Updated Projects Suggestions (markdown) --- Projects---Suggestions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects---Suggestions.md b/Projects---Suggestions.md index aac79df3..b0878697 100644 --- a/Projects---Suggestions.md +++ b/Projects---Suggestions.md @@ -6,7 +6,7 @@ For any entry, please use this template ## Short title * _Suggested by **your name**_": so that we know who suggested a feature. * **Requirement**: ... if any, otherwise remove this line -* _Description: ..._ a few lines to describe the project +* _Description: ... _ a few lines to describe the project * _References: ..._ if any, otherwise remove this line ---- From a7577bb3303a1aba908e6e2c1b2aae05eadf110f Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:33:58 -0700 Subject: [PATCH 18/28] Updated Projects Suggestions (markdown) --- Projects---Suggestions.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Projects---Suggestions.md b/Projects---Suggestions.md index b0878697..f3050b76 100644 --- a/Projects---Suggestions.md +++ b/Projects---Suggestions.md @@ -3,10 +3,12 @@ The content of this page will be moved to the main [[Projects]] page for time t For any entry, please use this template ---- + ## Short title * _Suggested by **your name**_": so that we know who suggested a feature. * **Requirement**: ... if any, otherwise remove this line * _Description: ... _ a few lines to describe the project -* _References: ..._ if any, otherwise remove this line +* _References: ... _ if any, otherwise remove this line + ---- From 26706841a5b6f72c58f78c44f32df29f67c5cecb Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:34:55 -0700 Subject: [PATCH 19/28] Updated Projects Suggestions (markdown) --- Projects---Suggestions.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Projects---Suggestions.md b/Projects---Suggestions.md index f3050b76..b7278fee 100644 --- a/Projects---Suggestions.md +++ b/Projects---Suggestions.md @@ -7,8 +7,8 @@ For any entry, please use this template ## Short title * _Suggested by **your name**_": so that we know who suggested a feature. * **Requirement**: ... if any, otherwise remove this line -* _Description: ... _ a few lines to describe the project -* _References: ... _ if any, otherwise remove this line +* _Description_: ... a few lines to describe the project +* _References_: ... if any, otherwise remove this line ---- From c92be6de09825f92b7a52faa8a14a7a8351e96f6 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:35:26 -0700 Subject: [PATCH 20/28] Updated Projects (markdown) --- Projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects.md b/Projects.md index 5ce89750..49c60a29 100644 --- a/Projects.md +++ b/Projects.md @@ -214,7 +214,7 @@ 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 [[Project suggestions]] to suggest new project, or request a feature. +Use the following page [[Projects Suggestions]] to suggest new project, or request a feature. We'll move the content to this page for time to time. Please provide: * a short title From 97018e93f6f926b6d80a6dbf40bbf2730a8d03ff Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:39:54 -0700 Subject: [PATCH 21/28] Updated Projects (markdown) --- Projects.md | 146 +++++++++++++++++++++++++--------------------------- 1 file changed, 70 insertions(+), 76 deletions(-) diff --git a/Projects.md b/Projects.md index 49c60a29..5cf4823e 100644 --- a/Projects.md +++ b/Projects.md @@ -6,28 +6,28 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Evaluate EWF according to the following constraints ... * _Suggested by **Javier**_ -* _Description:_ According to http://www.amundsen.com/blog/archives/1130 , evaluate the current design of EWF to see if this match the different points. An other option would be to take the following REST implementation toolkit as a guide to evaluate EWF http://code.google.com/p/implementing-rest/wiki/RESTImplementationToolkit. +* _Description_: According to http://www.amundsen.com/blog/archives/1130 , evaluate the current design of EWF to see if this match the different points. An other option would be to take the following REST implementation toolkit as a guide to evaluate EWF http://code.google.com/p/implementing-rest/wiki/RESTImplementationToolkit. ## Road to Hypermedia API * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ describe differents types of Web API, and how you can build them using EWF. Describing Pros and Cons. This should be on http://martinfowler.com/articles/richardsonMaturityModel.html +* _Supervisor_: +* _Suitability_: +* _Description_: describe differents types of Web API, and how you can build them using EWF. Describing Pros and Cons. This should be on http://martinfowler.com/articles/richardsonMaturityModel.html ## Build a video to demonstrate how an Hypermedia API works, and how to build it using EWF * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ produce a audio+video+slide that demonstrates how to build an hypermedia API using EWF. This could be based on upcoming "graphviz server" example, or an extension of existing RestBucksCRUD example, or any new example. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: produce a audio+video+slide that demonstrates how to build an hypermedia API using EWF. This could be based on upcoming "graphviz server" example, or an extension of existing RestBucksCRUD example, or any new example. ---- # Works related to EWF / framework / tools ## Improve EWF * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Improve existing EWF source, this is a permanent task for EWF, and this can be code, documentation, tests, ... Among others , here is a list of needed effort: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Improve existing EWF source, this is a permanent task for EWF, and this can be code, documentation, tests, ... Among others , here is a list of needed effort: ** Improve encoding support *∗ Better MIME handler ** _Support for configuration _ @@ -41,9 +41,9 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Eiffel Web Nino * _Suggested by **Javier & Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ Currently Eiffel Web Nino, is a standalone httpd server written in Eiffel. It is great for development, or embedding httpd component in application. However there are room for improvement so that one can also use it as replacement for apache, iis, ... To reach this state, here are a list of task that should be achieved: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Currently Eiffel Web Nino, is a standalone httpd server written in Eiffel. It is great for development, or embedding httpd component in application. However there are room for improvement so that one can also use it as replacement for apache, iis, ... To reach this state, here are a list of task that should be achieved: ** Implement persistent connection ** Complete implementation of Eiffel Web Nino using pool of threads ** Complete migration of Eiffel Web Nino to SCOOP @@ -52,29 +52,29 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## New EWF connectors * _Suggested by **Jocelyn & Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ EWF is relying on the notion of "connector" to achieve portability on various platform and underlying httpd server, currently EWF support any CGI or libFCGI system (i.e apache, IIS, ...), and provide a standalone version thanks to Eiffel Web Nino. The goal now, would be to support specific connector for: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: EWF is relying on the notion of "connector" to achieve portability on various platform and underlying httpd server, currently EWF support any CGI or libFCGI system (i.e apache, IIS, ...), and provide a standalone version thanks to Eiffel Web Nino. The goal now, would be to support specific connector for: ** LightHTTP (http://www.lighttpd.net/) ** nginx (http://nginx.org/en/) ## Concurrenty and EWF * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Check that EWF is compliant with concurrency (Eiffel Thread, and SCOOP), and provide an example using concurrency. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Check that EWF is compliant with concurrency (Eiffel Thread, and SCOOP), and provide an example using concurrency. ## Design and build something like Ruby on Rails or Grails * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ Using EWF, design and build the set of tools to provide a conventional MVC to create Web sites. This could be useful even if this is not the taste of everyone. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Using EWF, design and build the set of tools to provide a conventional MVC to create Web sites. This could be useful even if this is not the taste of everyone. ## Provide a Websocket implementation * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Provide an implementation of websocket with EWF and eventually Eiffel Web Nino, then demonstrate it on a simple example. WebSocket is a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Provide an implementation of websocket with EWF and eventually Eiffel Web Nino, then demonstrate it on a simple example. WebSocket is a web technology providing for bi-directional, full-duplex communications channels over a single TCP connection. * See http://en.wikipedia.org/wiki/Websocket ---- @@ -82,21 +82,21 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## HAL browser * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Build a HAL browser to discover an API using HAL mediatype. The browser will be able to follow the links, and display the transmitted data. This could be a vision2 application inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/. HAL stands for Hypertext Application Language see http://stateless.co/hal_specification.html. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Build a HAL browser to discover an API using HAL mediatype. The browser will be able to follow the links, and display the transmitted data. This could be a vision2 application inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/. HAL stands for Hypertext Application Language see http://stateless.co/hal_specification.html. ## Collection-JSON browser * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ Build a Collection/JSON browser to discover an API using Collection/JSON mediatype. The browser will be able to follow the links, and display the transmitted data. This could be a vision2 application inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/. Collection+JSON is a JSON-based read/write hypermedia-type, see http://www.amundsen.com/media-types/collection/ +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Build a Collection/JSON browser to discover an API using Collection/JSON mediatype. The browser will be able to follow the links, and display the transmitted data. This could be a vision2 application inspired by http://haltalk.herokuapp.com/explorer/hal_browser.html#/. Collection+JSON is a JSON-based read/write hypermedia-type, see http://www.amundsen.com/media-types/collection/ ## Build a simple CMS with EWF * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ Using EWF, Build a simple CMS (Content Management System) framework and then an example. It should provide common features such as: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Using EWF, Build a simple CMS (Content Management System) framework and then an example. It should provide common features such as: - user management (register, login, lost password -> send email) - page editing - blog @@ -107,30 +107,30 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Build P2P connector * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Imagine you want to publish a website (or web service, API) running on your machine (behind firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Imagine you want to publish a website (or web service, API) running on your machine (behind firewall). One would need to initiate the connection via a public website, this is common for P2P software such as remote assistance (i.e: join.me, teamviewer, showmypc, ...) ---- # Libraries ## Hypermedia API library to work with XHTML * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Use XHTML as a media type to for hypermedia API. See http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Use XHTML as a media type to for hypermedia API. See http://codeartisan.blogspot.com.ar/2012/07/using-html-as-media-type-for-your-api.html ## Add support for Mediatype such as RSS, ATOM, ... * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ In addition to JSON, HAL, Collection+JSON, XHTML, application might want to support (read and write) standard media type such as RSS, ATOM, ... +* _Supervisor_: +* _Suitability_: TODO +* _Description_: In addition to JSON, HAL, Collection+JSON, XHTML, application might want to support (read and write) standard media type such as RSS, ATOM, ... ## Security: provide popular authentication mechanisms * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Any web service, web site, API need a reliable authentication mechanism, the could be on the server side or the client side to build mashup service (integrate with other web API such as google, flicker, ...). So far, EWF provides only basic HTTP Authorization, and application would need more solutions such as : +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Any web service, web site, API need a reliable authentication mechanism, the could be on the server side or the client side to build mashup service (integrate with other web API such as google, flicker, ...). So far, EWF provides only basic HTTP Authorization, and application would need more solutions such as : - OAuth: consumer and provider - OpenID - Google Connect @@ -139,15 +139,15 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Design a state machine to serve response * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ In the world of Hypermedia API, the notion of state machine is pertinent, but this could also be used to provide a multi-page web form. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: In the world of Hypermedia API, the notion of state machine is pertinent, but this could also be used to provide a multi-page web form. ## library: Template engine * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Get inspired by any existing template engine, and build one for Eiffel, this should be easily usable within a web application. This could be inspired, or implementation of standard template engine, this way people can reuse existing content, or migrate easily their application to EWF. For inspiration, one can look at: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Get inspired by any existing template engine, and build one for Eiffel, this should be easily usable within a web application. This could be inspired, or implementation of standard template engine, this way people can reuse existing content, or migrate easily their application to EWF. For inspiration, one can look at: - http://www.smarty.net/ - http://mustache.github.com/ - http://en.wikipedia.org/wiki/Template_engine_(web) ... they are plenty of them, a comparison of the different engine would help. @@ -155,16 +155,16 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## library: Wikitext, markdown parser and render engine * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Build component to support (read and write, and why not convert), lightweight markup language (see http://en.wikipedia.org/wiki/Lightweight_markup_language) such as wikitext, markdown, and other. The component should be able to read/scan, but also produce an HTML output. Focus first on wikitext, and markdown since they seems to be the most popular. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Build component to support (read and write, and why not convert), lightweight markup language (see http://en.wikipedia.org/wiki/Lightweight_markup_language) such as wikitext, markdown, and other. The component should be able to read/scan, but also produce an HTML output. Focus first on wikitext, and markdown since they seems to be the most popular. * Then , a nice addition would be to render those lightweight markup lang into Vision2 widget (not related to EWF, but could be useful to build (editor) desktop application) ## library: Web component to build HTML5 widget * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ Build set of Eiffel components to ease development of websites. First this should be based on HTML5. Idea for components: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Build set of Eiffel components to ease development of websites. First this should be based on HTML5. Idea for components: - table widget (with sorting ...) - suggestive typing widget - tab ... @@ -176,32 +176,32 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, ## Libraries: Reusable Client Design based on J.Moore Presentation * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: TODO _ +* _Supervisor_: +* _Suitability_: TODO +* _Description_: TODO * Generic client that can be customized (see design in slide 12) * http://s3.amazonaws.com/cimlabs/Oredev-Hypermedia-APIs.pdf * video http://vimeo.com/20781278 ## Create a Client Cache based on Apache commons Client Cache. * _Suggested by **Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: TODO _ +* _Supervisor_: +* _Suitability_: TODO +* _Description_: TODO * http://hc.apache.org/httpcomponents-client-ga/httpclient-cache/index.html * http://labs.xfinity.com/benchmarking-the-httpclient-caching-module ## Add SSL support to Eiffel Net * _Suggested by **Jocelyn**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description:_ Currently Eiffel Net does not provide any support to SSL (thus no HTTPS). For now Eiffel application often use the Eiffel cURL wrapper which provide SSL, but it would be more convenient to use directly Eiffel Net. Then find solution to add SSL support to EiffelNet, or to extend EiffelNet with an EiffelNet+OpenSSL solution, or other. +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Currently Eiffel Net does not provide any support to SSL (thus no HTTPS). For now Eiffel application often use the Eiffel cURL wrapper which provide SSL, but it would be more convenient to use directly Eiffel Net. Then find solution to add SSL support to EiffelNet, or to extend EiffelNet with an EiffelNet+OpenSSL solution, or other. ## Build clients to consume popular RESTful APIs * _Suggested by **Jocelyn & Javier**_ -* _Supervisor: _ -* _Suitability: TODO _ -* _Description: _ Build Eiffel libraries to consume popular web APIs, such as: +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Build Eiffel libraries to consume popular web APIs, such as: - Google Discovery APIs - Twitter - Facebook @@ -215,9 +215,3 @@ 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 Suggestions]] to suggest new project, or request a feature. -We'll move the content to this page for time to time. -Please provide: -* a short title -* a description -* eventual requirement -* "_Suggested by_": so that we know who suggested a feature. \ No newline at end of file From 693b5b2d1b4fa91e7991ec1a56f67be826cdb89b Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:40:22 -0700 Subject: [PATCH 22/28] Updated Projects Suggestions (markdown) --- Projects---Suggestions.md => Projects--Suggestions.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects---Suggestions.md => Projects--Suggestions.md (100%) diff --git a/Projects---Suggestions.md b/Projects--Suggestions.md similarity index 100% rename from Projects---Suggestions.md rename to Projects--Suggestions.md From 681e331dec24f22671f199f600912025adcc5733 Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:40:44 -0700 Subject: [PATCH 23/28] Updated Projects Suggestions (markdown) --- Projects--Suggestions.md => Projects-new-suggestions.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Projects--Suggestions.md => Projects-new-suggestions.md (100%) diff --git a/Projects--Suggestions.md b/Projects-new-suggestions.md similarity index 100% rename from Projects--Suggestions.md rename to Projects-new-suggestions.md From 55fc25b25869a066131108c9ca49d0114389809e Mon Sep 17 00:00:00 2001 From: jocelyn Date: Mon, 13 Aug 2012 03:41:07 -0700 Subject: [PATCH 24/28] Updated Projects (markdown) --- Projects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Projects.md b/Projects.md index 5cf4823e..dda1a146 100644 --- a/Projects.md +++ b/Projects.md @@ -214,4 +214,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 Suggestions]] to suggest new project, or request a feature. +Use the following page [[Projects new suggestions]] to suggest new project, or request a feature. \ No newline at end of file From a29bbab0a8dbd46b3c400181806455f9f4dce10a Mon Sep 17 00:00:00 2001 From: jocelyn Date: Tue, 14 Aug 2012 01:16:50 -0700 Subject: [PATCH 25/28] Updated Projects (markdown) --- Projects.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/Projects.md b/Projects.md index dda1a146..ad4f235f 100644 --- a/Projects.md +++ b/Projects.md @@ -137,11 +137,25 @@ If you are a student, don't hesitate to pick one, or even suggest a new project, - Facebook Connect * The goal is to provide component to consume other popular API/service, but also component for your own service so that other can consume it. -## Design a state machine to serve response +## Security: provide popular authentication mechanisms * _Suggested by **Jocelyn**_ * _Supervisor_: * _Suitability_: TODO -* _Description_: In the world of Hypermedia API, the notion of state machine is pertinent, but this could also be used to provide a multi-page web form. +* _Description_: Any web service, web site, API need a reliable authentication mechanism, the could be on the server side or the client side to build mashup service (integrate with other web API such as google, flicker, ...). So far, EWF provides only basic HTTP Authorization, and application would need more solutions such as : + - OAuth: consumer and provider + - OpenID + - Google Connect + - Facebook Connect +* The goal is to provide component to consume other popular API/service, but also component for your own service so that other can consume it. + +## Provide a SSO (Single Sign On) implementation (server, and clients) +* _Suggested by **Jocelyn**_ +* _Supervisor_: +* _Suitability_: TODO +* _Description_: Design and build a Single Sign On implementation for Eiffel. That should include the authentication server, and at least one Eiffel client component (it would be convenient to also provide php, js, ...). In the same spirit, having Eiffel client for popular SSO server would be appreciated as well. +* _Reference_: + - http://en.wikipedia.org/wiki/Single_sign-on + - http://en.wikipedia.org/wiki/List_of_single_sign-on_implementations ## library: Template engine * _Suggested by **Jocelyn**_ From 61b7f89e3bfc881d9422736d43aba3bdc4b8b968 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 28 Aug 2012 16:45:25 +0200 Subject: [PATCH 26/28] Fixed source code for building and installing the ISE Wizard --- tools/ise_wizard/custom/ewf.dsc | 4 ++ .../ise_wizard/custom/resources/template.ecf | 21 +++++++ tools/ise_wizard/ewf.dsc | 2 +- tools/ise_wizard/ewf_ise_wizard-safe.ecf | 7 ++- ...tall_wizard.bat => install_ise_wizard.bat} | 4 +- .../ise_wizard/install_ise_wizard_custom.bat | 21 +++++++ tools/ise_wizard/src/ewf_custom_wizard.e | 55 +++++++++++++++++++ tools/ise_wizard/src/ewf_wizard.e | 10 ++-- 8 files changed, 113 insertions(+), 11 deletions(-) create mode 100644 tools/ise_wizard/custom/ewf.dsc create mode 100644 tools/ise_wizard/custom/resources/template.ecf rename tools/ise_wizard/{install_wizard.bat => install_ise_wizard.bat} (69%) create mode 100644 tools/ise_wizard/install_ise_wizard_custom.bat create mode 100644 tools/ise_wizard/src/ewf_custom_wizard.e diff --git a/tools/ise_wizard/custom/ewf.dsc b/tools/ise_wizard/custom/ewf.dsc new file mode 100644 index 00000000..2524dfd6 --- /dev/null +++ b/tools/ise_wizard/custom/ewf.dsc @@ -0,0 +1,4 @@ +NAME="EWF: Eiffel Web Framework application, multi-platform, with EWF source code" +DESCRIPTION="Create a web server application based on the cross-platform library EWF. Using the original source code of EWF (i.e: not the one in $ISE_LIBRARY)" +LOCATION="ewf_custom" +PLATFORM="all" diff --git a/tools/ise_wizard/custom/resources/template.ecf b/tools/ise_wizard/custom/resources/template.ecf new file mode 100644 index 00000000..0fe0b5e3 --- /dev/null +++ b/tools/ise_wizard/custom/resources/template.ecf @@ -0,0 +1,21 @@ + + + + + + /EIFGENs$ + /CVS$ + /.svn$ + + + + + + + + + + + diff --git a/tools/ise_wizard/ewf.dsc b/tools/ise_wizard/ewf.dsc index 85b6a364..cf62696d 100644 --- a/tools/ise_wizard/ewf.dsc +++ b/tools/ise_wizard/ewf.dsc @@ -1,4 +1,4 @@ -NAME="Eiffel Web Framework application, multi-platform, with EWF" +NAME="EWF: Eiffel Web Framework application, multi-platform, with EWF" DESCRIPTION="Create a web server application based on the cross-platform library EWF." LOCATION="ewf" PLATFORM="all" diff --git a/tools/ise_wizard/ewf_ise_wizard-safe.ecf b/tools/ise_wizard/ewf_ise_wizard-safe.ecf index aede67cd..fa4c6cd1 100644 --- a/tools/ise_wizard/ewf_ise_wizard-safe.ecf +++ b/tools/ise_wizard/ewf_ise_wizard-safe.ecf @@ -1,6 +1,6 @@ - - + + /.git$ @@ -15,4 +15,7 @@ + + + diff --git a/tools/ise_wizard/install_wizard.bat b/tools/ise_wizard/install_ise_wizard.bat similarity index 69% rename from tools/ise_wizard/install_wizard.bat rename to tools/ise_wizard/install_ise_wizard.bat index 61c27d84..3aa39e7c 100644 --- a/tools/ise_wizard/install_wizard.bat +++ b/tools/ise_wizard/install_ise_wizard.bat @@ -2,10 +2,10 @@ setlocal rd /q/s tmp mkdir tmp -ecb -config ewf_ise_wizard-safe.ecf -finalize -c_compile -project_path tmp +ecb -config ewf_ise_wizard-safe.ecf -target wizard -finalize -c_compile -project_path tmp mkdir spec mkdir spec\%ISE_PLATFORM% -move tmp\EIFGENs\ewf_ise_wizard\F_code\ewf_ise_wizard.exe spec\%ISE_PLATFORM%\wizard.exe +move tmp\EIFGENs\wizard\F_code\wizard.exe spec\%ISE_PLATFORM%\wizard.exe rd /q/s tmp set WIZ_TARGET=%ISE_EIFFEL%\studio\wizards\new_projects\ewf diff --git a/tools/ise_wizard/install_ise_wizard_custom.bat b/tools/ise_wizard/install_ise_wizard_custom.bat new file mode 100644 index 00000000..f1b46778 --- /dev/null +++ b/tools/ise_wizard/install_ise_wizard_custom.bat @@ -0,0 +1,21 @@ +setlocal + +rd /q/s tmp +mkdir tmp +ecb -config ewf_ise_wizard-safe.ecf -target custom_wizard -finalize -c_compile -project_path tmp +mkdir custom +mkdir custom\spec +mkdir custom\spec\%ISE_PLATFORM% +move tmp\EIFGENs\custom_wizard\F_code\wizard.exe custom\spec\%ISE_PLATFORM%\wizard.exe +rd /q/s tmp + +set WIZ_TARGET=%ISE_EIFFEL%\studio\wizards\new_projects\ewf_custom +rd /q/s %WIZ_TARGET% +mkdir %WIZ_TARGET% +xcopy /I /E /Y %~dp0\pixmaps %WIZ_TARGET%\pixmaps +xcopy /I /E /Y %~dp0\resources %WIZ_TARGET%\resources +copy %~dp0\custom\resources\* %WIZ_TARGET%\resources +xcopy /I /E /Y %~dp0\custom\spec %WIZ_TARGET%\spec +copy %~dp0custom\ewf.dsc %WIZ_TARGET%\..\ewf_custom.dsc + +endlocal diff --git a/tools/ise_wizard/src/ewf_custom_wizard.e b/tools/ise_wizard/src/ewf_custom_wizard.e new file mode 100644 index 00000000..4141da07 --- /dev/null +++ b/tools/ise_wizard/src/ewf_custom_wizard.e @@ -0,0 +1,55 @@ +note + description : "Objects that ..." + author : "$Author$" + date : "$Date$" + revision : "$Revision$" + +class + EWF_CUSTOM_WIZARD + +inherit + EWF_WIZARD + redefine + get_information, + generate_project + end + +create + make + +feature -- Form + + get_information + do + if attached string_question ("Location of EWF source code (by default $EWF_DIR)?", Void, Void, False) as pn then + ewf_dir := pn.string + else + ewf_dir := "$EWF_DIR" + end + Precursor + end + +feature -- Generation + + generate_project (a_layout: WIZARD_LAYOUT) + do + if attached ewf_dir as d then + variables.force (d, "EWF_DIR") + Precursor (a_layout) + else + die (-1) + end + end + +feature -- Access + + ewf_dir: detachable READABLE_STRING_8 + +feature -- Change + +feature {NONE} -- Implementation + +invariant +-- invariant_clause: True + +end diff --git a/tools/ise_wizard/src/ewf_wizard.e b/tools/ise_wizard/src/ewf_wizard.e index 0967bd66..8e4cc8fa 100644 --- a/tools/ise_wizard/src/ewf_wizard.e +++ b/tools/ise_wizard/src/ewf_wizard.e @@ -25,8 +25,6 @@ feature {NONE} -- Initialization end end -feature -- Status - feature -- Access project_directory_name: detachable READABLE_STRING_8 @@ -65,7 +63,7 @@ feature -- Form projet_name := "ewf" end - if boolean_question ("Do you want to use router (Y|n) ? ", <<["y", True], ["Y", True]>>, "Y") then + if boolean_question ("Do you want to use WSF_ROUTER (Y|n) ? ", <<["y", True], ["Y", True]>>, "Y") then use_router := True router_type := "uri-template" else @@ -131,13 +129,13 @@ feature -- Form d.recursive_create_dir end create tfn.make_from_string (dn.string) - tfn.set_file_name ("ewb_application") + tfn.set_file_name ("ewf_application") tfn.add_extension ("e") if attached router_type as rt then check rt.same_string ("uri-template") end - copy_resource_template ("ewb_application-"+ rt +".e", tfn.string) + copy_resource_template ("ewf_application-"+ rt +".e", tfn.string) else - copy_resource_template ("ewb_application.e", tfn.string) + copy_resource_template ("ewf_application.e", tfn.string) end create tfn.make_from_string (dn.string) From 0c110169de2266aa2d2965df22c5d50aee4b56e7 Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Tue, 28 Aug 2012 17:06:14 +0200 Subject: [PATCH 27/28] fixed location of ewf.ini for ISE wizard --- tools/ise_wizard/src/ewf_wizard.e | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/ise_wizard/src/ewf_wizard.e b/tools/ise_wizard/src/ewf_wizard.e index 8e4cc8fa..9d6f08a6 100644 --- a/tools/ise_wizard/src/ewf_wizard.e +++ b/tools/ise_wizard/src/ewf_wizard.e @@ -119,6 +119,13 @@ feature -- Form tfn.add_extension ("ecf") copy_resource_template ("template.ecf", tfn.string) + create tfn.make_from_string (dn.string) + + tfn.set_file_name ("ewf") + tfn.add_extension ("ini") + copy_resource_template ("ewf.ini", tfn.string) + + create res.make (tfn.string, d.name) create dn.make_from_string (pdn) @@ -138,11 +145,6 @@ feature -- Form copy_resource_template ("ewf_application.e", tfn.string) end - create tfn.make_from_string (dn.string) - - tfn.set_file_name ("ewf") - tfn.add_extension ("ini") - copy_resource_template ("ewf.ini", tfn.string) send_response (res) end From bd15133e2b11b89b3b855228d53b45bbb3f9d53f Mon Sep 17 00:00:00 2001 From: Jocelyn Fiat Date: Fri, 31 Aug 2012 07:03:15 +0200 Subject: [PATCH 28/28] Also convert from STRING_8 to URI_TEMPLATE (not only from READABLE_STRING_8) --- library/text/parser/uri_template/src/uri_template.e | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/text/parser/uri_template/src/uri_template.e b/library/text/parser/uri_template/src/uri_template.e index 1a7587d5..b1bc3a4a 100644 --- a/library/text/parser/uri_template/src/uri_template.e +++ b/library/text/parser/uri_template/src/uri_template.e @@ -24,7 +24,7 @@ create {URI_TEMPLATE} make_from_uri_template convert - make ({READABLE_STRING_8}) + make ({READABLE_STRING_8, STRING_8}) feature {NONE} -- Initialization