Archive forProgramming

Visual Studio Express is Free

Starting from today, MS Visual Studio Express is permanetly free. From their FAQ:

Effective April 19th, 2006, all Visual Studio 2005 Express Editions are free permanently. This pricing covers all Visual Studio 2005 Express Editions including Visual Basic, Visual C#, Visual C++, Visual J#, and Visual Web Developer as well as all localized versions of Visual Studio Express.

SQL Server 2005 Express Edition has always been and will continue to be a free download.

Comments

MS Vista & .NET

An interesting article about new Microsoft Vista and .NET: Analysis of .NET Use in Longhorn and Vista by Richard Grimes.

“My conclusion is that Microsoft has lost its confidence in .NET. They implement very little of their own code using .NET. The framework is provided as part of the operating system, but this is so that code written by third party developers can run on Vista without the large download of the framework. Supplying the .NET runtime for third party developers in this way is similar to Microsoft supplying msvbvm60.dll as part of XP.” 

I agree with those who say that Vista core should not be made with .NET, but I’d expect much more MS applications delivered with OS to be developed with .NET, especially Visual Studio. I’m interested to see important MS applications, money generators, developed with .NET as a strong assertion for its capabilities and power. By comparison, Java Studio Creator & Java Studio Enterprise is build with Java.

Comments

AJAX or SJAX? Async or Sync Client JS XMLHttp ?

Definitely, Asynchronous JavaScript and XML (AJAX) is the new buzzword of the Internet with more and more websites using it. This is a technology based on XMLHttpRequest object to exchange data asynchronously with a web server, available in all modern browsers. The result is quite interesting: you can update parts of the web page without re-loading the entire page. You can change dynamically webpages based on user interaction.

As this technology is named, everything is asynchronous: a request is made and a callback function is declared, which is called during the process and at the end of the request. Nothing about synchronous operations, this object supports.

Asynchronous operations are very good with lengthy requests, when user is not blocked till the request is processed. You can display an animated images to let user know that is working, and the whole process is made in the background. All AJAX is based on this idea. But there are times when user is only waiting for response, usually short response, just to process small amounts of data. In this case more logical is a synchronous operation, still available with XMLHttpRequest.

For details how to use XMLHttpRequest see this interesting article: Dynamic HTML and XML: The XMLHttpRequest Object. In this example is used an asynchronous call (see processReqChange() callback function). Let’s change it synchronous:

var req;

function loadXMLDoc(url) {
 req = false;
    // branch for native XMLHttpRequest object
    if(window.XMLHttpRequest) {
     try {
   req = new XMLHttpRequest();
        } catch(e) {
   req = false;
        }
    // branch for IE/Windows ActiveX version
    } else if(window.ActiveXObject) {
        try {
         req = new ActiveXObject(”Msxml2.XMLHTTP”);
       } catch(e) {
         try {
            req = new ActiveXObject(”Microsoft.XMLHTTP”);
         } catch(e) {
            req = false;
         }
  }
    }
 if(req) {
  req.open(”GET”, url, false);
  req.send(”");
  return(req.responseText);
 }

Then you can use it simply: alert(loadXMLDoc(’local_file.htm’))

Changes are minor: only pass ‘false’ as third parameter for open() and you don’t need a callback function. Everything happens synchronously: user make a request and wait for its response.

Very important is security limitation, in all browsers: you can’t access files from another domains, because of the ’sandbox’ policies. But you can access files from the same server (maybe you can build a page to load other URLs server-side).

The only thing I want to highlight here is that it may be times when synchronous process is enough and simpler. Is this AJAX or SJAX?

Comments

My (in)experience with Mono

Initially, I wanted to install on this Apache webserver mod_mono module and to develop the website with Mono. You know, is that .NET solution for Linux / Unix machines.

Good part is that there is something in CPanel for mod_mono installation. I tried to install it from browser, just ticking a check-box. It just didn’t worked. I think current integration on mod_mono with CPanel don’t work at all. I tried to compile mod_mono library on the server but it just missed to many other modules and the biggest problem: I’m not experienced Linux administrator. I didn’t worked, either. Then I asked for support of hosting company. They didn’t figured out. I did some searches on the net, I saw some solutions that work (I know is possible), but at the end I gave up.

Actually, I gave up because of other a few reasons:

  • Even if I install it I should spent more time developing Mono / .NET software I’d need. I read that some .NET blog software works with mono (BlogX) but I’m still not convinced;
  • Then it’s Mono itself. Unfortunatelly, I think it will be always one step behind Microsoft .NET. See what they say about Mono 1.1.13: “Many .NET 2.0 updates”. There aren’t all updates of .NET 2.0 and truth is that many classes are not there or behind schedule (see Windows.Forms, even if it’s another story for its necessity for WebForms & web development). Why a company would invest in a second hand technology, only because it’s free? I don’t say it’s not possible that Mono will become first grade technology, running side by side with Microsoft solution, just it’s not there yet, I think.
  • Also, regarding Mono itself, I don’t see too much happen in it’s community. Sorry to say this, but I new emerging technology would need more support and active members.

I’ll still keep an eye on Mono and jump for it whenever I’ll consider it’s good for me, just that not right now.

Some may give me links how to solve my problems. Thanks, but I don’t have to much time for ‘trial and error’ solutions.

Good luck Mono!

Comments