eclipse wtp project

二月 26, 2005

eclipse wtp project
Eclipse Web Tools Platform (WTP) Project

All About The WTP Project
The Eclipse Web Tools Platform (WTP) project extends the Eclipse platform with tools for developing J2EE Web applications. The WTP project includes the following tools: source editors for HTML, Javascript, CSS, SQL, XML, DTD, XSD, and WSDL; graphical editors for XSD and WSDL; J2EE project natures, builders, and models and a J2EE navigator; a Web service wizard and explorer, and WS-I Test Tools; and database access and query tools and models.

非常酷的工具集,到底是IBM捐献的,功能异常的强大,不过pre-requirements也是非常之多,eclipse的插件要爆炸了

问题跟踪系统

二月 25, 2005

现在项目的开发的规模越来越大,同时进行开发的人数也越来越多,同时这些人员也往往呈现出分布化办公的趋势,因此在项目开发过程中的人员之间的协同成为项目成功的一个重要因素.我们这次项目中也需要采用一个系统进行任务的分配,进度跟踪以及任务反馈等等.开始是往公文流转系统这方面想,但是考察了一些系统之后,发现我们实际需要的可能只是一个问题跟踪系统.以前,问题跟踪系统大多局限于bug的跟踪管理,而现在的外延已经有所扩大,不仅仅应用于bug的管理,也可以应用于普通的项目管理过程中.这次主要看了一下一些系统:

  • JIRA无疑是我看到的最好的一个,J2EE环境.唯一的缺点是要收费,虽然有很多的license,但是要想免费蹭着用还是要有很高的门槛的.
  • Mantis据说部署很方便,PHP的应用.不过版本号怎么才0.2都不到,有点不可靠的样子,看来要多学学Larry Ellison才行.
  • Bugzilla大名鼎鼎,用Perl编写.但是要部署在windows系统上好像还是很困难,而且据说升级的时候会有很多问题发生.
  • OnTime使用起来也还不错,界面满清楚的,不过有两个缺点,一个是它部署在IIS+ASP.NET+MS SQL Server上,限定了只能部署在windows平台上了其实就,另一点更为致命的是2004版还不支持Unicode,限定了只能用在英语国家了,呼
  • Roundup Tracker没有使用过,主要是因为它的环境太偏了,用Python的是.不过口碑好像还不错.
  • 其他还有一些如Issue Manager, issue track,zentrack,trackstudio等等

在Struts中reset方法有什么作用(转)

创建人:王艺
创建时间:2003年6月15日星期日

第一步:
对象的可视范围:request、session、application、page。
Request:在一个请求周期内有效。就是从你点击页面上的一个按钮开始到服务器返回响应页面为止(包括响应页面)。
Session:在一个用户与服务器建立连接的整个过程中有效。
Application:在整个web应用程序内有效。
Page:仅在一个jsp页面内有效。

第二步:
ActionForm在你确定的有效期(可视范围)内是唯一的。

第三步:
在每次为ActionForm赋值前调用它的reset方法。作用是使ActionForm中的值恢复初始状态。在应用中我们可以通过在reset中为变量赋初值的方式,使得页面上的某个对象有显示值。

第四步:
可视范围与赋值前的初始化结合。
由于第二步所述特性,如果可视范围是request,则reset方法并不是很重要,因为你每次调用时都会产生一个新的ActionForm实例,所以你所操作的ActionForm不会与别人分享同时也就不会受别人的影响;如果可视范围是session,由于在session范围内此ActionForm是唯一的,所以你在session范围内需要用到此ActionForm的地方调用的都是同一个ActionForm,要是你没有在reset中对变量赋初值那么前一次调用ActionForm是为它赋的值将在此次调用时有效,这到也没什么。但是,如果恰巧再次调用时你仅仅需要为ActionForm中的一部分变量赋值,那么其余的变量将保持上一次得到的值,这样你就得到了一个“新旧混合体”,我想这多半不是你所期望的;如果可视范围是application,那其影响就更是不难理解了,这时不但是你自己会影响你自己,使用应用的其他用户的操作也会影响到你。

第五步:
知道了reset方法的作用和ActionForm在scope内唯一的特性后就为我们灵活处理ActionForm的行为提供了基础。比如说你现在需要跨过多个页面收集数据信息,这时你就可以把scope设置为session,并且不实现reset方法��这样在每个页面put数据时都不会将之前收集的数据清空,最后在你收集完数据后在Action中调用ActionForm中你自定义的初始化方法,如:resetField。
在具体的我也想不出了,还是要大家在应用时多多体会这些特性,这样才能把架构的威力发挥到最大。

在网上查文章的时候不断的看到IBM的developerWorks 中国网站上面的文章,很多都写的很好。下面这位的文章我已经n次找到了,可以去devoloperWorks上面搜索一下“Uche Ogbuji”,可以找到他写的很多文章,都是XML方面相关的,很不错。

关于作者
Uche Ogbuji 的照片Uche Ogbuji 是 Fourthought Inc. 的顾问兼共同创始人,该公司是专为企业知识管理提供 XML 解决方案的软件供应商和咨询公司。Fourthought 开发了 4Suite,这是一个用于 XML、RDF 和知识管理应用程序的开放源码平台。Ogbuji 先生是一名出生于尼日利亚的计算机工程师兼作家,他生活和工作在美国科罗拉多州博耳德。可以通过 uche.ogbuji@fourthought.com 与 Ogbuji 先生联系。

[转]XML Tag Library

二月 16, 2005

XML Tag Library

The JSTL XML tag set is listed in Table 14-5.

Table 14-5 XML Tags

A key aspect of dealing with XML documents is to be able to easily access their content. XPath (see How XPath Works), a W3C recommendation since 1999, provides an easy notation for specifying and selecting parts of an XML document. In the JSTL XML tags, XPath expressions specified using the select attribute are used to select portions of XML data streams. Note that XPath is used as a local expression language only for the select attribute. This means that values specified for select attributes are evaluated using the XPath expression language but that values for all other attributes are evaluated using the rules associated with the JSP 2.0 expression language.

In addition to the standard XPath syntax, the JSTL XPath engine supports the following scopes to access web application data within an XPath expression:

  • $foo
  • $param:
  • $header:
  • $cookie:
  • $initParam:
  • $pageScope:
  • $requestScope:
  • $sessionScope:
  • $applicationScope:

These scopes are defined in exactly the same way as their counterparts in the JSP expression language discussed in Implicit Objects. Table 14-6 shows some examples of using the scopes.

XPath Expression

Result

The XML tags are illustrated in another version (bookstore5) of the Duke’s Bookstore application. This version replaces the database with an XML representation of the bookstore database, which is retrieved from another web application. The directions for building and deploying this version of the application are in The Example JSP Document. A sample bookstore5.war is provided in <INSTALL>/j2eetutorial14/examples/web/provided-wars/.

Core Tags

The core XML tags provide basic functionality to easily parse and access XML data.

The parse tag parses an XML document and saves the resulting object in the EL variable specified by attribute var. In bookstore5, the XML document is parsed and saved to a context attribute in parsebooks.jsp, which is included by all JSP pages that need access to the document:

<c:if test="${applicationScope:booklist == null}" >
<c:import url="${initParam.booksURL}" var="xml" />
<x:parse doc="${xml}" var="booklist" scope="application" />
</c:if> 

The set and out tags parallel the behavior described in Variable Support Tags and Miscellaneous Tags for the XPath local expression language. The set tag evaluates an XPath expression and sets the result into a JSP EL variable specified by attribute var. The out tag evaluates an XPath expression on the current context node and outputs the result of the evaluation to the current JspWriter object.

The JSP page bookdetails.jsp selects a book element whose id attribute matches the request parameter bookId and sets the abook attribute. The out tag then selects the book’s title element and outputs the result.

<x:set var="abook"
select="$applicationScope.booklist/
books/book[@id=$param:bookId]" />
<h2><x:out select="$abook/title"/></h2>

As you have just seen, x:set stores an internal XML representation of a node retrieved using an XPath expression; it doesn’t convert the selected node into a String and store it. Thus, x:set is primarily useful for storing parts of documents for later retrieval.

If you want to store a String, you must use x:out within c:set. The x:out tag converts the node to a String, and c:set then stores the String as an EL variable. For example, bookdetails.jsp stores an EL variable containing a book price, which is later provided as the value of a fmt tag, as follows:

<c:set var="price">
<x:out select="$abook/price"/>
</c:set>
<h4><fmt:message key="ItemPrice"/>:
<fmt:formatNumber value="${price}" type="currency"/>  

The other option, which is more direct but requires that the user have more knowledge of XPath, is to coerce the node to a String manually by using XPath’s string function.

<x:set var="price" select="string($abook/price)"/>

Flow Control Tags

The XML flow control tags parallel the behavior described in Flow Control Tags for XML data streams.

The JSP page bookcatalog.jsp uses the forEach tag to display all the books contained in booklist as follows:

<x:forEach var="book"
select="$applicationScope:booklist/books/*">
<tr>
<c:set var="bookId">
<x:out select="$book/@id"/>
</c:set>=
<td bgcolor="#ffffaa">
<c:url var="url"
value="/bookdetails" >
<c:param name="bookId" value="${bookId}" />
<c:param name="Clear" value="0" />
</c:url>
<a xhref="http://blogger.org.cn/blog/${url}" mce_href="http://blogger.org.cn/blog/${url}">
<strong><x:out select="$book/title"/> 
</strong></a></td>
<td bgcolor="#ffffaa" rowspan=2>
<c:set var="price">
<x:out select="$book/price"/>
</c:set>
<fmt:formatNumber value="${price}" type="currency"/>
 
</td>
<td bgcolor="#ffffaa" rowspan=2>
<c:url var="url" value="/catalog" >
<c:param name="Add" value="${bookId}" />
</c:url>
<p><strong><a xhref="http://blogger.org.cn/blog/${url}" mce_href="http://blogger.org.cn/blog/${url}"> 
<fmt:message key="CartAdd"/> </a>
</td>
</tr>
<tr>
<td bgcolor="#ffffff">
  <fmt:message key="By"/> <em>
<x:out select="$book/firstname"/> 
<x:out select="$book/surname"/></em></td></tr>
</x:forEach>

Transformation Tags

The transform tag applies a transformation, specified by an XSLT stylesheet set by the attribute xslt, to an XML document, specified by the attribute doc. If the doc attribute is not specified, the input XML document is read from the tag’s body content.

The param subtag can be used along with transform to set transformation parameters. The attributes name and value are used to specify the parameter. The value attribute is optional. If it is not specified, the value is retrieved from the tag’s body.

Divider

[转]使用Java与XSLT的10条技巧
2005-2-12 1:07:38

使用Java与XSLT的10条技巧

作者:Eric M. Burke
翻译:家居猫

1、 尽可能使用缓存。

2、部署前做测试。

3、尽量让XSLT样式表简单。

4、和XSLT一起使用CSS。

5、小心处理不间断空格。

6、写XML生成器类。

7、假设Cookie是被禁止的。

8、把XSLT作为一个代码生成器使用。

9、对于i18n用<xsl:import>

10、设立StreamSource来解析相关的URI。

Web Application Form Design
by Luke Wroblewski

“Input elements should be organized in logical groups so that your brain can process the form layout in chunks of related fields.” �HTML: the Definitive Guide

Quite rare is the Web application that doesn’t make extensive use of forms for data input and configuration. But not all Web applications use forms consistently. Variations in the alignment of input fields, their respective labels, calls to action, and their surrounding visual elements can support or impair different aspects of user behavior.

Form Layouts
When the time to complete a form needs to be minimized and the data being collected is mostly familiar to users (for instance, entering a name, address, and payment information in a check-out flow), a vertical alignment of labels and input fields is likely to work best. Each label and input field is grouped by vertical proximity and the consistent alignment of both input fields and labels reduces eye movement and processing time. Users only need to move in one direction: down.

vertical labels

In this layout, it’s advisable to use bold fonts for input field labels. This increases their visual weight and brings them to the foreground of the layout. When they are not bold, labels may compete with input fields for a user’s attention as they have almost equal visual weight.

When the data being collected by a form is unfamiliar or does not fall into easy to process groups (such as the various parts of an address), left-justifying input field labels makes scanning the information required by the form easier. Users can just scan the left column of labels up and down without being interrupted by input fields. However, the distance between the labels and input fields is often elongated by long labels, and as a result, completion times may suffer. Users have to “jump” from column to column in order to find the right association of input field and label before inputting data.

Left-Justified Horizontal Labels

An alternative layout, right aligns the input field labels so the association between input field and label is clear. However, the resulting left rag of the labels reduces the effectives of a quick scan to see what information the form requires. In the Western world, we read from left to right, so our eyes prefer a hard edge along the left side.

Right-Justified Horizontal Labels

Using Visual Elements
Due to the advantages of a “left-justified horizontal label” layout (easy scanning of input labels and reduced vertical screen space), it may be tempting to attempt to rectify its primary shortcoming: the separation of input fields and their respective labels.

One such approach features the addition of background colors and rules: the different background colors create a vertical unit of labels and a vertical unit of inputs; the horizontal rules form a relationship between each label and input field pair. Though this approach may seem desirable, it actually creates a few problems.

Through gestalt (our innate rules of visual perception), an additional 15 visual elements are added to the layout: the centerline, each background box, and each horizontal line. These elements begin to distract our eye and make it more difficult to focus on the most important elements in the layout: the labels and input fields. As Edward Tufte points out: “Information consists of differences that make a difference.” In other words, any visual element that is not helping your layout ends up hurting it. This can be seen when you try to scan the left column of labels. Your eye repeatedly pauses to consider each horizontal line and the box created by each combination of line and background color.

Backgrounds & Rules

Of course this doesn’t mean that background colors and rules should never be used within form layouts. When there is value in pointing out related groupings of information to users, a thin horizontal rule or light background color can visually unite related data. Both of these elements (rules and background colors) can be especially useful for drawing attention to the primary call to action of a form.

Seperating Related Content

Primary & Secondary Actions
The primary action associated with a form (most commonly “submit” or “save”) needs to carry a stronger visual weight (in the example above bright color, bold font, background color, etc.) than the other form elements and should vertically align with the input fields. This illuminates a path for users and guides them to competition of the form.

When a form has multiple actions such as “Continue” and “Go Back” it may be wise to reduce the visual weight of the secondary action. This minimizes the risk for potential errors and further directs users to completion.

Primary & Secondary Actions

Though these guidelines can help better position a form for your specific purpose, the combination of layout, visual elements, and content that’s right for you should still be verified through user testing or data analysis (completion rates, errors, etc.).

Contact Info
More Articles & Papers

Male jeen
Sesame developer

If you store the files in seperate repositories, you will not be able to do queries that return information from both files (since a query is always evaluated against a single repository). On the other hand, if you keep them seperate it is easier to modify one file without disturbing the other.

So it depends on what you want to do. In most cases where querying is involved, putting files in a single repository is the most logical choice though.

Sesame Repository 配置

二月 6, 2005

Sesame Repository使用id和title来进行标识,id是Sesame中区repository的唯一标识符,而title则是让人容易识别的一个标
记。Sesame
Repository的配置主要是Sail栈的配置,通过Sail栈的配置,可以对repository的持续层存储、是否进行推理、安全和版本问题等等
进行配置。
Sail栈是一种自顶向下的结构,base sail一共有六种:

  • org.openrdf.sesame.sailimpl.rdbms.RdfRepository:
    an non-inferencing driver for relational database storage.
  • org.openrdf.sesame.sailimpl.omm.versioning.VersioningRdbmsSail:
    an inferencing driver for relational database storage that
    supports change tracking.
  • org.openrdf.sesame.sailimpl.memory.RdfRepository:
    a non-inferencing driver for storage in main memory.
  • org.openrdf.sesame.sailimpl.memory.RdfSchemaRepository:
    an inferencing driver for storage in main memory that support RDF and RDF
    Schema entailment.
  • org.openrdf.sesame.sailimpl.nativerdf.NativeRdfRepository:
    a non-inferencing driver for storage directly on disk.

以上六个base sail中,基于关系数据库的sail有六个参数要进行配置,分别是:

  • jdbcDriver
  • jdbcUrl
  • user
  • password
  • dependency-inferencing
  • commitInterval

基于内存的sail有四个参数要进行配置:

  • file
  • dataFormat
  • compressFile
  • syncDelay

基于native disk的sail有一个参数要进行配置:

  • dir

其中蓝色的参数时必须设置的,而紫红色的参数是可选的。

除了base sail以外,还有一个在base sail层之上构造的sail,org.openrdf.sesame.sailimpl.sync.SyncRdfSchemaRepository。
这一sail不是必要的,但是推荐使用这一sail。这一sail层处理了并发访问的问题,如果没有它的话,Sesame遇到多用户同时访问
repository时可能会以不可预测的方式进行工作。

以上主要参考Sesame 1.1用户手册第四章Advanced repository configuration


下一页 »