Archive for the 'Software Development' Category

AJAX PUSH

Once again, Wikipedia says it best:

Comet is a programming technique that enables web servers to send data to the client without having any need for the client to request it. It allows creation of event-driven web applications which are hosted in the browser.

[…]

Traditionally, web pages have been delivered to the client only when the client requested it. For every client request, the browser initiates an HTTP connection to the web server, which then returns the data and the connection is closed. The drawback of this approach is that the page displayed is updated only when the user explicitly refreshes the page or moves to a new page. Since transferring entire pages takes a long time, refreshing pages introduces a long latency.

To solve this problem, Ajax can be used which allows the web browser to request only that part of the web page that has changed and update that portion accordingly. Since the overall data transferred is reduced, latency is also reduced, and overall responsiveness of the web site hosting the application increases. Further, by using asynchronous background data transfer, where the user works with partly received data as the rest of the data is being retrieved, the responsiveness of the web application can be further increased.

But this practice also suffers from the problem that the client has to request some data before it will be sent by the server. This problem becomes a major hurdle when designing applications which have to wait for some event to occur at the server side, such as some other user sending some data to the server, before it can proceed, but has no information when the event will occur.

A solution would be to design the application such that it will intermittently poll the server to find out if the event has occurred. But this is not an elegant solution as the application will waste a lot of time querying for the completion of the event, thereby directly impacting the responsiveness of the application. In addition, a lot of network bandwidth will be wasted.

A better solution would be for the server to send a message to the client when the event occurs, without the client having to ask for it. Such a client will not have to check with the server periodically; rather it can continue with other work and work on the data generated by the event when it has been pushed by the server. This is exactly what Comet sets out to achieve.

This technique has numerous applications but the main conclusion I draw from this is that DHTML has not yet reached it’s limits and has still a few good years as the main RIA platform before techologies like Fex, Silverlight and JavaFX really start to grow, gaining on it’s limitations.

Advertisements

What’s this Flex thing?

Flex is a technology that allows the creation of Rich Internet Applications.

It’s somewhat of an alternative to DHTML w/ AJAX but they can also complement each other.

The visual building blocs for this kind of apps are the components. You can of course build your own components (from scratch or extending an existing one). Also, there are places where you can get additional components either commercially or from Open Source repositories.

Their main target is the Information Systems market and for the vast majority of these, the Adobe predefined components with or without a little style personalization will suffice.

The target platform is as ubiquitous as the Flash player, because these applications are compiled into plain .swf files.

It seams it was the result of a fork in the Flash platform caused by the different needs of two kinds of professionals that where using it: animators (who like time lines, frames, drawing tools and the like) and application builders (who just need combo boxes, radio buttons, text areas, menu bars, etc.).

Here are some cool examples of what you can do with this:

Dashboard

Home Locator

Restaurant Finder

You can go directly to the source to learn the technology:

If you’re a J2EE / JEE developer, this is a great place to start:

Other related links on my del.icio.us account:

Technorati Tags: , , , , ,

The right tool…

For a number of reasons I've recently decided to give Fedora a try.

I could explain you the reasons I decided to leave my previous distro, Ubuntu but I'll leave it for another time.

So, to make a long story short…

  • Installed Fedora Core 5;
  • Solved a package manager application problem (turn off);
  • Installed my PCMCIA UMTS card & Internet connection (another turn off, in Ubuntu it was a much less painful task);
  • Installed some extra packages;
  • Made some Windows / Linux integration stuff;
  • Browsed through other Fedora community websites (great stuff here);
  • Eventually ended up in the Red Hat Magazine

… where I found two great articles about my favorite (and indispensable) working tool, Eclipse, which apparently enjoys some appreciation in a part of the Linux community.

Because I'm a Linux enthusiast and also an Eclipse intensive user, I decided to point them out:

1. redhat.com | Introduction to Eclipse on Fedora:

Eclipse™ is a very popular open source, application-rich platform that is written in Java. The beauty of Eclipse is its extensibility and cross-platform compatibility. The Eclipse Software Development Kit (SDK) includes an extremely well-built Java® Integrated Development Environment (IDE) as well as a Plug-in Development Environment (PDE). "Plug-ins" are special-purpose software packages that can be installed into the Eclipse framework. For example, Red Hat's Eclipse Bugzilla plug-in integrates a Bugzilla interface into Eclipse.Through plug-ins, the Eclipse framework can be extended to almost any possible area of computing. Plug-ins exist for anything from J2EE development to embedded development to an office application suite.

Eclipse is developed largely on and for the Microsoft® Windows® platform, and even though other platforms–including GNU/Linux–are supported, there is no tight integration between Eclipse and those platforms. Moreover, Eclipse does not have integrated support for traditional open source development practices, and instead focuses mostly on Java development. Fortunately, Fedora Core 5 ships with an integrated Eclipse development environment based on Eclipse 3.1.2, making it possible for Eclipse to run smoothly on Linux.

This article describes the history of this effort, the current state of the platform, and some future plans.

2. redhat.com | Confessions of an Eclipse convert:

As a long-time Emacs™ user, and a typical command-line-oriented UNIX® person, I was skeptical when I first heard about Eclipse™, an extensible open source integrated development environment. Even when I was working to make Eclipse run when compiled with GNU gcj, I used it primarily as a smoke test for the compiler and GNU Classpath libraries.However, I saw quite a bit of Eclipse, and I frequently heard it described as the premiere open source integrated development environment, especially for Java. So, seeing that I work on GNU Classpath, which is mostly written in Java, I decided that I would give it a serious try.

The best way I could think of to do this was an experiment: for two weeks, do all of my Classpath work in Eclipse. (Naturally I wasn't so rash as to shut down Emacs–after all, that is where I read my email.)

And Now for Something Completely Different…

No… This post isn't about Monty Python 😉

It's just about a cool website I found:
MAD SCI

It's educational and amusing but it has a downside: it's… well… there's no other way to put it… Plain ugly. It's a shame… Maybe it's the black background with the orange text, maybe not 😛

This makes me think:

There should be a network of volunteer Web Designers / Web Programmers / DBAs to help non profit projects make good websites / webapps.

I wouldn't mind participating in these kind of projects in my spare time. If there's one thing we've learned from OpenSource software is the value and quality that can emerge from collaborative free work.

All the tools to do this exist and are free:

It's funny how the subject diverged from my original intention…

“IBM developerWorks” Java & AJAX new article

Here's another article from this great series.

The problem with JavaScript…

function myTest() {
var a = 123;

var b = 123;
a = "123";
return (a == b);
}

This obviously is going to return false. Or is it true?

It actually depends on the browser you're working with (thank you, Vítor, for pointing this out to me).

The way I see it, it makes no sense to use comparison operators diferently typed variables.

The problem is, of course the fact that JavaScript is a not a "strongly typed programming language" but I think it would be great to be able to declare strongly typed variables in JS. Somewhat of a mid-term solution…

If you would declare var something; that would be a generic variable, to mantain backward compatibility, but if you declared int x; float y; String z = new String("test"); the browser would enforce type validation and averyone would be happier 😛

Having said that, I guess there are some arguments for the "weakly typed" option, but for me, I can't see any real advantages…

In the meanwhile, maybe this or this will share some light…

The problematic operators are the relational operators ('==', '', '') and the concatenation operator ('+') which is also used for addition. All these operators work with more than one type.

“Why ADO’s Find method is the devil”

I'm currently working with ADO and I found this life saving article.

A picture is worth 50 records:

It's much faster to re-open the RecordSet object every time but but it doesn't make any sense… Wy the Find method and the Filter propperty, then?


Follow me on Twitter

My del.icio.us

For what it’s worth…


My blog is worth $1,693.62.
How much is your blog worth?

Blog Stats

  • 5,845 hits