Tuesday, April 5, 2011

Creating a list of selected items

Problem: I created an order form where the user could select which things they wanted to order, but I did not know how to store the items together so that I could have access to them and be able to manipulate as neccessary.

Impact: There was no way for me to view the group of items or do anything with them (ie: display, calculate totals, remove items).

Solution: I created a class call items and in it I created a List<items> which is able to hold a list of the selected items. This allows me to have direct access to them and be able to manipulate them as a whole or individually.

Constructor Confusion

Problem: When I went to run my program, I got an error that 'There is no empty constructor for this class'.

Impact: The program would not load.

Solution: Normally, you can have 2 types of constructors be mutually exculsive from eachother - one with parameters, one without. In this case, I created a constructor that took 2 parameters. The problem was that this class needed to have a constructor that took no parameters as well.

JSP page displaying - oops

Problem: When I run my program, the index.jsp page is displaying, but the servlet is the page that should be displayed.

Impact: Well, the wrong page is loading and there is no content that I want to work with on the JSP page, all my code and the program I wrote are on the servlet page I developed.

Solution: I realize that I did not set my <welcome-page> in my web.xml file to represent that my servlet page was to load first, not the JSP page.

User selectable items

Problem: I needed to create a list of items taken from a db and display them to the user. From there, the user should have been able to click on any of the items and have a new display come up with detailed information about the item that the user clicked on. I was unsure as to which widget to use that would best serve this purpose.

Impact: Without the user selectable items, the site would become obsolete as the whole purpose is for user interaction with the site.

Solution: There are many widgets available to display items to the user, some which are selectable by the user, some which aren't. I started out using a bulleted list which was hyperlinks. I found this was not the ideal from a design perspective. I wanted to display them in some sort of box, so I used a textbox first to get my display down, but realized that they were not clickable. I ended on using a listbox, which is able to be used as a clickable item for the user.

Compiling Beans

Problem: My project would not compile due to an error with the application server.

Impact: The project would not work as it wouldn't compile

Solution: This is an error that I have never seen before and was at a loss as to what the issue was. After investigating the problem, I found that the problem was that server still had a number of other applications were still running on the server and that they needed to be undeployed prior to the compilation of the new project.

Making proper database calls

For my ASP project we needed to make specific calls to databases to get data and update with user inputs. My issue was in getting all of the calls to return the specifics of what was needed and I was not able to get it working properly.

The impact was that essentially, my program was not functional as there was no data displayed and the user could not make any calls to the db to perform searches or updates.

I did some research on the different techniques and ways to connect and utilize a db. After working out the different techniques in a separate project and was able to get a connection working. From there, I ported it over to my working project and was able to get everything working.

Sunday, March 13, 2011

Firebug

Last week I spent a lot of time debugging with firebug and got some great experience using it as a tool to further investigate the migration issues. The breakpoints and steps are key to really getting into the core of the bugs and discovering the root cause of issue.