Post for the tag: symfony

Service Decoration in Practice

Recently WouterJ has written an excellent article about repositories and how to treat them as collections. In it he also shows that it is useful to have interfaces on your repository classes. If you have not yet read it, I fully recommend doing so.

This concept is something I have recently applied in a project and found that there are some extra benefits in using those interfaces. In this post I would like to expand on WouterJ's ideas and show how this enables service decoration.


Symfony, versioning and compatibility

Versioning is more than just slapping an incremental number on your new release. A good version increase will let the users of your package know more than just a new release. Most of us will understand the difference between major and minor versions. However, using a proper versioning scheme can help people a lot with what the impact of the upgrade will be.

This post will try to give some context to the Symfony versions. What to be aware of with a new release, be it a patch, minor or major version bump.


Migrating your project to Symfony

From time to time I see people struggling with trying to port their existing site or web-app to Symfony. Their old framework architecture might not match that of Symfony, making porting their controllers not that easy. Other times, their data structure contained so much logic that it was impossible to simply replace with a new ORM. Thus porting the project can seem like a daunting task.

So, what are your options of migrating to Symfony? Well you could try the 'big bang' approach and just power through your project, porting all of it and then releasing it all at once. While I might not consider this the most optimal way, it does have its advantages. It's gives you a clean slate which allows for a fresh new design and fixing all the legacy stuff you had from the old framework.

But what if your project is too big or you want a more graceful way of migrating? Well there is another way, which allows for a more gradual replacement of the old code. This is running both Symfony and your old project at the same time using a fallback method, and it is a lot easier than you might think.


Decoupling Your Security User

A lot of developers come to #symfony and ask how to implement a login or authentication system. It's quite common to have a bunch of features which require authentication and authorization. While authentication is identifying your user, authorization is granting permissions to this user.

One of the steps of implementing the security features of your application, involves creating an object to contain your user information such as your username, email, password and user id. If you have followed the Symfony docs, you will most likely have ended up with a User entity implementing the Symfony\Component\Security\Core\User\UserInterface. I would like to show you an alternative- decoupled- approach which will prevent several issues within a Symfony application.


Bloginception

I think the need to blog for a programmer is something inherent. It's a desire to spread knowledge, and create a post is something everyone can read. So it's a bit strange, at least to me, that there are not more blogging platforms targeted at developers. A quick Google search either results in Wordpress plugins, NodeJS HTML generators or CMS solutions.

This happened more often if I have to believe this twitter post: https://twitter.com/iamdevloper/status/743799765566054410. I think there are more developers which create their own blogging software and then blog about it, like... This post. Then again, it shows that there is no proper solution for software development blogs yet.


Copyright © 2016 stovepipe.systems