Posted by Igor Moochnick on 08/20/2012
The brute force solution of using the T4 templating engine to emit both the client-side and the server side data models didn’t look that appealing to me. Primarily due to a simple fact that it’s not that easy to refactor the T4 templates. And, the ReSharper junkie like me, can’t tolerate this fact.
Note: all of the code is an intermediate solution that was answering my personal needs for the project I was running. It is in no-way represent the full fledge solution. If you want something bigger and more feature-reach, you can either contribute to my solution or look into projects like Script# or SharpKit.
Read the rest of this entry »
Posted by Igor Moochnick on 07/20/2012
I had a blast presenting for ASPConf 2012. I want to thank all the organizers, presenters and attendees. Without you it wouldn’t have been possible.
One of the questions from one of the attendees during my “Building complex Single Page Application should be as enjoyable as visit to a SPA” talk was:
Q: Is it possible to bring on-demand portions of the application that will be emitted by the Asp.Net MVC Views (aka: dynamic views generation)
A: Sure (see Picture #3).
But when, in fact, I’ve tried to demonstrate it right away – I hit a snag.
What happened is: my implementation was correct but Google Chrome was too smart for me to handle it and wrapped the partial HTML with the full “HEAD” and “BODY” tags [See Picture #1].
I’ve assumed that my server was returning more than the generated by the Raw view content itself. If I would’ve checked a network stream [See Picture #2] (or Fiddler) I would’ve seen another result – the correct one.
So, this is a simple example how you can import a dynamically generated content from an Asp.Net Mvc view into a SPA application:
1. Create a view
2. Create a Controller entry (when you’ll navigate to this view you should see a result on Picture #2)
3. Change a dependency path in your SPA view to point to the new content (and the final result should look like Picture #3)
Posted by Igor Moochnick on 06/09/2012
It’s better to follow the best practices from the beginning to reduce the weight of the complexity and enable easy extensibility of your code. Here are a couple of links that may put you on a good path:
Here is an entry list of frameworks to know about:
I’m not afraid to admit that I’m not a web designer and I struggle with building good-looking sites, but there are a couple of tricks that I use to make sure that I’m not stuck:
Tips for VisualStudio–devoted crowd:
Here are a couple of more helpful ones:
- async.js – Async utilities for node and the browser
Posted by Igor Moochnick on 10/26/2011
With the recently released project Roslyn (or alternatively Mono Compiler Services) it is possible to have a clean solution to the problem: I write my data and data model in a language and an environment that allow solid validation and refactoring.
I’m ironing out some kinks in my implementation and, as soon as it’ll be in a stable state, I’m going to release a NWT (NeWT) project that will provide a similar to GWT (Google Web Toolkit) functionality.