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.
 
  • Locked thread
Subjunctive
Sep 12, 2006

✨sparkle and shine✨

I think they accidentally used gwt for something once, before they realized it was theirs and stopped.

Adbot
ADBOT LOVES YOU

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Subjunctive posted:

I think they accidentally used gwt for something once, before they realized it was theirs and stopped.

Funnily enough, I don't see much new development using GWT any more - that particular niche is where angular gets used instead.

A bunch of internal tooling uses angular (actually, internal products tend to be more early-adopter than customer-facing products in general), but there's also stuff like leanback and doubleclick.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Jabor posted:

A bunch of internal tooling uses angular (actually, internal products tend to be more early-adopter than customer-facing products in general), but there's also stuff like leanback and doubleclick.

that's interesting. I think our first major users of react were a) the mostly widely used page on our site, news feed, and b) the customer-facing tools through which most of our money comes in, ad management. I don't know how hard it is to use angular as part of something (like a new gmail widget or some part of news); that aspect of react really helped accelerate adoption, because if we'd had to convert all of news feed to react before we deployed any of it lolwutimo.

leftist heap
Feb 28, 2013

Fun Shoe
angular is a spa framework so it really isn't meant to be used for small pieces or widgets or w/e. not that you couldn't it just doesn't make a lot of sense. not the way it would for something like react at least.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Subjunctive posted:

does Google use Angular (either version) for anything important?

I believe their goto app example is the PS3 Youtube app.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Subjunctive posted:

that's interesting. I think our first major users of react were a) the mostly widely used page on our site, news feed, and b) the customer-facing tools through which most of our money comes in, ad management. I don't know how hard it is to use angular as part of something (like a new gmail widget or some part of news); that aspect of react really helped accelerate adoption, because if we'd had to convert all of news feed to react before we deployed any of it lolwutimo.

hey can you get the person responsible for this to pay for my therapy? tia



"okay sure i'll just configure my endpoints and not wor-"





(of course what would be the point of maintaining legacy endpoints while updating the schema? still though ugh)

DONT THREAD ON ME fucked around with this message at 06:47 on May 6, 2015

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



every time i see gwt i think "goons with tools" :(

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



also lol at my stupid hash function

code:
var hashValue: Int { return self.x * 1000 + self.y; }

Soricidus
Oct 21, 2010
freedom-hating statist shill

MALE SHOEGAZE posted:

hey can you get the person responsible for this to pay for my therapy? tia



"okay sure i'll just configure my endpoints and not wor-"





(of course what would be the point of maintaining legacy endpoints while updating the schema? still though ugh)

making life harder for advertisers is strictly virtuous

~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

Shaggar posted:

idk much about reporting but these kinds of tables are pretty common I guess? basically they want Business ID - Reporting Year to be a filter and then you have an id for that filter to make it easy to work w/

but yeah you want an auto increment identity column and then columns for the business area id and reporting year. pk is the auto increment id and then a unique key on business area id + reporting year.

Then use something like
SQL code:
INSERT INTO BusinessAreaReportingYears (BusinessAreaId, ReportingYear)
SELECT 
	BusinessAreaId
	,DATEPART(year,GETDATE())
FROM
	BusinessAreas
to load the table. You will want to load it once a year or you could prefill it with years forever, but you would need to keep it updated as new business areas are added.

i don't think this would work due to the requirement to have incrementing IDs per year and business area
in fact I can't think of a way to meet that reqt using PKs, without doing something dumb like multiple tables

you're going to need to generate the PK on insert in the app layer, or using a trigger or something

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

Snapchat A Titty posted:

also lol at my stupid hash function

code:
var hashValue: Int { return self.x * 1000 + self.y; }

at least use a prime number jeez :cmon:

Shaggar
Apr 26, 2006

uncurable mlady posted:

shags, whats your beef with EF anyway

ORMs are bad to begin with because they assume your application owns the data model. they also require direct table access which is bad for security and also makes it harder to do multiapplication access.

on top of that normal orm stuff, EF has this hosed up and bizarre internal "entitye" state store. your statements aren't written in a transaction as coded and then committed on success, they are stored in memory until you call save or some poo poo at which point EF tries to figure out what you actually changed to do the real statements. This stupid store thing means you constantly have to janitor entity state on a second level before the database. its a huge pain in the rear end.

stored procs + statement mapping are a much, much better data access model. EF can atleast do some really lovely basic statement mapping with procs, but it cant map normal statements and you cant specify your own model objects as inputs/outputs.

Shaggar
Apr 26, 2006

~Coxy posted:

i don't think this would work due to the requirement to have incrementing IDs per year and business area
in fact I can't think of a way to meet that reqt using PKs, without doing something dumb like multiple tables

you're going to need to generate the PK on insert in the app layer, or using a trigger or something

they way I read it was that the id is a surrogate key representing the combination of year + business area and not an id property of the year and business area.

Shaggar
Apr 26, 2006

rrrrrrrrrrrt posted:

angular is a spa framework so it really isn't meant to be used for small pieces or widgets or w/e. not that you couldn't it just doesn't make a lot of sense. not the way it would for something like react at least.

knockout, on the other hand, makes doing full SPAs and small components equally possible. as the former is composed of the later.

Shaggar
Apr 26, 2006

triple sulk posted:

one of these places I've been talking to said they were rewriting their api from webapi to node and short of new(ish) hotness I have no idea why. also they described their culture (when I asked about how they work, generally speaking) as a "war room" which I assume means 80 hour work weeks

I could see going from webapi 2 to mvc6 just cause of the consolidation, but lol @ node.

brap
Aug 23, 2004

Grimey Drawer
seems to me like letting a bunch of different apps have raw access to a database makes for more code churn if you need to change schema. better to give those apps access to the same API for doing database stuff. it's like providing clients with an interface as opposed to handing them an implementation.

leftist heap
Feb 28, 2013

Fun Shoe
do you HAVE to let EF own your schema? or is it like hibernate where you can develop your model entirely independently and wrap hibernate around it? i was on a team once that was creating their db exclusively by reverse engineering their hibernate model and good lord is was the worst pos imaginable.

Shaggar
Apr 26, 2006

fleshweasel posted:

seems to me like letting a bunch of different apps have raw access to a database makes for more code churn if you need to change schema. better to give those apps access to the same API for doing database stuff. it's like providing clients with an interface as opposed to handing them an implementation.

yeah your procs are the interface between your application and the database. in fact when using a statement mapper its common to create an actual interface with methods that will be used for data access and then have the statement mapper bind the inputs and outputs from the interface methods to statements/procs. w/ spring mybatis this can be done automatically with the resulting proxy injected into wherever you want. its the best way to do data access by far.

Shaggar fucked around with this message at 16:30 on May 6, 2015

Shaggar
Apr 26, 2006

rrrrrrrrrrrt posted:

do you HAVE to let EF own your schema? or is it like hibernate where you can develop your model entirely independently and wrap hibernate around it? i was on a team once that was creating their db exclusively by reverse engineering their hibernate model and good lord is was the worst pos imaginable.

you don't have to let it own the schema but then you're letting the database dictate the application model, which is definitely a better scenario, but its still not optimal. better to abstract the two.

jesus WEP
Oct 17, 2004


rrrrrrrrrrrt posted:

do you HAVE to let EF own your schema?
iirc you can give it access through a user that has no ddl privileges but its likely to throw a shitfit about it sooner or later

Shaggar
Apr 26, 2006
I talked to someone on the vs team about the vs data tools + ef and they litterrally could not comprehend the idea of the application not completely owning the schema. so that's why those tools are the way they are.

brap
Aug 23, 2004

Grimey Drawer

Shaggar posted:

yeah your procs are the interface between your application and the database. in fact when using a statement mapper its common to create an actual interface with methods that will be used for data access and then have the statement mapper bind the inputs and outputs from the interface methods to statements/procs. w/ spring mybatis this can be done automatically with the resulting proxy injected into wherever you want. its the best way to do data access by far.

that sounds quite good. I think I just had a bad experience with a certain project I worked on which pretty much had the app accessing tables raw.

do you have any experience with table valued functions? at my last job when we would have some giant predicate or really large projection that needed to be used in a bunch of different places we would basically copy paste it and I felt bad and wrong the entire time. I know that scalar functions mostly suck for performance but there must be SOME way that SQL server lets you have function composition in your scripts while preserving the performance.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

Shaggar posted:

yeah your procs are the interface between your application and the database. in fact when using a statement mapper its common to create an actual interface with methods that will be used for data access and then have the statement mapper bind the inputs and outputs from the interface methods to statements/procs. w/ spring mybatis this can be done automatically with the resulting proxy injected into wherever you want. its the best way to do data access by far.

shaggar was exactly right

Shaggar
Apr 26, 2006
I've used table valued functions before, but I always end up going another way usually cause it ends up not being that reusable.

also theres a lot of fud about performance in sql and most of it comes down to people not being able to separate certain patterns from poor performance caused by implementation. like if you have a function that is internally joining to a bunch of tables and then you include that function in a join somewhere else then yes of course that's going to be slow you idiot. but if your function is just concatenating strings or something then that will be plenty fast.

SQL server is generally pretty good at optimizing queries and a function containing the same code as something you're coping and pasting around should have the same performance (for the most part).

also CTEs are gr8

Soricidus
Oct 21, 2010
freedom-hating statist shill

Subjunctive posted:

shaggar was exactly right

:agreed:

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Shaggar posted:

I've used table valued functions before, but I always end up going another way usually cause it ends up not being that reusable.

also theres a lot of fud about performance in sql and most of it comes down to people not being able to separate certain patterns from poor performance caused by implementation. like if you have a function that is internally joining to a bunch of tables and then you include that function in a join somewhere else then yes of course that's going to be slow you idiot. but if your function is just concatenating strings or something then that will be plenty fast.

SQL server is generally pretty good at optimizing queries and a function containing the same code as something you're coping and pasting around should have the same performance (for the most part).

also CTEs are gr8

index inDEX INDEX

Malcolm XML
Aug 8, 2009

I always knew it would end like this.
CL

Malcolm XML posted:

index inDEX INDEX

CLUSTER CLUSTER CLUSTER

Shaggar
Apr 26, 2006
"hrm, why is this query so slow?"

"well whats the index on?"

"index?"

MrMoo
Sep 14, 2000

Reuters turns indexing off on their gigantic onsite SQL Server 2008 DB's for performance, :lol:

http://thomsonreuters.com/en/products-services/financial/quantitative-research-and-trading/quantitative-research.html

It updates regularly throughout the day (6TB content) and apparently that is only feasible on the crap hardware used when indexing is disabled.

MrMoo fucked around with this message at 20:28 on May 6, 2015

cowboy beepboop
Feb 24, 2001

Shaggar posted:

"hrm, why is this query so slow?"

"well whats the index on?"

"index?"

i looked like a superstar when i added indexes to columns commonly used in joins.
php devs :(

Maluco Marinero
Jan 18, 2001

Damn that's a
fine elephant.

Subjunctive posted:

that's interesting. I think our first major users of react were a) the mostly widely used page on our site, news feed, and b) the customer-facing tools through which most of our money comes in, ad management. I don't know how hard it is to use angular as part of something (like a new gmail widget or some part of news); that aspect of react really helped accelerate adoption, because if we'd had to convert all of news feed to react before we deployed any of it lolwutimo.

Yeah, that's a HUGE part of the leg up for React in my mind. With React it's actually really practical to eat an application from the inside, because wrapping components with more components is trivial and easy to do as long as you have good property flow.

On the contrary, Angular requires special snowflake HTML, comes with a router, and is quite controlling when it comes to SPA. The result is you go full Angular straight away, but even then the directives, controllers and services combine to create an application that's way less composable.

On another note, a colleague and I built a client services site using Django with Node as view renderer (using Jade and React static renders). With out next go around I'm keen to actually write it in React entirely, all the way down to the full layout. (we can even pretend we're using Jade with this https://www.npmjs.com/package/react-jade-transformer)

That way its trivial to turn any part of the site into an interactive component without trouble. Try doing that with Angular. The fact that React is versatile, isomorphic and can produce compliant markup is huge.

Its nice to know also that no React = no Facebook, because going all in on a technology has its risks of course.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
angular is bad for every use case except for making gmail

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

MALE SHOEGAZE posted:

angular is bad for every use case except for making gmail

wait what? no WAY do they use angular for gmail.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
in other news i spent hours today getting an animated tayne to dance around in the terminal while gradlew/spring is spinning up.

it forks the spring boot process and then when the app bootstraps it sends a sighup to tayne.pid.

but the part i spent like 3 hours on was trying to get io redirection to work such that the spring logs wouldnt gently caress up taynes dancing. couldn't figure that out

i think tomorrow i'm gonna dockerize it completely

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Subjunctive posted:

wait what? no WAY do they use angular for gmail.

i know right. that's the saddest part.

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

MALE SHOEGAZE posted:

in other news i spent hours today getting an animated tayne to dance around in the terminal while gradlew/spring is spinning up.

it forks the spring boot process and then when the app bootstraps it sends a sighup to tayne.pid.

but the part i spent like 3 hours on was trying to get io redirection to work such that the spring logs wouldnt gently caress up taynes dancing. couldn't figure that out

i think tomorrow i'm gonna dockerize it completely

a good use of time.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

bobbilljim posted:

a good use of time.

Dessert Rose
May 17, 2004

awoken in control of a lucid deep dream...
i love aalib

Adbot
ADBOT LOVES YOU

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:

5

  • Locked thread