Below you will find pages that utilize the taxonomy term “Doctrine”
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
Doctrine 入門(一)
準備
依照之前整合的 Zend Framework 1.11.0 and Doctrine 1.2.3 and Smarty 3.0.4 環境,來做學習與測試.
更改index.php
application.ini 環境
;Doctrine
autoloaderNamespaces[] = "Doctrine_"
pluginPaths.ZendX_Doctrine_Application_Resource = "ZendX/Application/Resource"
resources.doctrine.debug = 1
resources.doctrine.paths.models_path = APPLICATION_PATH "/../models"
resources.doctrine.connections.orm1.dsn.adapter = mysql
resources.doctrine.connections.orm1.dsn.user = "user"
resources.doctrine.connections.orm1.dsn.pass = "password"
resources.doctrine.connections.orm1.dsn.hostspec = "localhost"
resources.doctrine.connections.orm1.dsn.database = "orm1_sd_idv_tw"
Posts
Zend Framework 1.11.0 and Doctrine 1.2.3 and Smarty 3.0.4
懶惰許久~~ 趕快來補一下功課.
這篇主要介紹 Zend Framework 1.11.0 and Doctrine 1.2.3 and Smarty 3.0.4 的結合方式.
Doctrine 1.2.3 跟 Zend Framework 1.11.0 結合主要參考 http://pastie.org/481633 http://pastie.org/481635 使用.
目錄結構:[
]1
Posts
PHP: Doctrine
[][1][
]2 Doctrine project 始於 2006 年,2008 年開始受到矚目;網站訪客數從每日 300 人到上千人;亦可在網上搜尋到許多 Framework 整合教學文章,例如
Zend Framework、Symfony 及 CodeIgniter。
Doctrine 的主要開發者 Jonathan H Wage,今年 24歲,非常年輕。Wage 在 Symfony 創始者的資助下成為 Doctrine 成立公司後的第一位員工。