3 ms·
As soon as you have more then 1 app talking to your database its time to either create a common library that talks to your database that can be shared or wrap i
by DonnyV 12y ago
As soon as you have more then 1 app talking to your database its time to either create a common library that talks to your database that can be shared or wrap it in a service. This has nothing to do with NoSQL vs SQL. It has to do with architecture composition.
Plus your problem with checking if a field exists is because Ruby doesn't support property attributes. This is easily solved in C# using attributes.
Which you can fake in Ruby.
http://stackoverflow.com/questions/1085070/how-do-i-fake-c-sharp-style-attributes-in-ruby http://stackoverflow.com/questions/1085070/how-do-i-fake-c-s...
Data consistency is what your models are for. No data should be inserted before being assigned to a model.
Again it sounds like you needed a shared library or just a service wrapped around your database.