JSConf 2014

Desarrollo ágil de juegos con JavaScript

Bodil Stokke  · 

Presentación

HTML (pincha para descargar)

Vídeo

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

so yeah staying within the theme I think JavaScript development today has a serious problem we generally for the most part we write our programs in a fairly imperative style we go global mutable staged on occasions object orientation and there's a problem

with that there's a very real problem it's just too mainstream it's not cool I mean but any self-respecting hipster wouldn't want to touch that stuff but we aren't really clear on the alternative someway I mean what kind of people will

write codes in Si like that done this thing I'm so much for micromedex timing and enterprise developers would do we want to be a surprise developers no we do not so we need an even better solution for this so we have this thing called functional programming

and photo programmers up in their ivory tower femme salons they had all these amazing words and concepts and things that what you've probably never heard of math sounds like it's a good start so yeah you got your closely arrows you got your needle

um I don't know why you would need a lemma but there you go go burritos we don't mention the M word and so on I'm gonna have to pronounce the last one now so I go history morphic people morphisms just just for kicks he I practiced so much to be

able to say that so yeah best function but there's all this stuff baton what what's the ease of this there are things fortunately leaking out of the world of Haskell and whatnot into you some into concepts that are more relevant to us as JavaScript

developers for one thing there's this thing called functional reactive programming and in particular this thing called reactive extensions made by this guy called Eric Meyer for c-sharp originally and then started associate spreading out into other languages

and this guy called Misaki essentially implemented at the JavaScript version rxjs map that doesn't look like years old cool t-shirt that is Eric ware who's this done I don't know it looks cool probably invented something very interesting wait is

that the guy could see the day isn't it yeah good job anyway so rxjs is what i want to try and use today to actually build something real I'm just gonna be once I'm done introducing this thing I'm essentially just gonna be writing code so we're

gonna build again using rxjs and originally i i thought i'd just used the dom to render our game components and then I saw Angelina stalker yesterday about the canvas so I thought maybe we just rewrite this year's the canvas and then just now David

mentioned this thing called react so I figured why not use that so I just finally I was talking I just rewrote this had think T these reactors are back-end that's the live by the way that was prepared so react was in what's been invented by these guys

and Facebook and it's essentially um well it's it's more than just a renderer but I'm just gonna use the rendering pot now wait we're aney can you construct social and immutable virtual dumb and then just push that into the current um turn

out to be Michael very easy to do so if you're wondering about reactive extensions is essentially think of arrays you know erase in JavaScript you can map them you can filter them we can do all these really function things with them and in international

extensions you have this thing called an observable which is sort of the same thing so I would also extend over time so what we got here is we're taken away and we turn it into an observable and I've got this helper function here called lunk which

just prints the what comes out of the other end of the observable this it's sort of like a stream as one so if we run this we should be getting bONIES ben is a cool we can map the ponies ponies map only like any and then that anything is essentially I

mean it looks just like mapping erase at this point of course it also works over time I've got this thing here which takes my pony observable and zips it together with an interval observable which takes every half second so if we love this we get one penny

[ ... ]

Nota: se han omitido las otras 1.932 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.