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
Bloody
Mar 3, 2013

how do i do dynamic interactive content without js? or alternately with minimal js? im obviously using c# mvc because im not an idiot.

Adbot
ADBOT LOVES YOU

Symbolic Butt
Mar 22, 2009

(_!_)
Buglord

Shaggar posted:

like you people talk about writing loads of js but I just cant think of any scenario where thats a valid thing to do.

html5 canvas is very attractive

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
shaggar is saying that he uses something that magically generates ur js exactly as you need it

which is believable if you want your product to look straight out of the 90s i guess

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

USSMICHELLEBACHMAN posted:

which is believable if you want your product to look straight out of the 90s i guess

well he does advocate testing on ie8

Shaggar
Apr 26, 2006

Bloody posted:

how do i do dynamic interactive content without js? or alternately with minimal js? im obviously using c# mvc because im not an idiot.

depends on what ur trying to do. if its client side then you can write some knockout to do stuff like add fields to forms or whatever. if its server side just do an ajax call w/ html.ajaxform or w/e to return a partial view with the new content.


Symbolic Butt posted:

html5 canvas is very attractive

canvas is for quirky html5 demo sites, not for real webzones.


USSMICHELLEBACHMAN posted:

shaggar is saying that he uses something that magically generates ur js exactly as you need it

which is believable if you want your product to look straight out of the 90s i guess

javascript doesn't have anything to do with look. or atleast it shouldn't.

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Shaggar posted:


javascript doesn't have anything to do with look. or atleast it shouldn't.

javascript shouldn't have anything to do with anything. unfortunately it does.

Tiny Bug Child
Sep 11, 2004

Avoid Symmetry, Allow Complexity, Introduce Terror

Shaggar posted:

Models are just obejcts that hold data. They should be super simple. Like properties only here no logic allowed!!!!

ugh no logic goes in the model. controllers are supposed to be thin

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

USSMICHELLEBACHMAN posted:

is it as bad as coffeescript

coffeescript (afaik) doesn't try to do much, just polish up js's syntax

typescript adds strict typing, namespaces, classes, interfaces, generics, access modifiers, C#-style accessors, fixes this and a bunch of other things. its got full js interop, and as a bonus most libraries can be made type safe by providing an interface definition file.

because it's subject to the dual constraints of a) being a superset of js b) compiling to idiomatic js there're a fair few warts. most major ones are that you have to fully qualify references to other classes or modules, you have to qualify references to other class members with this, overloading fukkin suckks, one-class-per-file is doable but a pain, and VS's refactorings don't work properly with it yet.

also ECMAScript 6 is scheduled for December and that's supposed to have a lot of the stuff typescript currently crowbars in.

Shaggar posted:

canvas is for quirky html5 demo sites, not for real webzones.
i wanted to do interactive data visualization, and the only way is a big ol pile of js.

Bloody
Mar 3, 2013

Tiny Bug Child posted:

ugh no logic goes in the model. controllers are supposed to be thin

wrong

Bloody
Mar 3, 2013

coffeetable posted:

coffeescript (afaik) doesn't try to do much, just polish up js's syntax

typescript adds strict typing, namespaces, classes, interfaces, generics, access modifiers, C#-style accessors, fixes this and a bunch of other things. its got full js interop, and as a bonus most libraries can be made type safe by providing an interface definition file.

because it's subject to the dual constraints of a) being a superset of js b) compiling to idiomatic js there're a fair few warts. most major ones are that you have to fully qualify references to other classes or modules, you have to qualify references to other class members with this, overloading fukkin suckks, one-class-per-file is doable but a pain, and VS's refactorings don't work properly with it yet.

also ECMAScript 6 is scheduled for December and that's supposed to have a lot of the stuff typescript currently crowbars in.

i wanted to do interactive data visualization, and the only way is a big ol pile of js.

d3 is non-terrible ive heard

Socracheese
Oct 20, 2008

oh hey i did javascript+canvas visualized data!

did you know?

html formatted emails are a BITCH MOTHERFUCKIING SHITFUCKFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFfffffffffffffffffffffffffffff

Luigi Thirty
Apr 30, 2006

Emergency confection port.

So what you're saying is there are many arguments for what goes in what on mvc????

FamDav
Mar 29, 2008

m(vvm)c bitches

Bloody
Mar 3, 2013

Luigi Thirty posted:

So what you're saying is there are many arguments for what goes in what on mvc????

no

there are people who understand what mvc is (shaggar, me) and people who are idiot troll hellfucks (tiny bug idiot)

FamDav
Mar 29, 2008

Tiny Bug Child posted:

well he does advocate testing on ie8

you should really test against ie8 if you're company makes a couple tens of billions.

otherwise youre probably fine with skipping it.

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Bloody posted:

no

there are people who understand what mvc is (shaggar, me) and people who are idiot troll hellfucks (tiny bug idiot)

you're agreeing with shaggar but arguing with tiny bug childe.

god who do i believe!!!!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
if someone is using ie8, you don't want them as a customer anyhow

Bloody
Mar 3, 2013

Luigi Thirty posted:

you're agreeing with shaggar but arguing with tiny bug childe.

god who do i believe

shaggar

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

USSMICHELLEBACHMAN posted:

if someone is using ie8, you don't want them as a customer anyhow

unless they're a business

Luigi Thirty
Apr 30, 2006

Emergency confection port.

lol if you don't turn away potential customers because they're not hip enough

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
all you're logic should go in the model because what better thing to perform validations on itself than the thing itself

double sulk
Jul 2, 2010

USSMICHELLEBACHMAN posted:

all you're logic should go in the model because what better thing to perform validations on itself than the thing itself

fat models are better than fat controllers. a little bit of view logic is fine too. it's all poo poo in the end anyway. :getin:

Socracheese
Oct 20, 2008

there is a clear distinction of what belongs in the model, view, or controller. i sit and think about it real hard, and then i put it in one of those three places, and if you dont put it in the same place you are a lovely coder

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
fat models, fat controllers imo. or multiple controllers for controlling different things

MeruFM
Jul 27, 2010

Bloody posted:

d3 is non-terrible ive heard

D3 is nice but anything fancier than a chart with some hover elements still requires writing OO js.

I cannot wrap my head around var and this, function f() and var F = function()

the worst one is "this" which seems to do entirely different things depending on where you're calling it from.

this thread was made for me

Corla Plankun
May 8, 2007

improve the lives of everyone

MeruFM posted:

the worst one is "this" which seems to do entirely different things depending on where you're calling it from.

:laugh:

A COMPUTER GUY
Aug 23, 2007

I can't spare this man - he fights.
no fat models

Socracheese
Oct 20, 2008

tbh the only logic i ever remember filling in on a model where one field, if not given, had to be calculated from something and saved there, otherwise i p much never did any logic on it

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
real models have curves

Deus Rex
Mar 5, 2005

double sulk posted:

fat models are better than fat controllers. a little bit of view logic is fine too. it's all poo poo in the end anyway. :getin:

thin models, thin controllers, fit easy to test service and form objects

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i mean i think every code would be better with less code in it, but the fact is you need to put all that code somewhere

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

USSMICHELLEBACHMAN posted:

i mean i think every code would be better with less code in it, but the fact is you need to put all that code somewhere

fat dtos between skinny models and skinny viewmodels

jesus WEP
Oct 17, 2004


what is a good book on asp.net mvc

i just taught myself using lots of trail & error & some stackoverflow and i think i make the worst mvc apps in the world

Morkai
May 2, 2004

aaag babbys

double sulk posted:

fat models are better than fat controllers. a little bit of view logic is fine too. it's all poo poo in the end anyway. :getin:

no and no and you're missing the point. this is correct. true.
:getout:

Bloody
Mar 3, 2013

St Evan Echoes posted:

what is a good book on asp.net mvc

i just taught myself using lots of trail & error & some stackoverflow and i think i make the worst mvc apps in the world

http://www.asp.net/mvc

Welsper
Jan 14, 2008

Lipstick Apathy
speaking of books, is there a good java/object orientated intro book for dumb functional plangers such as myself?

Bloody
Mar 3, 2013

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

Welsper posted:

speaking of books, is there a good java/object orientated intro book for dumb functional plangers such as myself?

objects are a poor man's closures

closures are a poor man's object

inshaggar'allah

Shaggar
Apr 26, 2006
all logic belongs in the controller. if you have logic in the model then it can have effects on the controller and view and you don't want that. you want the model to just be dumb data that you pass around. it can have metadata (annotations/attributes) for validation and stuff, but not logic.

code that retrieves the model from the database is an extension of the controller, not the model.

Do not loving use orms ever. do not use entity framework outside of statement mapping (which it still doesn't do great)

Adbot
ADBOT LOVES YOU

jesus WEP
Oct 17, 2004


shaggar did I read you saying it's better to set up all your queries on sql server as stored procedures and then just exec from your app?

  • Locked thread