Activate your free membership today | Log-in

Monday, December 1st, 2008

Kojax? Huh?

Category: .NET, Microsoft, Mobile

Mary Jo Foley has an article called Move over, Ajax. Here comes Microsoft’s ‘Kojax’. The thing is, I don’t get what it actually is:

Kojax is a mobile development platform, according to my sources, that will allow Microsoft- — and third-party-developed — applets run in an Ajax-like way, using a combination of Visual Studio tools and JavaScript, on Java-based mobile phones.

Erm, is this just JavaScript running on the JVM? This is the big deal instead of the PDC touted “write using .NET and deploy everywhere”?

Mary goes on:

What kinds of mobile applets are we talking about here? Nothing iPhone-like, such as restaurant reviews or “I am Rich.” More like a virtual wallet for online payments, a group messaging service and photo-sharing app — things that build on top of Windows Live for Mobile services. Some of these Kojax-based applets will ad-funded; others will likely be transaction- and subscription-based.

Another interesting part of the Kojax tips I’ve received: Microsoft allegedly is aiming its Kojax applet plans primarily at users in emerging markets.

The Kojax work may or may not be related to a recent Unlimited Potential initiative about which I recently heard, known as “Mobile First.” Mobile First is all about users whose first Microsoft-related experience tends to be in the mobile-phone, rather than the PC, realm. (Given Microsoft’s recent acknowledgment that China Mobile will offer the first handsets running Internet Explorer 6, it’s not far-fetched to see how/why Microsoft is putting so much emphasis on emerging-market customers.)

I haven’t been able to glean much more about Kojax and Microsoft’s mobile applet plans. So before you ask, I don’t know what stage Kojax is at: It could be anything from a glimmer in a Microsoft development team’s eye, or something in private beta.

Posted by Dion Almaer at 4:00 am
4 Comments

+----
1.8 rating from 37 votes

Thursday, November 20th, 2008

Microsoft LiveFX: Apps that look like a browser

Category: .NET

Regardless of whether you’re in the Google camp or in the Microsoft camp, I think it’s a fair statement to say that these differences of viewpoint accurately reflect each company’s core strength and focus: Google wants the browser to grow to subsume the desktop; Microsoft wants the desktop to grow to subsume the cloud.

This was the concluding paragraph in a post by Danny Thorpe of Microsoft (and formerly Google).

His post is itself a rebuttal on Dare’s article: Live Framework (LiveFX), Is it Microsoft’s GData or Something More?:

A number of LiveFX’s additional features such as synchronization and resource introspection which have no analog in GData are fairly interesting and I wouldn’t be surprised to see these ideas get further traction in the industry. On the flip side, the client-side Live Operating Environment is a technology whose benefits elude me. I admit it is kind of cool but I can’t see its utility.

Danny answers:

The answer, in a word, is “offline.”

The local Live Operating Environment (local LOE) is what makes running mesh-enabled web applications on the desktop, outside the browser, possible. The local LOE creates and manages a sandboxed execution environment for the mesh app, just like a browser would for an HTML+JavaScript or Silverlight application but without the browser UI frame looming overhead.

It seems like a trivial thing, whether or not the browser frame surrounds your app UI. Does it matter? The answer is yes - having your app surrounded by browser UI constantly and forcibly reminds the user that this isn’t a real app, it’s just a web page with lipstick.

The Live Framework local LOE is a client application that works like a browser. It may even create an instance of the browser internally (I don’t know the internal details of the LOE) but it is fundamentally treated as “not the browser.”

I am trying to wrap my mind around this all myself :)

Posted by Dion Almaer at 5:04 am
10 Comments

+----
1.5 rating from 22 votes

Friday, October 24th, 2008

Round the Web: Vector Graphics

Category: .NET, Canvas, SVG

Here's a quick round-the-web series of updates on happenings with SVG, Canvas, and open web graphics libraries.

First is a cool demo using SVG called Blobular:

I got the demo working in Firefox 3, though there were some glitches in Safari 3. As a cool aside, when I was uploading the screencast above YouTube transparently saw that I have Gears installed and used it to give me better upload feedback ("Uploading... 31%") and resumability (Disclosure: I work for Google and with the Gears team):

Screenshot Uploading Blobular Screencast Using YouTube

Screenshot Uploading Blobular Screencast Using YouTube

Next on our round-the-web update is a cool graphing library named Bluff, taglined "Beautiful graphs in JavaScript":

Bluff is a JavaScript port of the Gruff graphing library for Ruby. It is designed to support all the features of Gruff with minimal dependencies; the only third-party scripts you need to run it are a copy of JS.Class (about 2kb gzipped) and a copy of Google’s ExCanvas to support canvas in Internet Explorer. Both these scripts are supplied with the Bluff download. Bluff itself is around 8kb gzipped.

To draw a graph, you create a new Bluff graph object using the id of a canvas element on the page, set some options, add the data and labels, then tell the graph to draw. A basic example:

HTML:
  1.  
  2. <canvas id="example"></canvas>
  3.  
JAVASCRIPT:
  1.  
  2. var g = new Bluff.Line('example', 400);
  3. g.theme_37signals();
  4. g.title = 'My Graph';
  5.  
  6. g.data('Apples', [1, 2, 3, 4, 4, 3]);
  7. g.data('Oranges', [4, 8, 7, 9, 8, 9]);
  8. g.data('Watermelon', [2, 3, 1, 5, 6, 8]);
  9. g.data('Peaches', [9, 9, 10, 8, 7, 9]);
  10.  
  11. g.labels = {0: '2003', 2: '2004', 4: '2005'};
  12.  
  13. g.draw();
  14.  

Produces this:

Screenshot of Bluff Example

Screenshot of Bluff Example

Next is a nice paper published recently on how the KDE project is using SVG baked in in a deep way:

KDE 4 is the latest release of the KDE software stack. One of the most notable changes in KDE 4 is a pervasive usage of SVG. SVG files are used for themes, icons, storage system and transport. They are at the beating heart of beauty of the KDE 4 interfaces.

Furthermore, the whole graphics stack utilized by KDE has been heavily influenced by the SVG standard. A new Free Software graphics driver model, called Gallium3D, has been written in order to utilize modern graphics hardware for accelerating API's such as OpenVG and OpenGL to assure real time rendering of SVG files using minimum amount of resources. On top of that the Qt library, which KDE is layered upon, has a graphics API fully compatible with the SVG rendering model.

To cope with variety of uses of the SVG technology KDE comes with two SVG rendering engines. Th SVG 1.2 Tiny [SVG12] compliant QtSvg library, which is meant to be a minimal rendering engine, suitable for things like icons, and QtWebKit's SVG which is a full SVG engine.

KDE 4 has just begun its existence and almost every day engineers working on it come up with new and creative ideas, tools and use cases for how to better utilize SVG. Unlike most of the technologies leveraging SVG, KDE's focus is on interactivity and animation. A whole set of tools and utilities has been developed to aid that goal. The best example of such uncommon usage of the SVG standard is the Plasma [Plasma] project, which comes with its own animation framework layered on top of the SVG rendering model.

The openness of the SVG standard aided by the creativity of the Free Software engineers created something truly unique and exceptional.

Checkout the rest of the paper for lots of nice, in-depth explanations of how they have leveraged SVG.

Finally, here is something that will blow your mind (I'm still trying to wrap my mind around this one); someone has been working on getting Microsoft's XAML/WPF technologies to render in the browser without Silverlight using.... SVG:

This post is basically a pre-announcement...in my spare time, I’ve also been working on another system based around the same ideas, except this time based on the SVG implementations supplied by browsers, along with JavaScript.

It’s called Firelight, and the github wiki is here.

Think of it as a Silverlight-like implementation with some WPF thrown in, with no plugin.  Just a JS file and a little initialization code.  It loads almost instantly (it’s smaller than jquery for the time being, although it’s unlikely to stay that way) and immediately goes to work.  And it will directly benefit from performance work being done in browser SVG, DOM, and Javascript implementations.

Since I don’t expect any of you to go grovel around that stream of consciousness wiki page, here’s a tiny demo of some of the core infrastructure in firelight:   http://squeedlyspooch.com/firelight/xaml.xhtml.  The xaml file which is loaded by that page is here.  Note the event triggers on the smaller gradient filled canvas.  Try mousing over it and clicking it.

That demo (as the wiki states) works in Firefox version 3.x, Safari (windows, at least) 3.1.2, and on the iPhone (that part I get a real kick out of).  Opera has some issues with some of my code, and so I have some issues with Opera.  But I’ll get it working there too soon (makes sense, since last I checked it had the most compliant version of SVG available.)

Posted by Brad Neuberg at 7:00 am
1 Comment

++++-
4.1 rating from 15 votes

Sunday, September 28th, 2008

jQuery finds its way into Microsoft and Nokia stacks

Category: .NET, Ajax, jQuery

Just as jQuery kicks off its first jQuery conference adjunct with The Ajax Experience in Boston tomorrow, it gets an energy boost from some big double-barrel news:

Microsoft and jQuery

Microsoft is looking to make jQuery part of their official development platform. Their JavaScript offering today includes the ASP.NET Ajax Framework and they’re looking to expand it with the use of jQuery. This means that jQuery will be distributed with Visual Studio (which will include jQuery intellisense, snippets, examples, and documentation).

Additionally Microsoft will be developing additional controls, or widgets, to run on top of jQuery that will be easily deployable within your .NET applications. jQuery helpers will also be included in the server-side portion of .NET development (in addition to the existing helpers) providing complementary functions to existing ASP.NET AJAX capabilities.

Scott Guthrie talks about the news and details some of the features. His blog shows intellisense at work, and more.

Scott Hanselman then wrote an tutorial that shows jQuery working with ASP.NET libraries such as the ASP.NET AJAX 4.0 Client Template work.

Here is the sample code that shows the weaving of jQuery and Client template APIs. The script src at the top is to an "intellisense" version of jQuery, which includes the addition of special comments to make Intellisense work. The Open Ajax Alliance is trying to standardize on this metadata so we can share it between the various tools (e.g. Aptana has a very nice sdoc that does this, and allows you to put it external to the file so you don't have to have clients download it).

JAVASCRIPT:
  1.  
  2. var bikes; 
  3. Sys.Application.add_init(function() { 
  4.     bikes = $create(Sys.UI.DataView, {}, {}, {}, $get("bikes"))
  5.     $(".colorfilter").click(function(e) { 
  6.         LoadBikes($(this).val())
  7.     })
  8.     LoadBikes()
  9. })
  10.  
  11. function LoadBikes(q) { 
  12.     qq= q|| "Red"
  13.     var svc = new Sys.Data.DataService("bikes.svc")
  14.     svc.query("/Products?$filter=Color eq '" + q + " '&$top=5", OnProductsLoaded)
  15. } 
  16.  
  17. function OnProductsLoaded(result) { 
  18.     bikes.set_data(result)
  19.  
  20.     $("ul li:even").css("background-color", "lightyellow")
  21.     $("ul li").css("width", "450px").css("font-size", "12px")
  22.  
  23.     $("div.bikerow").mouseover(function(e) { 
  24.         $(this).animate({ 
  25.             fontSize: "18px"
  26.             border: "2px solid black" 
  27.         }, 100)
  28.     }).mouseout(function(e) { 
  29.         $(this).animate({ 
  30.             fontSize: "12px"
  31.             border: "0px" 
  32.         }, 100)
  33.     })
  34.  
  35. } 
  36. Sys.Application.initialize();
  37.  

Nokia and jQuery

Nokia is looking to use jQuery to develop applications for their WebKit-based Web Run-Time. The run-time is a stripped-down browser rendering engine that allows for easy, but powerful, application development. This means that jQuery will be distributed on all Nokia phones that include the web run-time.

To start Nokia will be moving a number of their applications to work on the run-time (such as Maps) and building them using jQuery. jQuery will become part of their widget development platform, meaning that any developer will be able to use jQuery in the construction of widgets for Nokia phones.

How will these companies work with the project?

Microsoft and Nokia aren’t looking to make any modifications to jQuery (both in the form of code or licensing) - they simply wish to promote its use as-is. They’ve recognized its position as the most popular JavaScript library and wish to see its growth and popularity continue to flourish.

In fact their developers will begin to help contribute back to the jQuery project by proposing patches, submitting test cases, and providing comprehensive testing against their runtimes. As with any contribution that comes in to the jQuery project it’ll be closely analyzed, reviewed, and accepted or rejected, based upon its merits, by the jQuery development team - no free ride will be given.

A significant level of testing will be added to the project in this respect. The jQuery test suite is already integrated into the test suites of Mozilla and Opera and this move will see a significant level of extra testing being done on Internet Explorer and WebKit - above-and-beyond what is already done by the jQuery team.

This is great news for the jQuery project.

Posted by Dion Almaer at 2:01 pm
18 Comments

++++-
4.2 rating from 133 votes

Wednesday, August 20th, 2008

Ra Ajax: Ajax for .NET

Category: .NET

Thomas Hansen is a vocal member of the community, and worked on Gaia Widgets in the past. Now he has moved on to create his own opensource library Ra Ajax, an Ajax library for .NET. (He has posted the bloody details of how he "left").

He is experimenting, and writing up a series of "how to write an Ajax library" as he does just that. He has already started with:

Check out the project release on Google Code as well as the project homepage and let him know what you would like to see.

UPDATE Thomas just posted about getting sued by Gaiaware due to a non-compete. I am not a lawyer, and have no idea about the law there, what was signed, etc..... but this seems totally out of bounds and they should leave him alone.

Posted by Dion Almaer at 8:01 am
6 Comments

+++--
3.7 rating from 44 votes

Friday, July 4th, 2008

Talking to .NET on the server with Jaxer

Category: .NET, Aptana

What does your CEO do? Paul Colton, CEO of Aptana, gets his fingers dirty. He just wrote a post about accessing COM objects from JavaScript with Jaxer.

This is possible as the JavaScript is running on the server, and this server is running on Windows. You can download the source code to check it all out.

HTML:
  1.  
  2.      <body>
  3.          <script runat="server-proxy">
  4.              function rotate(angle)
  5.              {
  6.                  var img = COMObject("ImageProcessor.ImageProcessing");
  7.  
  8.                  img.LoadImage(Jaxer.request.documentRoot + "/photo.jpg");
  9.                  img.RotateImage(angle);
  10.                  img.SaveImage(Jaxer.request.documentRoot + "/new.jpg");
  11.              }
  12.          </script>
  13.          <input id="angle"/>
  14.          <input type="button" value="Rotate"
  15.                         onclick="rotate(document.getElementById('angle').value);
  16.                                 document.getElementById('img').src =
  17.                                 document.getElementById('img').src + '?' + new Date()"/>
  18.          <br />
  19.          <img id='img' src="new.jpg"/>
  20.      </body>
  21. </html>
  22.  

Posted by Dion Almaer at 6:56 am
4 Comments

+++--
3.7 rating from 27 votes

Tuesday, April 29th, 2008

Fast Streaming Ajax Proxy

Category: .NET, Performance

Omar AL Zabir, the co-founder & CTO of Pageflakes has written about a continuous streaming Ajax proxy that solves the common problem that all Ajax proxies have, the double delay in downloading content on server first and then delivering to the browser.

Omar talks about the continuous proxy that can help solve the problems. The approach for the continuous proxy is:

  • Read bytes from external server in chunks of 8KB from a separate thread (Reader thread) so that it's not blocked
  • Store the chunks in an in-memory Queue
  • Write the chunks to ASP.NET Response from that same queue
  • If the queue is finished, wait until more bytes are downloaded by the reader thread

Making a difference

And if you wonder what difference this can make:

Content Proxy served about 42.3 million URLs last month which is quite an engineering challenge for us to make it both fast and scalable. Sometimes Content Proxy serves megabytes of data, which poses even greater engineering challenge. As such proxy gets large number of hits, if we can save on an average 100ms from each call, we can save 4.23 million seconds of download/upload/processing time every month. That's about 1175 man hours wasted throughout the world by millions of people staring at browser waiting for content to download.

There is even more detail on how the proxy has created.

Posted by Dion Almaer at 7:02 am
2 Comments

+++--
3.3 rating from 29 votes

Thursday, April 3rd, 2008

JavaScript, C#, and ExtSharp

Category: .NET, Ext

Colin Ramsay thinks that JavaScript and C# can be scarily similar as he shows an ExtJS example:

JAVASCRIPT:
  1.  
  2. var win = new Ext.Window({
  3.     title: 'Order Viewer', layout: 'border',
  4.     width: 500, height: 500,
  5.     modal: true, resizable: false, closable: false, draggable: false,
  6.     items: [ frm, lst ]
  7. });
  8.  
  9. win.on('render', function() {
  10.     load(5);
  11. });
  12.  
  13. win.show();
  14.  
C#:
  1.  
  2. var win = new Ext.Window{
  3.     Title = "OrderViewer", Layout = Layout.Border,
  4.     Width = 100, Height = 200,
  5.     Modal = true, Resizable = false, Closable = false, Draggable = false,
  6.     Items = new [] { frm, lst }
  7. };
  8.  
  9. win.Render += delegate {
  10.     load(5);
  11. };
  12.  
  13. win.show();
  14.  

This works well for ExtJS since it is written in a style that leads itself to this similarity. Colin also points out ExtSharp, a project that lets you write your Ext application in C#:

I really love Ext but coding in javascript just gives me the chills. So I went out and found a way to use my favorite js library (Ext) and my favorite programming language (C#) at the same time. By using a project called Script# I am able to write C# code and have it converted into javascript, similar to GWT. Building on that, Script# also allows you to code against external APIs, but you need to create the types, methods, properties, etc. for everything in the javascript library. So what I did was write a little console app that parses all of the ExtJS source files extracting out the script comments and writing C# files for each class. The end result is a programmable C# API to access all of the Ext objects and I threw in a couple new things to make life a little easier.

Posted by Dion Almaer at 6:06 am
3 Comments

++++-
4.5 rating from 55 votes

Wednesday, March 19th, 2008

Google Visualization joins the Ajax APIs

Category: .NET, Google, JavaScript

Yoah Bar-David & Itai Raz of Google have introduces the latest Ajax API: Google Visualization API, a new API designed for visualizing structured data.

There is a large visualization gallery that can show you some of the visualizations that you can use.

You tie into the API as you do with other Google Ajax APIs:

JAVASCRIPT:
  1.  
  2. google.load("visualization", "1");
  3.  
  4. var q = new google.visualization.Query(DATA_SOURCE_URL);
  5. q.setQuery("select A, sum(D) group by A");
  6. q.send(responseHandlerCallback);
  7.  

Take a look at this very cool example that the Gapminder team came up with (click on play)

This complements the Google Chart API, which just lifted its limits on the number of calls for charts.

NOTE: Google I/O is a conference being held at San Francisco on May 28-29 2008. APIs like this will be talked about. I will be there. And lots of good folks will be there (Steve Souders, Mark Lucovsky, Guido van Rossum, Jeff Dean, Chris DiBona, Josh Bloch).

Posted by Dion Almaer at 11:56 am
6 Comments

++++-
4.2 rating from 26 votes

Monday, March 3rd, 2008

Json.NET 2.0

Category: .NET, JSON

<