The online User Interface for the Ambient-HackyStat project.
Personals:Blog: http://taesup.blogspot.com/ Projects:Done:
| To fully understand the scope of this project, please visit the Ambient Devices page. Introduction The ambient server, at its current state, can only be run from the command line because it has no user interface. This also creates implications with editing the configuration file for the ambient server. To edit a configuration file, a user must open the configuration file and edit its contents manually. Additionally, the ambient server needs to be restarted every time changes are made to a configuration file in order for the changes to take effect. History To implement the user interface, we started with the idea of user Flash and Flex but realized that the framework really wasn't what we needed. Flex and Flash seems to client side software which make it extremely difficult to grab a configuration file from the server, edit that file, and return it to the server without worrying about security issues. We then fell back on what we used for the MyIsern project. We decided to use the Stripes Java Framework but found much difficulty in setting up the JSP pages. This did solves our problem of grabbing the configuration file from the server and editing it, because that file never leaves the server. There is also a proper authentication protocol included with Stripes. Eventually we dropped this idea too. Another group was using the Java Wicket web framework and we decided to give it a try on the encouragement of Prof. Johnson. We found that althrough there was a steep learning curve, and less then three weeks left for the project, this was the best choice for the project. So with three weeks left and the Prof. Project browser project as an example to work off of, we bought a copy of "Pro Wicket" and got to it. What I worked on For the course of this project, I worked on the general framework of the project. Although it's nothing that I'm really proud of, I think the user interface gets the job done. I actually have some experience in developing webpages but using Wicket was something completely different. Wicket is made with a Java developer in mind, so it render most of the webpage for you. I'm used to using HTML and CSS so there really wasn't much to edit there, just more code to learn in Wicket. I had to learn many of the intricacies of Wicket such as making a table in Wicket using the listView method. Basically you had to get all the items needed for the list, set the list, then populate the table. Here's an example of one of the things I worked on. Getting the items and setting the list:
The results: As you can see, the code itself is really easy to work with once you've learned the basics. But there is a steep learning curve with actually setting up a page. Also learning to set up a login page was quite difficult to learn but thanks to the examples and Prof Johnson's Project Browser code I was able to understand most of it. Results At the end of three weeks, this project is what we came up with. Using the Wicket framework we created a page that will load the configuration page and let you edit the Trigger/Action Pairs according to the user's wishes. We can also save these change back to the configuration page and automatically restart the AmbientServer to work with these changes. There is also a login page for authentication. Here's the link to the project home page: http://code.google.com/p/ambienthackystat-ui-wicket |


