Browse by Tags
All Tags »
JavaScript (
RSS)
Web Tools Extensions 1.2, which is part for the Web Platform Installer package named “Windows Azure SDK for .NET (VS 2012) 1.8.1 – February 2013” contains a new feature which provides Intellisense in web forms and web pages for KnockoutJS MVVM data binding. You can verify that you have Web Tools Extension 1.2 installed by opening Visual Studio’s “About” dialog and scrolling through the installed products list to find: Web Developer Tools 1.2.40208.0 Unfortunately, upon installation several customers have reported slow-downs and lock-ups of Visual Studio when editing certain web pages containing Knockout syntax. We are actively...
We added a C# MVC Single Page Application (SPA) template in ASP.NET Fall 2012 Update BUILD Preview. John Papa had written a detailed blog about the preview version . With help of John Papa’s detailed feedback and sample code, we’ve rewritten and reorganized the JavaScript code to make it more structured in RC. We really appreciate the help from John Papa. He just wrote another blog about SPA template in RC version . The major improvement for the MVC Single Page Template RC release includes the following: 1. Added VB MVC SPA template for .net framework 4.5 and 4.0. 2. Added WebAPI HelpPage support 3. Moved all the application specific JavaScript files to Scripts/app folder 4. Redo the datacontext, model and viewmodel files to make cleaner separation...
With the release of ASP.NET and Web Tools 2012.2 RC (details here ), we have added a couple of new features to Page Inspector in Visual Studio 2012, namely CSS Auto-Sync and JavaScript Selection Mapping. I explain these features in the context of a MVC 4 Single Page Application (SPA app) below, which is a new template available in this release. But the Page Inspector improvements are available for all the other kinds of web projects as well, such as other types of MVC projects and web forms projects. CSS Auto-Sync Let’s get started by creating a new MVC 4 SPA application using VS 2012. With VS 2012, once the application is created, you can right-click the MVC project and ‘View in Page Inspector’ and the page will load in the...
WTE (Web Tools Extension) 1.2 RC is part of the ASP.NET and Web Tools 2012.2 RC and it’s available for download from http://www.microsoft.com/download/details.aspx?id=36053. Knockout Intellisense is an exciting new feature in WTE 1.2 RC. Knockout is a declarative JavaScript MVVM system for client-side data binding. See http://knockoutjs.com/ for complete information and http://learn.knockoutjs.com/ for tutorials. Knockout Intellisense allows you to code Knockout quickly and accurately, and custom bindings are fully supported! With WTE 1.2 RC installed, you can utilize the Knockout Intellisense feature on any web page by: Loading Knockout-n.n.n.js or Knockout-n.n.n.debug.js Defining a view model in JavaScript as an object or a function...
Anders published a video of his new project today , which aims at creating a superset of JavaScript, that compiles down to regular current JavaScript. Anders is a tremendously clever guy, and it always shows in his work. There is much to like in the enterprise (good code completion, refactoring and adoption of the module pattern instead of namespaces to name three), but a few things made me rise an eyebrow. First, there is no mention of CoffeeScript or Dart , but he does talk briefly about Script# and GWT . This is probably because the target audience seems to be the same as the audience for the latter two, i.e. developers who are more comfortable with statically-typed languages such as C# and Java than dynamic languages such as JavaScript....
To those of us who have been around for a while, namespaces have been part of the landscape. One could even say that they have been defining the large-scale features of the landscape in question. However, something happened fairly recently that I think makes this venerable structure obsolete. Before I explain this development and why it’s a superior concept to namespaces, let me recapitulate what namespaces are and why they’ve been so good to us over the years… Namespaces are used for a few different things: Scope : a namespace delimits the portion of code where a name (for a class, sub-namespace, etc.) has the specified meaning. Namespaces are usually the highest-level scoping structures in a software package. Collision prevention : name collisions...
It should be quite obvious: drawing requires constant visual feedback. Why is it then that we still draw with code in so many situations? Of course it’s because the low-level APIs always come first, and design tools are built after and on top of those. Existing design tools also don’t typically include complex UI elements such as buttons. When we launched our Touch Display module for Netduino Go! , we naturally built APIs that made it easy to draw on the screen from code, but very soon, we felt the limitations and tedium of drawing in code. In particular, any modification requires a modification of the code, followed by compilation and deployment. When trying to set-up buttons at pixel precision, the process is not optimal. On the other hand...
The HTML canvas has a set of methods, createImageData and putImageData, that look like they will enable you to draw transparent shapes pixel by pixel. The data structures that you manipulate with these methods are pseudo-arrays of pixels, with four bytes per pixel. One byte for red, one for green, one for blue and one for alpha. This alpha byte makes one believe that you are going to be able to manage transparency, but that’s a lie. Here is a little script that attempts to overlay a simple generated pattern on top of a uniform background: var wrong = document.getElementById( "wrong" ).getContext( "2d" ); wrong.fillStyle = "#ffd42a" ; wrong.fillRect(0, 0, 64, 64); var overlay = wrong.createImageData(32, 32), data...
In Visual Studio 11 Beta, we have exciting JavaScript editing features for the developers. Last year, we blogged “ JavaScript Web development differences between Visual Studio 11 Developer preview and Visual Studio 2010 ”. Here are the differences between Visual Studio 11 Beta and Visual Studio 2010 . IntelliSense Description VS2010 Behavior Visual Studio 11 Beta Behavior Changed From VS11 Developer Preview ECMAScript 5 compliance No Yes. Visual Studio 11 Developer Preview fully supports ECMAScript 5. Auto-reducing Statement Completion List No Yes, if the IntelliSense is automatically enabled when typing. The following screen shots shows all the document's statement completion items that contains character "al": Completion Hint...
Travis Leithead showed a video "Building responsive apps and sites with HTML5 web workers" in BUILD. When editing "Dedicated worker" JavaScript file in Visual Studio 11 Developer's Preview, we need to add the following line in the beginning of the file to get the proper JavaScript web walker IntelliSense in the editor: /// <reference group="Dedicated Worker" /> "Dedicated Worker" is a reference Group defined in the Tools->Options->Text Editor->JavaScript->IntelliSense->References. It contains a JavaScript file which contains all the web walker JavaScript HTML5 objects. You can then see IntelliSense, such as importScripts: Also, IntelliSense will be shown form the JavaScript files...
More Posts
Next page »