programmers feeling superior to other programmers

Started by Thorin, March 26, 2014, 12:04:06 PM

Previous topic - Next topic

Mr. Analog

I disagree its more about using the right tool for the right job

You can use a screwdriver as a hammer but it doesn't mean you should

Knowing something's weakness means you learn its strengths, unfortunately most people don't bother to learn or even think about where some technologies are weak/ strong and end up coding around problems in weird ways
By Grabthar's Hammer

Tom

That's just it though, most ORMs seem to be the wrong tool for a job that needs to be reasonably performant. At least for most average PHP devs :(

It's just not a choice for us at this job, we use the specified ORM, or sql. I could argue we switch to something that allows to map relations and such, but I don't think they are interested.
<Zapata Prime> I smell Stanley... And he smells good!!!

Mr. Analog

An ORM isn't supposed to be performant or even easy for developmental use, it has a single function: abstraction of the database

That's all it does, all it should ever do. If your project doesn't need to be compatible with different databases there is NO REASON to use an ORM. Period.

That's why I say, right tool, right job. If you aren't planning on supporting multiple DBs there's no point in using an ORM.
By Grabthar's Hammer

Tom

I don't think that's the whole story. But you're entitled to your own opinion.
<Zapata Prime> I smell Stanley... And he smells good!!!

Thorin

I have a real-world, concrete example of the Entity Framework failing that basic requirement - have to create two different models for Sql Server vs Oracle due to datatype differences between the two database engines.
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Mr. Analog

Quote from: Tom on March 26, 2014, 04:55:37 PM
I don't think that's the whole story. But you're entitled to your own opinion.

I see people trying to use it as a "code first" approach and I also see those people stuck with some DB specific thing asking dumb questions on StackOverflow

Quote from: Thorin on March 26, 2014, 05:46:00 PM
I have a real-world, concrete example of the Entity Framework failing that basic requirement - have to create two different models for Sql Server vs Oracle due to datatype differences between the two database engines.

What a Microsoft product not playing well with non-Microsoft products? (particularly Oracle) I'm shocked!!

:D
By Grabthar's Hammer

Thorin

Yeah, "code first" is a great idea if there isn't an existing database (most likely DB2 running on an AS/400) that you have to get your data from...
Prayin' for a 20!

gcc thorin.c -pedantic -o Thorin
compile successful

Mr. Analog

Quote from: Thorin on March 26, 2014, 08:37:00 PM
Yeah, "code first" is a great idea if there isn't an existing database (most likely DB2 running on an AS/400) that you have to get your data from...

Hahah, exactlyyyy. I mean it takes so much refactorin' to get your database in a shape that works better for EF (I ended up creating optimized views for some stuff that had tons of joins/unions/etc) or try to push out heavy processes that would bork the DB if you ever let EF try to wrangle the SQL into detached Entities so you can manipulate them in memory without destroying the universe as we know it...
By Grabthar's Hammer