Wednesday, December 10, 2008

New version of the PowerPoint

There is a new version of the PowerPoint presentation up on SourceForge. It is in both .ppt and .pptx format, although the .ppt is not fully editable due to limitations in the old software. Changes in this version comprise changes Fabio suggested in yesterday's meeting, including a 'flow of information' slide.

Tuesday, December 9, 2008

Venice Framework up and running on VPC server

So we've got almost everything moved over to the VPC server. The embeded app can be found at: http://cityknowledge.org:8088/VeniceWebClient/embed.html

Also running: MySQL server, GlassFish, Web Service, Client application and servlet, ImageMagick script

Monday, December 8, 2008

Powerpoint presentation is up on SourceForge

Our first draft of the Powerpoint presentation is up on SourceForge. It is complete, content-wise, but still needs to be fleshed out.

Friday, December 5, 2008

First Drafts of all section are up on SourceForge

First drafts of most of the sections are up. Still lots of work to do on everything though:

https://sourceforge.wpi.edu/sf/docman/do/listDocuments/projects.veniceb08/docman.root.mqp_report

Whoops, I was logged into Justin's account for that
-Eric

Initial JavaDocs for VeniceFramework are up on SourceForge

The initial generated JavaDocs are up in a .zip file on Sourceforge. These documents pertain only to the Framework, and not to any pieces of the proof of concept. A good amount of the code is correctly commented, but some more work still needs to be done.

Wednesday, December 3, 2008

Application Creation Document Updated

Revisions have been made to the "Developing Applications on the Venice Framework" document. The document now includes information on how to create web services using the Framework, and how to test those web services. It links to some tutorials that we found to be very well written and informative.

The background document has also been reworked a bit.

Monday, December 1, 2008

Developing Applications on the Venice Framework Tutorial, Version Uno

The first version of the "Developing Applications on the Venice Framework" document is up on SourceForge. It details how to build the framework to produce a JAR, and how to include that JAR as a library in an external project.

More work on the paper

After re-reading the report template from Prof. Pollice, we realized that what we had typed for our background would fit better in the methodology section. Today, we reworked the section into the methodology, adding code snippets and talking more about our development process. The document is still very much in draft form and not completed yet, but can be found in the report section of our SourceForge.

https://sourceforge.wpi.edu/sf/docman/do/listDocuments/projects.veniceb08/docman.root.mqp_report

Work From Home Day

Physical limitations are preventing us from making it to the university today. Luckily, we can write most of our tutorials individually without a fast speed to the internet.







Monday, November 24, 2008

Public Art Clustering


One problem with the map application is that there are tons of public art in any given area, and sometimes there are more than one public art in the exact same place. One way to solve this is to cluster the public art to not only speed up transactions but to create more readability.



Figure 1 -
This image depicts points within a certain radius being connected. From here we calculate how many other points each one touches.



Figure 2 -
The points are sorted by how many connections they have, and then for every point that one connects to, we disable so that another point may not connect to it, and so that it cannot connect to other points. Using this method we can group the most amount of points into each cluster, minimizing the number of clusters. The above image is 'unweighted' such that the circle or cluster point is not at the center of mass.



Figure 3 -
This image depicts the clusters at center of mass.

Sunday, November 23, 2008

Venice Web Client Ported to Maven2

Formerly known as VeniceClient is now the new VeniceWebClient project. It has successfully been ported to the maven2 project. It uses the VeniceWebService to access the database through the framework. It can be accessed here as it has been deployed already here

Saturday, November 22, 2008

Venice Web Service Project Ported to Maven2

Formerly known as VeniceFrameworkWebService is now the new VeniceWebService project. It has just been committed to the repository. We had been thinking about porting the Netbeans project to maven for a while now, seeing that there were two major problems with the status quo.
  1. Integrating the framework and the webservice would be difficult if the projects were using different build tools (one Ant w/convoluted Netbeans artifacts, one with maven2).
  2. The framework needed to be built seperately, copied over to the webservice folder. There was an anomaly which resulted in ~20mb war file even though the framework was only about 9mb
Since both projects are now maven2 projects, one can be the parent and the other a module. This way they can share dependencies as well as share each other's source files cross-project--which was exactly what we needed. This is also means that using one single maven command, the developer can build both the framework and the webservice and subsequently deploy them.

The VeniceClient is still a Ant/Netbeans project, we are hoping to port this over soon so that all three projects are under the same build tool.

The ultimate benefit is that all projects will be IDE independent as well as cross-platform.
Write once, run anyway anywhere!

Embeddable Public Art

An embeddable version of the Public Art application has been created, and it can be seen below!

One New Web Client

For this week's meeting with Professor Carrera, we made a couple of front ends to demonstrate the extensibility of our framework. The applications show different ways that Municipal Data Objects (Public Art in this case) could be displayed to varying end users.

One of the web clients that we made is a proof of concept of our web service. It is laid out in an archival format, and allows users to search through Public Art objects either by entering an ID or by hitting previous and next buttons. Upon clicking one of the buttons/links, an AJAX request is sent from the .jsp to a servlet (the server-side of the client...yes we know that is kind of confusing). The servlet parses the request and sends a SOAP request to the web service, which in this case is located on the same server as the Client but does not need to be as it is a wholly separate entity. The Web Service is an (proof of concept) application built using the Venice Framework, and thus calls methods in the framework to fulfill the SOAP request. The Web Service then takes the Java objects that it is returned, converts them to XML, and sends them off in a SOAP response to the server-side servlet of the web client. The servlet then parses the XML response and sends out a JSON-encoded AJAX response to the .jsp which displays the results.

This application can be accessed here. Please disregard the absurd loading .gif...it is in the wrong div.

Thursday, November 20, 2008

VeniceClient updates

Today we made some progress with the VeniceClient web client. The front-end .jsp now communicates effectively with the VeniceTestServlet (kind of a stupid name in retrospect) using AJAX aided by the technologies JSON and Prototype. The client does not currently display anything, but we will have one or two front ends to demponstrate by the meeting with Professor Carrera tomorrow.

Solution to Blocked MySQL in University

We've had this problem for a while now. When we work in the IUAV, we have excellent internet connection but the MySql connections are blocked off. This makes it hard for us to do testing beyond using HSQLDB + DBUnit + JUnit. The first part of the solution is to tunnel the connection through SSH. In order to do this...
  1. Ping the server (your.server.net), get the actual IP and copy it somewhere (this will be explained later)
  2. Start putty
  3. Put the actual IP into the hostname field
  4. Under the tree menu, goto Connection-->SSH-->Tunnels
  5. For Source Port, put the "MySQL port" (default: 3306)
  6. For Destination, put "localhost:MySQL port" (default: 3306)
  7. Now connect to the server and login
  8. Your computer's port MySQL port should now be the server's tunneled MySQL port. You can now connect to it using MySQL admin tools
This was all well and good that we could connect to localhost:3306 to access the MySQL database remotely, however, we this still meant we had to change all of our project configurations to adapt to the change of the hostname from your.server.net to localhost. This was feasible, but not practical. So instead, this is what we came up with.

  1. For Windows OS', navigate to C:\windows\system32\drivers\etc and find the hosts file
  2. Open the hosts file with notepad
  3. Append "127.0.0.1 your.server.net" to the end of the file
  4. Change all Non-tunneled connections to the actual IP address of your.server.net so as not to connect to yourself at 127.0.0.1 (e.g. pinging your.server.net would not work with the host file changed)
Since the change is made only in one place, it makes it much easier to do the testing and it means less errors switching around configurations all the time.

Tuesday, November 18, 2008

Photos up on the server

The photos have all be uploaded and made available on our server (slocketrocket).

http://slocketrocket.res.wpi.net:8080/photos/

We are working right now on getting photo information retrieved properly in our framework (hibernate issues) and we should have everything integrated soon.

Relating Photos and MDOs

We had to make a decision regarding MDO objects and how they would be related to pictures. We decided that pictures will be hosted on the server separately from the database. Each photo has have a unique filename. The Photo table in the database has a unique id, a description, and the unique filename. This table is related to MDO in a relational table that has both ids.

The issue we had was with the initial population of the relational table. Previously, PublicArt objects had a value called 'c2kid' which was also used for the names of the images. They still have this 'c2kid', but the id is no longer used directly to access the images. Instead, we inserted new Photo rows into the Photo table for each PublicArt row, using the 'c2kid' as the name. We then inserted a relation into the relation table for each matching pair of 'c2kids' (PublicArt and Photo).

Using this method, we were able to populate the database while keeping a general format for the relation between the two classes instead of using an arbitrary string ID that is unique to PublicArt.

Monday, November 17, 2008

Praha uno

A bit off-topic, but here are some pictures from our recent trip to Prague:











































Thursday, November 13, 2008

End to End Web Service Working

We were able to get the Framework all .jar'd up and put into the web service. We then did a bunch of compliance testing and got them communicating with each other. The web service can now retrieve data from the database. The client now allows a user to enter an ID, and it will retrieve from the database the PublicArt object of that ID. This marks a giant leap forward because it demonstrates how our framework will be implemented into applications, such as the PublicArt web service or the Admin Console.

The link for this functionality is here. Note that this overrides the previous web service, so you can no longer multiply numbers by two.

Tuesday, November 11, 2008

More work on the MQP report

A folder in SourceForge has been created to hold all of our documents related to the MQP report. I have uploaded drafts of both our Introduction and Background sections of the report. The Background section is still very rough and needs some expansion and reorganization. Right now it clocks in at around 8 pages. Both documents are in .doc format.

Building the Framework

Yesterday, we attempted to build the framework and include it in the web service project. We were able to get the .jar file just fine, but the web service would not deploy correctly. After hours of confusion, we gave up for the night. Today, we had a thought: perhaps the dependencies for the framework were not being accurately compiled into the .jar file. Upon further investigation, we found that this was indeed the case. It turns out Maven does not build the dependencies into the .jar by default. Some web research determined that there is a plugin that makes it easy for Maven2 to build the dependencies into the .jar. We found the link referenced here.

Friday, November 7, 2008

Web service deployed to development server

"Currently, the web service 'PublicArtByID' does nothing but take an int parameter, double it, and stick it in the id of an outgoing XML representation of a PublicArt object. The Client currently takes an integer parameter from the user (no checking or anything) and invokes the Servlet, which sends it to the service. When the Servlet gets a response, it prints out the result."

This functionality can be accessed here.

Thursday, November 6, 2008

Finally implemented a client for the web service

After 4 long days of attempting to use the nuSOAP PHP library to create a client, we stumbled upon this gem of a tutorial on creating Java EE web service clients. It is so darn easy. Our test web service client project, VeniceClient, has been uploaded to the SF repository. Creating a basic barebones client for a web service (or several web services) takes under 10 minutes.

Currently, the web service 'PublicArtByID' does nothing but take an int parameter, double it, and stick it in the id of an outgoing XML representation of a PublicArt object. The Client currently takes an integer parameter from the user (no checking or anything) and invokes the Servlet, which sends it to the service. When the Servlet gets a response, it prints out the result.

This functionality can be accessed here. That is running on our development server in Worcester.

Wednesday, November 5, 2008

SOAP and REST

Over the last iteration, we have relieved numerous questions regarding which web service technology is more appropriate for use with the Venice Framework. We decided to take a day to research the technologies, and produced the document available here. In short, both technologies have their advantages and disadvantages. In terms of what we see as being the end product, we have decided that SOAP more appropriately fills our needs because it allows for more complex communication between the service and the client.

Tuesday, November 4, 2008

Web Service Work

Today, we were able to successfully get our Web Service working and tested in soapUI. The Web Service itself still had some very annoying namespace issues to work out, but after that was cleared up, our test of the service worked perfectly. Justin is now working on getting a simple php application to interact with our service remotely, since this is likely what we will be doing when we develop our proof of concept application (which will show off both our framework and web service layers).

More posts to come later.

Monday, November 3, 2008

Tests for PublicArt

We have just completed the various tests for PublicArt which completes all of our trackers. We have been thinking what the best way to write the tests are. The recommended way that DBUnit does is to have a sample dataset, run some tests that will change the dataset, then use an "expected" dataset and compare them with the methods DBUnit provides to compare two datasets. The problem with this approach is that for each test we would have to generate an XML file to compare the resulting dataset. This would end up generating literally hundreds if not more xml files that need to be uploaded into the SVN. This may make sense for a large test that represented a complete use case, but not small tests of functionality. The second problem is that it would not really test our model/framework. As per the Hibernate article here http://www.hibernate.org/109.html on Equals and Hashcode, we implemented the methods for eaach model object so that duplicate objects are not generated as well as providing a explicit way for our tests to compare objects. The general manner in which the tests are written are as follows:
  1. Generate a PublicArt Object
  2. Start a Transaction
  3. (optional) Save the PublicArt Object
  4. Commit the transaction
  5. Open a new Transaction
  6. Load a new PublicArt Object from the database
  7. Compare the two objects to each other
  8. End the Transaction
This ensures that the object saved and the object loaded are one and the same in terms of both hashcode() and equals(). We are considering other methods of testing that we may need in order to cover more ground in terms of stressing the framework and testing it's versatility.

Calling SOAP Web Services

Today was the first day of Iteration 2. Since our meeting with Fabio isn't until tomorrow, we took it upon ourselves to work on the trackers that absolutely must be in with this iteration. One such tracker is here. this tracker deals with creating a skeleton client that will access our web service.

We found an article, located here, that gives a good tutorial on how to call SOAP-based web services using straight-up HTML and JavaScript. There is another library, used here, that we found to be of interest as well. We have begun creating a simple web application based on the examples provided in those article.

Work on second section of report

One of the things that we worked on today was organizing for the second section of the report, which we hope to write this week while we are also working on the framework. I've uploaded our two-page outline of the second section of the report to SourceForge here

Comments are welcome since we are going to be writing the document during the rest of the week. We have also been trying to get academic resources as reference through the WPI library site, although it is difficult to find good resources on there.

Sunday, November 2, 2008

Wrapping up Iteration 1: Web-Service portion

This week we successfully completed 35 units of work for iteration 1. This closed 5 trackers.

On the Web Service Layer, we were able to create a skeleton Web Service built on the SOAP xml protocol. Netbeans has a generator for projects like this, but it took a lot of customizing to get it to fit our project. We had to write our own WSDL and XSD files. The WSDL describes the service itself, and the XSD describes the data returned by the service. The service successfully builds and deploys in GlassFish, and we are currently looking for a good web service tester to simplify the testing process.

Thursday, October 30, 2008

Debugging DBUnit

Today was more debugging of DBUnit bugs that was still plaguing our test cases. At first we thought the problem was that Hibernate was not creating the DB schema before DBUnit could load the database. So we tried opening/creating a session in the constructor of the testcase before dbunit loaded the sample.xml file into the HSQLDB. This, still produced errors about tables not being found. Eventually, after many attempts on changing the configuration of both Hibernate and DBUnit, we realized that DBUnit did not recognize it's own XML file it created from its Maven2 plugin incarnation. This makes utterly no sense and was unfathomable as to why it would create incompatible formats of XML files for backup. This seemed to be the root of the problem, even though the hunch of having to open a Hibernate session in the TestCase's constructor was still correct since DBUnit does not store the table's schema inside it's XML backups. Since the backup from the Maven2 dbunit plugin no longer worked, we had to first re-import the sample dataset into the server using the maven dbunit plugin, write a function (it's in a Main class right now) to export the database programmatically using the dbunit JAR (and its myriad of dependencies). Now that the JUnit tests work, we plan to encapsulate the quirks of the JUnit into its own subclass so we don't have to write boiler plate cold for each test file. Our test cases can use dbunit functions to compare the manipulated DB and the resulting DB as well as all the standard JUnit asserts.

Web Service Updates

Okay, today on the web services front we got the XSD (XML Schema) file written that defines the schema for public art objects in XML. We also finished working on the WSDL (although it will be expanded as we fill in the web service later). We have a NetBeans project up and running with our service and are looking into running some tests to make sure everything is working as it is supposed to. We are using a NetBeans plugin for SoapUI to allow for testing of the service. Namespaces in the XML have been a confusing issue but I think we got everything worked out today.

Wednesday, October 29, 2008

More on DBunit

We have only been trying to get dbunit to work as for backing up and restoring the database. This was done using the Maven2 plugin. However, when there is a need for having a sample dataset loaded every single time a test runs (e.g. during setUp() for JUnit) it isn't practical. This is because a Maven2 plugin can only be attached to a certain phase of the Maven2 build lifecycle, meaning the sample dataset would only load once at the beginning of all tests. So in order to have the sample dataset load for each test, we added the dbunit 2.3.0 as a dependency in Maven2 and use its original implementation. It has it's own DBTestCase class instead of the JUnit testcase, which is, we believe, just a subclass of the JUnit TestCase class anyway. It can also be used in a regular JUnit TestCase class as well, the initialization of some DBUnit specific variables just have to be done manually. This changes what we have been previously done for tests, which is simply programmatically inserting values through Hibernate, then running tests on the few tests we did. Now, we have 150 rows of sample data from the Public Art application as our test data. There are still some issues, but should be resolved summarily as we understand more about DBUnit.

More work with Web Services

Today we were given access to the university and have been able to spend a couple of hours working there so far.

One thing that we worked on was setting up our web service. We have been researching SOAP and WSDL files (This article has been helpful for understanding WSDL). We have started working on our WSDL file and defining how our objects are going to be represented in XML schema. We've got part of the WSDL written, but it will need to be expanded as we actually start integrating our Framework into the Web Service. We also set up a web project in NetBeans that we are going to develop our Web Service in.

Tuesday, October 28, 2008

Daily Entry for Tuesday, October 28th (DB & CODE)

Today, we found out how to do the unit testing in another scope, without altering the real data in on the server. First, we realized that in Maven2, the test source folder has it's own resource folder. We copied and changed values of the original hibernate.cfg.xml from MYSQL dialect to the HSQLDB dialect. This way the test can be run offline, without a test server.

As for the dbunit plugin, we can now run database backup and restoration through a maven command since the configuration data has been added to the POM.xml.
  • To Backup: type "dbunit:export"
  • To Restore: type "dbunit:operation"
The backup file will be taken from the "[project path]\backup\backup.xml" and it also restores from that location. This should be changed later to different files and should have the data automatically appended to the filename. The first database backup is on sourceforge documents. We also found out how to export the database schema in SQL programmatically. The schema is uploaded along with the backup of the database on sourceforge. We also commented some code in MDOManager as well as added the function to find by proximity.

Researching Web Services

One of the things we did today was look into web services that we could use on top of our framework. We looked at using a RESTful web service first, but it after evaluating it, we realized that it is not as good of a solution as SOAP for what we are trying to do. We found an example for setting up a SOAP project in NetBeans and are looking more into how to write a WSDL file for our service. We also are most likely going to send the object data via XML.

After going through that tutorial, I was able to get the Web Service set up, but we still need to make our own bare-bones WSDL file and start integrating it with our framework as that gets more fleshed out.

Monday, October 27, 2008

Daily Entry for Monday, October 27th

Today, we started by adding values to all of our tracker tasks. We also split up and refined the tasks some more. We also met with Prof. Carrera today to talk about our iteration plans. We set up a meeting for tomorrow and also talked about the internet situation. Prof. Carrera said that the University is in the process of giving us access and with any luck we should have it tomorrow. In the meantime, we were given a key so that we can use the VPC at night.

So tonight we are in the VPC. We are working on using DBUnit so that we can export our database to XML and keep a copy (this XML will also be used when running JUnit tests). After, we will import the correct data into both tables and keep a copy with our project. We are also researching how to create a web service so that we can begin doing that in the near future. We are also trying to get access to the digital pictures that go along with the public art data.

Wednesday, October 22, 2008

Introduction rough draft

Today, one of the things we did was write a draft of the introduction for the report. It will be posted on sourceforge soon, but at the moment our dial-up will not allow us to access, so I posted it on google documents here

EDIT: posted on sourceforge documents now

Trackers and Requirements

We created the basic requirements today.

Here is the Google Doc link, and here is the SF link.

We are currently in the process of turning the objectives in this document into trackers on the SF site. The progress can be monitored here. The trackers will be divided by what portion of the project they pertain to (Data, Base Framework, Location-Specific Framework, Web Service, Application).

Tuesday, October 21, 2008

In Venice

We are still working on getting reliable internet through the University with Professor Carrera. In the meantime, we will work on the introduction to our report, as well as preparing items for the tracker. More updates to follow.

Tuesday, October 14, 2008

New version of UML diagram up on sourceforge

Today we worked some on the UML diagram. We're also going to flesh out the plan of work a little more.


Here is the UML diagram:

Also, here is the revised plan of work:

https://sourceforge.wpi.edu/sf/docman/do/viewDocument/projects.veniceb08/docman.root/doc6325/2?_message=1224013582838

Monday, October 13, 2008

Tentative schedule up on sourceforge

Our tentative schedule of work is up on SourceForge. Have a look:

https://sourceforge.wpi.edu/sf/go/doc6325?nav=1

Friday, October 10, 2008

Current UML Daigram and Scenarios

Here is our current version of our Object Model. This is a very rough draft and we still have some questions regarding some of the associations and methods.



















Here is a link to the current scenarios.

Thursday, October 9, 2008

Public Art Columns

ONLY Public Art Columns NOT MDO

Here are the following columns that we will transfer from the access MDB files to our DB and object mapping.
  • Normalized Year (Anno Normalizzato)
  • Medium (Materiale)
  • Type (Tipo)
  • Subtype (Sottotipo)
  • Family (Famiglia)
  • Conservation Level (Conservazione Rizzi Numere)

Work thus far this week

This week, we began brainstorming and writing scenarios on Monday and Tuesday. On Tuesday we started putting together a UML class diagram to help us wrap our heads around the details of what our framework would do in each scenario. We've been thinking about the overall design and all of the classes that we would need for our framework to work in a reasonable fashion. We hope to finish the UML diagram later today and work on getting a couple more scenarios written up.

Monday, October 6, 2008

Scenarios

We need to create scenarios for several calls on the framework. We'll post them here.

Friday, October 3, 2008

Iteration Meeting

We discussed about expounding the "update" use case. How will we append an extra MDO? Will this require changing the framework or extending the framework? There is a possibility that this process needs to be documented for the "application programmer". This lead us to come up with different actors...
  • framework developer
  • application programmer
Professor Pollice decided our use cases needed to be more detailed, especially on the interaction between our framework and google maps/mapping services/other services during which the use case would be realized.

Added e-mail notification to blog

I added e-mail notification to the blog so now it should be easier to keep updated with our progress.

Some DocumentWorthy Progress

I just committed some code to the SVN repository. I believe it was significant enough for me to post because there are some major changes and additions I made to the code that may not be clear just at glance. Here are my commit bullet points...
  • - Added JavaDoc to all existing classes
  • - Refactored testing to the appropriate test package instead of using a main method
  • - Added GenericDao.java so far for the DAO pattern, more work needs to be done, but it is functional as of now
  • - Added log4j properties file and added logging for testing, this also means greater control in hibernate debug messages. By changing the properties files we can turn on logging to a point that every single transaction is shown in the log, it also allows for us to redirect the logging to a file (which will be useful in production)
  • - Refactored Hibernate Annotation mapping into HibernateUtil.java
  • - Added the "new SchemaExport()" line when initializing HibernateUtil so we can programmatically change if the tables are being dropped and recreated. This is in direct response to the original code that would keep dropping and recreating tables. I later found out this was specified in the XML and even though XML and programmatic means may mingle, I decided on deleting the XML config for this particular function and specify this configuration in HibernateUtil.

Thursday, October 2, 2008

DbUnit for testing and moving datasets

There was the belief that hibernate would make our dataset portable to any underlying database. However, it seems that out-of-the-box, Hibernate does make our framework portable but not the dataset. This meant we would have to either write importers or exporters for our specific schema. Well, it seems that this JUnit extension called DbUnit @ http://dbunit.sourceforge.net/ solves the problem. It is also a maven plugin where it can both export and import large datasets using XML during testing to prevent data corruption. It uses the JDBC driver so it will be DBMS agnostic. Of course this will help us in unit testing as well.

Wednesday, October 1, 2008

More detailed use cases posted

More detailed use cases for our framework have been posted on SourceForge:
https://sourceforge.wpi.edu/sf/go/doc6265?nav=1

This covers all of the use cases we could think of when going through scenarios where our framework would be used.

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).