Posts
Doctrine 2 Stable Release!!
2010-12-21 這天 Doctrin2 釋出正式穩定版.
Doctrine 2 First Stable Release
這個版本工程之浩大於2008就開始開發,歷經2年半的時間努力.核心開發團隊五人於最後一年最後整合應用保有 Doctrine 1功能並重構並且導入新的DataMapper.
What is new in Doctrine 2?
- DQL is now a real language inside Doctrine, based on an EBNF that is parsed and transformed to SQL. Benefits of this refactoring are readable error messages, the generation of an AST that allows us to support many different vendors and powerful hooks for developers to modify and extend the DQL language to their needs. DQL can either be written as a string or be generated using a powerful QueryBuilder object.
- Your persistent objects (called entities in Doctrine 2) are not required to extend an abstract base class anymore. Doctrine 2 allows you to use Plain old PHP Objects.
- The UnitOfWork is not an alibi-pattern as implemented in Doctrine 1. It is the most central pattern in Doctrine 2. Instead of calling save() or delete() methods on your Doctrine_Record instances you now pass objects to the data mapper object called EntityManager and it keeps track of all changes until you request a synchronisation between database and the current objects in memory. This process is very efficient and has consistent semantics. This is a significant improvement over Doctrine 1 in terms of performance and developer ease-of-use.
- There are no code-generation steps from YAML to PHP involved in the library anymore. YAML, XML, PHP and Doc-Block Annotations are four first-class citizens for defining the metadata mapping between objects and database. A powerful caching layer allows Doctrine 2 to use runtime metadata without relying on code-generation.
- A clean architecture and powerful algorithms make Doctrine 2 magnitudes faster than Doctrine 1.
- Doctrine 2 supports an API that allows you to transform an arbitrary SQL statements into an object-structure. This feature is used by the Doctrine Query Language itself and is a first-class citizen of the library. It essentially allows you to make use of powerful vendor-specific features and complex SQL statements without having to cirumvent the ORM completely.
- Inheritance is not akward anymore. There are now three different types of inheritance to choose from: Mapped Superclasses, Single-Table- and Joined-Table-Inheritance.
- Many more features, just see the reference guide on what is possible with Doctrine 2.
Posts
VirtualBox-OSE on FrreeBSD 免x11
參考 http://d.hatena.ne.jp/wittro/20100617/1276782079 cd /usr/src make build32 install32; ldconfig -v -m -R /usr/lib32 cd /usr/ports/emulators/virtualbox-ose make install clean ============================================================================= VirtualBox was installed. You need to load the vboxdrv kernel module via /boot/loader.conf: vboxdrv_load="YES" For bridged networking please add the following line to your /etc/rc.conf: vboxnet_enable="YES" Reboot the machine to load the needed kernel modules. You also have to add all users to your vboxusers group in order to use vbox.
Posts
PHPUnit
PHPUnit 介紹 PHPUnit 其實是個 PHP 寫成的 Framework , 主要功能就是自動對我們所寫的PHP程式做輸入輸出的檢查 一個方便的工具來幫我們自動測試 , 而 PHPUnit 就可以讓我們自行撰寫測