敏捷软件开发宣言–Manifesto for Agile Software Development

本文探讨了敏捷开发的核心理念,包括快速迭代、用户反馈驱动和持续改进,并通过一个幽默的故事展示了实施敏捷开发可能遇到的实际挑战。同时,文章引用了敏捷宣言的要点,对比了传统开发方法与敏捷方法的区别,并讨论了敏捷开发的12条原则。

敏捷开发, 谁不会呀, 不就是

没文档, 出活快, 用户说啥都能改?

下面是一个笑话,  王屋村的大牛说 -

我最近转手接了一个活, 完事能挣四五万, 我拿过图纸一看, 不就是盖一烟囱吗? 我们是敏捷 (Agile) 的团队,要文档作甚? 马上开始干活!

 

image

 

都快盖好了, 客户来检查,把我打了一顿!我冤枉啊!

image

 

原来, 图纸看倒了,人家让挖口井。

不过, 我们是敏捷的团队, 被客户打了也要拥抱变化, 好不容易砌好的烟囱不能这么废了, 要不断重构, 代码重用。 于是我们在地上挖了一个大坑, 然后把重构后的烟囱强力插入, 终于把这口 “井”做好了!

 

我在《现代软件工程》这门课上讲到了敏捷开发流程, 其中内容比“没文档, 出活快, 用户说啥都能改” 要多得多。

 

下面把敏捷宣言网页中提到的大意转述如下:

 

现有的做法

敏捷的做法

流程和工具

个人和交流

完备的文档

可用的软件

为合同谈判

与客户合作

执行原定计划

响应变化

 

我们认同“现有的做法”有其价值, 但是我们更倾向于“敏捷的做法”。

关于敏捷软件开发的 12 条原则, 仁者见仁, 智者见智.  我的翻译在这里

 

<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> <display-name>AirlineBooking</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- 配置JSTL --> <jsp-config> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/lib/jstl-1.2.jar</taglib-location> </taglib> </jsp-config> <filter> <filter-name>AuthFilter</filter-name> <filter-class>com.airline.filter.AuthFilter</filter-class> </filter> <filter-mapping> <filter-name>AuthFilter</filter-name> <url-pattern>/booking/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>AuthFilter</filter-name> <url-pattern>/user/*</url-pattern> </filter-mapping> <!-- <!&ndash; 应用显示名称 &ndash;>--> <!-- <display-name>OnlineShop</display-name>--> <!-- <!&ndash; 欢迎文件列表 &ndash;>--> <!-- <welcome-file-list>--> <!-- <welcome-file>index.jsp</welcome-file>--> <!-- </welcome-file-list>--> <!-- <!&ndash; 会话超时配置(单位:分钟) &ndash;>--> <!-- <session-config>--> <!-- <session-timeout>30</session-timeout>--> <!-- </session-config>--> <!-- <!&ndash; Servlet 配置 &ndash;>--> <!-- <servlet>--> <!-- <servlet-name>LoginServlet</servlet-name>--> <!-- <servlet-class>com.onlineshop.servlet.LoginServlet</servlet-class>--> <!-- </servlet>--> <!-- <servlet>--> <!-- <servlet-name>RegisterServlet</servlet-name>--> <!-- <servlet-class>com.example.onlineshop.servlet.RegisterServlet</servlet-class>--> <!-- </servlet>--> <!-- <!&ndash; Servlet 映射 &ndash;>--> <!-- <servlet-mapping>--> <!-- <servlet-name>LoginServlet</servlet-name>--> <!-- <url-pattern>/login_process.jsp</url-pattern>--> <!-- </servlet-mapping>--> <!-- <servlet-mapping>--> <!-- <servlet-name>RegisterServlet</servlet-name>--> <!-- <url-pattern>/register_process.jsp</url-pattern>--> <!-- </servlet-mapping>--> <!-- <!&ndash; 错误页面配置 &ndash;>--> <!--<!&ndash; <error-page>&ndash;>--> <!--<!&ndash; <error-code>404</error-code>&ndash;>--> <!--<!&ndash; <location>/error/404.jsp</location>&ndash;>--> <!--<!&ndash; </error-page>&ndash;>--> <!--<!&ndash; <error-page>&ndash;>--> <!--<!&ndash; <error-code>500</error-code>&ndash;>--> <!--<!&ndash; <location>/error/500.jsp</location>&ndash;>--> <!--<!&ndash; </error-page>&ndash;>--> <!-- <!&ndash; 上下文参数 &ndash;>--> <!-- <context-param>--> <!-- <param-name>jdbcDriver</param-name>--> <!-- <param-value>com.mysql.jdbc.Driver</param-value>--> <!-- </context-param>--> <!-- <context-param>--> <!-- <param-name>jdbcUrl</param-name>--> <!-- <param-value>jdbc:mysql://localhost:3306/onlineshop</param-value>--> <!-- </context-param>--> <!-- <!&ndash; 过滤器配置(可选) &ndash;>--> <!--<!&ndash; <filter>&ndash;>--> <!--<!&ndash; <filter-name>CharacterEncodingFilter</filter-name>&ndash;>--> <!--<!&ndash; <filter-class>com.example.onlineshop.filter.CharacterEncodingFilter</filter-class>&ndash;>--> <!--<!&ndash; <init-param>&ndash;>--> <!--<!&ndash; <param-name>encoding</param-name>&ndash;>--> <!--<!&ndash; <param-value>UTF-8</param-value>&ndash;>--> <!--<!&ndash; </init-param>&ndash;>--> <!--<!&ndash; </filter>&ndash;>--> <!--<!&ndash; <filter-mapping>&ndash;>--> <!--<!&ndash; <filter-name>CharacterEncodingFilter</filter-name>&ndash;>--> <!--<!&ndash; <url-pattern>/*</url-pattern>&ndash;>--> <!--<!&ndash; </filter-mapping>&ndash;>--> </web-app>我这个配置有问题吗
最新发布
06-16
### 正确配置 `web.xml` 以支持 JSTL 核心 URI 为了确保 JSP 文件能够正确解析 JSTL 核心 URI `[http://java.sun.com/jsp/jstl/core]`,需要在 `web.xml` 文件中进行适当的配置。以下是具体的配置方法: #### 配置 `<jsp-config>` 元素 在 `web.xml` 文件中添加 `<jsp-config>` 元素,并定义标签库的 URI 和位置。以下是一个示例配置[^5]: ```xml <jsp-config> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/c.tld</taglib-location> </taglib> </jsp-config> ``` - `<taglib-uri>`:指定 JSTL 标签库的 URI。 - `<taglib-location>`:指定 TLD 文件的位置。通常位于项目的 `/WEB-INF/` 目录下。 #### 确保 TLD 文件存在 如果项目中未包含 `c.tld` 文件,则需要手动添加。可以从 JSTL 的官方文档或相关依赖中获取 `c.tld` 文件,并将其放置在 `/WEB-INF/` 目录下。 #### 检查 Servlet 版本 确保 `web.xml` 文件的头部分定义了正确的 Servlet 规范版本。例如,对于 Servlet 3.0 及以上版本,应使用以下声明[^4]: ```xml <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> </web-app> ``` #### 验证 JSP 页面中的导入语句 在 JSP 页面中,确保正确引入了 JSTL 核心标签库。例如: ```jsp <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> ``` 如果使用的是 JSTL 1.0,则 URI 应为 `http://java.sun.com/jstl/core`[^3]。 --- ### 解决 JasperException 异常 当出现 `org.apache.jasper.JasperException: The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved` 错误时,通常是因为缺少必要的 JSTL 依赖或配置错误。以下是解决方法: #### 添加 JSTL 依赖 如果项目使用 Maven 构建,则需要在 `pom.xml` 文件中添加以下依赖项[^1]: ```xml <dependency> <groupId>javax.servlet.jsp.jstl</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>org.glassfish.web</groupId> <artifactId>javax.servlet.jsp.jstl</artifactId> <version>1.2.5</version> </dependency> ``` #### 检查 Tomcat 配置 如果项目运行在 Tomcat 容器上,确保 Tomcat 的 `lib` 目录中包含必要的 JSTL 和 Standard 库文件。如果缺少这些文件,可以将它们手动添加到 Tomcat 的 `lib` 目录中[^2]。 --- ### 示例代码 以下是一个完整的 `web.xml` 配置示例: ```xml <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <jsp-config> <taglib> <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> <taglib-location>/WEB-INF/c.tld</taglib-location> </taglib> </jsp-config> </web-app> ``` 以下是一个完整的 JSP 页面示例: ```jsp <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <html> <head> <title>JSTL Example</title> </head> <body> <h1>JSTL forEach Example</h1> <ul> <c:forEach var="item" items="${['Apple', 'Banana', 'Cherry']}"> <li>${item}</li> </c:forEach> </ul> </body> </html> ``` --- ### 注意事项 - 如果仍然报错,检查是否遗漏了某些依赖项或配置。 - 确保项目的运行环境(如 JDK、Tomcat)与项目要求一致。 - 如果使用的是 Spring Boot 或其他框架,可能需要额外配置以支持 JSTL。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值