These are chat archives for canjs/canjs

22nd
Dec 2015
Justin Meyer
@justinbmeyer
Dec 22 2015 03:14
@marshallswain you want to update a bunch of items?
like a list?
list.save()
sorta thing?
this isn't built into can-connect, but the API is speced out (and implemented in the caches)
updateListData
.updateListData(listData[, set]) -> Promise<ListData> - Update a list's data.
we need a saveList() CRUD method
Marshall Thompson
@marshallswain
Dec 22 2015 15:08
@justinbmeyer that's what I needed to know. Thanks.
Adam Tourkow
@atourkow
Dec 22 2015 20:23
I'm reading an article about SPA that says canJS has AMD. I'm just learning about this, what's the AMD part? Loading .js files on demand? Where is that documented?
I just got the whole zip from github
Kevin Phillips
@phillipskevin
Dec 22 2015 20:32
@atourkow I’m not sure exactly what the article is talking about, but there is an amd version of canjs so you can use canjs if you’re using amd
you can see an example here: http://canjs.com/release/2.3.7/amd/
Adam Tourkow
@atourkow
Dec 22 2015 20:43
@phillipskevin Ahh, it's this article: http://blog.falafel.com/building-single-page-applications-with-canjs-and-requirejs/ But he was saying version 1.1 :) So, it's old.
Kevin Phillips
@phillipskevin
Dec 22 2015 20:51
yeah, requirejs probably isn’t being used too much anymore
you should take a look at StealJS, which is the module loader we use in most projects
you can use it with AMD, CommonJS, or ES6 module syntax
or any combination of them
Adam Tourkow
@atourkow
Dec 22 2015 20:55
@phillipskevin Thanks. :) I'm going to just stick with the tutorial for now. This resturant example is great actually. This wasn't here when I first tried can JS. Explains a lot.
Kevin Phillips
@phillipskevin
Dec 22 2015 20:56
Ok, there’s also a place-my-order guide here http://donejs.com/place-my-order.html that is a bit more recent
which shows CanJS + StealJS
there’s also a quick start guide thats a bit shorter: http://donejs.com/Guide.html
whichever guide you find the most useful :smile:
Guido Smeets
@gsmeets
Dec 22 2015 21:17
Requirejs is still in use in plenty of places ;)
Adam Tourkow
@atourkow
Dec 22 2015 21:21
donejs?
@phillipskevin Wait, so which is preferred canjs or donejs?
Kevin Phillips
@phillipskevin
Dec 22 2015 21:22
donejs uses canjs
if you just need client-side mv* stuff, canjs is good
donejs also has module loading, testing, documentation, live reloading, server-side rendering
@gsmeets I wasn’t trying to insult requirejs. I’ve used it on lots of projects that are still using it today.
Adam Tourkow
@atourkow
Dec 22 2015 21:25
ahh, ok, so it's more robust
Kevin Phillips
@phillipskevin
Dec 22 2015 21:25
yeah, it’s a combined package of a lot of smaller projects, including CanJs
Adam Tourkow
@atourkow
Dec 22 2015 21:26
I remember when looking into new JS frameworks, I saw angular and CanJS. SOmething about can was so appealing. Since then there's now react, but I looked into that also and still think CanJS is more appealing