Research Log of Web Science Students

Computer Science is not simply programming

Save Project Drafts

leave a comment »

Adding a project

After the project draft was saved

Editing a project

After saving another revision

It’s interesting to note that the ids of the learning objects above have changed after each save! I am cheating a little bit here. There’s a 3 story hierarchy in my Project model.

Project contains a Learning activity which contains a resource and a set of learning objects. Ideally to save a draft I would have to associate each learning object form (description input text box + link input textbox) with the id of the learning object and

1. make a roundtrip to the server when I add a learning object
2. make another roundtrip to the server when I delete a learning object.
3. make yet another roundtip to the server when I edt a learning object….

all to retrieve the specific learning object via it’s id and perform a crud operation.

This is something which is really hard to do right now. Besides it’s hard to change how the code is written now to accommodate a cleaner implementation.

I thought the easiest way to save a draft was to keep the key of
the Project form and then when I needed to save a draft I delete the previous revision entirely and save the new revision but keeping the key.

Not very clean (I am not proud of it) but it works and it’s something I have to live with right now. Cheers! 😀

Advertisements

Written by Jose Asuncion

December 25, 2009 at 3:21 am

Posted in Hardwire

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: