Archive

Posts Tagged ‘layout’

BD-review

July 29th, 2009 bodom_lx No comments

BD-review is a dynamic website to allow people to review releases (albums, demos, EPs, singles) of (young, unsigned) music bands. The project is the outcome of the Internet Technologies course at the Faculty of Computer Science of the Free University of Bolzano.  The requirements of the project were to build a website using a small subset of JavaEE technologies, without the use of web-frameworks.

Therefore, this project is not really meant for production use. It was made as a strong, working and correct base for studying JavaEE academically. It should be useful for every student (also non-student) willing to have an overview on JSP and study it. The code is well-written, uses MVC, and the whole project is documented in detail in a 20+ pages report.

A screenshot of a Review

A screenshot of a Review

I encourage to read the PDF report of the project. It contains detailed information about the analysis and design phases, as well as the architecture description, screenshots, problems found etc. Please read also the README file. It contains configuration instructions.

There is a running demo located on the evaluation server of the course, but I think it will be removed soon.

Quick Jump:

Vision

Requirements Implemented

Technologies Overview

Download

License

Vision

The aim of the project is to build a dynamic website to allow people to review releases (albums, demos, EPs, singles) of (young, unsigned) music bands. Users will be able to signal interesting materials and review them, while other users will be able to comment the reviews, too.
This web 2.0-oriented application should allow unknown talented musicians to achieve a higher notoriety but also to improve their productions.

Screenshot of the personal user page

Screenshot of the personal user page

Requirements Implemented

I report here the requirements of the course, all implemented by BD-review:
What BD-review implements is:

  • User Management
    • List existing users of the system
    • Creation of a new user
    • Deletion of the existing user
  • List and modify access rights of the users
    • check boxes with some capabilities (min 3)
  • User registration and login to the system
  • Items management
    • Users add, edit or remove items
    • Users comments or reviews items
    • Administrator can manage the comments (edit,remove, add)
  • Personalization
    • Salutation for a returning user
    • List resources that are new from the last visit
    • Customization of the layout for a class of users.
  • Techniques – MUST be used
    • Static HTML
    • CSS: all the look and feel must be in CSS files
    • Javascript: check input and manage menus
    • Servlet: Reading (parameters and headers) and writing headers and resulting page
    • Servlet: Session management with cookies and session object
    • Servlet: Redirect the client
    • Servlet: Forward to another page or servlet
    • JSP: Expressions, scriptlets and declarations Beans
    • DBMS access trough JDBC
    • Integration of JSP and Servlets (forward and include) using MVC pattern.

In addition, BD-review implements two Filters and plays with Regular Expressions.

Technologies Overview

  • J2EE technologies (JSP, Servlets and JavaBeans)
  • Database support (PostgreSQL 8.3) through JDBC 4
  • XHTML Strict 1.0 + Cascading Style Sheets 2.1 for presentation
  • Apache Commons for conversion and Bean population routines
  • Some utility methods found on Books and Internet (their provenience is cited in the sourcecode)
  • Javascript for confirmation system and form validation
  • Regular Expressions
  • TinyMCE rich WYSIWYG HTML editor
Screenshot: modifying a Review

Screenshot: modifying a Review

Download

PDF report of the project
Complete Source Code and Documentation (as Netbeans Project)

The Future

There will not be future developments for the project. It was not a real-life project but I will be very proud if you find it an useful example for learning JSP. You can also use it as a basis for developing a real project (also a University Project). You can do anything you want with BD-review, but please respect the license. I would be happy if you send me an email about your experience in using BD-review.

License

BD-review is released under The Gnu Affero GPL version 3! This is different from the license of the contents of the blog

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program. If not, see < http ://www.gnu.org/licenses/ >.

Related posts

Unipoli

June 11th, 2009 bodom_lx No comments

Unipoli is a simple simulation of the very popular board game Monopoly by Hasbro. Unipoli is the Java outcome of the Programming Project course I followed in Academic Year 2007 – 2008.

I don’t know for how long the official project page will stay on Unibz servers, therefore I’m keeping this page on task3.

Project Members

  • Riccardo Buttarelli
  • Daniel Graziotin
  • Martin Leitgeb
  • Massimiliano Pergher

Mission Statement

This document was the first step made in facing the project:
The project will provide a simple simulation of the very popular board game Monopoly. Unipoli will allow a multiplayer experience (up to 8 human players) on the same machine but not over a network.
We will implement the classical Standard (Atlantic City version) Monopoly game board layout, produced by Charles Darrow, and later by Parker Brothers.
However, by virtue of being a virtual implementation of the real game, Unipoli will overtake some aspects of the real Monopoly game, giving to the players unique visual experiences. As example, we will highlight owned lands with the color associated to their owners. When a player decides to sell a property, the board will be obscured, leaving the lands owned by the player well visible.
Like in the original game, the purpose is to dominate the competition against the opponents, and be the last to survive. Due to time problems, we will not implement all the rules and game features. For example, hotels will not be included in our game version.

The GUI will consist of two main components:

  • A 2D top view of the game-board, that will occupy about the 80% of the window.
  • A sidebar containing information on players and the dice.

Players will be able to buy lands and build houses in case of monopoly. The opponents have to pay rents if a land is owned. There will be both factories and railroads.
Our game implementation will also feature the so-called Chance Cards.
There wonʼt be the possibility to play as the Bank. Money will just be considered as a number which increases and decreases. Therefore, a graphical representation of paper money is not scheduled.

Screenshots

Unipoli - Board Overview

Unipoli - Board Overview


Unipoli: user choices

Unipoli: user choices

Documentation

Source code and Javadoc

Binaries

License

Unipoli is released under the GPL v. 3

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http ://www.gnu.org/licenses/>.

Related posts

How to have both Mac Os X and Linux installed and share the same home directory files

February 27th, 2009 bodom_lx 2 comments

So much time since my last post! I’m sure that the best way to come back to blog posting is a nice tutorial.
I’m going to write how to have the same home directory shared between Mac Os X and Gnu/Linux. Let me call Gnu/Linux just Linux from now on.

A unique place for your working directory on both Mac Os X and Linux!

The configuration I’m proposing should be very confortable, as it works with symbolic links.
It lets you to boot either Mac Os X or Linux and have the same directories and files for your everyday use. Meanwhile, the important configuration files and directories (e.g. ~/Library for Mac Os X, ~/.config for Linux) are kept separately on their corresponding partitions.
Another advantage of this configuration is that you can have a small partition dedicated to Linux – let’s say 10GB but could be even less – just for installing the programs you need, while your videos, documents, music files are kept inside the biggest partition, the one for Mac Os X.

Disclaimer, assumptions

Basically, you will mount your Mac Os X root partition in Linux, and soft-link your important directories to your Linux home directory.
You will then use them as there were real directories in your Linux home directory. For this how to, there are a couple of things I assume that:

  • You have Linux installed and running natively on your Mac(Book). I’m going to give commands with sudo, so configure it if you’re not using Ubuntu-based distros!
  • You know your partition layout. The following is mine. I’m going to use it as example:

    disk0s2 /dev/sda2 MacOsx /
    disk0s3 /dev/sda3 Linux /
    disk0s4 /dev/sda4 Swap

  • You have a clean Linux home directory. This means that you don’t have directories whose names are in conflict with those on your Mac Os X home directory
  • You are going to disable file system journaling on your Mac Os X root partition! Please read carefully this Wikipedia page about journaling and this Apple page about HFS+ journaling if you need more information.

Boot Mac Os X

Follow these instructions under Mac Os X:

Open a Terminal.

Identify your Mac Os X root partition:

$ sudo diskutil list

/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *111.8 Gi disk0
1: EFI 200.0 Mi disk0s1
2: Apple_HFS MacOsX 99.9 Gi disk0s2
3: EFI 10.7 Gi disk0s3
4: Linux Swap 1.0 Gi disk0s4

Disable file system journaling for the partition:

$ sudo diskutil disablejournal disk0s2

Do a ls -n of your home directory to discover your user id uid:

$ ls -n

total 0
drwx——+ 11 501 20 374 25 Feb 17:43 Desktop
drwxrwxrwx+ 32 501 20 1088 26 Feb 18:19 Documents
drwxrwxrwx+ 8 501 20 272 26 Feb 18:06 Downloads
[Few Others ...]

My UID is 501. Keep your UID in mind, you will need it under Linux. You obtain the same results by using the command “id”.
Reboot your Mac.

Boot Linux

Follow these instructions in a linux shell.

Change your Linux user id (UID). To correctly share the same home directory between both OS, you need to have on Linux the same UID of your Mac Os X user.

sudo usermod -u <uid> <username>

(sudo usermod -u 501 bodom_lx in my case)

To have your new UID applied, either reboot or logout from every shell you opened, even from your desktop environment. Login again.

Create a directory in which you are going to mount Mac Os X root partition:

sudo mkdir /media/</strong>MacOsX</strong
sudo chmod 775 /media/</strong>MacOsX</strong>

put this line at the end of /etc/fstab, as root, with your favourite editor:

/dev/sda2 /media/MacOsX hfsplus rw,nosuid,nodev,uhelper=hal 0 0

Remember to change sda2 and MacOsX

Either reboot the system or type:

sudo mount /media/MacOsX

To mount your Mac Os X root directory in your mount point directory.

Now cd to your Linux home directory and begin to soft-link all of your important Mac Os X directories. Here are some of those I needed:

ln -s /media/MacOsX/Users/bodom_lx/Documents/ .
ln -s /media/MacOsX/Users/bodom_lx/Pictures/ .
ln -s /media/MacOsX/Users/bodom_lx/Projects/ .
[…and many more]
 

Don’t soft-link the Library directory.

Conclusions

Now you have the same important files shared on both Mac Os X and Linux, while the important hidden configuration files are kept in separate phyisical places.
You can listen to your Itunes mp3 collection on both operating systems. You can now develop programs under Gnu/Linux. You can reboot your machine to Mac Os X and take notes during the lectures, and so on! Hope you liked this how to, and comment it as well. Contact me if you find some mistakes or you’re in trouble!

Related posts

BD-theme released!

December 8th, 2008 bodom_lx No comments

I’m very pleased to announce the final version of BD-theme! For those who don’t know, BD-theme is a widget ready, two columns Wordpress theme. It is written using the default Wordpress theme as php/XHTML base.
The theme is mostly inspired by TorrentFreak rounded layout.
BD-theme exists just because I wanted to write my own Wordpress theme.
You should probably see this theme in action on my blog, or on the testing site .
Anyway, here is a screenshot:

BD-theme 1.0

BD-theme 1.0


BD-theme is valid XHTML 1.0 Strict as well as valid CSS 2.1 (check the testing site against W3C validators)
It has been checked with all the most popular browsers: Internet Explorer 6, Internet Explorer 7, Firefox 2.x and Firefox 3.0.x, Google Chrome, Opera 9.62.
The theme is free software and released under the Creative Commons Attribution-Noncommercial 3.0 License. You are free to use and/or modify the theme under the conditions of the license.
You can obtain the theme on its project page:
http://task3.cc/projects/bd-theme/

Related posts

Testing Ubuntu 8.10 (Intrepid Ibex) beta on a Macbook (updated!)

October 3rd, 2008 bodom_lx 6 comments

It’s a very long time since I abandoned Ubuntu, 1 year and 9 months being precise, although I continued to use Ubuntu derived distros.
I decided today to give Ubuntu 8.10 beta a try. Obviously, every time I decide to try a Gnu/Linux distribution it happens that a new release comes out: I downloaded Alpha 6 yesterday, I fell into problems with it and a apt-get update && apt-get dist-upgrade brought me Ubuntu 8.10 beta, correcting some of them :-)
Read more…

Related posts

BD-incollo project status update, after 24 hours

September 25th, 2008 bodom_lx No comments

The general structure of the program is ready and works. I’m very happy with it, I’m currently playing with templates to have a very accessible, clean layout with few page scrolling needing. At the moment is is possible to:

  • Paste a code
  • Search a Paste
  • View a colored Paste (code syntax)
  • View a Paste without syntax highlighting
  • Download a Paste as plain text
  • View all pastes (although I will allow to see the last 20-30 pastes)

Related posts