3 ms·
Personally, I prefer raw SQL, because I like SQL. It is one of the few languages where you can be really clever without making maintenance a nightmare, IMHO. O
by krylon 9y ago
Personally, I prefer raw SQL, because I like SQL. It is one of the few languages where you can be really clever without making maintenance a nightmare, IMHO.
OTOH, I tend to encapsulate the direct interaction with the database into a separate class/data type in my applications, that offers an interface to the rest of the code that is more in line with the application domain. So one could argue that I tend to write special-purpose ORMs over and over again. ;-) It has the advantage, though, that switching out the underlying DBMS is less of a pain, when it is required.
Full disclosure: All the projects I have worked on were fairly modest in size and complexity. The most "out there" thing I have done was to write and/or maintain a couple of SQL views and triggers to hook up our ERP system to other applications. Because our ERP system sucks. But on the plus side, I learnt a lot about SQL, which tends to feed back into my preference of raw SQL over ORMs. ;-)