This is the first part of the series Symfony2 Tutorial for Beginners. It will give a short overview over the functionality of the website we are going to build.
For the purpose of this tutorial, I will keep the functionality that will need to be planned at a minimum.
We will develop a Website which will have an Impressum (static page), a contact page (interactive page), and a page which lists news posted by a site admin (persistence). The news may be in one or more categories.
Following is a very short overview over the requirements of the website. As it will be quite small, I did not draw diagrams or fully formulate all use cases. Neither did I sketch out the view or create uml diagrams. If you are planning a bigger website, you might want to do all that (and everything else that belongs in a proper Product Requirement Document).
We will need an Admin Entity with the following fields:
The nickname will be the name displayed in the news-posts, the username the one used to log in to the admin area.
Because it might well be that we will have to introduce other users in the near future, we will not name this Entity Admin but User and let the Admin Entity extend the User Entity
Furthermore we will need a Post Entity with the following fields:
- title – the title that will be displayed
- content – the actual news
- creation date – the date this Post-Instance was first created
- last updated – the date this Post-Instance was last updated
- user – the user which posted the news
- categories – the categories this post is in
And last we need a Category Entity:
- posts – the posts in this category
As I am not a Designer, we will keep the views as simple as possible. No planning will be needed.
As there are not very many use cases, I will not create a use case diagram. The use case descriptions will also be held quite short.
- sends a message via contact page: The User sends a message via the contact page. Afterwards, a message will be shown informing the user of the success or failure of the action.
- views a news list: The user views a paginated list of all the news sorted by date.
- views a single news post
- views a list of news in a category: The user views a paginated list of all the news sorted by date in a certain category.
admin user (extends user):
- creates news post: The Admin can create a post. It is also possible, to assign it to one or more categories on creation.
- creates a category
- adds category to post
- deletes post
- deletes category: The Admin deletes a category. The posts in the category will not be deleted (but they will not be in this category anymore)
The next part of this tutorial is: Netbeans and Symfony2 – Setting everything up
Overview over all parts: Symfony2 Tutorial for Beginners