At what point does the form lose its “model” and become a document?

I thought a lot and learned a lot about the forms that recently tried to add additional extensions to the Spree ECommerce platform: subscriptions, events, donations, and all kinds of surveys.

Every example that I have ever met (in blogs , in docs , in screencasts , in source code , etc.) makes forms from Models , but they never go to anything semi-structured or unstructured (or simply to really dynamic ), So, you have such forms as:

  • Contact form (user model may also be divided into address model).
  • Registration form (user model, account model, address model, etc.).
  • Blog post form (publication model, tag model, etc.).
  • Order form (delivery model, order model, LineItem model, etc.).

All of them make perfect sense: they are the culmination of 10 thousand, even millions of human hours. Tons of people slowly abstracted these things into almost universal “models” that could be stored in a database table. So, now we all create models for them and create database tables for them.

But there are so many other things that cannot be reduced to these specific models. Things like polling for a particular event, with form fields such as:

  • You are pregnant?
  • How many children do you have?
  • Have you ever been sick?
  • What is your fastest mile?

, 100 1000 , "".

, , , "" "", "" "" (Form ~ Survey ~ Questionnaire ).

:

  • ResponseSet ( )
  • ( )

"", .

, : , , ( " " "", Spree, 10 ), / / /? ?

- " - , SomeTutorialModel, TutorialModel, ., Surveyor gem". - :).

, , - .

, , CouchDB, , , . MySQL .

+3
1

, , , :

1.) () , /

2.) AFAIK, . Google /, ,

3.) ,

0

Source: https://habr.com/ru/post/1732176/


All Articles