Jezz Santos - 76 - Aug 3, 2014

Looking at moving to a SPA on my web clients, and investigating the JS frameworks I need to get started with.

Currently leaning towards a knockout.js and breezejs.

I understand we may need an adapter for breezejs?
Can anyone confirm?

Stephen Brannan:

If knockout/breeze can handle a rest api then I see no reason why you would need web api in between. ServiceStack is the alternative to MS’s web api. ServiceStack.Razor is also an alternative to MS’s asp.net mvc as well. Both of which I’m using and prefer.

Jezz Santos:

OK, thanks, so if I moved to angularjs (I am studying it now) sounds like it will replace knockout for binding to data, but will give me the offline functionality (like upshot or breezejs) as well?

Stephen Brannan:

+Jezz Santos I can’t speak for knockout and breeze but if it helps I’ve been using angularjs with ServiceStack and so far love it a lot. Out of curiosity why did you choose knockout/breeze?

Jezz Santos:

Hey Stephen,

Just because my starting point was knockout+upshot. Upshot now dead, so looking for a replacement. Recommendation was either JayData or Breezejs.

Not seeing any firm statements either way on whether breezejs or jaydata support SS services. Or if I need to build WebAPI stuff between my SS service and my JS clients. Hope not. 

Just looking for guidance, given this is all new ground.

Stephen Brannan:

I had to look up breeze myself since I haven’t used it before. From what I can tell no you need to still use breeze even with angularjs. But I did find a few pages showing how breeze works with angularjs just fine… See http://www.breezejs.com/documentation/breeze-angular-service

and…
http://www.breezejs.com/samples/todo-angular

Stephen Brannan:

Oh and let me comment on angularjs in respect to knockoutjs. angularjs does two-way binding incredibly well, but it also provides an excellent client side mvc framework with dependency injection.

Jezz Santos:

that might be the clincher for me - JS unit testing is non negotiable.

Great, so looks like: angularjs + breezejs + jasmine:
angularjs for a MVVM framework + databinding + structuring app
jasmine for unit testing angluarjs
breezejs for offline support?

Stephen Brannan:

+Jezz Santos Sounds like some good client side choices :slight_smile:

I also highly recommend AngularJS which IMO is the choice SPA platform for any backend. We’ve even added an AngularJS template in the ServiceStackVS templates:
https://github.com/ServiceStack/ServiceStack/wiki/Creating-your-first-project also +Alexandru Vasile Pop just released his AngularJS + SS book which may help, you can also find links to his code samples on GitHub from his blog: https://github.com/ServiceStack/ServiceStack/blob/master/release-notes.md#get-the-learning-angularjs-for-net-developers-book

There are also a few example projects with SS + AngularJS on: https://github.com/ServiceStack/ServiceStack/blob/master/release-notes.md#get-the-learning-angularjs-for-net-developers-book

Jezz Santos:

thanks guys, thanks for the support/confidence. Time to experiment and learn