1 information and computer science university of hawaii honolulu, hi 96822 myisern brown brian...

Post on 13-Jan-2016

217 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

11Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Review and Analysis ofReview and Analysis ofMyISERN-1.3MyISERN-1.3

November 18, 2007November 18, 2007

ICS 612, Fall 2007ICS 612, Fall 2007

Brian JaressBrian JaressRandy CoxRandy Cox

Team MyISERN-1-BrownTeam MyISERN-1-Brown

22Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

AgendaAgenda

Processes Product

• Design Pattern (MVC)• Model Implementation• Data Transfer to Action Beans• Login and Security Filter• Main Menu and Passing of Organization Lists• Pre Populating Edit Pages – Pre-Edit• Populating Select Lists – Edit Researcher• Populating Multiple Select Lists – Edit Collaboration• Populating Table Lists – Use: Action Bean• Concurrency Model

Quality Assurance Lessons Learned

33Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

ProcessesProcesses

Issue Management Based Meetings at Barnes and Noble and Manoa Innovation

Center (using projector) E-Mails

44Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Design PatternProduct - Design Pattern

Model View Controller

ModelMyIsernModel

ControllerMyIsernAction

ViewJSP Pages

55Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Model ImplementationProduct - Model Implementation

Data Transfer to Action Beanpublic synchronized void fillResearcher(Object bean, String researcherId)

Map m = describe(source); for (Object o : m.keySet()) { if (m.get(o) instanceof List) { List l = (List) m.get(o).getClass().newInstance(); l.addAll((List) m.get(o)); m.put(o, l); } } populate(dest, m);

1. Simply pass in bean2. fillResearcher will find a data fields with similar names3. Fill them with data

66Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Login Security FilterProduct - Login Security Filter

Security Filter(URL == Public URL)

User Request: Public URL

SessionUser Attribute

Public URL

Logged In

Logged In?(User <> Null?)

Security Filter(Logged IN)User Request: URL

URL

Login Page

At Successful LoginUser Attribute Set

Web.xml(Configuration)

Not Logged In

77Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Passing Organization ListsProduct - Passing Organization Lists

Map<String,String> map = model.getResearchers(); List<String> list = new ArrayList<String>(); list.addAll(map.values()); getContext().getRequest().getSession().setAttribute("researchers", list);

SessionAttribute: researchers

<c:forEach var="name" items="${researchers}"> <tr> <td id="${name}"> <stripes:link href="/EditResearcher.action" event="preEdit" id="${name}"> ${name} <stripes:param name="name" value="${name}"/> </stripes:link> </td> </tr> </c:forEach>

SelectResearcher.jsp

MainMenuActionBean.java editResearcher()

88Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Prepopulating Edit PagesProduct - Prepopulating Edit Pages

<c:forEach var="name" items="${researchers}"> <tr> <td id="${name}"> <stripes:link href="/EditResearcher.action" event="preEdit" id="${name}"> ${name} <stripes:param name="name" value="${name}"/> </stripes:link> </td> </tr> </c:forEach>

public Resolution preEdit() { Map<String, String> map = model.getOrganizations(); List<String> list = new ArrayList<String>(); list.addAll(map.values()); getContext().getRequest().getSession().setAttribute("organizations", list); if (this.name != null) { this.model.fillResearcher(this, MyIsernModel.makeId(this.name)); } return new RedirectResolution("/editResearcher.jsp").flash(this);

SelectResearcher.jsp

EditResearcherActionBean.java preEdit()

99Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Select ListProduct - Select List

<stripes:select size="1" name="organization"> <stripes:options-collection collection="${organizations}"/> </stripes:select>

EditResearcher.jsp

1010Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Multiple Select ListProduct - Multiple Select List

<stripes:select size="5" name="collaboratingOrganizations" value="${collaboratingOrganizations}" multiple="true"> <stripes:options-collection collection="${organizations}"/> </stripes:select>

EditCollaboration.jsp

1111Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Populating TablesProduct - Populating Tables

<jsp:useBean id="reporter" class="edu.hawaii.myisern.brown.action.ReportActionBean"/> <c:forEach items="${reporter.collaborationTable}" var="row"> <tr> <c:forEach items="${row}" var="cell"> <td>${cell}</td> </c:forEach> </tr> </c:forEach>ListCollaboration.jsp

1212Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Product - Synchronization ModelProduct - Synchronization Model

Thread-safe Singleton Model

SynchronizedMethods

1313Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Quality AssuranceQuality Assurance

Emma Coverage• class: 94% (16/17)• method: 98% (167/171)• block: 91% (2614/2857)• line: 92% (557.2/605)

Missing Coverage• Class MyIsernModel$1 • Misc catch statements• Setters/Getters available for Stripes

1414Information and Computer ScienceUniversity of HawaiiHonolulu, HI 96822

MyISERN BrownBrian JaressRandy Cox

Lessons LearnedLessons Learned

Stripes Tags and Web Programming Examining Classes at Run-time Strengths of Issue Based Management Concurrency Next Steps

• Upgrade Multi-fields from comma delimited strings.• Improve Aesthetics of web-pages• Upgrade to SQL based DBMS

top related