2012 年文章归档
共 10 篇文章
简单工厂模式----《大话设计模式》第一章
本章要点如下: 题目:用任意一种面向对象语言实现一个计算器控制台程序。要求输入两个数和运算符号, 得到结果。 程序应该做到:(1)可维护;(2)可复用;(3)可扩展;(4)灵活性好。 可维护:就是说代码一处更改,不能产生连锁反应,不能影响其他地方。 可复用:尽量减少重复性代码。 可扩展:如果要扩展新的功能、新的业务,则只需要增加新的类就好了,不对已有的类和逻辑产生影响。插拔式的应用。 面向对象要点: 面向对象三大特性:封装、继承、多态。 通过封装、继承、多态把程序耦合降低。 业务逻辑和界面逻辑分开。 简单工厂模式实现过程如下: 1. 首先,搞清楚业务中容易发生变化的部分。在本应用中,要求计算…
2012-08-08 16:29 · 设计模式
序 --- 《大话设计模式》笔记,阅读策略
《大话设计模式》 程杰 著 阅读策略: 第一遍:粗读。了解本书所讲的各种设计模式的大概。关键:尽可能快的读完。 第二遍:细读。理解书中每张的例子程序,并用java语言实现一遍。关键:只关注本章的 例子程序,程序能够实现并跑起即可。至于中间的一步步的分析过程能理解多少 是多少。 第三遍:深读。进一步理解书中的例子程序,思考为什么要用这种模式,能不能使用其他模 式实现。 第四遍:精读。脱离书中的例子程序,每一种模式可以开一个专题,广泛阅读。 第五遍:心读。抛开书本和网络,对每一种设计模式有自己的理解,并在博客上陆续发表自 己的见解。
2012-08-02 17:52 · 设计模式
8.1 to 8.2 Agile Process 培训总结
Agile Process的四个理念: Individuals and interactions over processes and tools Working software over comprehensive document Customer collaboration over contract negotiation Responding to change over following a plan HW. 1 Simplicity-the art of maximizing the amount of work not done -- is essential 简易是必须…
2012-08-02 16:33 · 敏捷开发
Self-introduction
Very pleased to meet you! My name is xxx. (This is my resume, please have a look.) Firstly, I would introduce myself from education background,project experiences,career planning,hobbies,etc. I promise what I will say is true. I graduated from southwest university of science and technology. In June…
2012-07-26 17:17 · English
English 900 - 5&6&7 - Identifying people by occupation
5. Identifying people by occupation Who are you? I am a student. Who is that over there? He is a student too. (He's) Is that lady a student? No,she isn't. Those men are students either. Am I your teacher? Yes,you are. That man is a teacher,isn't he? Yes,he is. Who are those people? May be the farme…
2012-07-26 10:27 · English
VOA SE - 2 - 2012/7/25
Under international law, refugees are the only displaced people with a guaranteed right to education. But that guarantee often means little. Schools in refugee camps often have limited money for teachers and supplies. Last year, Pauline Rose visited the Dadaab camps in northern Kenya. Those camps s…
2012-07-25 10:31 · English
第一个JSF程序——Hello World!(maven+eclipse4)
开始做一个小的JSF程序。 主要用到的工具及软件有: Eclipse Java EE IDE(Version: Juno Release) apache-tomcat-6.0.35 m2eclipse(1.1.0.201205300009) jdk1.7.0_05 helloworld主要实现用户输入名字,然后单击Say hello to按钮或回车,下面相应显示"Hello xxx!"。下面是开发的主要步骤(默认jdk、tomcat、maven等已经配置好了。): (1)新建一个maven项目。File>New>Other>Maven>Maven Project;在弹出的对话框中勾选Crea…
2012-07-24 19:09 · JSF
VOA SE - 1 - 2012-07-24
Conflicts around the world are keeping tens of millions of young people from going to school. Many have physical or emotional injury that make hard or even impossible for them to learn. Later this year UNESCO will release its twenty-twelve Education for All Global monitoring report. UNESCO is Unite…
2012-07-24 13:41 · English
eclipse中安装配置maven
1、首先说一下在windows中安装maven。非常简单。。。 到 http://maven.apache.org/download.html 中下载maven,截止笔者发文时,maven最新版本为maven 3.0.4。我下载的即为此版本。具体地址为 http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-3.0.4-bin.zip (以后可能会有变化,自己去官网慢慢找就是了,不难)。 下载以后解压,我的解压目录为E:\apache-maven-3.0.4,即为M2_HOME 接下来就是我们熟悉的配置环境变量:新建环…
2012-07-23 12:19 · maven
Eclipse中配置tomcat6
首先是Eclipse的版本:Eclipse IDE for Java EE Developers(Juno,Eclipse4.2),下载地址: http://www.eclipse.org/downloads/ 。 Tomcat用的是apache-tomcat-6.0.35,本地的根目录是E:\apache-tomcat-6.0.35,暂记为%TOMCAT_HOME%。 下面说一下具体的配置过程及注意事项。 1. 依次点击Window>Preferences>Server>Runtime Environment,在右边面板中单击Add按钮。这是要新建一个Server的运行环境。本步骤如下图所…
2012-07-20 18:46 · eclipse