Home > 2011 Winter BTI420 > BTI420 Assignment – Blogging component

BTI420 Assignment – Blogging component

February 11, 2011 Leave a comment Go to comments

This document is “version 1.1” of the specifications for the BTI420 Programming Assignment’s blogging component. It was most recently updated on Wednesday, March 9, 2011, at 5:00pm ET.

.

Introduction

MyWebCMS will include blogging functionality. This document has the initial specifications for the blogging component (enough to enable you to get started right away).

Please note that the specifications may change, for a number of reasons. You are responsible for meeting the most recent version of the specifications.

.

Purpose of the blog component, for the public

Your blog will enable readers to follow your progress, as you work on this assignment. You can also use the blog to comment on other things in life and the world around you.

.

Purpose of the blog component, for you, the BTI420 student

The blog component will enable you to learn and apply many of the concepts and techniques that are taught in the BTI420 course. They include the following:

Implementing master pages, and templated content in general.

Activating a security scheme, which allows you (as the web site owner) to create blog content, while the public typically has read-only access.

Using Entity Framework to help you persist your web site content.

Helping you document your progress, as you work on the assignment.

Enabling you to show early and substantive progress of your assignment work, to promote the best possible chance at success.

.

Specifications, version 1.1

MyWebCMS will have a blogging component.

The component will include the following programmed assets:

  • An index page, which provides list of posts that match visitor-provided criteria
  • A post page, which displays a post
  • An editor page, which enables you (as the blog owner) to create and edit a post
  • An Entity Framework data model
  • A persistent store, implemented as a database on SQL Server
  • Other ASP.NET Web Forms app assets and components

.

Your initial effort will probably use standard pages. Soon, you will learn ASP.NET Routing, which will change the way you program your pages.

You, as the operator of MyWebCMS (and the user who is in the “Administrator” role), will be the only one creating blog posts. When you login to MyWebCMS, you will be able to create and edit your posts. A blog post can have three levels of visibility:

  • Public – available to anonymous visitors to your web site
  • Member – available to authenticated visitors (members can also read public posts)
  • Admin – available to you only (admin can also read member and public posts)

.

All kinds of visitors will be able to add a comment to a post, and a comment will be identified with visitor information.

During Week 6 of the BTI420 course, you will learn ASP.NET Membership, which is the component that enables authenticated access to authorized web site resources.

When you write a blog post, you will use a rich text editor, which is implemented as a JavaScript component. (See CKEditor for an example; you will learn how to implement it just after the study week break.)

All blog component pages – and all pages in MyWebCMS – will use master pages.

The following is a suggested initial design for the entity objects in the blog component. It is likely that your design will change, but the initial design will enable you to get started with the programming. Click on the image below, and a new browser tab/window will open, showing a full-size image. Below the image, the entities are briefly described.

.

Document entity

This entity models a blog post. For blog posts, you will have to set its “DocumentType” property to “Blog”.

This entity will also work for a wiki page (document). For a wiki page, you will have to set its “DocumentType” property to “Wiki”.

.

Category entity

This entity models a category. This enables you, as the blog author, to categorize your documents. This in turn facilitates indexing and grouping, and search by visitors.

Document and Category have a many-to-many relationship.

  • A Document can have a collection of zero or more Categories
  • A Category can have a collection of zero or more Documents

Note that “zero or more” means that it is possible to create and access a Document that is not in any Categories, and looking at it the other way, it is possible to create and access a Category that has not yet been used by any specific Document.

.

Comment entity

This entity models a comment. Users of MyWebCMS will be able to post comments on your blog posts (and wiki pages).

Document and Comment have a one-to-many relationship.

  • A Document can have a collection of zero or more Comments
  • A Comment is related to only one Document

.

In addition, Comment has a relationship to itself. This enables you to support a scenario where a comment is a reply to another comment.

  • A Comment can have a collection of zero or more Comments as replies
  • A Comment can be configured as a reply to another specific Comment, or not

.

DigitalContent entity

This entity models digital content of any kind. The implementation enables a blog post to have “attachments”.

Document and DigitalContent have a many-to-many relationship.

  • A Document can have a collection of zero or more DigitalContents as attachments
  • A DigitalContent can have a collection of zero or more Documents

Note that “zero or more” means that it is possible to create and access a Document that does not have any DigitalContent attachments, and looking at it the other way, it is possible to create and access a DigitalContent item that is not related to any specific Document.

.

When designing your entities…

You should use the “model first” approach when you design your entities. That is, create a new entity data model (called “Assignment”). Then, when the wizard asks to “Choose Model Contents”, select “Empty model”.

The “string” properties must be configured with reasonable “Max Length” size values. (If you skip this step, all the database table “string” columns will be configured as varchar(MAX), which is not appropriate.) Here are some suggestions for reasonable sizes:

  • Short string properties (like Author and so on) should allow about 50 characters
  • Medium-length string properties (like Title, Slug, and so on) should allow about 100 characters
  • Longer string properties (like Synopsis, Description, and so on) should allow about 500 characters

In contrast, the “Content” property in the Document or DigitalContent entities should not have a Max Length.

.

More about the blogging component

Only you, in the “Administrator” role, will be able to create and edit wiki pages. (Before you publicly release MyWebCMS on April 7, you will create another “Administrator” user for your professor to use while testing and grading your web site.)

Content for the blog posts will be in the persistent store. You will create a number of pages to support your blog:

  • A blog home page, with suitable content; typically, this is a nicely-formatted list of the most recent five posts, in descending order by date and time
  • A viewer page, which shows the content of one blog post
  • An editor page, which enables an Administrator to create or edit a blog post

.

The blog home page will probably use a ListView or Repeater web server control. The master page for the blog posts must also provide a way to select posts by category, or by date, or some other criteria.

The Slug text must be unique for a blog post. It needs to be unique, to support search and retrieval later on. Slug text includes only lower-case alphabetic characters, digits, and a dash (-). It must begin with a character.

The viewer page will use ASP.NET Routing. It will gracefully show a message if there’s no match for the slug. The page will also list the blog post’s attachments (probably at the bottom), and enable the visitor to view or download them.

The editor page will use a rich text editor.

There are (at least) two ways to enable and support the creation and editing of blog posts, and you will implement one of them:

  1. Create a blog management page, available only to the Administrator role. It will list the blog posts, and offer links that enable the Administrator to select one for editing. It will also include a link for the creation of a new blog post.
  2. Add (probably) a LoginView control to the appropriate page, which shows links to only the Administrator. For example, the blog home page could show the “new blog post” link, and the viewer page could show the “edit this post” link.

.


Advertisements
Categories: 2011 Winter BTI420
  1. No comments yet.
  1. No trackbacks yet.

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: