diff --git a/en/index.rst b/en/index.rst index e250925c8..e6c9c070e 100644 --- a/en/index.rst +++ b/en/index.rst @@ -26,7 +26,9 @@ Getting Started --------------- * **Tutorial**: - :doc:`Getting Started ` + :doc:`Code First ` | + :doc:`Model First ` | + :doc:`Database First ` * **Introduction**: :doc:`In 10 quick steps ` | diff --git a/en/tutorials/getting-started-database.rst b/en/tutorials/getting-started-database.rst new file mode 100644 index 000000000..c96c90158 --- /dev/null +++ b/en/tutorials/getting-started-database.rst @@ -0,0 +1,27 @@ +Getting Started: Database First +=============================== + +.. note:: *Development Workflows* + + When you :doc:`Code First `, you + start with developing Objects and then map them onto your database. When + you :doc:`Model First `, you are modelling your application using tools (for + example UML) and generate database schema and PHP code from this model. + When you have a :doc:`Database First `, then you already have a database schema + and generate the correspdongin PHP code from it. + +.. note:: + + This getting started guide is in development. + +Development of new applications often starts with an existing database schema. +When the database schema is the starting point for your application, then +development is said to use the *Database First* approach to Doctrine. + +In this workflow you would always do changes to the database schema and then +regenerate the PHP code to use with this schema. You need a flexible +code-generator for this task and up to Doctrine 2.2, the code generator hasn't +been flexible enough to achieve this. + +We spinned of a subproject Doctrine CodeGenerator that will fill this gap and +allow you to do *Database First* development. diff --git a/en/tutorials/getting-started-models.rst b/en/tutorials/getting-started-models.rst new file mode 100644 index 000000000..4bf3cec16 --- /dev/null +++ b/en/tutorials/getting-started-models.rst @@ -0,0 +1,24 @@ +Getting Started: Model First +============================ + +.. note:: *Development Workflows* + + When you :doc:`Code First `, you + start with developing Objects and then map them onto your database. When + you :doc:`Model First `, you are modelling your application using tools (for + example UML) and generate database schema and PHP code from this model. + When you have a :doc:`Database First `, then you already have a database schema + and generate the correspdongin PHP code from it. + +.. note:: + + This getting started guide is in development. + +There are applications when you start with a high-level description of the +model using modelling tools such as UML. Modelling tools could also be Excel, +XML or CSV files that describe the model in some structured way. If your +application is using a modelling tool, then the development workflow is said to +be a *Model First* approach to Doctrine2. + +In this workflow you always change the model description and then regenerate +both PHP code and database schema from this model. diff --git a/en/tutorials/getting-started.rst b/en/tutorials/getting-started.rst index 5a6bff118..d59acace1 100644 --- a/en/tutorials/getting-started.rst +++ b/en/tutorials/getting-started.rst @@ -1,17 +1,29 @@ -Getting Started -=============== +Getting Started: Code First +=========================== -Doctrine 2 is an object-relational mapper (ORM) for PHP 5.3.0+ that provides transparent persistence for PHP objects. -It uses the Data Mapper pattern at the heart of this project, aiming for a complete separation of -the domain/business logic from the persistence in a relational -database management system. The benefit of Doctrine for the -programmer is the ability to focus solely on the object-oriented business logic and -worry about persistence only as a secondary task. This doesn't mean -persistence is not important to Doctrine 2, however it is our -belief that there are considerable benefits for object-oriented -programming if persistence and entities are kept perfectly +.. note:: *Development Workflows* + + When you :doc:`Code First `, you + start with developing Objects and then map them onto your database. When + you :doc:`Model First `, you are modelling your application using tools (for + example UML) and generate database schema and PHP code from this model. + When you have a :doc:`Database First `, then you already have a database schema + and generate the correspdongin PHP code from it. + +Doctrine 2 is an object-relational mapper (ORM) for PHP 5.3.0+ that provides +transparent persistence for PHP objects. It uses the Data Mapper pattern at +the heart of this project, aiming for a complete separation of the +domain/business logic from the persistence in a relational database management +system. The benefit of Doctrine for the programmer is the ability to focus +solely on the object-oriented business logic and worry about persistence only +as a secondary task. This doesn't mean persistence is not important to Doctrine +2, however it is our belief that there are considerable benefits for +object-oriented programming if persistence and entities are kept perfectly separated. +Starting with the object-oriented model is called the *Code First* approach to +Doctrine. + .. note:: The code of this tutorial is `available on Github `_.