Ray's playground

 

06 2010 档案

Working with persistent objects(Chapter 4 of Hibernate In Action)
摘要:In Hibernate, objects instantiated using the new operator aren’t immediately persistent.Their state is transient, which means they aren’t associated with any databasetable row, and so thei... 阅读全文

posted @ 2010-06-30 21:20 Ray Z 阅读(238) 评论(0) 推荐(0)

Managing transactions(Chapter 6 of Spring In Action)
摘要:Spring supports both programmatic and declarative transaction management.In either case, Spring shields you from having to work directly with a specifictransaction management implementation by abstrac... 阅读全文

posted @ 2010-06-29 12:59 Ray Z 阅读(195) 评论(0) 推荐(0)

More About Methods(Chapter 8 of Programming Ruby)
摘要:Methods that return a boolean result (socalledpredicate methods) are often named with a trailing ?.  Methods that are “dangerous,” or that modify their receiver, may be named with a traili... 阅读全文

posted @ 2010-06-29 00:05 Ray Z 阅读(187) 评论(0) 推荐(0)

Standard Types(Chapter 6 of Programming Ruby)
摘要:[代码]  In Ruby,these sequences are created using the . . and . . . range operators. The two-dot form createsan inclusive range, and the three-dot form creates a range that excludes the specified highva... 阅读全文

posted @ 2010-06-28 13:00 Ray Z 阅读(140) 评论(0) 推荐(0)

Sharing Functionality: Inheritance, Modules, and Mixins(Chapter 5 of Programming Ruby)
摘要:Modules are a way of grouping together methods, classes, and constants. Modules give youtwo major benefits:  • Modules provide a namespace and prevent name clashes.  • Modules support the ... 阅读全文

posted @ 2010-06-28 12:43 Ray Z 阅读(280) 评论(0) 推荐(0)

Containers, Blocks, and Iterators(Chapter 4 of Programming Ruby)
摘要:[代码]injectCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1[1,3,5,7].inject(0){|sum,element|sum+element}#=>162[1,3,5,7].inject(1){|product,element|... 阅读全文

posted @ 2010-06-28 12:38 Ray Z 阅读(171) 评论(0) 推荐(0)

Classes, Objects, and Variables(Chapter 3 of Programming Ruby)
摘要:classCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1classBookInStock2attr_reader:isbn3attr_accessor:price4definitialize(isbn,price)5@isbn=isbn6@pric... 阅读全文

posted @ 2010-06-27 16:44 Ray Z 阅读(161) 评论(0) 推荐(0)

Hitting the database(Chapter 5 of Spring In Action)
摘要:Spring can integrate with ORM frameworks such as Hibernate, iBatis.Several caching solutions are supported,including:  ■ EHCache  ■ GigaSpaces  ■ JBoss Cache  ■ JCS  ■ Op... 阅读全文

posted @ 2010-06-27 12:24 Ray Z 阅读(183) 评论(0) 推荐(0)

Ruby.new(Chapter 2 of Programming Ruby)
摘要:Ruby uses a convention that may seem strange at first: the first characters of a name indicatehow the name is used. Local variables, method parameters, and method names should allstart with a lowercas... 阅读全文

posted @ 2010-06-26 21:50 Ray Z 阅读(167) 评论(0) 推荐(0)

Advising beans(Chapter 4 of Spring In Action)
摘要:Advice  In AOPterms, the job of an aspect is called advice.Advice defines both the what and the when of an aspect. In addition to describingthe job that an aspect will perform, advice addresses the qu... 阅读全文

posted @ 2010-06-25 21:57 Ray Z 阅读(215) 评论(0) 推荐(0)

Advanced bean wiring(Chapter 3 of Spring In Action)
摘要:To accommodate sub-beaning, the <bean> element provides two specialattributes:  ■ parent—Indicates the id of a <bean> that will be the parent of the <bean>with the parent... 阅读全文

posted @ 2010-06-24 21:54 Ray Z 阅读(208) 评论(0) 推荐(0)

Collections(Chapter 7 of C# 4.0 in a nutshell)
摘要:Although the enumeration interfaces provide a protocol for forward-only iterationover a collection, they don’t provide a mechanism to determine the size of the collection,access a member by inde... 阅读全文

posted @ 2010-06-22 12:20 Ray Z 阅读(173) 评论(0) 推荐(0)

Mapping persistent classes(Chapter 3 of Hibernate In Action)
摘要:Along with Java identity (memory location) and object equality, we pickup database identity (location in the persistent data store). We now have three methodsfor identifying objects:  ■ Object i... 阅读全文

posted @ 2010-06-20 20:47 Ray Z 阅读(292) 评论(0) 推荐(0)

Basic bean wiring(Chapter 2 of Spring In Action)
摘要:There is no single Spring container. Spring comes with several containerimplementations that can be categorized into two distinct types. Bean factories(defined by the org.springframework.beans.factory... 阅读全文

posted @ 2010-06-20 19:16 Ray Z 阅读(305) 评论(0) 推荐(0)

Springing into action(Chapter 1 of Spring In Action)
摘要:HelloAppCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1packagecom.springinaction.chapter1.hello;23importorg.springframework.beans.factory.BeanFactor... 阅读全文

posted @ 2010-06-19 23:27 Ray Z 阅读(265) 评论(0) 推荐(0)

Introducing and integrating Hibernate(Chapter 2 of Hibernate In Action)
摘要: 阅读全文

posted @ 2010-06-12 01:37 Ray Z 阅读(114) 评论(0) 推荐(0)

面向应用的持久层设计(深入浅出Hibernate第一章)
摘要:Data Accessor Object(DAO) = Data + Accessor + Object 阅读全文

posted @ 2010-06-10 23:35 Ray Z 阅读(162) 评论(0) 推荐(0)

Framework Fundamentals(Chapter 6 of C# 4.0 in a nutshell)
摘要:Here are the other rules for overriding object.GetHashCode:  • It must return the same value on two objects for which Equals returns true(hence, GetHashCode and Equals are overridden together). ... 阅读全文

posted @ 2010-06-09 22:27 Ray Z 阅读(238) 评论(0) 推荐(0)

Imperative Programming(Chapter 4 of Programming F#)
摘要:The ref type, sometimes referred to as a ref cell, allows you to store mutable data onthe heap, enabling you to bypass limitations with mutable values that are stored on thestack. To retrieve the valu... 阅读全文

posted @ 2010-06-08 09:29 Ray Z 阅读(215) 评论(0) 推荐(0)

Framework Overview(Chapter 5 of C# 4.0 in a nutshell)
摘要:What’s New in .NET Framework 4.0Framework 4.0 adds the following new features:  • New core types: BigInteger (for arbitrarily large numbers), Complex (complexnumbers), and tuples (Chapter ... 阅读全文

posted @ 2010-06-01 19:01 Ray Z 阅读(364) 评论(2) 推荐(0)

Advanced C#(Chapter 4 of C# 4.0 in a nutshell)
摘要:LambdaCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1usingSystem;2usingSystem.Collections.Generic;3usingSystem.Linq;4usingSystem.Text;56namespaceCon... 阅读全文

posted @ 2010-06-01 09:06 Ray Z 阅读(190) 评论(0) 推荐(0)

导航