Net Profile Switch, Macro Recorder, Asp.Net-Forum, Help-Desk. JitBit Software
products download purchase support company blog

Jul 7, 2009

Calling ASP.NET Web Services from jQuery

Another post for ASP.NET developers reading this blog (if any).

I prefer compiling our web-projects to ASP.NET 2.0 rather than 3.5 basically because of all that stuff Visual Studio adds to the "Web.config" file. And the "Web.config" is often edited by our end-users, who might find it confusing to make their way through all these "configSections", "assemblies" and "httpHandlers" that look quite scary.

With the latest project we're working on (a CRM and contact management application) we decided to finally benefit from the MS AJAX framework that is built in to the .NET Framework 3.5.

But to optimize our code and keep it lightweight and fast, we've decided to use jQuery where possible, avoiding the bulky and clumsy MS AJAX's javascript.

So - how do you use jQuery to call a JSON ASP.NET web-service? Here it is. The code is self-explaining:

WebService code:


[WebService(Namespace = "http://mynamespace.org/")]
//the next line is important
[System.Web.Script.Services.ScriptService]
public class MyWebService : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld(int a, string b)
{
return "Hello World";
}
}

Now the client-side code. Note the JSON-serialized parameters passed with the "data" property:

$.ajax({
type: "POST",
url: "MyWebService.asmx/HelloWorld",
data: '{a:1,b:"test"}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
alert(msg.d);
}
});

Jun 29, 2009

Sharing interesting posts from Google Reader on Twitter

Jitbit has a Twitter account for quite some time now, where I post my own twits along with the company official news, releases and blog announcements.

All the official stuff is published via Twitterfeed, a great service that automatically twits your RSS-entries to your Twitter account. We have a news feed, a blog and a release-log feed, and all of them are automatically published to Twitter whenever a new item appears. So if you have a blog or a newsfeed - Twitterfeed is a must-have tool for you.

Now, I've recently thought of an efficient way to "retwit" (share on Twitter) the interesting links I stumble on in my Google Reader. Usually, once you've found a great article to share you have to (1) click the article in Reader, (2) copy the link and (3) paste that link into your twitter along with the article title... But the best way would be to use the Google Reader's built-in "Shared items" feed.

As you might know, Google Reader offers public access to all your shared items. What is great is that these shared items are also available as an RSS-feed! So all you have to do is to simply "feed" that feed to Twitterfeed and that's it:

Jun 9, 2009

Why should I buy from a small software company?

Imagine you've found an error in a product from some huge international software corporation, let's call it "MacroHard". I bet it has already happened to you a couple of times. Imagine you contact "MacroHard" to let them know about the error. Now think of the chances that this error would actually be fixed in a reasonable amount of time. The probability is close to zero, huh? Also think of the chances that MacroHard will contact you personally when it's fixed...

I'm not even mentioning feature-requests (instead of errors). You must have already guessed - forget about 'em.

Along with the company size, and brand recognition, and other "big" stuff you get when you buy from a massive corporation, you should always ask yourself - "how can I affect the product development or at least the error correction in it?"

Here's an example from earlier this week:

>>>

Wednesday (9:30 AM EST) — Customer:

"Hi there. I've downloaded the latest version of RSS Feed Creator, nice tool. But I need a feature that seems to be missing - or I was just too dumb to find it."

Wednesday (9:35 AM EST) — Alex (Jitbit):

"Hi. Thank you for the email. Can you specify what feature you miss exactly?"

Wednesday (10:30 AM EST) — Customer:

"Hi Alex. Thanks for the quick response. I want to remove the old outdated items from the feed, but the tool doesn't allow removing more than one item at a time."

Wednesday (12:45 PM EST) — Alex (Jitbit):

"Hi. Looked into this and it seems to be an easy task, we're adding this to our next version that will be out within 24 hours, please stay updated to our version-history RSS feed".

Thursday (10:30 AM EST) — Customer:

"Hello. We've downloaded the latest version, all OK. I think we'll be ordering some licenses later on today."

Thursday (02:09 PM EST):

"New Order for 2 licenses of Jitbit RSS Feed Creator"

<<<

Let's see a massive international software corporation do that.

May 14, 2009

I'm just a biker

This is totally "off-topic" for this blog, but please find 90 seconds of your time to watch these two videos. And please take longer to look for us, bikers, on the road.



May 7, 2009

Tech support bits #2: saying "No" to your customer

Continuing the "tech support thoughts": Don't be afraid to say "no" to a customer.

A software developer gets a question if his product has a "feature", that he knows is absent. "How can I answer 'no' to my customer?" - he thinks - "Maybe I should add this 'feature' to my next version? But I have no time to do this right now, so I'll leave this for the weekend..." Sounds familiar? A day passes, a week, and the developer still has no time to implement the new feature. The customer question remains unanswered. And it's getting more and more awkward each day, pushing this question from being answered even more.

Learn to say "No". Don't be afraid to.

"No, but we'll consider adding it". "No, and I'm afraid it never will have it". It's better than no answer at all.


PS. Inspired by a question from our customer: "can your helpdesk software do billing for our technicians?"

Apr 18, 2009

Dream home-office

I always considered myself a pro in setting up a home office, but this guy is incredible



More pictures here.

Apr 4, 2009

Google launches "Google Ventures"

Google has launched Google Ventures - a fund that "seeks to discover and grow great companies".