HighDots Forums  

Where to save temp data?

Ruby On Rails Talk Ruby On Rails programming language mailing list


Discuss Where to save temp data? in the Ruby On Rails Talk forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Heinz Strunk
 
Posts: n/a

Default Re: Where to save temp data? - 11-09-2009 , 12:16 PM






No no no, you understood me wrong. It's just a form where you can add
users to the object that is being created. It's a form, you click on add
user you go to another page, add as many users as you want, go back to
the main form.
I need to know how many users have been added, which ones and if the
maximum is reached.

Is it more clear now?
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #12  
Old   
Colin Law
 
Posts: n/a

Default Re: Where to save temp data? - 11-09-2009 , 12:25 PM






2009/11/9 Heinz Strunk <rails-mailing-list (AT) andreas-s (DOT) net>:
Quote:
No no no, you understood me wrong. It's just a form where you can add
users to the object that is being created. It's a form, you click on add
user you go to another page, add as many users as you want, go back to
the main form.
I need to know how many users have been added, which ones and if the
maximum is reached.

Is it more clear now?
Yes, in that case I would use the session, if you are really sure you
can't just update the db as you go along. What is the issue with just
updating the db as you go? The user will get really hacked off if he
spends half an hour entering multiple forms only to lose it all when
he loses connection for some reason.

Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #13  
Old   
Heinz Strunk
 
Posts: n/a

Default Re: Where to save temp data? - 11-09-2009 , 12:59 PM



Colin Law wrote:
Quote:
2009/11/9 Heinz Strunk <rails-mailing-list (AT) andreas-s (DOT) net>:

No no no, you understood me wrong. It's just a form where you can add
users to the object that is being created. It's a form, you click on add
user you go to another page, add as many users as you want, go back to
the main form.
I need to know how many users have been added, which ones and if the
maximum is reached.

Is it more clear now?

Yes, in that case I would use the session, if you are really sure you
can't just update the db as you go along. What is the issue with just
updating the db as you go? The user will get really hacked off if he
spends half an hour entering multiple forms only to lose it all when
he loses connection for some reason.

Colin
Well, good point but I'm not sure if I unerstood what you exactly mean
by update db as you go. The group and it's users (which are being added
in the sub form) have a m:n-relation so you'd create that relaion for
each and every user being added and delete it again if something goes
wrong or the user hits the cancel button? Looks like a lot of
unnecessary db traffic to me. Or would you create another table only for
the temp data?
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #14  
Old   
Colin Law
 
Posts: n/a

Default Re: Where to save temp data? - 11-09-2009 , 05:01 PM



2009/11/9 Heinz Strunk <rails-mailing-list (AT) andreas-s (DOT) net>:
Quote:
Colin Law wrote:
2009/11/9 Heinz Strunk <rails-mailing-list (AT) andreas-s (DOT) net>:

No no no, you understood me wrong. It's just a form where you can add
users to the object that is being created. It's a form, you click on add
user you go to another page, add as many users as you want, go back to
the main form.
I need to know how many users have been added, which ones and if the
maximum is reached.

Is it more clear now?

Yes, in that case I would use the session, if you are really sure you
can't just update the db as you go along. Â*What is the issue with just
updating the db as you go? Â*The user will get really hacked off if he
spends half an hour entering multiple forms only to lose it all when
he loses connection for some reason.

Colin

Well, good point but I'm not sure if I unerstood what you exactly mean
by update db as you go. The group and it's users (which are being added
in the sub form) have a m:n-relation so you'd create that relaion for
each and every user being added and delete it again if something goes
wrong or the user hits the cancel button? Looks like a lot of
unnecessary db traffic to me. Or would you create another table only for
the temp data?
I do not know enough about the application to say much more. I was
suggesting updating the actual data rather than a temp table, but it
was only a suggestion. I generally would suggest to do things the
easiest way initially and only complicate it it if becomes necessary,
though which is the easy way in your case I do not know. Certainly
don't worry about the db traffic unless it becomes an issue.

Whichever route you go down make sure you have tests in place so you
can refactor later and know it still works.

Colin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
  #15  
Old   
Heinz Strunk
 
Posts: n/a

Default Re: Where to save temp data? - 11-10-2009 , 03:31 AM



Colin Law wrote:
Quote:
I do not know enough about the application to say much more. I was
suggesting updating the actual data rather than a temp table, but it
was only a suggestion. I generally would suggest to do things the
easiest way initially and only complicate it it if becomes necessary,
though which is the easy way in your case I do not know. Certainly
don't worry about the db traffic unless it becomes an issue.

Whichever route you go down make sure you have tests in place so you
can refactor later and know it still works.

Colin
Alright, thanks a lot to all of you! I'll keep both solutions in mind
and see what's easier to use.
--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk (AT) googlegroups (DOT) com
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe (AT) googlegroups (DOT) com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.