FOSUserBundle: what's the point?

I saw how many people tried to use FOSUserBundle.

I struggled with this for 6 hours. Just to create a custom registration form. Basic Documentation - 6 pages: basic . Here are all the disadvantages of using FOSUserBundle, from my point of view:

  • you need to copy the paste of your views to make inheritance possible.
  • they have a table <base>: fos_user . Thus, you must create all your code on your user object, which has a BaseUser . If your database matches the convention (for example, wordpress does, with all tables starting with wp_ ), this violates your convention.
  • you need to hack all your own views with things such as "if the fos_user_content block is empty, I think nothing is visible there, otherwise I need to re-organize my entire view to display the fos_user_content block (registration, changing the user profile, and so on) "
  • and now I see that if you need two different forms of registration (for example, one for the client, one for the partners), this is impossible if you have not hacked. See here .

So I'm just wondering: what's the point of using if FOSUserBundle? If I have already done the registration process, which follows the most basic things described in the help of Symfony (forms, form validation and sessions), and I just copy the paste of my code, this, from my point of view, is much faster than installation, configuration, inheritance , change, etc. FOSUserBundle.

Knowing what I did, what are the benefits of FOSUserBundle? What can make me change and take a few more hours to work with my project, instead of reusing mine (forms, form validation and sessions) from another project?

+7
symfony fosuserbundle
source share
1 answer

Well, your question sounds more like ranting, but you have some points.

In my opinion, the main problem with the FOSUserBundle , as well as the many Bundle in the community, is that they are trying to make it customizable, universal, reusable, whatever.

The goal is valid, but in fact it often leads to non-human-friendly code. In most cases, it will take you a lot longer to “do this” using the community, rather than creating your own (see Sonata Packages).

I’m not saying that they are bad ligaments, not at all, but they deserve different goals .

For me, such packages can help beginners have a quick implementation, complete everything , and in the case of Rapid Application Development it can be very simple to get a fully functional application with the whole registration process.

But in most cases, you understand that using third-party codes connects you too much , and this is wrong.

In comparison, I really love the npm community, there is a LOT of a small package with one function that you can easily integrate, in the same way, I try to use the package library support when I want to publish an open source project. The fact is that the wireframe implementation is free of any concept or philosophy and is easily integrated into an existing project.

I remember some of the early days when I had to play with Joomla, Drupal, Wordpress, whatever it was, this is a plugin / extension / module mod, just as we often hear “there is a package for this,” some people or the company just wants to do this, regardless of the quality of the future application, because it has already been sold.

In conclusion, such packages can significantly help and speed up the development process, but be careful if you have user requirements, performance implications, etc., do not use them, however, if you only want to get a quick proof of concept, or simple app, it's worth it.

This is a fantastic story based on my own experience and the failures using it :)

+3
source share

All Articles