|
https://twitter.com/charliesome/status/799753287448686594
|
# ? Nov 19, 2016 00:18 |
|
|
# ? May 26, 2024 00:28 |
|
i am pretty sure that the garbage tier procedures i keep finding lurking around are due to someonw using an entity framework style wrapper because they didn't understand sql. there's no way a sane person could have formatted statements like that anyway. also just write a wrapper for your procs its not that hard and you wont curse the next person with having to figure out what the gently caress entity framework is actually doing through some bullshit edmx file
|
# ? Nov 19, 2016 01:40 |
|
Powerful Two-Hander posted:i am pretty sure that the garbage tier procedures i keep finding lurking around are due to someonw using an entity framework style wrapper because they didn't understand sql. there's no way a sane person could have formatted statements like that anyway. yeah i haven't really decided how i feel about EF in the long run It was nice for this application, since code (outside of the stuff generated by the edmx) is like 500 lines total and it's nearly a one-off so quick and dirty is the name of the game but i've definitely run into a lot of idiosyncracies (being unable to make the data classes internal without breaking everything, among others) that make me leery of wanting to use it again in a larger project THEN AGAIN manually writing data classes for like 20 tables with some two dozen columns in some of them can eat forty bags of hell
|
# ? Nov 19, 2016 01:46 |
|
I've been in ancient c++ land for so long that i'm really not au fait with modern practices or even capabilities in other languages or frameworks anymore
|
# ? Nov 19, 2016 01:47 |
|
like i feel like im being some kind of old man shouting at kids to get off his lawn or whatever but seriously, why do people keep coming up with ever more convoluted ways to avoid having to write sql? edit: yeah mapping is tedious but there are frameworks to automate that. every EF implementation ive seen has been 'fine' until it reaches a point where suddenly it's not and you're hosed because you're now locked in to it and so you have to hide logic in the db functions which defeats the original point. also i have probably only seen "bad" implementations! Powerful Two-Hander fucked around with this message at 01:59 on Nov 19, 2016 |
# ? Nov 19, 2016 01:49 |
|
My understanding learning this poo poo was that LINQ to database is essentially the task EF was made for (formerly LINQ to SQL but I guess that only really worked with SQL Server???) and, well, I really like LINQ
|
# ? Nov 19, 2016 01:53 |
|
linq is cool a gently caress since filter, map, and fold are cool as gently caress, but what it got to do with sql?
|
# ? Nov 19, 2016 02:18 |
|
computers are bad
|
# ? Nov 19, 2016 02:22 |
|
HoboMan posted:linq is cool a gently caress since filter, map, and fold are cool as gently caress, but what it got to do with sql? i mean, there's a reason that LINQ uses the same names as SQL keywords, and it's not just coincidence
|
# ? Nov 19, 2016 02:28 |
|
tef posted:computers are bad
|
# ? Nov 19, 2016 02:34 |
|
computers are.... good...???????
|
# ? Nov 19, 2016 02:44 |
|
tef posted:computers are bad
|
# ? Nov 19, 2016 03:19 |
|
Ciaphas posted:computers are.... good...??????? nah.
|
# ? Nov 19, 2016 03:41 |
|
tef posted:computers are bad
|
# ? Nov 19, 2016 04:08 |
|
linq is cool but people should learn sql prob if they deal with databases. you have to learn 90% of it to use a lovely query generator anyways, may as well learn the last 10% and not rely on weird magic
|
# ? Nov 19, 2016 04:42 |
|
yeah, even if you're going to use an orm sql skills are never going to hurt you. besides, you're eventually going to need them when that orm does something stupid.
|
# ? Nov 19, 2016 05:07 |
|
oh for sure i know enough sql to get by plaartly this assignment was a chance to learn some new to me tech (EF), tho i have no good sense of when to use something like it as opposed to going straight for Oracle.DataAccess or w/e
|
# ? Nov 19, 2016 05:22 |
|
ps gently caress OCI and OCCI in their respective assholes
|
# ? Nov 19, 2016 05:22 |
|
Ciaphas posted:better than writing raw sql use dapper. also: use stored procs
|
# ? Nov 19, 2016 05:40 |
|
entity framework is bad even for an orm.
|
# ? Nov 19, 2016 05:42 |
|
Shaggar posted:use dapper. also: use stored procs is using identity without ef as much of a pain as i suspect it is?
|
# ? Nov 19, 2016 05:57 |
|
I don't think so. you have to write your own stores, but they're easier than you think and you don't really need to implement everything. you should also consider using federation/claims based auth instead of database auth. adfs and azure ad are both free and take the boring, hard to do right stuff out of your hands
|
# ? Nov 19, 2016 06:03 |
|
WHAT NOW shagger
|
# ? Nov 19, 2016 06:09 |
|
hell, i don't have anything better planned tomorrow. time to poke around in identity's guts.
|
# ? Nov 19, 2016 06:10 |
|
finally you can get a working db on Linux. that said idk if theres a market of people who cant afford a windows license but can afford sql server.
|
# ? Nov 19, 2016 06:15 |
|
Shaggar posted:use dapper. also: use stored procs dapper looks neat, thanks, i'll gently caress around with it over the weekend probably won't be able to use it any time soon at work because NEW SOFTWARE SUBMIT DOCUMENTATIONK HA$TLEKBSDKJCGVB
|
# ? Nov 19, 2016 06:15 |
|
either way you should use stored procs. leave the sql to sqlserver
|
# ? Nov 19, 2016 06:18 |
|
Shaggar posted:finally you can get a working db on Linux. that said idk if theres a market of people who cant afford a windows license but can afford sql server. Lmao
|
# ? Nov 19, 2016 07:07 |
|
Shaggar posted:finally you can get a working db on Linux.
|
# ? Nov 19, 2016 09:42 |
|
tef posted:computers are bad sometimes computers are not too bad
|
# ? Nov 19, 2016 10:51 |
|
Every time i try to sit behind my computer my cat decides that it needs attention RIGHT NOW so it goes sit in front of my keyboard or starts trying to push my mouse from my desk. I think its trying to tell me that computer are bad and i should do something else with my life.
|
# ? Nov 19, 2016 12:10 |
|
the talent deficit posted:linq is cool but people should learn sql prob if they deal with databases. you have to learn 90% of it to use a lovely query generator anyways, may as well learn the last 10% and not rely on weird magic Ah, you see, I started off with a 15 year old database and then had to implement entity framework database first which is something that entity decided wasn't supportable a long time ago. Hand crafting the entity generation logic onto a database that's only ever been interacted with using SQL certainly teaches you a lot about both technologies. Now, not only do I know the data structures by heart, but I also have an intimate understanding of how the entities work and when it's all inevitably broken as gently caress, it's entirely my fault! You really get a good understanding for why entity abandoned database first generation when you embark on something like this. Holy poo poo.
|
# ? Nov 19, 2016 12:26 |
|
what is a good tool for database migration? we use liquibase but it seems to get easily confused about what changes it has already run and wants to rerun changes and gently caress up everything.
|
# ? Nov 19, 2016 13:06 |
|
well, it does not get confused if you run it in the same exact circumstances, during the application startup but it doesn't seem to like also being run from the command line.
|
# ? Nov 19, 2016 13:08 |
|
Shaggar posted:use dapper. also: use stored procs can confirm: dapper is good
|
# ? Nov 19, 2016 16:58 |
|
although it'd own even harder if theres a way of getting it to infer that butt_size in the db is the same as the Size property of the Butt it's constructing
|
# ? Nov 19, 2016 18:13 |
|
a coworker of mine mentioned stored procs are the devil's rear end in a top hat wrt portability, i.e. stored procs are the main reason we're all totally stuck on oracle db even though we all hate it and would benefit from a move to mssql I'm not au fait with databases, how true is this? i thought stored procs were just like... c functions i guess?? only for sql, so syntactic shortcuts for long queries i guess??`
|
# ? Nov 19, 2016 19:20 |
|
if your oracle procs are inside packages you can't set them up in mssql with the exact same name in oracle your fully qualified proc name will be database.schema.package.proc and in mssql it would just be database.schema.proc e: you could have a separate schema in mssql for each oracle package though i guess? jesus WEP fucked around with this message at 19:44 on Nov 19, 2016 |
# ? Nov 19, 2016 19:42 |
|
Wheany posted:well, it does not get confused if you run it in the same exact circumstances, during the application startup i use flyway, but only ever from the command line so i dunno about your problem
|
# ? Nov 19, 2016 20:39 |
|
|
# ? May 26, 2024 00:28 |
|
Ciaphas posted:a coworker of mine mentioned stored procs are the devil's rear end in a top hat wrt portability, i.e. stored procs are the main reason we're all totally stuck on oracle db even though we all hate it and would benefit from a move to mssql i don't know about oracle specifically, but stored procs aren't inherently good or bad for portability in my experience. they're like any other queries: if you use a bunch of vendor-specific features, they're not gonna be portable. i've only used postgres in any depth though (still just starting to use mssql and the less said about mysql the better).
|
# ? Nov 19, 2016 21:22 |