Skip to content

Commit

Permalink
Typos fixing and added articles.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikvasnica committed Apr 13, 2017
1 parent 756ac5b commit 5744462
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions source/_posts/2017/2017-03-27-why-is-doctrine-dying.md
Expand Up @@ -7,36 +7,36 @@ Do you use Doctrine ORM? If so, do you follow its evolution on Github? Symfony i
lang: en
---

I've been thinking over 2 years about this post. I wasn't sure if it's only negative hype feeling or real thing. It's still the same so it's time to write about it.
I've been thinking over 2 years about this post. I wasn't sure if it's only a negative hype feeling or real thing. It's still the same so it's time to write about it.


## Doctrine is Awesome Tool

To be clear, I have been using Doctrine for many years and it is **the best ORM there is**. Of course there is [Propel ORM](http://propelorm.org/) and [Eloquent](https://laravel.com/docs/eloquent) from Laravel,
**but they use active record**.

I'm not an expert in databases, so active record might be actually useful pattern, even architectonically, but I don't favor it now.
I'm not an expert in databases, so active record might be actually a useful pattern, even architectonically, but I don't favor it now.


## Doctrine is stuck in its Legacy, Unable to Evolve

But the main I see, is that Doctrine is not evolving. Last useful feature was **[2nd Level cache](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/second-level-cache.html)** in `doctrine/orm` [released in 2015](https://github.com/doctrine/doctrine2/releases/tag/v2.5.0). In meaning not a few-person feature, but feature, that can influence most of applications.
But the main I see, is that Doctrine is not evolving. Last useful feature was the **[2nd Level cache](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/second-level-cache.html)** in `doctrine/orm` [released in 2015](https://github.com/doctrine/doctrine2/releases/tag/v2.5.0). In meaning not a few-person feature, but feature, that can influence most of applications.

Would you be still using Symfony, if the last feature was released 2 years ago? **No, you would probably go for Laravel**, Yii2, CakePHP, Nette or **any other framework to see, if it works better for you**. Because we programmers evolve and we need to do the same work in less time and work.
Would you be still using Symfony if the last feature was released 2 years ago? **No, you would probably go for Laravel**, Yii2, CakePHP, Nette or **any other framework to see, if it works better for you**. Because we programmers evolve and we need to do the same work in less time and work.


### Who Caused is This?
### Who Caused This?

**This has nothing to do with code quality, number of active maintainers or to few people contributing.** Although all have great part in open-source life cycle.
**This has nothing to do with code quality, number of active maintainers or too few people contributing.** Although all have great part in open-source life cycle.

To put you in my seat, I've maintained many own and foreign packages. They had difficulty to stay alive with same amount of energy invested. Does that sound like legacy code to you? Yep!

**I see this is rather system setup.** As any other system, it can lead both ways - slow down, or speed up. Depends on the vector you prepare.
**I see this is rather a system setup.** As any other system, it can lead both ways - slow down, or speed up. Depends on the vector you prepare.


### Donate Your Liver, For Free

To show you and example, how system can go both ways, I will show you something nice to do when you die.
To show you an example how system can go both ways, I will show you something nice to do when you die.

Do you need your liver when you die? Somebody else might does, but it depends on your country's default law system, what will happen to it.

Expand All @@ -53,7 +53,7 @@ Of course you can write an extra card saying "Take my organs when I die", but wh

## Things That Might Save Doctrine

Where is death, there is life. I believe Doctrine or any slowly dying project can be saved - by just system setup.
Where is death, there is life. I believe Doctrine or any slowly dying project can be saved - by just a system setup.


### 1. Create a Competition
Expand All @@ -62,7 +62,7 @@ Where is death, there is life. I believe Doctrine or any slowly dying project ca

If Symfony would be the only framework, there would be no other choice, everyone would be using it. And Symfony would have no motivation to be better (better than who?).

I think Fabien was aware of that, so he wrote a series [Create your own framework... on top of the Symfony2 Components](http://fabien.potencier.org/create-your-own-framework-on-top-of-the-symfony2-components-part-1.html) in 2012, which promoted using only components of Symfony to create own framework. So [Laravel](https://laravel.com) was made on top of Symfony components.
I think Fabien was aware of that, so he wrote a series [Create your own framework... on top of the Symfony2 Components](http://fabien.potencier.org/create-your-own-framework-on-top-of-the-symfony2-components-part-1.html) in 2012, which promoted using only components of Symfony to create an own framework. So [Laravel](https://laravel.com) was made on top of Symfony components.

**Now these 2 frameworks are pushing industry standard like never before**. Awesome to watch!

Expand All @@ -89,17 +89,17 @@ That's how you spend more work on maintenance than on feature very easily.
### 3. Using Dependency Injection by Default

Last thing that might turn it to the right direction is Dependency Injection via Constructor, also called autowiring.
In many projects I see while consulting big companies, this pattern (when used properly) **would save them from 20-30 % complexity they have now**. Just by using it from the start.
In many projects I see, while consulting big companies, this pattern **would save them from 20-30 % complexity they have now** (when used properly). Just by using it from the start.

1,5 year ago, I sent pull-request for simple thing - [having modular filters](https://github.com/doctrine/doctrine2/pull/1453). It is actually just single-service constructor injection implementation. Huge problem to integrate. And there is a lot more static code like `new SomeService` that could be easily resolved with this.
1,5 year ago, I sent a pull-request for a simple thing - [having modular filters](https://github.com/doctrine/doctrine2/pull/1453). It is actually just a single-service constructor injection implementation. Huge problem to integrate. And there is a lot more static code like `new SomeService` that could be easily resolved with this.



## That's Why I'm Dropping My Doctrine Packages

I miss an evolution with Doctrine. When some packages are stuck for 2-3 years in one place, there is probably already better replacement. Either on Packagist or in your mind.
I miss an evolution with Doctrine. When some packages are stuck for 2-3 years in one place, there is probably already a better replacement. Either on Packagist or in your mind.

As [I mentor and coach teams](/skoleni) to write better code with less work, **I'd go against my own believes by putting vendor lock in their applications.**
As [I mentor and coach teams](/skoleni) to write better code with less work, **I'd go against my own beliefs by putting a vendor lock in their applications.**

That why I'm dropping my packages built on Doctrine.

Expand Down

0 comments on commit 5744462

Please sign in to comment.