Use cases

I wanted to include an html version of the finished mockup page in this blog, but couldn’t work out how. I converted it to a pdf but the conversion didn’t work properly – the layout’s broken and the colours aren’t right. So, i just did a screengrab instead:Page layout mockup

Anywa, next step – use cases. Those things i learnt about in Software Engineering. I’m going to do the brief ‘success’ use cases first, ie the case where the user does exactly what they’re supposed to and nothing weird happens.

1.1.1 User selects “add a story”

Actor – user

Preconditions – user has logged in

Postconditions – A new story is added to the database, linked to the correct item.

Description – The user clicks on the ‘add story’ link. They are taken to the story editor page, which creates a blank story, linked into the correct item, but not yet added to the database. The user types in their text, and has the option of inserting pictures or videos at specific points in the text (they can also just add a movie and no text if they want). They insert two pictures and a movie clip. They also enter some text for the title and the summary (these are required). They hit ‘submit’ and the story is added to the database, linked with the correct main story.

 

1.1.1 User adds a new comment

Actor – user

Precondition – user has logged in

Postcondition – a new comment is added to the comments list in the database.

Description – The user clicks on the ‘add comment’ link. They are taken to the comment editor page, which creates a blank comment, linked to the correct item. They type in some text (limited by number of characters) and hit the ‘submit’ button. The comment is added to the database.

1.1.2 User adds a link

Actor – user

Precondition – user has logged in

Postcondition – a new link is added to the links list in the DB

Description – The user clicks on the ‘add link’ link. They are taken to the add link page, which requires a url, a title (which is be pulled from the page linked to by the URL) and a brief text summary. The user enters a URL, and the title is retrieved automatically by the add link page. The user enters a brief summary text, and hits submit. The link is added to the database.

OK, that’s some basic and pretty obvious use cases.  I’m going to focus on those for now.  Looking at these, i can see the following domain entities, ie things we’re going to model.

 

domain entities

 That’s enough to start making our DB.  I’m going to start with a simple rails app that holds a list of comments, without worrying initially about whether a comment is a reply to another comment.

 

 

 

Advertisements

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