MS.Services: A .NET AJAX Data provider Comments

Ajaxian by Dion Almaer - May 23, '07 7:04am
MSServices is a server-side data processing application for HTTP (AJAX Data provider). It can execute Database SPs, MSMQ, Assemblies, IronPython script and generates JSON, Web Service, Text, Excel or RSS file through HTTP. The system has authentication/authorization, caching, compression and logging support. This allowed you to access URLs such as http://localhost/Web/Northwind.GetCustomerOrders.ws?CustomerID=ALFKI from your Ajax applications.
Be the first to comment this (no registration)

GPL author: Google must share code Comments

InfoWorld: Top News by Robert_McMillan@idg.com (Robert McMillan) - May 23, '07 7:12am

(InfoWorld) - Companies like Google that build their business on software such as Linux have a moral imperative to contribute back to the free software community, a prominent open-source advocate said Tuesday.

That's a good thing because it doesn't look like software licenses will require this anytime soon, Eben Moglen, a Columbia university professor and chairman of the Software Freedom Law Center, said Tuesday during a speech at the Open Source Business Conference in San Francisco.

Moglen is putting the finishing touches on what he hopes will be the next software license adopted by developers of the Linux kernel, the GNU General Public License Version 3.

Software that is licensed under the GPL can be freely copied and changed, but anyone who distributes the code must then publicly release their modifications under the same license. This means that companies like Red Hat and Novell must give back all of their Linux code to the community.

But not so for Google or Yahoo, considered two of the largest Linux users on the planet. Although their Web-based software is used by hundreds of millions of people, these companies are service providers, not software distributors. So whatever Linux enhancements they have made can legally remain private.

The organization responsible for the GPL, the Free Software Foundation (FSF), had toyed with the idea of adding language that would have compelled service providers to give back their changes, but that idea was eventually dropped.

On Tuesday, Moglen said that community pressure -- and not software licenses -- would most likely drive Google's continued contributions to GPL projects.

Google is already a contributor to many open source projects, including Linux, but some observers have said that it could be doing more. Still, Moglen said that there are no plans to add provisions to the GPL that would compel companies like Google to give back their code.

"They have ethical and community responsibilities to return at least those modifications that are not critical to their business and that are of general value to the community," Moglen said. "We will see over time whether there are additional measures necessary in order to secure cooperation in the community."

Moglen said he discussed these issues during a talk he gave at Google two months ago, but he did not know whether he had changed any minds there. "I think we all know that Google has a bias toward secrecy," he said in an interview following his talk.

In fact, Google has bumped up its contributions to free software projects over the past two months, said Chris DiBona, Google's open-source program manager, in an e-mail. That's because the FSF and Google recently hammered out a software contributor agreement that was to Google's liking. Since then Google has been able to make contributions to the GNU C Compiler and the company plans to deliver patches to Emacs and other Linux tools as well, he said.

 

Be the first to comment this (no registration)

All New Technorati: No Longer Blog-Centric Comments

TechCrunch by Michael Arrington - May 23, '07 4:42am
Blog search engine Technorati made significant changes to its data architecture and user interface this evening. CEO Dave Sifry outlined the details on his personal blog. The changes, Sifry says, are largely in response to Technorati’s changing user base - more and more mainstream Internet users are using the service. This is also a clear move [...]
Be the first to comment this (no registration)

Torrent overflows Opera Comments

The Register - May 23, '07 6:49am

Browser maker lances file download bug

Opera has fixed a flawed involving how its browser handles Torrent files that allowed hackers to attack vulnerable systems.…

Be the first to comment this (no registration)

What tools assist with your .NET development? Comments

TechRepublic.com - May 23, '07 3:31am
Tony Patton provides information about a sampling of the .NET development-related tools available. You can use these tools to assist with the various aspects of a development project from start to finish.
Be the first to comment this (no registration)

Promising antispam technique gets nod Comments

CNET News.com - May 23, '07 1:30am
Internet Engineering Task Force approves a technique designed to put junk e-mailers out of business forever.
Be the first to comment this (no registration)

New superfast wireless broadband device prototype submitted to FCC Comments

Ars Technica by eric@arstechnica.com (Eric Bangeman) - May 23, '07 12:40am

A third broadband pipe may be coming within two years to the white spaces between TV channels, but only if the FCC is convinced that it won't interfere. The White Space Coalition is trying to prove that it won't.

Read More...

Be the first to comment this (no registration)

Sellers running scared: a look inside the world of AllOfMP3 vouchers Comments

Ars Technica by nate@arstechnica.com (Nate Anderson) - May 23, '07 12:13am

Ars interviews several AllOfMP3 voucher resellers in the wake of the recent crackdown on the practice in the UK. If the raid was meant to send a message, it worked—many resellers now plan to exit the business.

Read More...

Be the first to comment this (no registration)

Microsoft Ajax events - part 2: exposing events from custom classes Comments

ASP.NET Blogs by Bertrand Le Roy - May 22, '07 9:11pm

 

In part 1, I showed how to subscribe to events exposed by JavaScript classes built on Microsoft Ajax. In this post, I'll show how to expose new events from your own classes.

Theoretically, the only things you have to do to expose an event are to implement "add_myEvent" and "remove_myEvent" methods that add or remove handlers, and to call all subscribers when relevant. In practice, managing the list of handlers for each event is really boilerplate code that you would have to reproduce for every event. This is why the Sys.Component base class exposes an events property that is an instance of Sys.EventHandlerList, which makes the event handler management a lot easier, and also has a few performance advantages. This is not a new pattern, System.Web.UI.Control also has an Events property of type System.ComponentModel.EventHandlerList, so if you know the .NET pattern you should feel right at home.

Let's look at a very simple example for which we'll build a very simple timer component. Our timer will expose a single event: tick (in addition to the events the base class supports, but we'll get back to that in a moment). The code for the add and remove event accessors is really simple, and this is all you have to do to expose any event:

add_tick: function(handler) {
    this.get_events().addHandler("tick", handler);
},
remove_tick: function(handler) {
    this.get_events().removeHandler("tick", handler);
},

The only thing that will vary in this code is the event name ("tick" here).

Calling subscribers is done from the _tick private function of our Timer class:

_tick: function() {
    var handler = this.get_events().getHandler("tick");
    if (handler) handler(this, Sys.EventArgs.Empty);
    // [...]
}

What's important in this method is how the _tick function gets a unique function reference for the "tick" event that will forward the calls to all subscribers. This makes Ajax events similar to .NET's multicast events. The function reference that getHandler returns can be null (in the case there are no subscribers) so it's important to test it before using it, but calling it is as simple as calling a regular function: the multicasting is entirely and internally handled by Sys.EventHandlerList.

Note that this _tick function is wired using window.setTimeout from the start method as can be seen in the full source code. I also omitted the code that rewires the timeout for the next tick.

It should be noted that the signature for the handlers is always (sender, arguments) where arguments are an instance of a class derived from Sys.EventArgs. Here, there's really no relevant information that we want to send to the handlers, so we're just using Sys.EventArgs.Empty, which is a special, empty instance of Sys.EventArgs.

For your own events, you can build your own class that derives from Sys.EventArgs. You should clearly document that this new class works with your event. Typically, the new arguiment class should take a constructor parameter for each of the pieces of information you want to transmit to the handlers. There should also be a property getter for each of those, but there usually won't be a setter. The reason is that these arguments should most of the time be considered immutable. There are a few cases though when this is not true and the handlers should be able to communicate back to the event publisher. One example of that is cancellable events (see Sys.CancelEventArgs and its cancel property). What's important in those case is that handlers should never rely on the values of those mutable properties. Only the event publisher can do anything depending on them. In the cancellable case, for example, what setting cancel to true does is prevent an action that would have happened *after* all the handlers have been called, but it doesn't prevent the remaining handlers from being called.

In the case of the Timer component, the event is raised by an externally happening source (the timeout feature exposed by JavaScript), which is why _tick is a private function. In some cases, it may be desirable to make it possible for public consumers of the class to raise the event. In this case, the convention is to expose a public method named "raise[event name]". For example, the base Sys.Component class exposes a raisePropertyChanged method that is typically called by derived classes to raise the propertyChanged event from the setters of properties that wish to advertise their changes.

Most of the time though, the event will be raised as part of a larger operation, which is what's being exposed publicly, and there's no point in having a "raise..." method. Once more, an example of that can be found in Sys.Component: dispose raises the disposing event before it actually does its cleanup work.

This pretty much covers what you need to know to implement your own custom events. In the next and final post in this series, I'll show how to integrate Microsoft Ajax events with the OpenAjax hub.

Full code for the timer component:
Timer.js.txt (rename to Timer.js before using that file)

A sample page that uses the component:
Clock.aspx.txt (rename to Clock.aspx and include in a Microsoft Ajax site with Timer.js to use)

Read part 1 of this post:
Microsoft Ajax events - part 1 - subscribing

Be the first to comment this (no registration)

Box.net Office On Demand Comments

Download Squad by Chris Gilmer - May 22, '07 2:00pm

Filed under: , , , , , ,

box.net office on demandIf you are a regular user of Microsoft Office, and the Box.net storage platform, you are going to love this new feature that makes storing and accessing your docs online an easy alternative to Google's Docs and Spreadsheets.

The Box.net team has just completed work on an Office On Demand feature for Word users that enables an easy way to save Word, Powerpoint, Excel and Access files directly into Box.net storage accounts.

The application is only available for Windows XP and Vista users. It adds a "Save to Box.net" button to the application toolbar, that when clicked, instantly uploads the file. This new feature is great if you are constantly switching between multiple computers, no more flash keys or manual uploading required.
Read | Permalink | Email this | Comments

Be the first to comment this (no registration)
© 2007 · wiredb.com · All trademarks are properties of their respective owners.