Extensions for Doctrine ORM - symfony1

I'm working on a PHP project and evaluating Symfony 2 + Doctrine ORM. Coming back to PHP from Ruby on Rails, I'm wondering if there are parallels for the acts_as-style ActiveRecord plugins that are available all over GitHub for common behaviours in Rails.
Doctrine itself only has a few standard extensions for Translatable, Tree, Sluggable, and Timestampable. I was able to find a few other items on GitHub.
I'm looking for things like sortable lists, some implementation of soft-delete, state machines, file attachments (images), and so on. Is anything similar available or is it a roll-your-own ecosystem? Where can I find more resources?

You can look at https://github.com/l3pp4rd/DoctrineExtensions, there's some awesome extensions!

Related

Grails Fixtures alternative

Could someone advice a good alternative to the grails fixtures plugin
It seems that the plugin project is not active any more, doc page shows 404 no recent commits and etc. Moreover, the plugin works buggy with new versions of grails (3.3.5).
We are using fixtures to initialize data for dev and test environments. And we like the concise way of defining entities and their many-to-many associations in bootstrap, which provides fixtures plugin.
So, any suggestions are welcome.
Thx.

Is there a straight-forward way of doing an ORM roundtrip workflow in Grails 3+?

For the last few years I have been a Symfony developer and one of the things I enjoy the most is the fact that I don't have to write/maintain entities by hand.
Through Doctrine (the integrated ORM) I can extract the table metadata and relations through
php app/console doctrine:mapping:import SomeBundle yaml
And then I can generate the ORM entity classes
php app/console generate:doctrine:entities SomeBundle
And I'm friggin' done.
Need to migrate?, no problem. Use this command to create a migration:
doctrine:migrations:diff
And the following to migrate to it:
doctrine:migrations:migrate
For Grails, it seems that there is no straight forward way, unless I go and download the Hibernate tools and a tool like Liquibase.
There seem to be a couple of plugins that did this, but the one for reverse engineering from a database does not seem supported for Grails 3 (db-reverse-engineer) and the one for migrations I tried, but does not seem stable enough (database-migration).
Am I just looking in the wrong place?, if not, how do you as a professional Grails developer solve these needs?
No there is not a straight forward way to make a "round-trip" as you describe in Grails 3.x.
Most plugins aren't going to be 3.x ready yet. 3.x is still quite new.
That said, the reverse engineering plugin isn't designed to be a fully automated one-shot handles everything type of plugin. It's suppose to be a running start that you take the last bit by hand.
The migration plugin on the other hand is fully production ready and very stable in 2.x.

Looking for something like RailsAdmin, but lighter-weight and not in the same process as the main app

We've been using rails_admin for a project for a year. It's good, but it would be preferable to have an admin interface that ran in a totally separate process from the main Rails app and from a completely independent code base. rails_admin has so many dependencies that upgrading it along with the main Rails app has proven brittle.
So the functionality we would need is just basic crud for the database tables, with a little bit of magic to make editing associations easier.
Are there any light-weight solutions out there for this? Bonus points for being lightweight & Sinatra-based rather than Rails-based.
I would look into git submodules or subversion externals. The way I've done something similar to this is to
List item migrate the models into a standalone ruby project.
put them in a 'core' subdirectory/module.
Create a new rails project just for administration.
Share the models between the 2 rails apps using an svn external of the 'core' directory into each project's app/models directory.

A Ruby On Rails-like migration tool

I like that Ruby On Rails allows you to write a simple schema in which you can create and update a database using. Is there any tool like Ruby On Rails's migration, as I would like to use the method without using Ruby On Rails for my website development?
There's no reason you can't use ActiveRecord::Migration outside of a rails app. In fact, you'll find plenty of examples of people doing this, as in http://exposinggotchas.blogspot.com/2011/02/activerecord-migrations-without-rails.html
If you're using mongo as the persistent store, check out mongrations for this.
I have heard this week on a little conference a talk about a tool called Liquibase, a database change management tool. It is based on Java (I think), but manages the database migrations in an XML file. The change sets you have to write are similar to the migrations you can write with Rails. If you use Liquibase inside an IDE like Eclipse, you get completion for all relevant parts of the change sets. It supports a lot of databases out of the box, so it could be an alternative, especially that nowadays Java is installed everywhere.
I recommend Python Alembic. It's not Ruby though.

Is Ruby on Rails suitable for a non-web application?

I am interested in developing a workstation-based application that communicates with a proprietary data server and that presents information from that server to the user. I am not intending the user interface to be browser-based, and have been considering Qt as my framework. Should I consider RoR for this? Thanks.
Rails is specifically a web application framework, however there are GUI toolkits that can be used with Ruby, including Qt (although not the open source version).
Rails is a web framework, so you should not use it. However, you should absolutely consider using Ruby. I've never used Ruby with Qt, but I've had a lot of success using JRuby with Swing. I use the Profligacy gem, which suits my needs quite well.
Being a web framework you may not use rails, but you may certainly use some parts of rails.
For example just use require 'active_record' and you instantly have access to AR and all its magic - validations, belongs_to, has_many and other similar associations.
You can use the ActiveRecord part of Ruby on Rails, which for a long time was the most interesting part of RoR. https://edgeguides.rubyonrails.org/active_record_basics.html
Alternatively, use another Ruby ORM, like DataMapper: http://datamapper.org/
The answer is yes. I've been working on a project, Qt on Rails, which combines Qt with a Rails back end. The end result is that you can develop your Qt app's in Ruby, harness the libraries of Rails and there's support for scaffolding of apps as well.
It’s still a 'Work In Progress' but the current latest version at the Qt on Rails github repository (http://github.com/theirishpenguin/qtonrails) will certainly give a flavour of where the project is headed. Contributors and feedback is most welcome and detailed blog post is available on the project.

Resources