Tuesday, September 30, 2008

Use Case Diagram















Here it is at long last. This use case diagram demonstrates the most basic of the functionality of the framework. We have determined that any scenario using our framework or any sub-functionality of our framework can be boiled down to a sequence of these events. For example, if an application wished to get all of the pieces of art near a point, it could send the point and a specified distance, and the framework would return all municipal data objects within that distance of that point. If the application wanted to expand this functionality, it could invoke this functionality for a series of points along a route. If we determine that this route proximity functionality is of great need, we could even implement functionality into our framework that takes a list of points and finds all MDOs in proximity to any point in that list. In the end however, this simply boils down to retrieving MDOs based on attribute criteria, the second use case.

Using Maven with Hibernate Annotations

We've decided to use purely Maven2 and have created a step-by-step tutorial to do so. The tutorial covers both Netbeans and Eclipse, using their respective Maven plugins.

Here is the video link.

The tutorial is as follows.

  1. Install the maven2 plugin for netbeans


  2. create the maven project using the following command.
    • mvn archetype:create -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=edu.wpi.hibernate.test -DartifactId=HibernateTestApp


  3. Import the project into NetBeans
  4. Add the maven compiler plugin by following the directions on their website here.
  5. Add the following dependencies in this order (groupId, artifactID, version)
    • (org.hibernate, hibernate, 3.2.6.ga)
    • (org.hibernate, hibernate-annotations, 3.3.1.GA)
    • (mysql, mysql-connector-java, 5.1.6) [This may vary depending on which DB you choose]
  6. Create the hibernate.cfg.xml file in "src/main/resources" with the follwing...
    • Change the following symbols { and } to <>

    • {hibernate-configuration}
      {session-factory}
      {property name="connection.url"}jdbc:mysql://hobonator/hibernate{/property}
      {property name="connection.username"}root{/property}
      {property name="connection.password"}root{/property}
      {property name="connection.driver_class"}com.mysql.jdbc.Driver{/property}
      {property name="dialect"}org.hibernate.dialect.MySQLDialect{/property}

      {property name="show_sql"}true{/property}

      {property name="format_sql"}true{/property}
      {property name="hbm2ddl.auto"}create{/property}

      {!-- JDBC connection pool (use the built-in) --}
      {property name="connection.pool_size"}1{/property}
      {property name="current_session_context_class"}thread{/property}

      {/session-factory}
  7. Change the connections settings to your MySQL server settings
  8. Add HibernateUtil class like the one shown in the Hibernate tutorial here
  9. Add a class with Hibernate Annotations
  10. Add a inside the node in hibernate.cfg.xml
  11. Run the project, you should see the table and rows have been created in your mySQL DB.
  12. Run "mvn eclipse:eclipse" in your project folder (assuming that you have maven2 installed correctly in your commandline)
  13. Install the eclipse maven plugin from here
  14. Import the project with eclipse
  15. Run the project with eclipse

Monday, September 29, 2008

Getting Maven Tasks for Ant

Maven tasks for Ant seems pretty easy to set up. First, make sure you have Ant and Java installed correctly (with Ant added to the path and ANT_HOME defined). Then, simply download Maven tasks for Ant on the front page of http://www.maven.apache.org/ (it's on the right side). Download the .jar version and drop that in the lib directory of your Ant install. From there on in, simply use a Maven build file to specify any dependencies (including hibernate, hibernate annotations, hsqldb and whatever else we will need).

Examples from the hibernate book that Prof. Pollice let us borrow can be found here: http://examples.oreilly.com/9780596517724/

Chapter 7 has the annotations example plus a Maven build file that has all of the dependencies.

Meeting September 26th, 2008

We met with Professor Pollice today, and discussed some sequences and scenarios that we thought would be applicable to our framework (presented from this document that we prepared yesterday). We decided that for the next week, we will attempt to come up with some more specific framework sequences, and to get hibernate implemented. We have been having trouble thus far trying to get Maven and Hibernate working as planned.

Wednesday, September 24, 2008

Meeting September 23rd, 2008

Today, we met in the ADP lab and worked more on Hibernation annotations in our NetBeans project. The project will be put up on SVN once our repository is approved. We also plan on getting the Use Case document ready and sent out for Friday soon.

Monday, September 22, 2008

Today's Redfish Meeting

Today, we met with Steve from RedFish. We talked with him about what we plan to have our framework do, and whether or not it overlaps with what he is doing. He talked with us about using agent vs. object-oriented programming and then we talked about what sort of use cases should be provided for our framework. He showed us several simulation that his company developed. Some may have been out of the boundary of our framework, but others gave us some ideas of other applications we should keep in mind while designing use cases.

Meeting September 22nd, 2008

Today, before meeting with Steve from RedFish, we discussed what we need to complete by Friday's meeting. We plan to get together tonight to put together a document with use cases and everything we talked about last Friday.

Sunday, September 21, 2008

Meeting September 19th, 2008

Today we met with Prof. Pollice to talk about we did over the past week and what we hope to accomplish over the coming week. Our main tasks for thi coming Friday are going to be starting to put together a document that will describe use cases for a prototypical application using our framework (in this case, a map-based navigation program), and then will examine what our framework will have to do and what the data it interacts with will look like. The other task we hope to accomplish this week is finishing our database schema and implmenting it using Hibernate annotations.

Meeting September 18th, 2008

Today we met as a group to investigate Hibernate. We set up a netbeans project and began to study annotations in Hibernate. Hopefully we will be able to set up hibernate and get it working with the MySQL database on our dev server relatively soon.

Wednesday, September 17, 2008

ER Diagram v.1












Here is the basic ER diagram we tossed together.

Monday, September 15, 2008

Note about Cache

We did some more research on Cache. When trying to install it on the server, we found it only ran on Pentium-4 or higher processors. Our server is a dual-P3. We tried to see what the Venice server had but all connection attempts failed -- perhaps it is down.

After this we did some further research and found that Cache can actually be interfaced with Hibernate. This provides a common layer on top of both Cache and MySQL or Postgres. Thus, we can begin to develop with MySQL in mind and do further research into the added value Cache would provide us separately. We can also write documentation about how to switch between database engines.

Glassfish up

Glassfish is up and running on the dev. server now. The admin console can be found at: http://slocketrocket.res.wpi.net:4848

If you want login info, e-mail me and I will send it along.

Meeting September 15th, 2008

We got some great things accomplished today. First, we drew a very basic preliminary schema. While it is not directly representative of our object model, it helped us to conceptualize what parts of our object model could be consolidated into a generic MunicipalDataObject. This schema will be available online as soon as we create a digital version.

Secondly we got a development server set up. It is available at slocketrocket.res.wpi.net. If you need access to it, ask Eric or myself and we will create a user account for you. This server is currently running CentOS linux and has Java, Ruby on Rails, Apache HTTP Server, and MySQL installed. We are working on getting Glassfish on there as well -- it should be complete by the end of the evening.

We have looked a little bit into Cache, an alternative object database. Our next step is to get an academic license and get it installed on the development server. Then we can create object representations in that and MySQL and run some tests to see what will be fasterand easier to use from our perspective. For more information on cache, look here.

Meeting September 12th, 2008

Today, we met with Professors Pollice and Carrera to show what we had done so far and to plan out what our next steps would be. We decided that for next week, we would evaluate several database server technologies, as well as put together a schema for the Venice data. We will also try to define the boundary of our project and start thinking of user stories.

Thursday, September 11, 2008

Meeting September 11th, 2008

Today, we met and rewrote the scenarios based on what we learned in class today. We also discussed some of our ideas about how the framework is going to work and be extensible. We also plan to write out the schedule based on the calendar we set up yesterday. The new scenarios can be found here.

Wednesday, September 10, 2008

Meeting September 10th, 2008

Today, we installed MapInfo Professional and exported the data to a Microsoft Access format. This allowed us to view the data in a viewable format. This gave us access to geographical coordinates as well, which is good news.

We also set up a Google calendar here
Milestones have been added to the calendar on the weekly iteration meeting (Friday).

Tuesday, September 9, 2008

Meeting September 9th, 2008

Today we met with Professor Carrera during our scheduled meeting time. We were given a copy of MapInfo with a license key, and then we went through and looked at the data in the access database with Professor Carrera. Together, we were able to determine most of the columns from the access database that we will end up using, and we talked about some of the technologies that we would need to become familiar with.

Monday, September 8, 2008

Meeting September 8th, 2008

During today's meeting, we focused most of our time getting started on coming up with scenarios that might use our framework. This information can be found here.

We are planning to put together a tentative schedule after we get a complete view of the data via MapInfo. We will be meeting with Prof. Carrera tomorrow to get MapInfo and (if there is time) to clean up the public art database some.

Blog up and running

This is the blog for the Venice B'08 project. Updates about work that is being done can be found here, with links to pertinent work posted on SourceForge (which unfortunately doesn't seem to have blogging tools).