Also, here's another thought about why I like this library. I'm building a pretty big app right now that runs in the browser, with about ten thousand lines of JavaScript. Throughout the program, I have many dialog boxes. By using this library, I can bind every dialog box to a JavaScript object. When the user fills in a dialog box and clicks OK, I don't need to go through and gather up the values for all the text boxes and drop downs. The data is automatically in my objects, ready for me to process. And similarly, if the user needs to edit existing data, I don't need to write code that prepopulates the form fields. I just push the data into an observable with one line of code, and the fields get filled in automatically with no work from my end. Then when the user is finished editing the data, again I don't need to do anything. My data structure is automatically filled in for me. This has saved me a huge amount of coding.

Well I'm not necessarily saying it's better. But I've found it has greatly sped up my development time. I'm creating data-bound user interfaces much more quickly than I used to for the web, more like in my days as a desktop software developer. And for me personally, the non-obtrusive JavaScript thing really isn't an issue. When desktop development started offering data-bound controls, life got much easier for many of us. And that's what I see here. I really don't have a problem if there's an intrusive or tightly-coupled aspect between the UI and the data structures. I'm not building my UIs to be reusable anyway. But that's just my own opinion. Others might differ. (And thanks for replying! I wasn't sure anyone was going to. :-) )

As I spend time in the Daniweb forums, I see some questions that ultimately come down to the issue of manipulating JavaScript data and a user interface on a website. When you build a GUI that lets your user view, add, edit, and delete data, a common approach is to spend a lot of time copying data back and forth between the JavaScript variables and the user interface. Further, this often involves managing the user interface, such as adding new elements as new data is added.

However, often people perform extra work that isn't necessary. In addition to the extra time, such work usually means writing extra JavaScript code, which opens up room for more bugs. It turns out that there are several JavaScript libraries that are well written, heavily tested, and do a fine job of simplifying what I'm describing here.

One such library that I personally like is called Knockout, which you can find at Other libraries work well, too; I just find this one to be more suited to my tastes. In this tutorial I'll show you how to get up and running with it.

A basic model

First let's build the basic data structure. I prefer to start there, with the data modeling. For this example we'll create a simple array that holds information about US presidents. Each item in the array will have a first name, a last name, and a number representing the order of the president, with George Washington being 1:

{ ...

Hi! The problem is your overflow:hidden is hiding it. Get rid of both of those (lines 38 and 53 of the CSS file). But then your layout will be thrown off, so add a min-height:83px to your body > header. Then it will work. :-)

People who know me know that Python has always been one of my favorite languages. And over the years, I've been pleased with the array of development tools that have been created for it, including the different IDEs.

I also do a lot of work in .NET, primarily with C#. And although I once wrote a raving review of the .NET implementation of python called IronPython, truth be told, I never use IronPython anymore. Not at all. In the past, oh maybe four years, I've created a grand total of two IronPython programs, each consisting of maybe three lines of code, just to try it out. As such, I've had little use for the IronPython tools for Visual Studio, which is a tool that lets you develop and debug IronPython code from within Visual Studio. Instead, when I use python, it's the original python, called CPython (because it's written in C), that I use. And when I want to target .NET, I use C#.

And so while the IronPython tools for Visual Studio have sat idle on my computer, I'm certainly open to a new tool put out by a team at Microsoft called Python Tools for Visual Studio. Why? Because it supports CPython, not just IronPython. The tool is free and open source, and it works in any of the non-free versions of Visual Studio, or with the free, standalone Visual Studio Shell. Let's take it for a test drive.

[B]Trying Out Python Tools For Visual Studio[/B]

First, in ...

Gribouillis commented: very nice review +13

A couple weeks ago, Microsoft Research made available a project that had been under development for a while called Debugger Canvas. This is a visual tool for debugging applications where your functions appear as bubbles, similar to a database diagram or UML diagram. It only works on Visual Studio 2010 Ultimate due to the fact that it uses some internal features that are only included in the Ultimate edition.

Because Debugger Canvas is a project of Microsoft Research, it's not "official" in that it's not actually a part of Visual Studio, nor is it an official, supported Microsoft product. And it contains bugs. It's the culmination of research and development, and is a prototype of sorts. It's buggy, and it doesn't quite do everything you might want. But nevertheless, it's pretty cool and you'll want to try it out. (And there's a good possibility it'll be part of a future version of Visual Studio. Several projects in Microsoft Research have become actual, official Microsoft products. Perhaps the biggest one right now is the Kinect.)

Normally when I do a product review, I try to give about 3-5 screen shots, because more than that gets a little cumbersome. But this time I'm going to break that rule, and instead go with the old saying that a picture is worth a thousand words.

To get going, I created a short console program with a class, a derived class, and a main that creates an instance of the derived class. I set a ...

Back around 2004 and 2005, I had embarked on a web project that included the ability for my users to draw on a web page—or at least, that was one of the requirements. At the time, most of my web development had been server-side, with very little JavaScript. Long story short, I ended up shelving the project—not because the project wasn’t a good idea (it was a project planning and collaboration tool), but because the browsers simply weren’t up to it. I explored numerous libraries for drawing on the browsers, but talk about a major headache. The reason for the trouble was simple: Some browsers didn’t include any drawing support and instead required a plugin, and other browsers had built-in support but there was no common standard. Firefox used SVG, but to use SVG in IE, you needed a plugin. But the only decent plugin was created by Macromedia, but they got bought by Adobe, and they shut down the project. Instead, with IE, you had to use Microsoft’s own technology, VML.

To this day, it astounds me that Microsoft refused to include support for SVG in their earlier browsers and instead tried to embrace their own proprietary technology (which is actually nothing unusual for them.) And I suppose Adobe might have seen SVG as a threat to Flash, which they also acquired when they bought Macromedia, and perhaps that’s why they shelved the SVG plugin. But SVG was—and still is—an excellent technology dating back to 2001. Either way, SVG ...

I've been using jQuery for a few years now, and the more I use it, the more I like and appreciate it. It seems like I'm always finding new ways to use it, and usually those new techniques result in me writing less code and ultimately being more productive. On May 3, jQuery 1.6 was released; then almost immediately, on May 12, came a new patch for this major release called 1.6.1.

The 6.1 release included a major change to the way jQuery handles attributes, and a lot of people were upset about the change, as it had the potential to break earlier code. But the jQuery team heard the gripes (unlike a certain giant company called Facebook), and responded by fixing it, allowing you to continue using jQuery the way you had before, while also allowing for a new way of using it with what are called properties. In this review, I'm going to look at that in more detail.

But first, speaking of updates breaking older code, I've seen people online ask how to write their code so that their HTML files always include the latest and greatest jQuery, without hardcoding a particular version. My response has always been that that's a bad idea, and the release of 1.6 shows just why that is: If you wrote some JavaScript code to always include the latest and greatest jQuery, and you have that code live on production server, there's a possibility that your site would have broken when 1.6 ...

almostbob commented: Thankyou +13

[COLOR="Red"][B]UPDATE: see author's comments after article[/B][/COLOR]

When you develop for mobile devices these days, you pretty much have two paths you can take: You can use the OS manufacturer's SDK and develop native apps, or you can create an application that runs in the device's web browser.

Developing for the web browser is often an easier path for many reasons. First, you can bypass any restrictions put into place by the app's marketplace. You can just post a link to the site hosting the app. Then the app, which is written in HTML and JavaScript, will just run in the browser. If the device is an iPhone, for example, you just give the URL to your clients, and Apple never has to approve the app before it will run.

It's also easier because you can develop on nearly any desktop computer. If I want to develop an iPhone app, I don't need the SDK that runs on a Mac; instead, I can create the application right on my Windows desktop.

And finally, once I do develop the app, if I stick to web standards, it should (in theory) run on any modern mobile browser. (And many mobile browsers are incredibly advanced. For example, the iPhone browser supports a huge amount of HTML5, and did before most desktop browsers did. For at least a time, it was one of the most advanced browsers around.)

For me as a web developer, this is a much more enticing approach to developing an application. ...

IE9 is on the horizon, and there has been plenty said about it. But what about its web development aspects? In this article I look at its web developer tools, and decide whether I'll start using it in my own web development.
Like most web developers, I abandoned IE several years ago, only using it when I have to fight with cross-browser compatibility issues (which, thankfully, have mostly gone away thanks to third-party libraries such as jQuery, where other people took care of the cross-browser headaches for me). At some point with an earlier version of IE, Microsoft managed to catch my attention very briefly when they announced their "Developer Toolbar." But after a bit of toying with it, I discovered it was just that--a toy.

Instead, like most web developers, much of my in-browser development time is spent using Firebug, the fantastic add-in for Firefox. (Firebug was, in fact, created by Joe Hewitt, who was involved in early Firefox development.) After Firebug had been around for a couple of years, the Chrome browser was released, and it has a built-in "Developer Tools" window, which is very similar to Firebug. Both work great, and in the past few months I've been spending more time in Chrome's debugger, trying to decide which I like better: Firebug of Chrome.

And now along comes Internet Explorer version 9. The official release isn't out yet, but it's coming soon, as the release candidate is out. The good news is that IE finally has a ...

Last week, I took a look at Node.js, a powerful server-side implementation of JavaScript. But one thing I found lacking was the way to easily create a web server. Essentially, Node is an implementation of CommonJS, which adds operating systems features to JavaScript. But Node is not a web application framework. If you want to build a web application in Node, you either need to do a lot of coding, or find a good framework that somebody else built. And that's what I found here—a framework called Express.js.

In four words: This thing is sweet. Let's take a look at it.

I've done a lot of web application development, mostly with PHP or C#/ASP.NET, so I'm able to compare express.js to those platforms. And I can say that the creators of Express.js (who includes the creator of Node.js) have done an awesome job putting this thing together.

First off, you have to download it, adding it to your Node installation. The [URL="

__avd commented: nice post! +12

[ATTACH=RIGHT]19350[/ATTACH]In the past, the word "JavaScript" usually triggered notions of buttons changing when you float your mouse over them, and images flashing, and silly animations happening in the web browser. Today, however, most programmers recognize that JavaScript is actually much more than that; it's a powerful language that runs in the browser, and it's the foundation of modern web-based applications. And the language itself has some very cool constructs that make it easy to write sophisticated code. People such as myself who use JavaScript extensively appreciate its functional approach to programming. But we often hit a problem when working with it: while JavaScript runs in the browser, we have to figure out a way to pass the data back to the server, which usually uses a different language such as PHP or C#/ASP.NET. That's when a huge disconnect happens. There are ways to make it happen, and libraries to help out, but what if we only had to work with one language, JavaScript, for both the client and server?

Several people have tackled the problem, and the result is a standard called [URL="

F-3000 commented: Well written and interesting +1
__avd commented: Good post :) +12
Airshow commented: Well written and informative article +3
pritaeas commented: Nice tool indeed, I agree with your rating. +7
Dani commented: Pretty interesting :) +25

Netbeans is a free, open source IDE for developing software in Java. It's been around for almost 15 years, having gotten its start around the time Java began. Version 7.0 is about to be released, and I got my hands on the Beta release of this new version.

In the past I've generally preferred Eclipse for my Java development—not because I felt it was necessarily better, but simply it's what I used at various jobs and grew accustomed to. So I didn't spend much time on NetBeans. But they do have a lot in common. One common element is that you can now use both of them for more than just Java development. NetBeans supports development in several languages, including PHP and C++ (as does Eclipse). And also like Eclipse, NetBeans is itself written in Java.

Rather than try out the whole product and review it here (which would basically be re-iterating what's been written all over the place), I wanted to just focus on the new features.

According to The Great Wikipedia, the all-knowing, always correct reference guide (he said sarcastically), NetBeans was originally code-named Xelfi, to sound like Delphi, but with an X for Unix. Indeed, the Wikipedia page points to the original home page for NetBeans, which also says it was called Xelfi. I'm not sure if they meant Delphi as in Borland Delphi; but what makes that timely for today is that Borland Delphi went on to be a great RAD tool with a full drag-and-drop ...

Last week, Microsoft released a set of tools for developing software for the new Windows Phone 7 using Visual Basic. In order to use the tools, you have to have Visual Studio 2010 Professional or better (right now the Express versions don't work, although I've heard that will change).

But here's the catch: You're coding for Silverlight. You're building Silverlight apps that run on Windows Phone 7. However, that's not necessarily a bad thing. Normally I have my reservations about Silverlight in browsers on desktops, because that's just one more runtime that needs to be downloaded and installed next to, for example, Flash, Java, and all that. And while there are versions of Silverlight for Linux (called Moonlight), those versions are always a bit behind, making it hard to ensure that your Silverlight application runs in all browsers on all platforms. But in the case of Windows Phone 7, that whole issue goes away: You're writing an application just for Windows Phone 7, which has Silverlight built right into it.

Nevertheless, on a recent job, I had to develop a set of Silverlight apps, and I have to say, even though I have the concerns I just mentioned, it's great to program for. If you've done any ASP.NET programming, you'll feel very much at home. You use a declarative syntax similar to ASP.NET for laying out your GUIs, a syntax called XAML (pronounced Zamel, rhymes with Camel). And then you attach code to them, where you can use either VB.NET ...

__avd commented: Good article. +11

This past Summer, Microsoft announced the beta of a new product called WebMatrix. Two weeks ago, the third beta came out. But before I talk about it, I have to ask: Is this a new product? Or am I having déjà vu?[ATTACH]18093[/ATTACH]WebMatrix (one word) is, in fact, a brand new product from Microsoft (contrary to what some tech journalists have reported), even though the name has been recycled from an earlier web development tool called Web Matrix (two words) that many of us remember dating back to the around 2003. That earlier product has very little in common with this product, and is, by all regards, not the same thing. Only the name has not been changed! (And by the way, at the time of this writing, if you Google WebMatrix and end up on Wikipedia, be warned that the article confuses the two products.)

This new WebMatrix is a sophisticated IDE for creating web applications with the focus audience being beginners. But don't let that sway you from learning some of its features, because, in fact, WebMatrix has some new features that are going to find their way into ASP.NET. And so in that regard, I'm encouraging programmers to view WebMatrix as a test bed for future ASP.NET features, at least for now. As for WebMatrix itself, I'm personally skeptical of its future. It seems to have a sharp learning curve for beginners, and, as I've seen other people note elsewhere, if it does somehow manage to bring web ...

__avd commented: (: +11

Here's the Einstein fellow! Thanks to google image search.


The other day Google announced a new API console to simplify working with their various APIs. These APIs are basically REST-based calls into the Google servers where you connect through a URL, passing different parameters in the URL itself, and get back a response. The response comes back as either XML, or as JSON, which is ideal for a client-side JavaScript program. (Although most server-side languages such as PHP and C#/ASP.NET provide parsers for JSON as well, so you can process the results on server-side if you prefer.)

As has been the case since the early days of the Google API, you must include an API key. That way Google knows who is using the APIs and can put daily limits so you don't slam their servers.

Much of this is nothing new, but what is new is the addition of the API console as well as two new APIs, a Custom Search API (which replaces the previous Web Search API), and a new Translate API, which is a brand new replacement for the older translation API.

I took the console and these two of these new APIs for a quick spin so I could report them back to you.

The console is incredibly easy to use. It's just a web page that you log into with your Google account, and offers several links for activating the different APIs (and not just the new APIs, but several others as well, including Buzz API, Moderator API, and others).

Initially you're asked ...

When I was studying computer programming in college many years ago, I didn't imagine that our work could impact lives, particularly in a negative way. We've heard reports (mostly true) of death, dying, and destruction as a result of software problems, such as the time a plane flew right into a mountain due to the users not being informed of changes to the software. (For more interesting tidbits, check out the check out this [URL="

[ATTACH=RIGHT]17677[/ATTACH]Here at DaniWeb, we've talked a lot about [URL="

__avd commented: Nice talk. +11
Intrade commented: Very good report on the Interview. Please keep these coming! +2
WASDted commented: nice interview Jeff!! +1


I did some checking around for you, and I was told that they are developing various aspects of Parallel Studio for Linux. I think that will include Cilk+. I'm not sure the data we should see it, but I'm thinking it'll be early 2011.


[ATTACH=RIGHT]17428[/ATTACH]Almost every programmer knows his name. He's a living legend in computers. His name is Bjarne Stroustrup, and he created the world's most popular programming language, C++. I had a chance to ask him a few questions. The first three of the questions I came up with, and the remainder I selected from the numerous questions suggested by DaniWeb community members. So sit back, and listen to the words of one of the greatest programming masters ever. (My questions are noted with "JC"; questions from the DaniWeb community are noted as "DW".)

[B]DANIWEB (JC):[/B] On your home page for your teaching, I see you're doing research in scalable parallel software. I know that parallel processing is now a reality for most desktops, with multi-core processors now common. I was wondering if you might tell us just a bit about that, such as what you're exploring right now in that field, and what exciting things are going on that might spark some interest in parallel programming with our readers?

[B]STROUSTRUP:[/B] I work on several distinct approaches to dealing with concurrency: parallel computation in the context of traditional numerical/scientific applications, standardization of conventional threads-and-locks approaches to concurrency, and lock-free programming (primarily to support the implementations of higher-level approaches to concurrency). In fact, I have worked with concurrency on and off since my student days where I did my PhD on concurrency topics.

In the parallel programming areas my main contribution aims to support Lawrence Rauchwerger's STAPL library and run-time support system. Lawrence ...

Antenka commented: Well done! :) +2
jonsca commented: Excellent use of DW questions +5

[ATTACH=RIGHT]17350[/ATTACH]Since the release of the second edition of Parallel Studio this month, I've spent a good amount of time with it, trying out the new features.

First, what's Parallel Studio? It's an add-in for Microsoft Visual Studio that gives you a large set of features for writing parallel code that targets multiple processor cores. It includes a new C++ compiler that gets run instead of the built-in Visual C++ compiler, allowing you to take advantage of several new features. Parallel Studio integrates with all the recent versions of Visual Studio: 2005, 2008, and 2010.

Parallel Studio 2011, which is the second version, is a significant improvement over the first version. The new features are:

[B]Cilk Plus:[/B] New C++ keywords (called Cilk Plus) that simplify the writing of parallel, threaded code.

[B]BPP:[/B] Parallel Studio includes an entire template library called Parallel Building Blocks (PBB). PBB is built on Threading Building Blocks 3.0, an open-source threading library that was also created by Intel, along with Array Building Blocks. This threading library includes several classes that are similar to the ones in the standard C++ library, with the difference being they are totally thread-safe and will, when possible, run simultaneously on multiple cores. This takes away a lot of the hard work of programming for multiple threads, and that's one of the primary goals of Intel Parallel Studio 2011.

[B]Intel Parallel Advisor:[/B] This is all new for 2011. (The earlier version included a "Lite" version.) The idea here is that you'll receive guidelines ...

ndeniche commented: Nice!! Will totally try it out!! +6

[ATTACH=left]17191[/ATTACH]Today at Intel's IDF 2010 was the official launch of the 2011 version of Intel Parallel Studio. Parallel Studio is a set of tools that enhance Visual Studio to support full parallel programming.

This is more than just a simple plug-in for Visual Studio. It's an entire set of tools covering the entire development workflow. In terms of parallel development, these steps are design, build and debug, verify, and tune.

For designing, you have the Intel Parallel Advisor, which sismplifies the process of adding parallelism to your application. For the build and debug phase, you have the Parallel Composer. Together those two tools help you create software that runs in parallel. But what exactly do we mean by parallel? The individual cores of, for example, a quad-core processor are essentially separate processors all on a single chip. A well-designed program, then, can take advantage of these multiple cores. For instance, a computationally-intensive loop can run its separate iterations in separate cores simultaneously, completing the task in a shorter time.

[ATTACH=right]17190[/ATTACH]Of course, if you're doing computations in a loop, it's probably not just a simple matter of running the iterations concurrently in separate cores, as each iteration might rely on the results of earlier iterations. But that's not a problem with the help of tools shipping with the new 2011 version of Parallel Studio. There's an entire library available called the Parallel Building Blocks that makes such computations easy. Combine that with the help of three new custom keywords Intel added ...

Ancient Dragon commented: Nice info :) +33

I'm here at the IDF 2010 conference in San Francisco, and during this morning's keynote session, I had to the opportunity to see some pretty cool technology. One of the things that they demonstrated was essentially the next generation of handheld game controllers. Think of the Wii remotes, but with more accuracy in 3 dimensions. Wii remotes use triangulation and technically only detect two dimensions (although clever programming in the Wii helps pick out a certain amount of a third dimension). But these devices they demonstrated had full three dimensional handling.

The new technology relies on the latest and greatest Intel technology, called Sandy Bridge. That might seem surprising since we're talking about game controllers, but that's precisely the point being made at this conference: The technologies are converging into single chips and platforms. The new Sandy Bridge generation of Intel technology covers multi-core technology, graphics, and floating point processing all on a single chip, making the chips usable in a wide range of applications, and removing the need for specialized chips. In the past we saw chips devoted to graphics, chips devoted to floating point operations (such as in digital signal processing designs), and so on. But now the individual chips can handle all of this. So Intel's idea is this: Why build specialized chips and platforms when the current processor can do it all for you? That leaves programmers able to build powerful applications and focus on the "what" rather than the "how". Need powerful image analysis operations? ...

I'm biased towards C++ All-in-One for Dummies.

Jeff Cogswell (Author, C++ All-in-One for Dummies. :-D)

Rapid Application Development has come a long way since the early days of Delphi and Visual Basic in the mid 1990s. I remember those days well, as I immersed myself in Pascal development with the original Delphi back in 1995 and even wrote a couple of books about it. Delphi was created by Borland, and then, after Borland changed its name twice (first to Inprise, then back to Borland), Delphi was later moved to a new company spun off by Borland in 2006 called CodeGear. CodeGear was then bought by Embarcadero Technologies in 2008. Today Delphi and its descendants are produced by Embarcadero.

The modern descendant of Delphi is called Rad Studio XE, which was just announced today. It will encompass most of the incarnations of Delphi, including Delphi itself for Pascal development, C++Builder for C++ development, Delphi Prism for developing .NET and Mono software, and RadPHP for PHP development.

Although the product won't be available until mid-September, Embarcadero has released the first of three "sneak preview" videos to show off some of the product's features.

Among the new features are version control (through Subversion), new debugging features, code editor enhancements, and, perhaps the most interesting, rapid development through RadPHP.

Based on the video, it appears the Subversion integration is pretty good. The demo machine had a copy of TortoiseSVN installed and all set up. Inside RAD Studio, the project tree included menu options for checking a project into SVN, checking out files, committing changes, and all that good stuff ...

With the recent release of Visual Studio 2010, Microsoft has updated.NET and the C# language, both now at version 4. One of the new features of C# is the ability to handle dynamic types. But what exactly does that mean?

Essentially, if you're very careful, you can use C# in a manner similar to languages such as Python or even Smalltalk. Normally, without dynamic types, the compiler does all your type checking for you and won't compile the code if there are typing errors. For example, if you have something like this in your C# program:
the C# compiler will make sure whatever class Myobj belongs to actually has a function called SomeFunction. If not, the compiler will issue a compiler error and refuse to build your program.

Normally compile-time type checking is a good thing, because it helps us programmers keep from writing sloppy code. But there are times when you might need to get around it.
Look closely at the following code. Notice the base class Car, and the three classes that follow it. Then notice the shop function, and how I use that function in Main.
[CODE]using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace dynamictypes

class Car{
    public virtual string tuneup() { return "fixed"; }

class Mustang : Car {
    public override string tuneup() { return "good to go"; }

class Pinto : Car
    public override string tuneup() { return "yee haw"; }

class Beetle
    public string tuneup() ...
ddanbe commented: Keep up the good work! +7