Alessandro Lacava

on Designing and Developing Software. In love with Functional Programming.

Will Your Next Web Application Be a Google Gadget?

Learn how to leverage the Google Gadget API to make your web applications more reachable. As an example, you’ll see how to build a real-world gadget that fetches and displays the DevX feeds.

Since AJAX first appeared, developer interest in JavaScript has increased exponentially—and toolsets for building functionality in JavaScript have burgeoned as well. One of the latest tools for JavaScript-related development is Google Gadgets. Many web sites already provide gadgets built with the Google tools, and you can, too. This article shows you how to develop a Google Gadget that fetches DevX RSS feeds and displays them to the user.

Go to DevX to read the rest of the article: Will Your Next Web Application Be a Google Gadget?.

The Productivity Perks Behind Prototype’s Popularity

Learn how to leverage the popular Prototype JavaScript framework to speed up your AJAX-based development. You’ll see how to use JavaScript in an object-oriented way.

The Prototype home page claims that “Prototype is a JavaScript framework that aims to ease the development of dynamic Web applications.” By using many object-oriented paradigms such as class-driven development and inheritance to enable JavaScript application development, Prototype completely accomplishes its aim. In fact, this framework contains a lot of useful functionalities, which you cannot help but apply to every application you develop once you’ve started using them.

Prototype’s main claim to fame is its rich AJAX (Asynchronous JavaScript and XML) library, which simplifies the now popular Web development technique for making non-blocking calls to the server through JavaScript. (It topped the recent Ajaxian.com 2006 Survey as the most popular AJAX framework.) Of course, everything you can do with Prototype you also can do using plain JavaScript—upon which Prototype is built. But why would you want to complicate your life? For example, which would you rather type to accomplish the same task: document.getElementById(“myElement”) or $(“myElement”)? If you answered $(“myElement”), then read the remainder of this article for an in-depth discussion of some useful Prototype functions—$ is just one.

Go to DevX to read the rest of the article: The Productivity Perks Behind Prototype’s Popularity.

Speed Up Your AJAX-based Apps With JSON

Find out how to improve your Web application performance by leveraging AJAX and JSON. In particular, you’ll see the advantages of using JSON over XML as a lightweight JavaScript data-interchange format.

JSON stands for JavaScript Object Notation and is a lightweight data-interchange format. Because it is text-based it is easy for humans to read and write, and it has a regular syntax that’s easy to parse programmatically. JSON is basically a subset of JavaScript and, as you’ll see, is even easier to parse than XML.

Go to DevX to read the rest of the article: Speed Up Your AJAX-based Apps with JSON.

Build Brilliant Client/Server Apps With J2ME, PHP, and MySQL

In this article you’ll see how to make the three technologies work together by developing a simple and useful application that lets you update a multi-user blog and download the latest posts from it.

Write once, run anywhere. This Java motto seems to hold true even for mobile devices. Indeed, since it was born J2ME has had an ever-increasing impact on mobile development. Some may argue that J2ME is not as portable as other Java technologies, but even so, the result obtained on different mobile devices is, in most cases, still acceptable.

Go to DevX to read the rest of the article: Build Brilliant Client/Server Apps with J2ME, PHP, and MySQL.

Producing Professional MSDN-style Documentation With .NET and NDoc

Tired of trying to keep your documentation synchronized with the source? You can help alleviate the problem by creating professional documentation directly from the built-in XML documentation features of the C# language using the brilliant NDoc open-source application.

The .NET framework provides a nice way to insert XML documentation tags inside C# source code. These tags can then be extracted to an XML file, and using NDoc, transformed into fully-functional MSDN-style documentation.

Go to DevX to read the rest of the article: Producing Professional MSDN-style Documentation with .NET and NDoc.

Obtaining Wireless News With J2ME and PHP

J2ME and PHP are both powerful technologies used to develop applications for mobile devices and Web applications, respectively. In this article, you’ll see how to make them work together by developing a simple and useful application that retrieves the latest news from the Web and displays that on a mobile device.

The Java 2 Platform, Micro Edition (J2ME) is targeted at cell phones, smart cards, pagers, and other consumer devices. J2ME technology consists of a virtual machine and a set of APIs suitable for tailored runtime environments for these devices. PHP, on the other hand, is a widely used server-based language to build Web applications. But these two radically different technologies work very well together. In this article you’ll see how they can interact via HTTP (Hyper Text Transfer Protocol). Of course, this is not intended to be a thorough explanation of how HTTP works—you only need to know that HTTP is a request/response protocol. That simply means that the client application performs a request and the server application returns a response.

Go to DevX to read the rest of the article: Obtaining Wireless News with J2ME and PHP.

Keeping Secrets Secret: Steganography With .NET

Steganography is a way to protect information by hiding it “in plain sight” within other types of digital content. Steganography complements rather than replaces encryption by adding another layer of security—it’s much more difficult to decrypt a message if you don’t know that there is a message. See how to leverage .NET to create steganographic techniques that hide encrypted information inside common digital data files.

Steganography, literally “hidden writing,” is nowadays most often associated with embedding data in some form of electronic media. Data is hidden by adding or altering insignificant bits of information of a file. For example, an algorithm designed to embed a text message might slightly alter information describing the RGB composition of a pixel for an image file.

Go to DevX to read the rest of the article: Keeping Secrets Secret: Steganography with .NET.

Goodbye Dennis Ritchie (Dmr)

Dennis MacAlistair Ritchie (username: dmr, September 9, 1941 — October 8, 2011) This post is dedicated to a man that gave a lot to the computer science world, Dennis Ritchie (a.k.a. dmr). He is the creator of the C programming language and the key developer of the Unix operating system.

The C programming language is the book he wrote along with Brian Kernighan. In my humble opinion, it is one of the best book ever written about computer programming.

Without further ado, I just want to say goodbye to one of the people I respect most when it comes to computer science. I have to thank Mr. Ritchie if I can read declarations such as (The C programming Language, chapter 5):

1
char (*(*x())[])()

x is a function returning a pointer to an array of pointers to functions returning char. :-) I think he would have said goodbye this way:

1
printf("goodbye, world\n");

R.I.P. Dennis Ritchie.

Undo Close Tab In Eclipse

I don’t know about you, but I love the Firefox’s undo-close-tab feature (Ctrl+Shift+T). If you use Eclipse you might be glad to know you can undo the close-tab action in Eclipse as well. You can do that both using your mouse by clicking on the yellow left arrow you can see in the Eclipse toolbar and through the keybord using the Alt+Left Arrow key combination.

I hope this helps.

Object Not Found | EasyPHP | MySQL | phpMyAdmin

After installing EasyPHP, when you try to run phpMyAdmin you might get the following error:

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

This might be due to the fact that it tries the following URL:

http://127.0.0.1/mysql/

Try this one instead:

http://127.0.0.1/home/mysql/

If it works then you can work it out by adding the following line to the httpd.conf file of Apache (you can find it under the %EASYPHP_HOME%/apache/conf path, where %EASYPHP_HOME% is the home directory of your EasyPHP installation). Open the file with a text editor and look up the following string: Alias /home/mysql

You should find something similar to the following line:

1
Alias /home/mysql "C:/Program Files/EasyPHP 3.0/phpmyadmin"

Just add, to the next line, the following string:

1
Alias /mysql "C:/Program Files/EasyPHP 3.0/phpmyadmin"

Restart EasyPHP. Now try to open http://127.0.0.1/mysql/. It should work.