strut项目小总结(团队)

03-05-14 cc
    

Struts项目总结

4月的XXXXXX系统中的指标管理、实拨计划与拨款单成功采用了Struts框架结构进行开发。

成功经验

其中,组长1人,小组成员3人,3人对Struts有一定了解。对Struts进行培训大概经历了1周(与业务培训同时进行),

立项1月1日开始。

1月1日-1月20日,了解需求,作反分析。

1月20日-1月30日,Struts培训学习。

2月8日-2月21日,设计,程序设计书。

2月22日-4月15日,写完程序(指标管理、实拨计划与拨款单)。

小组成员独立开发设计,交流很少。每个小组成员都按照一定的规范独立建立了struts构架。在以后的开发中应该使用同一个框架,小组成员按照层次分工,而不按模块分工。

优势劣势

由于采用新技术,所带来的优势:结构合理,复用性增强,成熟的web框架,维护性提高。

劣势:增加开发成本,对于不熟悉框架的人员来说维护性降低。

技巧

1. Struts采用合理的MVC架构。应尽可能多把应用处理放在Model层。

2. 表层的Taglib尽量可以不使用。使用taglib有时增加了复杂度,使用普通的html也可以达到同样效果。例如<form name=””>表单的使用。

3. 学习struts应通过自带的实例来学习。

4. 控制层中的action要调用façade模式。

总结

建议使用struts框架作为今后的开发模式。可以对struts进行相关培训。

    

inens
2003-05-15 08:21

我觉得Taglib还是要用的

这样可以节省大量的重复代码

使用Taglib并不会增加复杂度呀

你定义一次就可以了

而且还可以随时扩充,修改时也只是修改标签库就可以了

我们的项目都是用Taglib很好的呀

你能给出不用的理由么?

iceant
2003-05-16 14:34

TO: inens

taglib 的使用有个度。用过了,维护就麻烦。

度在哪,不好一概而论,只能靠自己把握。struts 中的 taglib 是太多了。

iceant
2003-05-16 14:39

我借花献佛,也转 post 一篇 Jato vs Struts 开发的经验。

一位Senior Java Architect,在他们公司的不同项目中分别使用了 Jato 和 Struts 构建项目后,写了这篇文章。我想大家可以做个借鉴吧。

==============================================================

Todd and JATO Team,

First of all, thank you very much for the support and prompt detailed

answers. Our industry-class and enterprise-scale application

(finance) is successfully running in production (SunOneServer/JATO

1.2).

JATO performs extremely well (even combined with our original very

fat object framework encompassing session management, workflow

processing, business rules engine, etc., etc.). Moreover, there is no

performance degradation for large number of concurrent users.

Extremely large and over-loaded with business logic pages (JATO's

very thin JSP is over 150K!, e.g.) just fly and it is hundred percent

dynamically multilingual (parallel content!).

A couple of notes regarding to the discussion JATO vs. Struts or vice

versa, since another application of the company uses Struts framework

and we could compare.

1. If application should be migrated from ND to J2EE (probably it is

a closed stage in the industry) it must be JATO (iMT tool does its

job very well).

2. If the application should be written from the scratch the

demarcation line is the size and complexity of the project. For any

enterprise size and complex application it has to be JATO as well.

Formalized model and event driven architecture allows easily

implement/include/add the best design patterns throughout the

application. Elimination of thread safe programming for developers

leads both to rapid bug-less development and good performance under

load (much better to refer to the originators' articles). From my

personal point of view, JATO has modern, very balanced and extensible

architecture and it is just nice to work with it.

3. For small/medium size application it could be either one or

another. It really depends on different factors (further company

goals, staff skills, staff education time, etc., etc.).

Now why I am using JATO abbreviation, not S1AF. There is still no

official announcement from Sun with regards to the S1AF code access

(please correct me if I am wrong). Conversion of the JATO 1.2 based

project to S1AF is not easy if the project integrated with non-Sun

IDE (in our case, we have JBuilder). Thus, it is could be a critical

to get this answer. Personally, I prefer to stay with JATO 1.2 (even

without interoperability with the code generator GUI) having the

access/control to the framework rather than to use reliable GUI as a

black box.

Please do not consider this as a criticism. I just don't know

details, it is totally out of my responsibilities, and I would like

to be wrong with my assumption. Nevertheless, from my point of view,

closing of the access to the source code could probably hurt S1AF's

market expansion. Struts source code is open (and will be open) by

default and this is the today's mainstream. JATO is very good and

matured, but not easy beast and one of the most efficient way to

learn it is to read the code. I definitely know, that people choosing

the MVC framework in the industry has been already taking this factor

into account. It doesn't mean, of course, that the GUI tool itself

should be free.

Let me be more precise with some historical excurse. NetDynamics

policy was to close the access to the source code and use it as a

black box (with a very good set of documentation). It was a common

practice in pre-J2EE time, but took a lot of extra hours to get the

result sometimes. Who knows where the NetDynamics would be if they

had chosen opposite approach.

Finally, thank you very much again for such a good product. Every

single word in the white paper is true. If I have any choice for my

further projects, I will stick with this state-of-the-art MVC

implementation (JATO or S1AF) again.

Vladimir Ivanov,

Senior Java Architect,

Ph. D. in Applied Mathematics

cc
2003-05-16 15:42

使用taglib确实遇到了麻烦,像使用输入框这样简单的taglib是没有问题,但是一但需要表现力增强的需求就不行了,比如加一些javascrip就不太好些,当然不是不能写。像一些iframe的也没有敢写,没自信写吧。也希望以后能把这些代码整到taglib里面去,总之,当时是没时间的。而且我们的总体规划不是太好,应该有人专门来写表层的东西的。下次就知道了。

写taglib的如下:

<html:form action="/budgetlists" target="budgetlist">
<logic:iterate name="budgets" id="budgetUnion" scope="session" type="com.foundercy.budget.util.BudgetUnion">
<html:hidden property="action" value="send"/>
<p>

另外,我们的XML配置文件维护的不是太好。CVS总是冲突,有好方案么?我曾经问过BEA的培训师,他也没办法,找个人专门维护吧。

2Go 1 2 下一页