spring-projects / spring-webflow

Spring Web Flow
https://spring.io/projects/spring-webflow
Apache License 2.0
331 stars 234 forks source link

Add support for generating flows that CRUD (create/read/update/delete) domain entities [SWF-369] #189

Open spring-operator opened 17 years ago

spring-operator commented 17 years ago

Keith Donald opened SWF-369 and commented

We can generate flows from minimal metadata based on conventions. e.g. what is shown above is a basic flow to edit this account. We should be able to get that down to something like:

When a stateless action model is desired, the above would register flows engineered at runtime exposed at the URLs: GET http://localhost:8080/app/account/list -> list all your accounts GET http://localhost:8080/app/account/new -> show a form to create a new account GET http://localhost:8080/app/account/1 -> show account with id 1 GET http://localhost:8080/app/acocunt/1/edit -> show edit form for account with id 1 POST http://localhost:8080/app/account -> create account with id 1 PUT http://localhost:8080/app/account/1 -> update account with id 1 DELETE http://localhost:8080/app/account/1 -> delete account with id 1 --- **Affects:** 1.0.4 **Issue Links:** - #1187 Make the Flow Definition Registry Implementation Namespace Aware (_**"depends on"**_) - #1225 Allow users to specify the namespace to register a flow in (_**"depends on"**_) 7 votes, 9 watchers
spring-operator commented 17 years ago

Sören Chittka commented

CRUD-Flows are a really good idea, I'd like to see this feature very soon.

But I think the semantics of a POST-request should be different: POST http://localhost:8080/app/account -> create account with id generated by server, redirect to http://localhost:8080/app/account/[generated id]

This is how RFC2616 (HTTP/1.1) defines this semantics for POST. PUT can be used to create and/or update resources at a known location (as shown in your previous posting).

spring-operator commented 17 years ago

nebhale commented

That is correct and the description has been updated.