Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Luigi Thirty posted:

idk that's what a dude ranted at me about today

Then what he's arguing is that thick clients with server APIs are replacing Django, but that's dumb too because all it does is shift the purpose of the back end away from templating, forms, etc to REST APIs and the like, which happens to be where Rails, Django et al are shifting focus, at least with support libraries if not with the core.

Adbot
ADBOT LOVES YOU

multigl
Nov 22, 2005

"Who's cool and has two thumbs? This guy!"
every so often I take a look at angular to see how it's progressed. It's maturing into a truly awful thing.

also, django + django-rest-framework is really convenient to use.

Rahu
Feb 14, 2009


let me just check my figures real quick here
Grimey Drawer

Tiny Bug Child posted:

this is not an improvement.

In this case I would probably be fine either way because it is so small, but for bigger queries splitting each part on to its own line is a Good Idea.

e:whoops i was a page behind :smith:

redleader
Aug 18, 2005

Engage according to operational parameters

Shaggar posted:

haha. sql in your code. very funny

what is the shaggar-approved(tm) way to access a database in .net? obviously not ef. manually bashing together sqlcommands?

Notorious b.s.d.
Jan 25, 2003

by Reene

Rahu posted:

In this case I would probably be fine either way because it is so small, but for bigger queries splitting each part on to its own line is a Good Idea.

e:whoops i was a page behind :smith:

for me, the biggest problem with sql as a language is the lack of a standard way to format it. it's deeply frightening when emacs can't appropriately insert newlines or indent my code

obviously i should just use an orm for everything

qntm
Jun 17, 2009

Maluco Marinero posted:

I know when I want to build a rock solid back end with reliable well documented dependencies my first port of call is nodejs

nothing is sexier than a version number which starts with "0."

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i made a pretty slick deprecated code tracking thing but i cant get ruby to do exactly what i want and it's pissing me off

Soricidus
Oct 21, 2010
freedom-hating statist shill

USSMICHELLEBACHMAN posted:

i made a pretty slick deprecated code tracking thing but i cant get ruby to do exactly what i want and it's pissing me off
here's a better deprecated code tracking thing for you:
code:
find . -name '*.rb' -o -name '*.php' -o -name '*.js'

Notorious b.s.d.
Jan 25, 2003

by Reene

qntm posted:

nothing is sexier than a version number which starts with "0."

well see it's still semver-compliant because 0. versions have undefined behavior :q:

TheresNoThyme
Nov 23, 2012
lol if your critical project dependencies aren't all alpha versions you got from some guy at a nosql meetup who was giving them out on usb sticks

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Notorious b.s.d. posted:

well see it's still semver-compliant because 0. versions have undefined behavior :q:

Every couple of weeks/months someone breaks a dependency in one of my contracted node projects by incrementing a minor version with backwards incompatible API changes, and THEN shipping a major patch version, thus thwarting any attempts to use semver in dependency tracking.

A great one was where not only did API breaks get shipped on a minor, but then the repos and npm package got moved to a new name & location for the major version so the documentation at the 'homepage' repo was completely inaccurate for the shipped minor version.

Woo node. Constantly reminding me to pick anything other than node for my personal back end projects.

Notorious b.s.d.
Jan 25, 2003

by Reene

Maluco Marinero posted:

Every couple of weeks/months someone breaks a dependency in one of my contracted node projects by incrementing a minor version with backwards incompatible API changes, and THEN shipping a major patch version, thus thwarting any attempts to use semver in dependency tracking.

A great one was where not only did API breaks get shipped on a minor, but then the repos and npm package got moved to a new name & location for the major version so the documentation at the 'homepage' repo was completely inaccurate for the shipped minor version.

Woo node. Constantly reminding me to pick anything other than node for my personal back end projects.

this happens to me all the time in ruby-land. it's not a nodejs issue. wherever you have idiots inexperienced developers and inadequate test suites you have versioning disasters

tef
May 30, 2004

-> some l-system crap ->
on the other hand if you vendored the gently caress out of things you'd have working builds

instead of pulling in the latest changes whenever they happen to coincide with a build, or hoping that a third party will give you the same library you asked for last time.

tef
May 30, 2004

-> some l-system crap ->
but no, let's not vendor anything why in gently caress would we want to have stable copies of third party dependencies


it's very easy to pick on other people breaking their code, but then again you get what you pay for.

tef
May 30, 2004

-> some l-system crap ->
ARGH TEENAGERS KEEP CHANGING THEIR CODE ON GITHUB DON'T THEY KNOW I'M RELYING ON THEM TO MAKE MONEY WITH PROGRAMMING

TheresNoThyme
Nov 23, 2012
It's more like why are you pulling in a version upgrade when you're admitting to having no idea what is being changed in the upgrade or why you might need it. Minor versions get released with terrible bugs all the time and if your system is stable and actually being used for something important then why yolo upgrade to that new version of hibernate that broke sequence id generation or whatever

TheresNoThyme fucked around with this message at 19:35 on Aug 9, 2014

Mr. Glass
May 1, 2009
personally i think vendoring dependencies is the only responsible way to go

hepatizon
Oct 27, 2010

redleader posted:

what is the shaggar-approved(tm) way to access a database in .net? obviously not ef. manually bashing together sqlcommands?

hopefully linq

Shaggar
Apr 26, 2006

redleader posted:

what is the shaggar-approved(tm) way to access a database in .net? obviously not ef. manually bashing together sqlcommands?

using ef's function import stuff as a half assed statement mapper or ibatis.

Notorious b.s.d.
Jan 25, 2003

by Reene

tef posted:

on the other hand if you vendored the gently caress out of things you'd have working builds

instead of pulling in the latest changes whenever they happen to coincide with a build, or hoping that a third party will give you the same library you asked for last time.

you can only get so far with local caches and version pinning. in particular, transitive dependencies catch up to you. YOU may not need the newest json library but one of the deps you upgraded for a bug fix might have a firm requirement

engaging with ruby on an ongoing basis means spending a significant fraction of dev time just trying to stay up to date

Notorious b.s.d.
Jan 25, 2003

by Reene

hepatizon posted:

hopefully linq

linq to sql doesn't really have a future. it's not deprecated but it's not getting updates either

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.
Yeah, its not just your own direct dependencies, and node easily explodes to 100s of dependencies due to the conviction that people should all write single responsibility libraries that do one thing well. This can be a reasonable approach, but requires that all these micro dependencies stabilise their API sooner rather than later to be dependable. Otherwise while any immediate build will be just fine once its built cause you wrap it, managing version pinning for all the dependencies you're running isn't trivial.

Sometimes these API changes aren't in the patch notes either. As you said, you get what you pay for, but by the same token many libraries are built by professionals for professional use, but they never concrete their work beyond their own use case.

havelock
Jan 20, 2004

IGNORE ME
Soiled Meat

Notorious b.s.d. posted:

linq to sql doesn't really have a future. it's not deprecated but it's not getting updates either

...which makes it immune to bloat. It still generates better sql than EF, but that's likely due to being mssql only. It also lets you do more stuff when projecting so you can actually turn your domain objects into REST resources (for example), unlike EF that basically only lets you set properties from other properties.

FamDav
Mar 29, 2008

Maluco Marinero posted:

Yeah, its not just your own direct dependencies, and node easily explodes to 100s of dependencies due to the conviction that people should all write single responsibility libraries that do one thing well. This can be a reasonable approach, but requires that all these micro dependencies stabilise their API sooner rather than later to be dependable. Otherwise while any immediate build will be just fine once its built cause you wrap it, managing version pinning for all the dependencies you're running isn't trivial.

Sometimes these API changes aren't in the patch notes either. As you said, you get what you pay for, but by the same token many libraries are built by professionals for professional use, but they never concrete their work beyond their own use case.

lol if your internal build system doesn't version all your dependencies down to the c compiler

Cybernetic Vermin
Apr 18, 2005

if any aspect of the world on which your system is not part of a unified version history, possible to recreate to any point (and especially to any tested release) as needed, you are doing poo poo wrong

also never update anything that you don't need to update, such a unecessary work trap to update random libraries

Damiya
Jul 3, 2012

Cybernetic Vermin posted:

also never update anything that you don't need to update, such a unecessary work trap to update random libraries

our new guy wants to do poo poo like update our jquery from 1.1x to 2.y "to make sure we're on the latest improvements" and version a bunch of other JS libs but the tech lead and I were just like "uhhh that's just not really a priority right now" and he's all "well let's put it on the backlog cause I really want to make sure we've got everything up to date everywhere"

he's got like 4 years of experience.

:catstare:

Sapozhnik
Jan 2, 2005

Nap Ghost
Databases should be accessed via a combination of stored procs to do updates/canned queries and SQL generation for accessing predefined views so that you can still sort and search stuff.

It's not very ~*agile*~ or whatever but I mean schema migrations are a thing you need to deal with so eh, at least you have a clearly defined interface on things.

as a bonus, when your lovely little operation gets big enough to have a DBA then your SPs and views can become that person's problem.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
what if your PMs need to run some queries?

Sapozhnik
Jan 2, 2005

Nap Ghost
well, they get direct (read-only) access to the database from a console, i'm talking about this as a structuring thing and not an access control thing

i'm assuming a "PM" is a flavour of human here

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

PMs that do frequent ad-hoc querying should be using some mini-warehouse usually anyway, so they don't impact production performance with recreational full table scans

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Subjunctive posted:

PMs that do frequent ad-hoc querying should be using some mini-warehouse usually anyway, so they don't impact production performance with recreational full table scans

that would be great.

Shaggar
Apr 26, 2006

havelock posted:

...which makes it immune to bloat. It still generates better sql than EF, but that's likely due to being mssql only. It also lets you do more stuff when projecting so you can actually turn your domain objects into REST resources (for example), unlike EF that basically only lets you set properties from other properties.

linq to sql serves no purpose because its effectively a subset of sql and theres 0 practical difference between hardcoding an ado.net query and hardcoding the linq that gets transformed into an ado.net query.

EF uses linq as well but it is bad cause it is an orm.

they are promising better statement mapping in future versions of ef so maybe it will get good.

americong
May 29, 2013


why don't languages that obviously want to be used for web dev include some non retarded way of accessing a database

Shaggar
Apr 26, 2006

Mr Dog posted:

Databases should be accessed via a combination of stored procs to do updates/canned queries and SQL generation for accessing predefined views so that you can still sort and search stuff.

It's not very ~*agile*~ or whatever but I mean schema migrations are a thing you need to deal with so eh, at least you have a clearly defined interface on things.

as a bonus, when your lovely little operation gets big enough to have a DBA then your SPs and views can become that person's problem.

this is correct.

Shaggar
Apr 26, 2006

americong posted:

why don't languages that obviously want to be used for web dev include some non retarded way of accessing a database

because historically the people doing web dev are the dumbest people alive and sql is way beyond their ability to comprehend.

mybatis is the best db framework there is, but its java only and the c# version (ibatis) is ancient and hasn't kept up to date w/ enhancements in .net.

mssql used to have a way to expose sql as soap methods which was a rad idea but not really what databases are for. it would be kind of cool to have that as a standalone component that you could install on a separate server to totally abstract the db from code.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

americong posted:

why don't languages that obviously want to be used for web dev include some non retarded way of accessing a database

i dont know

i mean it wouldnt even be that hard.

instead you either have orms or lines and lines and lines of inline sql that just get appeneded to eachother and executed and then copied and pasted throughout the entire codebase. like if you think sql was annoying to read, wait until there's tons of string interpolation and it's distributed over 600 lines while the method slowly appends new things to the query

Shaggar
Apr 26, 2006
if I weren't insanely lazy I would write that proc -> soap method thing cause it would be super easy

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

americong posted:

why don't languages that obviously want to be used for web dev include some non retarded way of accessing a database

http://php.net/manual/en/book.pdo.php

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
it just seems so simple to say 'hey, here's the query, now let's turn that into a function and i'll pass in all the variables and get the result' and yeah you could just turn that into a method and it would be fine but nope noone does that

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
that's exactly what a statement mapper is and what mybatis does

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply