* The system successfully accomplishes a useful task.
* An external user can successfully install and use the system.
* An external developer can successfully understand and enhance the system.
1. Interactive Development Environments (Eclipse, VisualStudio, etc.)
PD1: Does not really apply, since an IDE itself does not help the system to accomplish a useful task. But it helps a programmer to write, compile, and execute code. (could be done without an IDE)
PD2: Does not apply because a user should not need an IDE to successfully install and use a system.
PD3: Helps the external user to go and read through the code because an IDE typically has a root project hierarchy window listing that is easy to navigate through.
2. Coding Standards and Coding Standards Compliance Tools (Checkstyle, etc.)
PD1: Helps, the developer to verify that the code he or she is writing will execute successfully by eliminating some bugs.
PD2: Does not apply, since a user should be able to install a system without the knowledge of any standards.
PD3: When a common standards are enforced for projects then it is easier for other members who may take over the project to work on it. They can assimilate and understand the code faster. In addition, it is easier to maintain.
3. Build Systems (Ant, Make, etc.)
PD1: Helps the developers to concentrate on code implementation instead of on how to build the system. Developers write a small portion of code and can test it by building the system painlessly.
PD2: Build systems allow users to build the system without using an IDE. It also ensures that the system can be build universally.
PD3: A build system should allow an external developer to build the system using any IDE of choice. Therefore, making the process of understanding and enhancing the system quicker. In addition, build system is easy to modify and fit to many different needs and projects.
4. Automated Quality Assurance Tools (PMD and FindBugs, etc.)
PD1: Helps the developer to ship a relatively bug less system that will accomplish the task it should.
PD2: Does not apply to PD2, because the user should not need to care about QA tools in order to install the system of choice.
PD3: QA tools help the external developers, since they can verify if the system is relatively well written before they start enhancing it. It also allows them to produce code with high quality.
5. Black and White Box Testing
PD1: Black and White box testing is especially crucial to making a task work. It is important to test the increment to the program before it is released.
PD2: Only applies to the asspact that the user can successfully use the system, because if the system is tested well enough then it will work when an external user uses it. However, a user does not need to know about testing to install the system.
PD3: Let's the external developer know the correct outputs to the given inputs. Therefore, it is easier for the developer to understand what the system supposed to do.
6. Automated Testing Tools (JUnit, HttpUnit, etc.)
PD1: Automated Testing Tools Help to ensure that the useful task produces the correct output.
PD2: Does not apply, since it is not necessary for the user to know about testing tools to correctly install and use the system.
PD3: If a system works well it is easier to understand. It is also easier to maintain and modify. An external developer can make sure that the system works well before he or she takes it over. Of course, only if the person before had a 100% testing coverage and that the tests where good tests.
7. Configuration Management (CVS, SVN, etc.)
PD1: Configuration management helps developers to work at the same projects at different times and using only one copy of the source. Therefore, building a system that accomplishes a useful task for effectively.
PD2: PD2 is satisfied since the user can dowload the latest release.
PD3: Using configuration management tools makes it easy for developers to get, change, and update copies of the actual project. The developer can easily go back to past versions to make improvements.
8. Issue Driven Project Management
PD1: Issue driven project management helps the system to accomplish a useful task because issues are reported with information on how to reproduce them, so that they can be eliminated by any developer without forgetting these issues.
PD2: At times, it might happen that a product was released but it cannot be installed on some environments. An issue can be created on how to overcome this problem. Therefore, updating issues can help the user to install and use the system.
PD3: It is also useful to the external developer to know what previous issues the system had and if they were fixed. This help the developer to understand and enhance the system the the issues are actual documentations.
9. Use Cases
PD1: Use cases help the developers to code the system the way it supposed to behave when it is released.
PD2: Use cases provide the user with documentation on how to use the system. Therefore, it is possible for the user to understand the system and know the expected behaviors.
PD3: An external developer can uses the use cases to understand the expected behavior of the system. Therefore, it is easier for him or her to test, and enhance the system further.
10. Software Review
PD1: As read in "The confession of a terrible programmer" it is useful to have another person review the code. Once reviewed, it is more likely that the system accomplishes the task it supposed to accomplish.
PD2: Does not really apply. However, since the reviewer have to install the software and use the installation guide, the external user can count on a better installation guide that should help to install the system quicker and easier.
PD3: The reviewer can give feedback on how easy it is to go through the code. therefor e, an external developer should benefit from this.
11. Agile Methods (XP, Scrum, etc.)
PD1: Since all members work on every part of the project, it should be quicker to accomplish PD1, then release it and get more feedback on how to enhance it.
PD2: Does not really apply, since it is a method for "code writing". However, there are many and frequent releases, so the installation guide should be well written and therefore a user should be able to install and use the system successfully.
PD3: Does satisfy PD3 if the external developer will join the team since the Agile method is designed for changing a system frequently.
12. Open Source Licenses (GPL, CPL, etc.)
PD1: Open source licenses do not apply to PD1 since they do not act on the functionally of the system.
PD2: Open source licenses allow users to download install, and use the system more freely.
PD3: Depending on the license, and external developer could freely download, install, use, and modify the system and redistribute it as a new product. Most of time, open source project have great documentation.
13. Online Hosting Services (Google Project Hosting, SourceForge, etc.)
PD1: Posting a project online to which a lot of people have access, makes the system more know, useful, and tested. Therefore, all people help it to accomplish a useful task.
PD2: Online hosting services will help users to download it and get the installation guide.
PD3: Online hosting services give an external developer easy access to the source code as well as to any documentation issued for the specific project.
Monday, December 10, 2007
33.PrimeDirectivesRedux
Posted by Michal Zielinski at 1:28 AM 0 comments
Sunday, December 9, 2007
MyISERN-Onyx-2.0 Review
Our team will perform this review as a team. Therefore, I decided to review team Onyx's project based on the three prime directives and finally give some comments on there web layout and design, as I think that this will help team onyx the most for the final assignment.
An external user can successfully install and use the system
The installation went smooth, but I could not verify the system with the verify target, therefore I strongly recommend team Onyx to fix the pmd errors. Also, I went to the installation guide, which seems to be pretty neat. One note on the installation guide. It tells the user the username and password for the web application, however I believe that the user must change the tomcat-users.xml file in the conf directory of the tomcat system, to fit the distributed username and password. The installation guide says that the server is running locally on the user's computer, which is right. One comment, which might be a little bit confusing. The web application for MyISERN-2.0 is enhanced with the derby database which is also running locally on the user's computer. Therefore, at this point of time it might also be a good idea to tell the user to install Derby onto there system. Otherwise, they won't be able to use the web application fully. Of course, only if a an external database is not yet set up.
The system successfully accomplishes a useful task
The log in with the provided username and password was good. But when I pressed the login button without any username and password, the system crashed. The add, edit, and list Researchers woks fine. The add Organization does not insert multiple items. Therefore, team onyx should still work on that. Because of this fault the edit and display works only partially. It was also possible for me to insert a collaboration with only a name and all other fields blank, but when I tried to edit it it gave me this error: Collaboration field blank (not very useful) and the display collaboration function displays only two fields. The name and the description.
An external developer can successfully understand and enhance the systemThe developers guide is satisfactory, but I would recommend to include the information on how to download httpUnit for testing the web application. We have used it through out the semester and it is critical to our project. One more thing, we also have used jaxb and it might be helpful for the developer to know how to install that tool too. Especially, when the developer wants to perform export data into XML files, which should be one of the option.
Summary
Overall, the system satisfies the three prime directives only partially for reasons mentioned above. As for the web application itself, the formatting flows seem to be equally on FF and IE. All the fonts seem to be too large. The drop down is nice, but not formatted correctly. The side navigation is good but I did not use it at all because of the drop down. There, it is better to decide between a drop down or a side navigation, but not both. The Welcome message is way too large. It takes almost all of the screen real estate away. Talking about screen real estate, the window have to be fully open at all times. Finally, when I tried to login without a username and password using IE it did not crash for some reason.
Posted by Michal Zielinski at 8:41 AM 0 comments
Thursday, November 15, 2007
29.MyIsern-1.3-review
1. Installation Review
I have downloaded the gold's team ISERN 1.3 package from this link. First I was able to download, install, and run the system with no problem using ant. Then I tried running it with java -jar but the build.xml file does not have this target. The verify target passed with no errors, however Emma reported coverage in the range of 20-48, which is not too bad because mine was much lower. I did not find any installation guide.
2. Code format and conventions review
All the code format as well as comments are well written, besides that one "Web interface for the researchers page." which I found in all three action bean files. I am not certain whether it is right or wrong. However, even if it is right it doesn't say much about a class.
3. Test case review
It seems like there are only to classes to test MyIsernAction and MyIsern Model. MyIsernModel is tested well from both the black box and white box perspective. Only one Method the add/edit method was not tested at all. In addition, the whole MyIsernAction class needs to be tested. I understand that we did not have enough time to perform all the tasks assigned therefore as long as it will be done by Monday, it should be fine. From a break-da-bugha perspective, I clicked around and all the link that are not under construction worked well. Now, I think the assignment says to load the xml files from user.home which is somewhere in Document and Settings/name and create files if they don't exist but it loaded the xml files from the downloaded package.
4. User Interface review
Going to the user interface, it is fairly easy to use. The login and home or main page are on the same page but I assume that this is only so for the time until the login page is fully functional. The website utilizes screen estate average, it would be better if the width is a little smaller, because now it takes a little more than half a screen. I would suggest to rename the top researcher, organization, and collaboration tabs to something like list researcher etc. Since the user is not sure what the tab does until he or she clicks it. I was also a little confused where to edit definitions until I found a little note saying enter name to edit but what am I supposed to do then?
5. Summary and Lessons Learned
I did not learn a lot because it is about how people think about design. If I like a web layout that does not mean that everyone else will like it and vise versa. However, this project shows that at least they got a nice style sheet wrapped around the implementation. That is what I did not have the time for.
Posted by Michal Zielinski at 11:54 PM 0 comments
Sunday, November 4, 2007
25.WebAppQuestions
1. Explain in your own words the meaning of the web "request-response cycle".
A Web request-response cycle consists of the client's software i.e a Web browser sending requests to the Web server and the servers sending a response. This is a cycle known as the HTTP request/response protocol. The server can accept, process, and return the requested information to the client.
2. Explain how servlets facilitate processing of the request-response cycle.
Servlets are implemented in the Java programming language that run inside a web application server. It handles low level details of the HTML protocol, then it facilitates the request/response cycle by allowing developers to write Java code to handle user request. It also gives an object orient interface.
3. How do you login to the Tomcat Manager?
First of all to access the Tomcat manager one must first add a new username and password and associate the role manger. This must be done in the user.xml file. Then you go to this URL the http://localhost:[and the port], where you can login with the set username and password in the user.xml file.
4. What is the Tomcat Manager used for in the StackStripes application?
The Tomcat Manager is used in the StackStripes application for conviniently executing manager commands with Ant. Specifically, in the StackStripes application we use the deploy and undeploy tasks.
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 Web module structure contains an assembly root directory that has JSP pages, static HTML pages, and applet classes and a WEB-INF subdirectory. The WEB-INF directory contains files such as web.xml, sun-web.xml, and *.tld. It has the lib, classes, and tags as its subdirectories. The lib directory contains all library archive files. The classes directory contains all server-side .class files for the instance of the current web module, and the tags directory contains all .tag files.
6. How do you build a war directory structure in Ant? Where is this accomplished in the StackStripes application?
To build a WAR file under Ant you must specify the dest webxml and destfile targets. In the StackStripe application this is done in the build.xml file with the war target.
7. How do you install a war directory in a running Tomcat server? What information does the Ant task need to accomplish this?
You can use the Tomcat server's deploy tool, the asAnt creat-war, or just simply copy the war file into the Webapps directory since it will find and install any war files which reside in that directory. The Ant task needs to know where the WebBass directory resides.
8. What is the "Model2" architecture? What are its advantages?
Model 2 architecture uses Model-View-Controller design pattern to separate presentation from content. The controller's job is to pass the request to the right view (JSP), which in turn invokes the JavaBean which then may access a database.
The advantages of Model2 architecture is that it brings the "write once, run anywhere" paradigm to interactive Web pages, it is also fairly simple to learn and wield Java as a server-side scripting language. However the biggest advantage is that it helps effectively separate presentation from content.
9. What are JSP pages? How are they related to servlets?
JSP (Java Server Pages) is a language that allows easy creation of web content that contain both static and dynamic components. JSP are text based documents that contain implementation of how to process a request and construct a response. They also are extensions to servlets. When a request to a JSP is made, it looks if the the JSP pages's servlet is older than the JSP page itself. If this is the case it will translate the JSP page into a servlet class. The advantage is that the compilation is automated.
10. Why is there a delay when retrieving a JSP page for the first time? Where is the Java code for that page stored?
The delay occurs because the JSP page must be translated, compiled, and checked for errors when loaded the first time. I could not find any information on where the Java code is stored but I assume it is stored on the server side.
11. What are JSTL tags? Why are they useful? What is an example JSTL tag from the StackStripes system?
JSTL contains sets of standard tag libraries that give the required functionality which are needed when writing dynamic JSP pages. They are useful because they fix the shortcomings of JSP scriptlet tags. A JSTL tag used in StackStripes is for each.
12. What are Stripes tags? Why are they useful? What is an example Stripes tag from the StackStripes system?
Stipes tags are tags defined in the standard tag library and a dynamic attribute tag library. They are useful because they give easy implementation for comunication between the Web page and the Java code. Example Stripes tag:
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?
Programmers can use HttpUnit to imitate a real mouse click on a Web link. Therefore, it is crucial for writing test cases for programs with Web applications, whereas JUnit can only test the client site program. An example from the StackStripes is: WebConversation conversation = new WebConversation();
// Get welcome.jsp page and check for successful retrieval
String Url = testHost + "stackstripes";
WebResponse response = conversation.getResponse(Url);
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?
In order to implement the Double It button the index.jsp needed to include a submit tag with the name doubleIt and value Double It. The stackModel class needed a new doubleIt method and the StackActionBean class needed a new doubleIt Resolution method. No other methods or code needed to be changed. This exercise nicely illustrates the MVC design. By doing this exercise I learned how it all works.
15. What are the equivalence classes that need to be tested for the Double It button?
From a black box perspective it is good to test for the empty stack, stack with one item, average items, and many items. But since we only need to make sure that the doubleing works, it should be sufficient to push an item onto the stack and then simulate the double it click and check that the items doubled.
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 hitting Double It:
After hitting Double It:
17. What is the singleton design pattern? What is an example of its use in StackStripes? Why is it needed?
A singleton design pattern is supported by the static keyword. This allows working only on one object. Therefore, no other class or method can make a copy of that object, but rather access it directly via getting an instance of it. I think this is needed because we have to make sure, with the synchronized keyword, that we change only one object at the same time. An example is:
private static StackModel theInstance = new StackModel();
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?
The server side tests are in StackActionBean whereas the client side test are in StackModel. Emma gathers the needed data when from the Tomcat server and creates the appropriate coverage. However, the coverage is not available until the Tomcat server is shut down.
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.ckeck, makes sure that the server is running and that we have access to it.
tomcat.undeploy, removes stackStripes from the Tomcat server.
compile, compiles the code.
war, builds the directory structure need for tomcat deployment.
tomcat.deploy, deploys the war directory into Tomcat server.
junit.tool, execute junit test on the server and client side.
junit.report, creates a HTML junit reprot.
junit, runs junit.tool, junit.report and shows errors as encountered.
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?
I only created Web sites using basic HTML and Notepad, so I don't have any experience with such applications, but Stripes seems fairly easy to use.
Posted by Michal Zielinski at 8:50 PM 0 comments
Thursday, November 1, 2007
26.StackStripesExtension
The goal of this assignment was to gain some initial familiarity with new technologies including: Tomcat, JSP, JSTL, Stripes, and HttpUnit and to understand how to apply our previous experiences with Java, Ant, JUnit, PMD, FindBugs, Checkstyle, etc. to the domain of web application development.
What was difficult about this assignment?
I have completed all the tasks for this assignment, therefore I gained a lot of knowledge about building Web applications and using tools such as JSP, JSTL, and Stripes. The major task for this assignment was to understand how the index.jsp, StackActioanBean class, and the StackModel class all communicate and work together.
Now I understand that the index.jsp is the actual web page. When the user clicks on any button on that web page the index.jsp sends this information to the appropriate method in StackActionBean class. The code in the StackActionBean class calls methods in StackModel class, which perform the actual processing. After the call returns the StackActionBean class returns the modified index.jsp and it is displayed on to the web site. This was not hard to figure out but it was essential to understand this process before enhancing StackStripes.
What problems were encountered in carrying out the work
First of all, I made a really stupid mistake. The instructions in the assignment say: "If you are on Windows, you will also need to edit the file conf/context.xml file to change the <Context> tag to include the antiJARLocking and antiResourceLocking attributes as follows: <Context antiJARLocking="true" antiResourceLocking="true">" Even though it is very clear what to do, I just copied the line and inserted it between the already existing <Context> </Context> tags. That is why I was not able to connect to http://localhost:8080 and had to trace all the installation tasks back to figure out the problem. My bad, it took me an additional hour to figure that bug out. In addition, when I wrote test code for the stack pop method, I realized that the stack still contained values which were pushed onto the stack in a previously called test method. I tired to solve it by getting an instance of the stack and calling the stack clear method but this did not work. So, I decide to leave the values for testing the pop method.
Posted by Michal Zielinski at 7:03 PM 0 comments
Monday, October 22, 2007
21.MyISERN-1.2
The goal of this assignment is to continue developing our group-based software engineering skills and begin developing the ability to present our system status to "management".
Distribution package
All tasks were completed!
What was difficult about this assignment?
In my opinion, there were not many real challenges when coding this assignment. However, I found that there was lots of code to write. The three add methods where pretty easy to implement. But the edit was a little bit more difficult. Therefore, to change the state we decided to make the xmlLoader object static. When the user finally decides not to save the changes, the xmlLoader object gets assigned to the previous state, the state before the user started the edit. Another, difficult task was to write test cases for user input. With our knowledge and tools it is impossible. Since we did not have enough time to learn new tools, we decided to write good test cases from the black box perspective. However, the user input or standard output is not test and therefore the Emma coverage suffers. This does not mean that our program doesn't perform well! In addition, it was pretty hard to verify if all the links between Collaborations, Organizations, and Researchers are kept valid after adding new instances. We decided to perform checks on empty name field, uniqueness of id, year, and verify that organization exists when adding new Researchers and Collaborations. However, we did not make sure that all the Researchers exist when adding Collaborations or Organizations since this would go into an infinite loop, never solving the problem.
What problems were encountered in organizing the group and carrying out the work?
There were not really any problems with the group. We all decided to start on this assignment early. The first add method we got working on Wednesday and Thursday morning all the other add methods were finished. Then we implemented edit and after that we finished the marshaling methods. However, this was only the code, and we still had to improve the user interface as well as add all the informations.
What will you do differently during the next Milestone to improve the process and the product of your efforts?
Our group work was good and if anything I would like to have more time to meet with the group members to implement the code together. I find that if we work in a group the code gets more efficient and also it is quicker implemented than if a single person thinks and implements all the code. On the other hand when writing all the program by yourself the classes may be better distributed and redundant code is easier to omit. Therefore, one thing that comes to my mind as an improvement would be to actually draw a class hierarchy diagram and follow it for the implementation to omit writing redundant code.
Posted by Michal Zielinski at 6:15 AM 0 comments
19.UseCaseSpecification
The use case specification assignment helps with becoming familiar with the specification of a system in terms of Use Cases. It also help better understanding the ultimate vision' of MyIsern that we are working toward.
Link to use cases for MyIsern.
Our group extracted ten uses cases from the previous lecture. All use cases are clearly documented however there was no time to include some pictures that illustrate mock ups of the screens that the user would be interacting with. Once we put all the gathered information from the lecture together it was moderately easy to put it into a specific use case. However, this was our first time designing use cases and therefore it may not have all the quality a use case supposed to have.
I learned that use cases may help understand how the whole program will work in the future. The use cases collected from the lecture were already helpful for MyIsern 1.2, when we had to decide on certain code flow. But it was pretty difficult to get all the use cases from the lecture because it sometimes seemed as I could not keep up with the writing. Therefore, it is possible that in the short amount of time, when writing down the use case, I may have interpreted the use differently than expected.
Posted by Michal Zielinski at 5:58 AM 0 comments