wiki:S2S_WEB_COMMONS_R2
Last modified 16 years ago Last modified on 08/04/09 12:11:49

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=S2S_WEB_COMMONS_R2, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

The goal of this task is to create basic stuff needed for the Sophie2 Server. Server is moving to much more clear usage of MVC pattern.

Task requirements

  • Create design for all actions that need to be implemented using HttpRequestHandler interface. This will be our controllers.
  • We'll need a site map for the server pages.
  • Whole business logic MUST be removed from JSP files. Maybe we will rewrite them entirely.
  • Provide simple tag library which will allow composition of different jsp in a whole page. For example navigation bar and navigation items,

skeleton tag for (header,navigation,content,footer).

Task result

Source code, Site Map, Handlers Diagram

Implementation idea

  • Create components using jsp:include tag for site skeleton.
  • Create ELResolver which will support ProLib objects and properties. This will allow to exclude scriptlets entirely, and write jspx pages - valid xml java server pages.
  • Create a jsp template page from which to copy-paste every new jsp needed for new functionality.
  • Research how to integrate Selenium or/and other open source non-gpl testing frameworks which will allow us to create functional tests for jsp pages.

S2S_WEB_COMMONS_R1
S2S_WEB_BOOK_MANIPULATION_R1?
S2S_WEB_BOOK_ACCESS_R0?
S2S_WEB_BOOK_MANAGEMENT_R0
S2S_WEB_COMMENTS_PAGE_R0?
S2S_WEB_RESOURCE_VERSIONING_R0?
S2S_WEB_RESOURCE_SECURITY_R0?
S2S_WEB_USER_RELATED_R1?
S2S_WEB_INOFRMATIVE_R0?
S2S_WEB_HELP_RESOURCES_R0
S2S_WEB_HOME_R0
S2S_WEB_SEARCH_R0

How to demo

  • Show the new server, walk trough different sections

Design

Site map

There will be several sections introduced in this revision

  • Home
  • About
  • Server info
  • Browse resources
  • Resource detail view - this will also include upload resource functionality
    • The folders in the server should be resources there for they will have custom detailed view that contain list of children and upload functionality.
  • Login
  • Register
  • Forgotten password
  • Edit profile

They are few common elements via different section of the server

  • Header - contain Logo(link to home page), search field, account management fields and navigation
    • Account management fields have 2 states
      • for logged users - allows them to logout and manage their details, as well as provide them
      • for non logged users - they should actually be logged as anonymous users, provide them with login, and forgot password functionality
  • Footer

Here are some drafts of what the new look and feel of s2s could look like:

  • Home page

  • Login section
    • the forgot password, register and edit profile sections should be developed in the same manner.

  • Server info and About page should share the same structure

  • In manner of reducing the sections Browse section will represent the search results as well
    • In this section we'll have 2 main parts - filters and results.
      • The filters part could be in 2 states.
        • collapsed - contain only the label. Pressing the label send this component in expanded state
        • expanded state - provide the functionality to add(via combo box) or remove(via button on the right side of the filter) filters(the filters themselves will be provided in next revision of this task or in more appropriate one) as well as editing filter parameters.
        • When the user press browse for first time the filters part will be collapsed and empty
      • Results part for this revision will contain only summery of the resource
        • This will be represented via path that contains all parents of the resource and ends with his name
        • Every element of the path is link to appropriate detail view. If the user select the row itself this will act as he pressed the last link in the path.
    • Below are two drafts representing collapsed and expand state of filters as well as search(browse) results

Handlers

For every view page we have one handler and one jspx which is the view. Handler sets some attributes to the request and does a server-side redirect(client doesn't know) redirect to its jspx. Or if we need to redirect to some other section it does client-side redirect (http 304) to the needed handler.

Basicly we have three kinds of handlers.

  • Action handlers which extends the org.sophie2.server.webui.BasicHandlerSupport class. They are doing the controller logic for given section. Also the base class provides common functionality for redirects, referring and security.
    • There are following specializations of the BasicHandlerSupport
      • WelcomeHandler - for welcome page
      • AboutHandler - for about page
      • ForgottenPassowrdHandler - for forgotten password page
      • RegisterHandler - for registration page
      • LoginHandler - for login page
      • LogoutHandler - for logout page
      • ResourceHandler - for resources page
  • View which jspx. and renders the html that client recieves. These jspx are compiled and added as webui module extensions using org.sophie2.server.webapp.ServletRequestHandlerAdapter that creates org.sophie2.server.webapp.HttpRequestHandler from an servlet (jsp are compiled to servlets)
    • For views are created following helper tags
      • template - in template.tagx file. It contains common template for all pages. In template there are header, footer, error message, and mete and main menu.
      • menu - in menu.tagx file. It is used to wrap the main menu items
      • mainMenuItem - in mainMenuItem.tagx file. It represents an item for them main menu.
  • Static content which are resources in a package and its subpackages deployed on the server using org.sophie2.server.webapp.StaticContentHttpRequestHandler. Such content is

images and css for now. There cloud be some javascipt or other static files that are needed.

How to test

There are base class for selenium tests - org.sophie2.server.webui.SeleniumTestBase and there will be specialization for every site section.

Changesets

[4085][4153][4157][4158][4159][4160][4165][4224][4232]

Implementation

  • Create design for all actions that need to be implemented using HttpRequestHandler interface. This will be our controllers.
    • Included in design section
  • We'll need a site map for the server pages.
    • Included in design section
  • Whole business logic MUST be removed from JSP files. Maybe we will rewrite them entirely.
    • done
  • Provide simple tag library which will allow composition of different jsp in a whole page. For example navigation bar and navigation items,

skeleton tag for (header,navigation,content,footer).

  • done explained inside design section

Changesets

[4589][4593][4635][4750][4781]

Merged into the trunk in [4879].

Testing

Following selenium test were implemented

  • AboutTest
  • ForgottenPasswordTest
  • LoginTest
  • LogoutTest
  • RegisterTest
  • ResourceTest
  • SearchTest
  • WelcomeTest

all of them are in org.sophie2.server.webui package

Comments

  • Site map as well as wire frames for the server will be part of the design
  • Inside the provided drafts in the footer 'By Astea Solutions AD' only 'Solutions AD' is underlined. Instead of this the entire name of the company should be link, and there for - to be underlined.
  • There should be groups of users introduced in next revisions
  • The source merged with trunk is actually in http://sophie2.org/trac/browser/branches/private/tsachev/webui-commons-trunk-merge-for-meddle

Attachments