Doctrine Databasics


Unless you are building a static website, there's a very high likelyhood that you will need to - at the very least - retrieve some information from a database. Saving new or updated data to the database is usually not far behind.

As a PHP web developer, you have likely had this 'problem' before. You may have solved this problem just fine using (hopefully) PDO, (or less preferably) mysqli_*, or some other variation.

Why on Earth then, do you have to learn yet another new technology - Doctrine in this case - just to interact with your database in a Symfony application?

Well, truthfully, you don't. You can continue interacting with your database however you see fit. But investing a little time in learning Doctrine will make your life as a developer that little bit easier.

It will make your life easier by separating the code that does the 'business stuff' in your application, from the code that saves (persist's in Doctrine terminology) data to your database.

Probably the biggest drawback to learning Doctrine, from experience, is the sudden influx of a load of new terms:

  • Persistence
  • Hydration
  • Annotations
  • Fixtures
  • Migrations

And those are just a few.

Fortunately, you don't need to know them all. And honestly, most of them are easier to understand once you have seen the underlying premise in action.

We've already talked about Persistence, but it's a good example of the 'scary' terminology. Rather than thinking about persistence, just think: "saving". There we go, one less scary term to worry about.

The same goes for most, if not all of the terms honestly. Once you've seen them in action, you have some point of reference, and hey-ho, suddenly it all makes sense.

This beginner friendly short course is all about demystifying a bunch of these terms, and getting you started - quickly - with some hands on exercises to cover the basics of working with Doctrine in Symfony 3.

Episodes

Code For This Course

Get the code for this course.

Presented By

Christopher Moss

Christopher Moss

Hi, I'm Chris and welcome to CodeReviewVideos.com. In this video you will learn about... :)