I have never created a professional portfolio before and frankly speaking, I have never thought of doing one before. I used to think that it is sufficient to have a resume and cover letter for job applications but after completing this first version of my portfolio, my opinion changed completely.
Having a professional portfolio provided a place for me to talk about things such as my personal background which otherwise could not fit onto a resume. It also allowed me to go into more details about the projects I have done instead of just listing them in one sentence on my resume. Moreover, by creating this portfolio, I was given the chance to seriously reflect on what I have learned in my four years of college and more importantly, what I want to do in future. I once again realize my weakness: Have knowledge of an array of technologies but don't know any of them in-depth. MyIsern was the only project that I considered to be qualified as a "project". I used to think I learned quite a lot in school. I guess, quantitatively, that is true. But quality-wise, I just don't have extensive experience in the technologies that I learned in class.
While pondering on my strengths and weaknesses as I worked through this professional portfolio, I was lead back to the reason of why I want to do an Honors Thesis. I am going to address my technical weaknesses by working on this Thesis. Sometimes, I am being asked why I am spending all the extra time and effort on something you are not required to do at all. My answer? There are three main reasons. Firstly, I am not satisfied with what I am getting out of the classes alone. We get to learn a new language for a semester but you only get to learn the basic. I feel like I learn quite an array of technologies but I don't know any of them well enough. I consider this as my weakness and I want to work on it. I see doing an Honors Thesis for a year as a good opportunity to drill on my skills. Moreover, the thesis would be something that I chose to do, unlike the projects that we are assigned to do in classes and I am excited about getting a project of my own. Secondly, I want to improve my English and by working on this thesis, I will be reading a lot and writing a lot which are good exercises to brush up my poor English. Lastly, I am still debating between going to graduate school and getting a job straight out of college. Doing this thesis should give me an idea of what it is like to be in the graduate program working on your own thesis and I hope to make a decision on that based on this experience.
Working on this portfolio gave me the chance to reflect on strengths and weaknesses and I am glad that now I have a clearer direction of what I am lacking and where I want to go next.
Monday, January 28, 2008
Monday, December 10, 2007
33. Prime Directives Redux
The Three Prime Directives are:
1. The system accomplishes a useful task.
2. An external user can successfully install and use the system.
3. An external developer can successfully understand and enhance the system.
1. Interactive Development Environments (Eclipse, VisualStudio, etc.)
PD1: This prime directive is fulfilled as it allows developers to develop a system more efficiently by providing syntax check, debugging etc which saves time and allow the developers to focus on implementing the system instead of handling minor repetitive errors.
PD2: This is generally fulfilled as external users (developers in this case) are able to download them from their site or purchase them and then set up the IDE accordingly.
PD3: This is generally fulfilled, provided the IDE concerned is open source where the source code of the IDE is available for download. Otherwise, developers generally cannot make much change to the copy-righted IDE and enhance it.
2. Coding Standards and Coding Standards Compliance Tools (Checkstyle, etc.)
PD1: These tools fulfill the first Prime Directive by making the codes follow a conventional format and make it easier for developers to understand the code.
PD2: This Prime Directive does not apply to the users as users generally do not need to know the coding standards and the Compliance tools in order to use the system.
PD3: This Prime Directive can be fulfilled for the Coding Standards Compliance tools by having the source code available so that developer can enhance the system. Very often, developer guides are also available to aid developers with understanding the system.
3. Build Systems (Ant, Make, etc.)
PD1: This Prime Directive is fulfilled as these build systems make it easier for developers and users to build the system by automating the tasks required.
PD2: This Prime Directive is also fulfilled as users can download these systems and utilize them to facilitate the build process of other applications.
PD3: This Prime Directive is also fulfilled as developers can enhance the systems according to their own needs for specific projects.
4. Automated Quality Assurance Tools (PMD and FindBugs, etc.)
PD1: These tools fulfilled the first Prime Directive by making sure that the code is bug free by avoiding some coding practices that are likely to cause bug later on.
PD2: The second Prime Directive is also fulfilled as users can use these systems and run them over other systems to make sure they are bug-free.
PD3: Similar to the case of build systems, his Prime Directive is also fulfilled. Developers can enhance the systems accordingly to fit their own needs for their code.
5. Black and White Box Testing
PD1: This prime directive is fulfilled as they help developers find out the bugs, for example run-time errors which are not catch by QA tools, in the program.
PD2: This prime directive does not directly apply as users generally are not concerned with the testing of the program that they are using. However, if the system is thoroughly tested it would generally facilitate the user with installing and using the system.
PD3: This prime directive is fulfilled as developers can enhance the testing to fully cover their code to ensure they are working properly.
6. Automated Testing Tools (JUnit, HttpUnit, etc.)
PD1: This is fulfilled as they are useful tools that automated and simplified the process of testing the codes and thus make sure the codes are working up to expectation by finding out the bugs.
PD2: This Prime Directive is also indirectly fulfilled as users can have an easier time installing and using the system if the system has been tested thoroughly with these testing tools.
PD3: This Prime Directive is fulfilled as developers can utilize them to test other systems by enhancing them accordingly.
7. Configuration Management (CVS, SVN, etc.)
PD1: They fulfilled the first Prime Directive by providing a repository that allows developers to work on the same code at the same pace while solving the problem of simultaneous update.
PD2 & PD3: Both Prime Directives are fulfilled as developers can use the configuration management to work on a project together and thus enhance the system.
8. Issue Driven Project Management
PD1: It fulfills the first Prime Directive as it facilitates the software development process by breaking down a project into smaller parts. This allows programmers to have a better idea of what works are left to done and also helps divide the work among the team.
PD2: It does not apply to the second Prime Directive as users are not involved in the software development process.
PD3: It fulfills the third Prime Directive as it allows developers to better divide the work and keep track of where they are in the software development process, thus enhancing the system produced.
9. Use Cases
PD1: This prime directive is fulfilled as use cases allow developers to better understand how their systems will be used and thus have a clearer direction in designing their systems.
PD2: This prime directive does not apply as use cases are users are not concerned with the use cases scenario of the system they are using.
PD3: This prime directive is fulfilled as developers can come up with use cases according to the system concerned.
10. Software Review
PD1: This prime directive is fulfilled as they allow developers have to their systems reviewed by someone else. With such reviews, they can obtain constructive feedbacks in different areas such as installation procedures, code formatting,
PD2: This prime directive does not apply as software review should be done before the software is released for users to download and use.
PD3: This prime directive is fulfilled as it allows developers to get a better idea of how their programs are doing and enhance it accordingly.
11. Agile Methods (XP, Scrum, etc.)
PD1: This prime directive is fulfilled as Agile Methods allows programmers to work together in team more effectively.
PD2: This prime directive does not apply as Agile Methods are practice of software programming.
PD3: This is fulfilled as developers can enhance the system by practicing these methods to produce higher quality code.
12. Open Source Licenses (GPL, CPL, etc.)
PD1: These fulfilled the first Prime Directive by allowing developers to share their products with everyone freely.
PD2: This prime directive is fulfilled as they allow users to freely download and use programs distributed under them.
PD3: Similarly, this prime directive is fulfilled as they allow developers to freely contribute to the codes and make changes to the system.
13. Online Hosting Services (Google Project Hosting, SourceForge, etc.)
PD1: This prime directive is fulfilled as these online hosting services provide an easy mean for developers to post and share their projects as well as to searcher for other projects. This facilitates the process of posting and sharing projects with each others.
PD2: This prime directive is fulfilled as users can download programs from these hosting services.
PD3: This prime directive is fulfilled as they provide a place for developers to share and search for projects.
1. The system accomplishes a useful task.
2. An external user can successfully install and use the system.
3. An external developer can successfully understand and enhance the system.
1. Interactive Development Environments (Eclipse, VisualStudio, etc.)
PD1: This prime directive is fulfilled as it allows developers to develop a system more efficiently by providing syntax check, debugging etc which saves time and allow the developers to focus on implementing the system instead of handling minor repetitive errors.
PD2: This is generally fulfilled as external users (developers in this case) are able to download them from their site or purchase them and then set up the IDE accordingly.
PD3: This is generally fulfilled, provided the IDE concerned is open source where the source code of the IDE is available for download. Otherwise, developers generally cannot make much change to the copy-righted IDE and enhance it.
2. Coding Standards and Coding Standards Compliance Tools (Checkstyle, etc.)
PD1: These tools fulfill the first Prime Directive by making the codes follow a conventional format and make it easier for developers to understand the code.
PD2: This Prime Directive does not apply to the users as users generally do not need to know the coding standards and the Compliance tools in order to use the system.
PD3: This Prime Directive can be fulfilled for the Coding Standards Compliance tools by having the source code available so that developer can enhance the system. Very often, developer guides are also available to aid developers with understanding the system.
3. Build Systems (Ant, Make, etc.)
PD1: This Prime Directive is fulfilled as these build systems make it easier for developers and users to build the system by automating the tasks required.
PD2: This Prime Directive is also fulfilled as users can download these systems and utilize them to facilitate the build process of other applications.
PD3: This Prime Directive is also fulfilled as developers can enhance the systems according to their own needs for specific projects.
4. Automated Quality Assurance Tools (PMD and FindBugs, etc.)
PD1: These tools fulfilled the first Prime Directive by making sure that the code is bug free by avoiding some coding practices that are likely to cause bug later on.
PD2: The second Prime Directive is also fulfilled as users can use these systems and run them over other systems to make sure they are bug-free.
PD3: Similar to the case of build systems, his Prime Directive is also fulfilled. Developers can enhance the systems accordingly to fit their own needs for their code.
5. Black and White Box Testing
PD1: This prime directive is fulfilled as they help developers find out the bugs, for example run-time errors which are not catch by QA tools, in the program.
PD2: This prime directive does not directly apply as users generally are not concerned with the testing of the program that they are using. However, if the system is thoroughly tested it would generally facilitate the user with installing and using the system.
PD3: This prime directive is fulfilled as developers can enhance the testing to fully cover their code to ensure they are working properly.
6. Automated Testing Tools (JUnit, HttpUnit, etc.)
PD1: This is fulfilled as they are useful tools that automated and simplified the process of testing the codes and thus make sure the codes are working up to expectation by finding out the bugs.
PD2: This Prime Directive is also indirectly fulfilled as users can have an easier time installing and using the system if the system has been tested thoroughly with these testing tools.
PD3: This Prime Directive is fulfilled as developers can utilize them to test other systems by enhancing them accordingly.
7. Configuration Management (CVS, SVN, etc.)
PD1: They fulfilled the first Prime Directive by providing a repository that allows developers to work on the same code at the same pace while solving the problem of simultaneous update.
PD2 & PD3: Both Prime Directives are fulfilled as developers can use the configuration management to work on a project together and thus enhance the system.
8. Issue Driven Project Management
PD1: It fulfills the first Prime Directive as it facilitates the software development process by breaking down a project into smaller parts. This allows programmers to have a better idea of what works are left to done and also helps divide the work among the team.
PD2: It does not apply to the second Prime Directive as users are not involved in the software development process.
PD3: It fulfills the third Prime Directive as it allows developers to better divide the work and keep track of where they are in the software development process, thus enhancing the system produced.
9. Use Cases
PD1: This prime directive is fulfilled as use cases allow developers to better understand how their systems will be used and thus have a clearer direction in designing their systems.
PD2: This prime directive does not apply as use cases are users are not concerned with the use cases scenario of the system they are using.
PD3: This prime directive is fulfilled as developers can come up with use cases according to the system concerned.
10. Software Review
PD1: This prime directive is fulfilled as they allow developers have to their systems reviewed by someone else. With such reviews, they can obtain constructive feedbacks in different areas such as installation procedures, code formatting,
PD2: This prime directive does not apply as software review should be done before the software is released for users to download and use.
PD3: This prime directive is fulfilled as it allows developers to get a better idea of how their programs are doing and enhance it accordingly.
11. Agile Methods (XP, Scrum, etc.)
PD1: This prime directive is fulfilled as Agile Methods allows programmers to work together in team more effectively.
PD2: This prime directive does not apply as Agile Methods are practice of software programming.
PD3: This is fulfilled as developers can enhance the system by practicing these methods to produce higher quality code.
12. Open Source Licenses (GPL, CPL, etc.)
PD1: These fulfilled the first Prime Directive by allowing developers to share their products with everyone freely.
PD2: This prime directive is fulfilled as they allow users to freely download and use programs distributed under them.
PD3: Similarly, this prime directive is fulfilled as they allow developers to freely contribute to the codes and make changes to the system.
13. Online Hosting Services (Google Project Hosting, SourceForge, etc.)
PD1: This prime directive is fulfilled as these online hosting services provide an easy mean for developers to post and share their projects as well as to searcher for other projects. This facilitates the process of posting and sharing projects with each others.
PD2: This prime directive is fulfilled as users can download programs from these hosting services.
PD3: This prime directive is fulfilled as they provide a place for developers to share and search for projects.
Sunday, December 9, 2007
MyIsern-Onyx-2.0 Review
Team reviewed: Onyx
Our team decided to break up the review into four parts and I was given the task to review their web application.
Installation:
Their distribution package is easily found on their hosting site. Downloading and extracting the file was easy and smooth. Installation went well as they have detail instructions on their wiki page and also in the readme file that come in the distribution package. After executing ant -f tomcat.build.xml, I was ready to navigate their site.
Web Design:
They done a good job with the login page. The login page is simple and very informative. Even before logging in, the user can get a comprehensive view of what the page does as a detail description is listed there.
They choose a very nice template which looks professional. The black background stands out nicely. However, as Professor Johnson mentioned during the presentation, the black background and the grey texts in the main body might be hard to see when projected on a projector. Although no
The color scheme was also very good. The white title is catchy against the black background. If the color of the sidebar, which is currently green, can match with that of the main title bar, everything should look even more organized.
Screen Real Estate:
On the whole, team Onyx did a good job in term of screen real estate. The space allocated for the main body text is wide enough. However, when the window is reduced to less than 1/2 of the monitor space, the side bars cannot be show and some of the main body text is also not visible. I have to scroll across the page in order to see all the text.
Quite often, I have to scroll down the page to see some content and I think that can be improved by several ways:
1. Make the title smaller. It is catchy now but it takes up quite a lot of space.
2. Put the Logout Sign on the same level as the title or on the main navigation bar. Right now, it is occupying a separate row at the top.
3. They are too much white space inside the sidebars. Minimizing those white space might be a good idea.
Overall:
I tried their webpage on both Internet Explorer and Firefox and both worked well. Therefore, their website is user friendly regardless of the browser the user is using. Overall, this is a very well designed webpage and as a user, I had an easy time navigating it.
Our team decided to break up the review into four parts and I was given the task to review their web application.
Installation:
Their distribution package is easily found on their hosting site. Downloading and extracting the file was easy and smooth. Installation went well as they have detail instructions on their wiki page and also in the readme file that come in the distribution package. After executing ant -f tomcat.build.xml, I was ready to navigate their site.
Web Design:
They done a good job with the login page. The login page is simple and very informative. Even before logging in, the user can get a comprehensive view of what the page does as a detail description is listed there.
They choose a very nice template which looks professional. The black background stands out nicely. However, as Professor Johnson mentioned during the presentation, the black background and the grey texts in the main body might be hard to see when projected on a projector. Although no
The color scheme was also very good. The white title is catchy against the black background. If the color of the sidebar, which is currently green, can match with that of the main title bar, everything should look even more organized.
Screen Real Estate:
On the whole, team Onyx did a good job in term of screen real estate. The space allocated for the main body text is wide enough. However, when the window is reduced to less than 1/2 of the monitor space, the side bars cannot be show and some of the main body text is also not visible. I have to scroll across the page in order to see all the text.
Quite often, I have to scroll down the page to see some content and I think that can be improved by several ways:
1. Make the title smaller. It is catchy now but it takes up quite a lot of space.
2. Put the Logout Sign on the same level as the title or on the main navigation bar. Right now, it is occupying a separate row at the top.
3. They are too much white space inside the sidebars. Minimizing those white space might be a good idea.
Overall:
I tried their webpage on both Internet Explorer and Firefox and both worked well. Therefore, their website is user friendly regardless of the browser the user is using. Overall, this is a very well designed webpage and as a user, I had an easy time navigating it.
Friday, November 16, 2007
29.MyIsern-1.3-review
Author reviewed: Team Brown
1. Installation Review:
It was very easy to find and download their project as Randy has posted an entry for myIsern-1.3 and the link for download is easily accessible there.
Installation was easy. They have an installation guide and the link to it is also incldued in the blog. By following the instructions there, installation went well. All QA tests passed except for junit.
2. Code format and conventions review:
They did a great job with code format. I couldn't spot any violation only a few minor ones find in the MyIsernActionBean.java which has uncommented prviate members and an irrevalant comment on line 51 from conflicted file during update. There are also some prviate members that are not commented in other files but other than these, everything is good.
3. Test Case Review:
Black box perspective:
Most of the Action Beans are tested throughly, but the model still needs more testings. In particalar, DataIntegrityReportBean is not being tested at all.
White box perspective:
Emma Coverage summary
class: 88% (15/17)
method: 83% (133/161)
block: 70% (1728/2473)
line: 72% (373.8/522)
The coverage is pretty good as almost all classes are tested.
Break da buggah:
The program crush when pressing the save button for the collabotation item. An error always occur there even if no data is changed for that item. Also, by declaring a new organization entry, the xml file would be corrupted. Only the first 4 entries remain while all the rest, including with the new entry created would be erased from the file.
4. User Interface Review:
The user interface was simple and concise. In turns of real estate, they have done a great job! It functions well even when the screen is reduced to a small size. However, it was purely text-based and using more graphic should make it more attractive and professional-looking.
5. Summary and Lessons Learned:
They have achieved a lot with only a week! After reviewing their code, I learned how to implement the login page using Security filter which our group was previously stuck in. Also, the installation guide was a great help to users and our group should include one too.
Monday, November 5, 2007
26.StackStripesExtension
The source code can be found here.
This is a fairly straight forward assignment. All tasks are accomplished and the Emma coverage is 100%.
The main problem I faced was Emma. I keep getting the same error that coverage.ec is missing and thanks to the discussion group, I found the solution to the problem by modifying the emma.build.xml. Other than this, there were only some minor problems.
This is the first time I use Tomcat and Stripes. So far, I feel comfortable with both of them as they are both easy to learn and use. However, the way that emma keeps forcing Tomcat down is very inconvenient and at the beginning, I always forget to start up tomcat again before I run StackStripes or other build.xml files. But soon it becomes a habit and everything was fine.
This is a fairly straight forward assignment. All tasks are accomplished and the Emma coverage is 100%.
The main problem I faced was Emma. I keep getting the same error that coverage.ec is missing and thanks to the discussion group, I found the solution to the problem by modifying the emma.build.xml. Other than this, there were only some minor problems.
This is the first time I use Tomcat and Stripes. So far, I feel comfortable with both of them as they are both easy to learn and use. However, the way that emma keeps forcing Tomcat down is very inconvenient and at the beginning, I always forget to start up tomcat again before I run StackStripes or other build.xml files. But soon it becomes a habit and everything was fine.
25.WebAppQuestions
1.Explain in your own words the meaning of the web "request-response cycle".
The "request-response cycle" refers to a cycle of data-retrieval between a server and a client. The client, usually a user, would send out a request to the server. The server would then try to match the request to produce a response, usually a webpage. The client might send out another request after retrieving the information from the response and the cycle goes on.
2.Explain how servlets facilitate processing of the request-response cycle.
Servlets facilitates the process by allowing user to send in request and then produce dynamic response displayed on a webpage.
3.How do you login to the Tomcat Manager?
Make sure Tomcat is running by invoking "catalina run". Go to http://localhost:8080 and the tomcat page should show up. Click onto the link "Tomcat Manager" and log in with the pre-set username and password.
4.What is the Tomcat Manager used for in the StackStripes application?
It is used for deploying StackStripes.
5.What is the directory and file layout of an installed web application like StackStripes? (This is NOT the same as the directory and file layout of the StackStripes distribution!)
The directory is named StackStripes in the Tomcat's webapps folder. There are the 2 .jsp files and two subdirectory named META-INF and WEB-INF. META-INF contains meta data whereas WEB-INF contains java classes.
6.How do you build a war directory structure in Ant? Where is this accomplished in the StackStripes application?
A war directory structure can be created by defining a task that specify the target war file to build, the web.xml and the destination of that war file.
In StackStripes, this is accomplished in the build.xml.
7.How do you install a war directory in a running Tomcat server? What information does the Ant task need to accomplish this?
If Tomcat is running, we can just copy and paste the .war file into the Tomcat's webapps folder. To do so with an Ant task, create a task as described in the previous question.
8.What is the "Model2" architecture? What are its advantages?
Model2 uses the Model-View-Controller design pattern which separate data (model) and user interface (view) concerns by a controller. The advantage is that changes made to the user interface will not affect data handling and vice versa.
9.What are JSP pages? How are they related to servlets?
They are pages that contain java script which provides dynamic response to a web client request. They are compiled into a servlets by a JSP compiler.
10.Why is there a delay when retrieving a JSP page for the first time? Where is the Java code for that page stored?
This is because a JSP page has to be compiled into a servlet. Once it is compiled, it is stored into the servlet and allows quick retrieval of the page. The Java code is stored inside the page.
11.What are JSTL tags? Why are they useful? What is an example JSTL tag from the StackStripes system?
JSTL tags provide most functionality needed in a JSP page. They are useful because they are in XML format and so are convenient to use.
An example is found in index.jsp:
< c:forEach var="element" items="${actionBean.stackIterator}">
12.What are Stripes tags? Why are they useful? What is an example Stripes tag from the StackStripes system?
They are tags that start with "strips:" and they are very useful becuase they link up the Java classes and the JSP pages.
An example is found in index.jsp:
< stripes:submit value="push" name="push"/>
13.What is HttpUnit? How is it different from JUnit? Why is it useful? What is an example use of HttpUnit from the StackStripes system?
HttpUnit tests the code by simulating browsing a site whereas JUnit can only tests Java code and cannot simulate browser behavior.
An example is found in TestStackActionBean.java:
WebRequest pushRequest = pushForm.getRequest();
pushRequest.setParameter("numToPush", "1");
response = conversation.getResponse(pushRequest);
14.What needed to be changed in order to implement the Double It button? What didn't need to be changed? What did you learn about the MVC design pattern from this exercise?
A method to implement doubling a stack is added and index.jsp is modified to define the button
that execute the method. From this, I learned that the controller need not be modified.
15.What are the equivalence classes that need to be tested for the Double It button?
The equivalence classes includes doubling an empty stack, doubling a normal stack and doubling a stack with a lot of items.
16.Provide two screen images of your new StackStripes application with the Double It button, one showing the page before and one showing the page after hitting the "Double It" button.
Before:

After:

17.What is the singleton design pattern? What is an example of its use in StackStripes? Why is it needed?
It is a design pattern used to restrict instantiation of a class to only one object.
An example is found in StackModel.java:
private static StackModel theInstance = new StackModel();
This is needed to ensure the user is only dealing with the same stack all the time.
18.Some of the StackStripes tests exercise code on the "server side", while others exercise code on the "client" side. Which test classes exercise code on the "server", and which exercise code on the "client"? How does Emma deal with this to create appropriate coverage data?
TestStackActionBean.java tests on the server side by using HttpUnit and JUnit while TestStackModel.java tests on the client side using JUnit. Emma shuts down Tomcat in order to get the coverage on server side testing.
19.Running 'ant -f junit.build.xml' results in the following target invocations: tomcat.check, tomcat.undeploy, compile, war, tomcat.deploy, junit.tool, junit.report, junit. Explain what each of these targets do.
tomcat.check: Check to see if Tomcat is running
tomcat.undeploy: Undeploy the application from Tomcat if it exists
compile: compile the source code
war: generate the war directory
tomcat.deploy: deploy the application onto Tomcat
junit.tool: runs junit tests over the source code
junit.report: genearte html report on junit tests result
junit: to run junit.tool and junit.report
20.(Optional) If you have experience using one or more other web application frameworks, discuss your initial reactions to Stripes. How is it similar, or different, or better, or worse than your previous experience?
Tomcat is the only web application frameworks I have worked with so far.
The "request-response cycle" refers to a cycle of data-retrieval between a server and a client. The client, usually a user, would send out a request to the server. The server would then try to match the request to produce a response, usually a webpage. The client might send out another request after retrieving the information from the response and the cycle goes on.
2.Explain how servlets facilitate processing of the request-response cycle.
Servlets facilitates the process by allowing user to send in request and then produce dynamic response displayed on a webpage.
3.How do you login to the Tomcat Manager?
Make sure Tomcat is running by invoking "catalina run". Go to http://localhost:8080 and the tomcat page should show up. Click onto the link "Tomcat Manager" and log in with the pre-set username and password.
4.What is the Tomcat Manager used for in the StackStripes application?
It is used for deploying StackStripes.
5.What is the directory and file layout of an installed web application like StackStripes? (This is NOT the same as the directory and file layout of the StackStripes distribution!)
The directory is named StackStripes in the Tomcat's webapps folder. There are the 2 .jsp files and two subdirectory named META-INF and WEB-INF. META-INF contains meta data whereas WEB-INF contains java classes.
6.How do you build a war directory structure in Ant? Where is this accomplished in the StackStripes application?
A war directory structure can be created by defining a task that specify the target war file to build, the web.xml and the destination of that war file.
In StackStripes, this is accomplished in the build.xml.
7.How do you install a war directory in a running Tomcat server? What information does the Ant task need to accomplish this?
If Tomcat is running, we can just copy and paste the .war file into the Tomcat's webapps folder. To do so with an Ant task, create a task as described in the previous question.
8.What is the "Model2" architecture? What are its advantages?
Model2 uses the Model-View-Controller design pattern which separate data (model) and user interface (view) concerns by a controller. The advantage is that changes made to the user interface will not affect data handling and vice versa.
9.What are JSP pages? How are they related to servlets?
They are pages that contain java script which provides dynamic response to a web client request. They are compiled into a servlets by a JSP compiler.
10.Why is there a delay when retrieving a JSP page for the first time? Where is the Java code for that page stored?
This is because a JSP page has to be compiled into a servlet. Once it is compiled, it is stored into the servlet and allows quick retrieval of the page. The Java code is stored inside the page.
11.What are JSTL tags? Why are they useful? What is an example JSTL tag from the StackStripes system?
JSTL tags provide most functionality needed in a JSP page. They are useful because they are in XML format and so are convenient to use.
An example is found in index.jsp:
< c:forEach var="element" items="${actionBean.stackIterator}">
12.What are Stripes tags? Why are they useful? What is an example Stripes tag from the StackStripes system?
They are tags that start with "strips:" and they are very useful becuase they link up the Java classes and the JSP pages.
An example is found in index.jsp:
< stripes:submit value="push" name="push"/>
13.What is HttpUnit? How is it different from JUnit? Why is it useful? What is an example use of HttpUnit from the StackStripes system?
HttpUnit tests the code by simulating browsing a site whereas JUnit can only tests Java code and cannot simulate browser behavior.
An example is found in TestStackActionBean.java:
WebRequest pushRequest = pushForm.getRequest();
pushRequest.setParameter("numToPush", "1");
response = conversation.getResponse(pushRequest);
14.What needed to be changed in order to implement the Double It button? What didn't need to be changed? What did you learn about the MVC design pattern from this exercise?
A method to implement doubling a stack is added and index.jsp is modified to define the button
that execute the method. From this, I learned that the controller need not be modified.
15.What are the equivalence classes that need to be tested for the Double It button?
The equivalence classes includes doubling an empty stack, doubling a normal stack and doubling a stack with a lot of items.
16.Provide two screen images of your new StackStripes application with the Double It button, one showing the page before and one showing the page after hitting the "Double It" button.
Before:
After:
17.What is the singleton design pattern? What is an example of its use in StackStripes? Why is it needed?
It is a design pattern used to restrict instantiation of a class to only one object.
An example is found in StackModel.java:
private static StackModel theInstance = new StackModel();
This is needed to ensure the user is only dealing with the same stack all the time.
18.Some of the StackStripes tests exercise code on the "server side", while others exercise code on the "client" side. Which test classes exercise code on the "server", and which exercise code on the "client"? How does Emma deal with this to create appropriate coverage data?
TestStackActionBean.java tests on the server side by using HttpUnit and JUnit while TestStackModel.java tests on the client side using JUnit. Emma shuts down Tomcat in order to get the coverage on server side testing.
19.Running 'ant -f junit.build.xml' results in the following target invocations: tomcat.check, tomcat.undeploy, compile, war, tomcat.deploy, junit.tool, junit.report, junit. Explain what each of these targets do.
tomcat.check: Check to see if Tomcat is running
tomcat.undeploy: Undeploy the application from Tomcat if it exists
compile: compile the source code
war: generate the war directory
tomcat.deploy: deploy the application onto Tomcat
junit.tool: runs junit tests over the source code
junit.report: genearte html report on junit tests result
junit: to run junit.tool and junit.report
20.(Optional) If you have experience using one or more other web application frameworks, discuss your initial reactions to Stripes. How is it similar, or different, or better, or worse than your previous experience?
Tomcat is the only web application frameworks I have worked with so far.
Monday, October 22, 2007
21.MyISERN-1.2
Link to our project page: http://code.google.com/p/myisern-1-red/
Project download: http://code.google.com/p/myisern-1-red/downloads/list
Tasks:
All tasks for this assignment are completed.
Difficulty:
There were several problems faced. Firstly, we were confused with how to implement the methods to edit current researcher, collaboration or organization. We come up with several possible implementation ideas and finally clarified with Dr. Johnson on what the users expects to do when editing information. However, the actual implementation was not as easy as we thought. We come into problems when we write these methods and checking the link is a particular one that gave us lots of troubles. We used httpunit to check and validate the links but it kept giving us various errors when we run the program. After spending a whole night on adding in more data checking and throwing in exceptions, this problem was finally solved. Secondly, there was the problem with displaying our data in the table. We used Swing to print out tables. It worked fine for printing the researchers and organization which has a relatively simpler structure than the collaboration data. However, when it came to the collaboration data, we have trouble with displaying some entries. For example, those with missing years cannot be displayed at all. Thirdly, when my groupmate Jared did the testing, he kept receiving error: “junit.framework.AssertionFailedError: Forked Java VM exited abnormally” which is probably due to the vast amount of data put into the heap. After trying other possible tests, in the end, he has to take out those tests as there was no way to get around the problem caused by limitation of memory available. Lastly, there is the problem with entering the data. I entered the collaboration data and it was quite tedious to figure out the collaboration data from the given pdf, there was a lot of missing data so a lot of guesses was put in to make it as complete as possible. However, this is not a big problem compared to coding and it gave a good taste of what it is in real life at work because the users won’t always give you every data or requirements you need and you have to be able to sort them out.
Group work:
This is a nice experience working with my groupmates Jared and Phuoc as we are all willing to help each other whenever needed. One problem we faced was the lack of overall coordination. We didn’t assign work explicitly to each member. We all just took up whatever work is not done at that moment and worked on it. If we faced problem as we worked on our tasks, we would bring it out and the other members would always be willing to help which is encouraging. However, we feel that it would be more efficient if we just break down the tasks and assign them to each member instead.
Improvement for next Milestones:
There is mainly two ways to improve the process and the project itself. Firstly, in terms of group work, we would improve the overall coordination by breaking down the tasks into smaller parts and assign them to each member instead of volunteering to take up whatever part is left undone. This should make this programming process more efficient. Secondly, we would consolidate the code. For example, we have separate methods for adding or editing researchers, collaborations, and organizations respectively. In these methods, there are all performing similar actions and these actions could possibly be simplified by grouping them as another method. Moreover, given this project has grown so much in size that we have thousands of codes now, there would absolutely be other places with reluctant codes. We would go through the code in details for our next milestone and sort these codes out.
Project download: http://code.google.com/p/myisern-1-red/downloads/list
Tasks:
All tasks for this assignment are completed.
Difficulty:
There were several problems faced. Firstly, we were confused with how to implement the methods to edit current researcher, collaboration or organization. We come up with several possible implementation ideas and finally clarified with Dr. Johnson on what the users expects to do when editing information. However, the actual implementation was not as easy as we thought. We come into problems when we write these methods and checking the link is a particular one that gave us lots of troubles. We used httpunit to check and validate the links but it kept giving us various errors when we run the program. After spending a whole night on adding in more data checking and throwing in exceptions, this problem was finally solved. Secondly, there was the problem with displaying our data in the table. We used Swing to print out tables. It worked fine for printing the researchers and organization which has a relatively simpler structure than the collaboration data. However, when it came to the collaboration data, we have trouble with displaying some entries. For example, those with missing years cannot be displayed at all. Thirdly, when my groupmate Jared did the testing, he kept receiving error: “junit.framework.AssertionFailedError: Forked Java VM exited abnormally” which is probably due to the vast amount of data put into the heap. After trying other possible tests, in the end, he has to take out those tests as there was no way to get around the problem caused by limitation of memory available. Lastly, there is the problem with entering the data. I entered the collaboration data and it was quite tedious to figure out the collaboration data from the given pdf, there was a lot of missing data so a lot of guesses was put in to make it as complete as possible. However, this is not a big problem compared to coding and it gave a good taste of what it is in real life at work because the users won’t always give you every data or requirements you need and you have to be able to sort them out.
Group work:
This is a nice experience working with my groupmates Jared and Phuoc as we are all willing to help each other whenever needed. One problem we faced was the lack of overall coordination. We didn’t assign work explicitly to each member. We all just took up whatever work is not done at that moment and worked on it. If we faced problem as we worked on our tasks, we would bring it out and the other members would always be willing to help which is encouraging. However, we feel that it would be more efficient if we just break down the tasks and assign them to each member instead.
Improvement for next Milestones:
There is mainly two ways to improve the process and the project itself. Firstly, in terms of group work, we would improve the overall coordination by breaking down the tasks into smaller parts and assign them to each member instead of volunteering to take up whatever part is left undone. This should make this programming process more efficient. Secondly, we would consolidate the code. For example, we have separate methods for adding or editing researchers, collaborations, and organizations respectively. In these methods, there are all performing similar actions and these actions could possibly be simplified by grouping them as another method. Moreover, given this project has grown so much in size that we have thousands of codes now, there would absolutely be other places with reluctant codes. We would go through the code in details for our next milestone and sort these codes out.
Subscribe to:
Posts (Atom)