- Visual Studio 11 Beta
- ASP.NET MVC 4 Beta
- Single Page Application
- Bundles (new combining/minification stuff)
- Web API
- Twitter Bootstrap 2.0
- Modernizr
- MvcScaffolding
- etc…
Showing posts with label NuGet. Show all posts
Showing posts with label NuGet. Show all posts
Saturday, March 17, 2012
Disable Minification with MVC 4 Bundles
I decided to play around with a bunch of new technologies to dive in and learn today. I decided to write a basic blog app (yeah, boring, I know) using the following tools:
Sunday, March 4, 2012
Released: JsTrace.MVC
I just released the JsTrace add-on JsTrace.MVC as a NuGet package.
What is it? It's a way to automatically proxy JsTrace messages from client-side JavaScript to your MVC application.
Basically, when you add this package, you get the following Area added to your ASP.NET MVC project:

The JsTraceController has a single "Index" method that receives a JsTraceMessage object. All that contains is the module, level and message sent from the JavaScript side.
Given the following javascript:
By default, the rendered script will proxy only messages that pass the “switch test”. If you pass “true” in the RenderJsTraceProxy(), it will send all of them, which might be a bit crazy in production.
The script uses the jQuery $.ajax() method to post a JSON object to the server asynchronously -- ignoring success or error as well.
I may have a follow up version that has more options for the Proxy, like being able to pass a predicate-style (returns boolean) method to determine whether or not to send the message to the server. This way you could customize the logic yourself.
Check it out, and let me know what you think!
T
What is it? It's a way to automatically proxy JsTrace messages from client-side JavaScript to your MVC application.
Basically, when you add this package, you get the following Area added to your ASP.NET MVC project:

The JsTraceController has a single "Index" method that receives a JsTraceMessage object. All that contains is the module, level and message sent from the JavaScript side.
Given the following javascript:
var tracer = new Trace('TestModule'); tracer.error('testing: error message');The default implementation just outputs to the console using Debug.WriteLine:
JsTrace >> [error] Module 'TestModule' : testing: error messageAll you need to do is use the included HtmlHelper extension method like this, depending on your syntax:
<%: Html.RenderJsTraceProxy() %>or
@Html.RenderJsTraceProxy()
By default, the rendered script will proxy only messages that pass the “switch test”. If you pass “true” in the RenderJsTraceProxy(), it will send all of them, which might be a bit crazy in production.
The script uses the jQuery $.ajax() method to post a JSON object to the server asynchronously -- ignoring success or error as well.
I may have a follow up version that has more options for the Proxy, like being able to pass a predicate-style (returns boolean) method to determine whether or not to send the message to the server. This way you could customize the logic yourself.
Check it out, and let me know what you think!
T
Monday, February 27, 2012
JsTrace 1.1.1 released
So, I released a new version of the JsTrace project.
This version basically includes rewriting things to be a little more "proper" in the JavaScript side of things.
- I removed things like the "with" keyword (reimplemented just using basic closure technique)
- Turned on/Fixed a lot of JSHint restrictions (though I still don't dig the "use one var statement" thing, so I don't follow that – it's totally unnecessary in my opinion).
- Updated the Intellisense comments so that we have as much info in client code as possible
- Updated source code to have a test project and the NuGet package generation in it.
So, if you're using the NuGet package, you'll just get the update automatically, otherwise, go snag it on Codeplex: http://jstrace.codeplex.com
Happy Debugging!
Tom
Saturday, February 18, 2012
Released: JsTrace - My JavaScript Diagnostics Module (NuGet Package too!)
I've been planning on this for a while, but, after my original post post about JsTrace, I wanted to make it easier for people to get to and use.
So, first of all, I added JsTrace to CodePlex.
Then, I wrote some pretty decent documentation for it.
Finally, I published it as a NuGet Package.
Use it at will and spread the word!
So, first of all, I added JsTrace to CodePlex.
Then, I wrote some pretty decent documentation for it.
Finally, I published it as a NuGet Package.
Use it at will and spread the word!
Subscribe to:
Posts (Atom)