New around here? Register your SA Forums Account here!

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
HoboMan
Nov 4, 2010

seriously how do i REST?
i never realized how much i never thought about this with my old job's crappy old webforms project.

like there are several screens where we have a list with some bare-bones info and can click on the item to get detail and edit.
what to do for the endpoints?
do i eager-load all the detail data for the basic list?
do i re-use the detail object for the list and just have a bunch of null fields returned from a different endpoint on the controller?
or do i make a separate object and controller?

the last one seems "correct" but it's the most work

HoboMan fucked around with this message at 18:08 on Apr 26, 2019

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

if i run my project in visual studio and live edit the angular stuff it dosen't update on the page.
i thought vs just sucked for webdev, however my coworker says it works for them and they don't remember having to do anything special to get it to work.
anyone know of this problem?

HoboMan
Nov 4, 2010

like most vs problems i was able to fix it by blowing away all my project files and reloading it from source control

HoboMan
Nov 4, 2010

tps: i be all like "GET /" and the client app says "cant GET /" and i just have to sit here and imagine why i can't GET / because my browser's certainly not gonna tell me, and there's no precious logging to help me out either.

HoboMan
Nov 4, 2010

in retrospect i wish i had done GET /flask rather than just GET /

HoboMan
Nov 4, 2010

Corla Plankun posted:

how can i add auth to a thing that already exists and is written by someone not-at-this-company?

i basically want to MITM an internal website that we're serving to add auth on top of it and i have no idea how to do this at all

i guess i could just fork the original and add auth to the actual site but i really dont want to do webdev if i can help it

in barbossa voice: "you better start believing in webdev projects then corla plankun, you're in one!"

HoboMan
Nov 4, 2010

also in case anyone cares (i know you don't) the very helpful "cannot GET /" error i was getting was from angular silently failing to compile

HoboMan
Nov 4, 2010

Aramoro posted:

If you've managed to make your Angular compile fail silently you're problem starts before you get to the Angular part.

i don't know man, just got whatever set up vs 2017 gives you by default when you select "new angular project"

HoboMan
Nov 4, 2010

nginx:
i imagine it's supposed to be said like n-gin-x (engine x) but i can't help but read it as n-ginx (en jinx)

HoboMan
Nov 4, 2010

yep, seems like if the angular compiler throws an error visual studio ignores it and keeps on truckin', hosting a website with no content
if i want to see what the error is i have to open the command line and try to compile it from there

HoboMan
Nov 4, 2010


and here i've been mostly impressed with how well intellisense has been handling javascript compared to vs 2015

HoboMan
Nov 4, 2010

how to do field masking now that jquery is haram?

e: or disallowing characters

HoboMan fucked around with this message at 20:55 on May 2, 2019

HoboMan
Nov 4, 2010

is blazor still somehow ~powered by the blockchain~?

HoboMan
Nov 4, 2010

di: ok i guess
di frameworks: bad

HoboMan
Nov 4, 2010

are there any legal or ethical issues with just copy-pasting a function out of an open source project with no explicit license?

HoboMan
Nov 4, 2010

welp

got this broken-rear end js library that just so happens to have a function that does exactly what I need, but the rest of the library is garbage

HoboMan
Nov 4, 2010

gonadic io posted:

Just got told that work is paying 2k/mo for 30mb of data in cosmos lol

E: plans to change this have just been pushed to 2020

ask for a 24k/yr raise since wasting that much money apparently don't matter to them

HoboMan
Nov 4, 2010

anyone dealt with nested objects in dapper before?

HoboMan
Nov 4, 2010

thanks for the reply, yeah we got an object that has other objects as properties and wanted to know what the best way to get that in and out of the database using dapper.
i just spent the last 3 hours trial-and-error learning about undocumented angular lifecycle hook behavior though so my brain hurt and i'll look at this dapper stuff later.

gently caress angular by the way

HoboMan
Nov 4, 2010

brand engager posted:

android studio

found your problem

HoboMan
Nov 4, 2010

ask me about the time andriod studio updated in the background and caused my build to break and i spent two days trying to figure out how i hosed up my build

HoboMan
Nov 4, 2010

Sapozhnik posted:

if you think angular is bad imagine how bad angularjs (angular 1) was. i still have nightmares about that poo poo

any time im looking stuff up and i think to myself "man this code is really ugly and confusing" i check the tags and realize im accidentally reading an angularjs tutorial

HoboMan
Nov 4, 2010

i was looking up a bug in angular and there was a ticket for it on thier github already. someone even has a pull request to fix it, but they marked it as wontfix because "fixing it would break too many things over here at google"

HoboMan
Nov 4, 2010

"just toss an xml blob at the database and let the sql devs figure it out" guy technically has final say in this project's design but since we are also doing the sql dev i think it would be faster an easier to just not.

HoboMan
Nov 4, 2010

"i sure hate having to map values... i know! ill just use a fragile method that requires three times as much value mapping to avoid it!"

HoboMan
Nov 4, 2010

quote:

Angular defines an ErrorHandler class that will allow us to override it and handle custom logic. Typically, I have my error handlers do things like show some sort of notification to the user via a dialog or growl-like component (ideally with a emoji)

ugh

HoboMan
Nov 4, 2010

shagger is right, the internet was a mistake

HoboMan
Nov 4, 2010




ughhhhhhhhhhhhhhhhhh

HoboMan
Nov 4, 2010

i just made a lovely little reflection function that sets all empty strings to be null recursively on the passed object

i feel mildly accomplished but at the same time i think this is probably not a good idea

in conclusion terrible programming is a profession of contrasts

HoboMan
Nov 4, 2010

Powerful Two-Hander posted:

I mean, one guy I know was storing time series pricing data as an array on an object in mongo and was complaining he was having problems with the data volume and it was like, that's because that's stupid, just use a table.

lol, like even if you're committed to not using sql there are time series databases

HoboMan
Nov 4, 2010

redgate tools for smss i found quite needs suiting. they were slightly jank but far better than anything else i've seen (which is admittedly not much)

gave good code completion on par with an ide and had version control and db object diff that i liked using more than the very lovely visual studio sql project way to do it

HoboMan
Nov 4, 2010

Fiedler posted:

the database projects are fine, but require you to use visual studio for database editing. people get really comfortable doing all database related stuff in ssms, so redgate feels nicer.

visual studio's code completion for sql is garage to non-existent and trying to sync up a sql project to the database has never not broken both the database and the project

HoboMan
Nov 4, 2010

i both dread and look forward to the idea of working on anything actually important

HoboMan
Nov 4, 2010

speaking of webdev crosspost from cjs thread:
cjs: could hear very friendly, soft-spoken, and well mannered co-worker forced to work on webdev lament quitely in the next cube over "hell! i've gone to hell! why won't you work you piece of poo poo?"

HoboMan
Nov 4, 2010

redleader posted:

lol if you trust any devs to correctly reimplement anything

ftfy

HoboMan
Nov 4, 2010

does anyone know what im supposed to do if i still want to display my component in angular despite not reciving data for my bindings?

HoboMan
Nov 4, 2010

Aramoro posted:

I'm not sure what you mean. Like you want a blank component to show up despite having no data or the data not loaded yet?

yeah

currently it's crashing on the bindings if there is no input but i would like the input to be optional

i previously had the html for it wrapped in <div *ngIf="myData"></div>
but my component is an editable form and i would like have filling out a new form just be calling it with no data

HoboMan fucked around with this message at 20:39 on May 14, 2019

HoboMan
Nov 4, 2010

Aramoro posted:

Are you using reactive forms or template forms?

template i guess, but i'm not actually using a form tag anywhere because making it a proper form makes angular-material do weird things

i figured it out though. was setting the data model to be an empty object in the constructor but the parent was still technically giving an input of undefined instead of just not passing anything and overwriting my empty object with undef

HoboMan
Nov 4, 2010

gonadic io posted:

rip you. i had a fun day trying to get sbt to download files from a github release. then the next day github announced they've made a hosted maven service

oh jesus christ, i wouldn't wish sbt on my worst enemy

only good thing about sbt is it's so garbage it got me to not bother with scala which saved me a lot of time

HoboMan fucked around with this message at 21:07 on May 14, 2019

Adbot
ADBOT LOVES YOU

HoboMan
Nov 4, 2010

leper khan posted:

hot take: xml is fine. jason certainly isn’t any better.

xslt is real bad though

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