8

I realise this may be an opinion based question, but I am am curious if there are any best practices regarding setting up a new SPA in Visual Studio.

I have some experience with TypeScript, Knockout, Underscore, Moment, Razor and MVC4 framework (and EF6).

What interest me the most is:
-Is there a VS SPA template that is considered "the best" or do I start from scratch?
-What kind of projects and naming conventions should i use in VS?
-What libraries is considered as good combinations in SPA (Angular.js is something I'm looking into) ?
-What is consideres best practices regarding client call to retrieve data from a database (first and foremost Ajax call)
-Best practices regarding HTML/CSS coding

Do you know about about a tutorial or documentation that you have used and found very helpful on the subject(s) and that is regarded as a "must read"?

Maybe somethings in the lines of this:
http://isobar-idev.github.io/code-standards/
http://msdn.microsoft.com/en-us/magazine/dn605877.aspx

UPDATE (what I learned so far):

Client:

Client-Server communication:

  • Breeze for quering the server for data and exhange of metadata(?) -> http://www.breezejs.com/
  • SignalR (under consideration as I am building a forum/chat system in my webapp)
  • Websockets (if I need realtime solutions...)

Server:

  • Asp.Net WebApi for HTTP services
  • EF 6 (for creating entities)

Database:

  • SQL server express for now (for ease of entity generation), other suggestions?

VS directory structure and project definitions:

  • Not sure about this yet..
Community
  • 1
  • 1
Daniel
  • 113
  • 7
  • http://www.asp.net/web-api/tutorials/hands-on-labs/build-a-single-page-application-(spa)-with-aspnet-web-api-and-angularjs – Oren A Sep 06 '14 at 21:27
  • Thanks for the link @OrenA! WebApi seems like a good way to handle request from the client. I'll try to summarize my findings on the internet in the main post – Daniel Sep 07 '14 at 09:33
  • If you like knockout you should try out Durandal. Typescript is a must. About project structure... Keep the website in a seporate project from the server (within the same solution thoug). Breeze is nice for data display and caching, but for security reasons I would recomend updates to be performed by simple api calls using custom Business Objects. – Svakinn Dec 06 '14 at 21:44

0 Answers0