2008-04-06
JavaPersistenceWithHibernate读书笔记(6)--持久层与另外可用替代方案
关键字: persistence layers and alternatives
1.3 Persistence layers and alternatives In a medium- or large-sized application, it usually makes sense to organize classes by concern(这个by concern写的不错呀!). Persistence is one concern; others include presentation, workflow,and business logic. A typical object-oriented architecture include ...
- 17:21
- 浏览 (244)
- 评论 (0)
- 分类: 我的读书笔记
- 进入论坛
- 发布在 Database圈子 圈子
2008-04-06
<Java.JavaEE面试整理>(12) 对Collections FrameWork的理解(二)
关键字: concurrentmodificationexception
<Java.JavaEE面试整理>(12) 对Collections FrameWork的理解(二) ++++++++++++++++++++++++++++++++++++++++++真是抱歉,没有把那个<Java.JavaEE面试整理>(11) 对Collections FrameWork的理解(一)(以下简称"理解一")这样核心部分的内容放到频道首页来让更多的朋友看到,而只是把个英文原文放到这里.应该说"理解一"更为值得关注.为了答谢大家的支持,鄙人会将这段时间对这个Collection Framework的理解心 ...
Q 16:谈谈你对Java Collections Framework的理解? LF DP FAQQ 16: collections framework对外提供的接口是List,Set and Map.List和Set继承自Collection接口.不要把Collection这个接口和Collections这个类搞混了,这个Collections类与Arrays类似,也是一个工具类. Set(HashSet,TreeSet): &nbs ...
写博一月后的收获与反思开始安下心来写博到现在,细想一下也有一个来月了,期间几乎是都有博客粘上去.从刚开始的开场白, Tomcat折磨心得,憔悴的一天及其疗法,还有母鸡孵出小鸭子这个有些怪诞的Log,blissfully ignorant of the goings-on of the outside,再到Eclipse里配置Ant 组织的Project(3)Eclipse中配置Tomcat的JNDI至到现在的一系列读书心得,其间很有追名逐利的浮躁,不过有一点成功对我的帮助很大,那就是在这种追名逐利的浮躁的牵引下,我很清楚地发现了我的写作能力很是有限,极需提高;有些话,心里很是明白,可写出来后总 ...
2008-04-04
JUnit In Action读书笔记(7) -- Managing resources with
关键字: managing resources with a fixture
2.6.1 Managing resources with a fixture 有时,一些tests是需要外部资源的,而这些资源的配置却很麻烦.这方面很典型的例子就是数据库的连接.而有时为了一个测试,我们得需要很复杂的data stuctures或一长串的随机输入. 要是把这些很典型的setup代码也写进tests里的话,那可就显得有些傻了.毕竟我们要测试的不是搭建资源的能力--我们仅仅是需要一个稳定的测试环境.这里的测试环境set在JUnit里称 ...
2008-04-03
<Java.JavaEE面试整理>(9)--抽象类与接口有什么区别?以及如何选择?
关键字: abstract class, interface, or ?, 抽象类与接口有什么区别?以及如何选择?
"abstract class" or "interface"?Q 12: 抽象类与接口有什么区别?以及如何选择? LF DP DC FAQ A 12: In design, 我们想让基类只为其子类提供一个调用的接口,这样做我们并不想将此类实例化,我们只是在运行时将子类upcast to it(这样就可以获得多态特性了).我们可以用Java里的abstract关键字来将些基类定义为abstract class. Java里的Interface又将这个概念进一步地抽象了,利用它编译器将阻止对接口中展现的方法实现.这样我们 ...
2008-04-03
<Java.JavaEE面试整理>(8) --基于什么考虑,Java 1.4中引入Assert???
关键字: what is design by contract? explain the assertion construct?
Q 11: What is design by contract? Explain the assertion construct? DC(基于什么考虑,Java 1.4中引入Assert???) A 11: Design by contract specifies the obligations of a calling-method and called-method to each other. Design by contract is a valuable technique, which should be used to build well-defined interfaces ...
1.2.4 Problems relating to associations 在我们的E-Co实例中的Domain model里,实例对象的关系是用associations表示的,这样User Address和BillingDetials就可以关联起来.不过,BillingDetails与Address不同的是,在BD中这个类有自己表存放数据. 实例对象间的关联及其管理是ORM中的核心内容. OO中,关联关系是 ...
- 10:41
- 浏览 (731)
- 评论 (0)
- 分类: 我的读书笔记
- 发布在 Database圈子 圈子
1.2.2 The problem of subtypes Java world: parent class and child class. 父类和子类. Sql world: 要是有supertables和subtables就好了,那样我们就可以在新建一个表时从一个父表中继承来一些列,可是RDBMS里并没有提供这种机制. 对于如何来沟通这两个世界里的就subtypes这方面的联系,本书将在第五章第一节的"Mapping class inheritance&quo ...
- 17:25
- 浏览 (565)
- 评论 (0)
- 分类: 我的读书笔记
- 进入论坛
- 发布在 Database圈子 圈子
Q. Why would you prefer code reuse via composition over inheritance? Both the approaches make use of olymorphism and gives code reuse (in different ways) to achieve the same results but: 1,The advantage of class inheritance is that it is done statically at compile-tim ...
Q 10:请谈谈你对多态,继承,封装和动态绑定(dynamic binding)的理解?A 10: 多态:是指对于一个给定类型的引用可以指向不同类型的对象,并在其方法调用时会自动地选择其真正指向对象的特定方法.换个角度来说,多态是一种从上底到上的方法调用形式(in a nutshell,polymorphism is a bottom-up method call).Java里的用多态的好处是,我们可以在不修改调用代码(当然这个调用代码本身使用了具有多态特性的类和接口)的情况下,很容易地添加新的实现类.多态背后的机制就是我们说的动态绑定. &nbs ...
2008-04-01
JUnit In Action读书笔记(5)
关键字: rolling your own test suite, collecting parameters with testr
2.3.2 Rolling your own test suiteThe default TestSuite goes a long way toward keeping the simple things simple.But what happens when the default suite doesn’t meet your needs? You may want to combine suites from several different packages as part of a master suite. If you’re working on a ...
Q 09: 请谈谈你对'is a'和'has a'的理解?也就是继承与组合的理解?组合与聚合又有什么不同?A 09: 'is a'的关系描述的OO中的继承,而'has a'描述的是OO中的组合方式.通过继承与组合,我们都可以在新类中使用已有代码.这里我们也说下,在OO中通常有两种主要的代码重用的方式:类的继承与对象的组合. 继承是单向的.例如,Hourse is a Building.而我们并不能说一个Building就一定是House.在Java中,我们用extends来表达继承. 组合:我们还用上面的例子来说,我们可说 ...
JavaPersistenceWithHibernate读书笔记(2)1.2 The paradigm mismatchcan be broken into several parts-->we will examine one at a time-->start with a example that is problem free --> mismatch appear.User: represent information about a user of the system.BillingDetails: represent information about the ...
- 19:24
- 浏览 (187)
- 评论 (0)
- 分类: 我的读书笔记
- 进入论坛
- 发布在 Database圈子 圈子
Q 06:Java中构造方法与其它常规方法有什么区别?要是你没写构造方法会怎么样呢?我们能不能在一个构造方法里调用另一个构造方法?如何调用父类的构造方法?A 06: 构造方法: 必须与类名相同,并且不能有任何的返回值.与常规方法可以无限次的调用相比,构造方法只能在一个对象创建时调用,且只调用一次. 常规方法: 常规方法的名字没有任何语法上的限制,在调用次数上也没限制.Q 要是没写构造方法会怎么样? &nb ...
2.2 Launching tests with test runners Writing tests can be fun, but what about the grunt work of running them? 2.2.1 Selecting a test runner The JUnit distribution includes three TestRunner classes: one for the text console, one for Swing, and even one for AWT (th ...
Chapter 2 Exploring JUnitThis chapter covers: Using the core JUnit classes Understanding the JUnit life cycle++++++++++++++++++++++++As we add new classes(这里的new classes是指像Calculator这样的实际类?), we often want to make changes to classes under test(这里的classes under tes ...
1.4 Setting up JUnit JUnit comes in the form of a jar file (junit.jar). In order to use JUnit to write your application tests, you'll simply need to add the junit jar to your project's complication classpath and to your execution classpath when you run the tests. ...
Q 04: 怎么用Java里的Package?A 04: 利用Java的package,因类同名而造成的冲突就可以轻易地解决掉.这个package的概念也有利于帮助我们的整理一个项目中的文件. Java里的java.lang包是自动引入的,而其它的包就得手动用import引入了.Q 05: 说说你对类加载器的理解?如何来运行一个包中的类?说说对动态类加载器的理解?A 05: 类加载器是分层地布署的(class loaders are hierachical).在JVM中,类是以这种方式加载进去的,当这个类在一个 ...
Part 1: Getting started with Hibernate and EJB3.0In part1, we show you why object persistence is such a complex topic and what soluctions you can apply in practice. chapter1: O/R paradigm mismatch and several strategies to deal with it. chapter2: a guide step-by-s ...
JUnit In Action读书笔记(1)Part1 JUnit distilledchapter1 will teach you what the JUnit framework is and what problems it solves.chapter2 will take you on a discovery tour of the core JUnit classes and how to best use them.chapter3,you'll practice your new JUnit knowledge on a real-world example.chapter4 ...
Java.J2EE.Job.Interview.Companion(2)读书笔记 Q 01: 你出于什么考虑而选择Java作开发语言? (LF DC FAQ) A 01: 1,Java在语言层面上支持多线程,Socket编程,内存管理(也就是垃圾自动回收). 2,面向对象编程. 3,与其它语言相比更优于跨操作系统的移植. 4,对Web编程的内存 ...
- 浏览: 25449 次
- 性别:

- 来自: 北京

- 详细资料
搜索本博客
链接
最新评论
-
自写的一个JavaScript小小 ...
被ym1981抢先了
-- by longleg -
自写的一个JavaScript小小 ...
真谢谢ym1981,我还不知道select可以这么简单地来选定,再谢谢自己,若不 ...
-- by rmn190 -
自写的一个JavaScript小小 ...
function lockSelect(id, value){ ...
-- by ym1981 -
"异常"的梦
呵呵...
-- by rmn190 -
"异常"的梦
学习Java有点疯狂了,连做个梦都能想到异常,佩服得五体投地,看来偶也要努力学习 ...
-- by celebration






评论排行榜