Amy's Devblog

A blog containing information on all my work/education projects.

Thursday, January 18, 2007

Google Web Toolkit

My responsibilities on the project are going to be concentrated mostly on the front end, although since the team is small, I'm sure I will be somewhat involved in all aspects, including the Spring configuration, Hibernate, etc.

We have decided to use Google Web Toolkit for the front end, so I am busily learning as much as I can about this tool. GWT basically allows the developer to code in Java, and then the Java classes created are compiled by the GWT compiler into Javascript. The idea is that GWT has already done the work of making sure their code works well on all browsers, which should take a lot of the load off the developer. Hopefully there will be a lot less fuss over tweaks/hacks for browser incompatibilities. The toolkit contains several pre-designed 'widgets' which should make GUI design much easier. GWT also has built in RPC support for asynchronous calls to the server for updating the GUI. There is a little bit of a learning curve, but so far so good.

Spring Training

I have started work on a new project that is going to be using the Spring 2.0 framework. Since my experience with Spring is extremely limited, I attended The Spring Experience conference in Hollywood, FL in December 2006. I attended several sessions on Spring Basics, Domain Driven Design, JUnit Testing with Spring, and AJAX frameworks. I learned a lot, and was very impressed with the quality of the speakers. Of course, it didn't hurt to be right on the beach in an awesome resort hotel either!

Monday, January 30, 2006

Build and deploy web applications

Now that Stephanie is not in the office anymore, I have taken over the responsibility of building and deploying new production versions of our web applications. To build, I run Ant scripts and then use Eclipse to package the application into a war file. I have not written an Ant script from scratch myself, but I have had to become somewhat familiar with Ant in order to track down problems during builds. In order to deploy the application to the server (a Sun server) I have had to become familiar with telnet, ftp, and basic commands in Solaris.

Thursday, January 12, 2006

ESIWEB admin tools

I added a new administrative tool to the employee section of the ESIWEB application. This tool gives an admin user the capability to add a new Work Ethic Award winner, or edit an existing winner. The tool retrieves all existing winner information saved in the CMS and creates an array of beans representing the data. The JSP page uses the array to display a list of winners. The user can select an existing winner to edit his/her information, or click a link to add a new winner. Form submissions go to a servlet which handles updating an existing winner's node in CMS, or adding a new node if a new winner was added. The winner information includes text properties, such as date and description, and a picture of the winner. The html form uses a content type of multipart so the user can upload an image.

More Dynamic Forms

I expanded the Dynamic Forms Edit tool to add a capability for a user to define certain form elements as linked so that, depending on the user's answer to a question, other form elements are either displayed or hidden. The tool lets the user define which elements are linked to a particular question, and whether or not to show or hide each linked element for each possible answer to the question. When the form is saved, this information is converted to an XML string representation of the link details and saved as a property of the question. When a user requests a particular form, the XML data is parsed and used to generate Javascript code to handle the display/hiding of linked elements. This generated Javascript is placed in the form header and a call to the generated function is placed in the question's onclick/onchange event handler.

Wednesday, November 02, 2005

Dynamic Forms Edit tool

As part of the ESIWEB project, I created a web-based tool to create and edit dynamic forms (described in a previous post). The tool consists of a JSP page to allow users to edit form properties and add/delete/reorder form questions. There is another JSP page to modify question properties for a specific question selected on the form JSP page. The tool uses a servlet to handle processing of all requests. Some of the functionality on the form editing page, specifically re-ordering of questions, is handled using Ajax to modify data on the server without re-drawing the entire page. The form editing page, in addition to editing functions, allows the user to preview the form and preview the email that will be generated containing the form link.

I also added the capability to supply an image that will be used at the top of the form, instead of the ESI logo. In order to implement this, I used an HTML file input element to allow the user to select an image from their file system and used a com.oreilly.servlet.MultipartRequest object to retrieve the multi-part form data. The image data is converted to a byte[] and saved as a FormBean bean property. I created a servlet to read the bean data, generate a BufferedImage object, resize the image if it is too large, and stream the image. The form designer can see the image they have selected in the form design tool.

Thursday, September 22, 2005

CMSUI Property Permissions

Added functionality to CMSUI so that user can set permissions on individual properties. Previously permissions setting was only available at the node level. While working on this, we discovered that some changes needed to be made to CMS in the code related to setting property values. If a user set permissions on a property and then set the value to a new value before checking in the changes, the earlier permissions settings were being lost.

Thursday, September 15, 2005

Sun Certified Programmer

Today I received my certificate and other goodies in the mail from Sun showing that I have passed the exam and am now a Sun Certified Programmer for Java 2 Platform 1.4!!

CMS User Id

I added a userId field to the UserData object in CMS and implemented it for each user model. In ActiveDirectoryUserModel, we use the objectGUID attribute of the user that is generated automatically by AD when a user is created. In HibernateUserModel, we use the primary key of the user in the users table. In Prevayler, we generate an ID whenever a user is created using a combination of the system time (in milliseconds) and an integer suffix to distinguish between any users who happen to be created at the same millisecond. I then modified the permissions code so that it uses the userId to store the permissions data rather than the user logon name. This way, the user's logon name can be changed without invalidating all the previously set permissions for the user.

Tuesday, August 23, 2005

ESIPCT User Admin Tools

Added functionality to ESIPCT to allow users to be added to or deleted from the system and from individual projects. This involved adding tools to the contact list which are visible only if the user logged in has appropriate admin privileges. For system user add, I created a JSP page for input of required user data and roles for each project. For project user add, I created a JSP page which initially only requires a user logon name and project role. If the user exists already in the system, the user is added to the project. If the user does not exist, the JSP page redisplays with additional fields for required user data. The system & project user delete JSP page requests the user logon name and generates an alert to verify the user should really be deleted before proceeding. All of these functions required the addition of code to ControllerServlet and supporting classes, such as UserActions, ServletUtil, etc. to actually add or remove the users from CMS. When a new user is created, an email is generated to the user with their logon information (system-generated password). When a user is added to/removed from a project, an email is generated to the project managers/coordinators to notify them of the change.