May 29th 06
Posted by Remus Stratulat in web 2.0
I have written a small tutorial about how a microlink can be created using prototype.js and script.aculo.us. The source code is also available.
The tutorial is in the AJAX articles section on this site. Just click on the title.
May 23rd 06
Posted by Remus Stratulat in web 2.0
Any CMS needs an authoring tool (authorware). Most of them rely on an online HTML editor that helps the managers to add content in their system. But a good online HTML editor does more then just edit a piece of HTML. Or better, editing/creating an HTML is a little more complex then just entering some text and bold some words.
KTML 4.1.0 is a JSP Online HTML Editor that does all this and even more. It is the last version from InterAKT and it’s behavior is enhanced using AJAX for a better usability.
HTML Editing
In most of the cases a piece of content is added inside a CMS from a document already written in Word or some other office application. For this case KTML come with a ‘Paste from Word’ feature that strips down all unnecessary formatting.

KTML4 comes with a familiar looking toolbar. It resembles the Word toolbar and it has the same functionalities. One key feature is that a CSS file can be added to the KTML to be used in the style dropdown.
But adding styles and other formatting to the HTML is not all. You must be able to edit them in a simple manner, without going into the HTML source. For that purpose KTML 4 comes with a lot of property inspectors.

Of course that if you are skilled in HTML you can go into the source code and edit it to your likeing.
Templates
For reusable blocks of HTML, KTML 4 comes with a templating engine. The user can select a piece of HTML inside the KTML and save it for later use as a template. This templates are saved on the server as HTML files. One can also upload HTML files as templates.
Online File Browser
I’ve mentioned the file upload so I must say that KTML 4 comes with a very good online file browser. This file browser lets you to manage a folder structure on the server and manage the files in this structure. It has three working modes: documents, templates and media.
For the media mode the user has access from the file browser to an online image editor, so last fine tunning of an image is now possible directly on the server.
Spellchecking
No good editor is complete in our days without a spellchecking tool. So KTML 4 has a spellcheck tool that uses an aspell on the server. In addition to this, if the client does not have access to an aspell on it’s server, the KTML 4 can be set up to use the spelling web service from InterAKT.
Security
This article does not try to be a comprehensive description of all the KTML4 features. I only try to outline some of the features that caught my attention and impressed me. But there is one very important aspect that must be mentioned. KTML 4 was build to be secure. Because KTML 4 uses AJAX to power it’s usability, all the calls to the server are checked both into the client and onto the server. The online file browser was treated with special attention, no call, true or fake, can alter files outside the designated box (folder specified by the administrator on the server).
All the modules are easy to set up and using a role based security system in the CMS the admin can enable them only for some roles (eg. the file browsing can be disabled for low level clearance).
Demo
A lot can be said about KTML 4 but I suggest looking at the demo to see how it works and make an impression about it.
May 22nd 06
Posted by Remus Stratulat in JSEclipse
What all this Ajax frameworks have in common? JSEclipse 1.5.2 that has the capability to understand all their idioms and propose all the classes for code completion.
May 8th 06
Posted by Remus Stratulat in JSEclipse
JSEclipse 1.5 includes a new feature, pretty common in other editors: code templates (also known as code snipets).
JSElispe comes with a set of predefined templates.

I am proposing here to add a new and useful template for the AJAX developers, particularly for the ones that are using prototype.js. The template is for creating and extending a class. The code (straight from prototype.js source code) looks like this:
Form.Observer = Class.create();
Form.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {
getValue: function() {
return Form.serialize(this.element);
}
});
To add a new template just go to Window/Preferences.. and then JSEclipse/Templates. The New… button will open the dialog for adding a new template.

After pasting the code inside the Pattern text area all that remain is to replace parts of the code with template variables: The next image is showing the result.

Now there is only one thing. Test the template into a JavaScript page:

After selecting the template and typing MyClass in the first box this is how the editor looks like:

It can be noticed one thing: typing MyClass in the first box also changes the value of the first box from the next row. These two boxes were created with ${ClassName} and their values are bound. To move to the next box to be edited just hit Tab.
So, if you are using prototype.js this little template will be quite useful.
May 1st 06
Posted by Remus Stratulat in web 2.0
The web is at 2.0 version. Or at least this is the buzz word of the day. The social web. The new Internet.
Actually I think that no one knows where are we at this moment. Google, Yahoo, Microsoft, Adobe, they all have their own vision about the web. And this to name only a few.
The world is small
I’ve heard in a TV ad the other day: the world is small. The globalization theory is considering the economical, the political and the cultural aspects of the human life. But there is another: the informational aspect. We are surrounded now by information. Right now this is not the most important aspect of our life as a global nation. For some individuals (like myself) it is, but for a lot of people the other three aspects of life are a lot more important.
In a lot of countries the information comes from a political or religious leader. In others, the “free and liberal” countries, the information comes from TV and newspapers.
[I've quoted free and liberal as in fact, from the ancient time when the homo sapiens was hunting and collecting fruits, the human race has not been really free. We are now bound to a society and to the laws, to our credits and generally to what is considered a normal social behavior. And I do not say that as it would be a wrong thing but only to state a fact. There is no fun in freedom if it's chaos.]
Playground and Office
We get our information from the web and we need our information to be fresh. We are in a newspaper store and we are looking for the last hour news not for a day old newspaper. We need our information to be condensed and to the point (not like this article tends to be). We are in a hurry and we do not have time to waste. And more to this, if the delivered information is already filtered to our needs (more like the sport section in a newspaper) it’s a lot better.
We also work, play, shop and date on the web. The web is our playground and also our office. For those of us who read more emails in one day that letters in the whole life, for those of us who write easier on laptop and only use a pen to write down their signature on some paper, the web 2.0 is a promise and maybe a part of reality. (Of course if we can also make some money out of it…
)
Let’s now consider the following. Five years ago a 128kb network connection was affordable only by companies. Now I’m writing this article at my laptop at home over a 512kb network connection and that is the cheapest one I can get from my cable provider. This tells us one thing. The days of simple and slick html are over. Maybe there are few of us that still appreciate a simple site but we are only relics of the past. Bandwidth is no longer a problem and web applications care less and less about it. Radio over the net, VoIP, video streaming.
Web applications grew in complexity also. Google maps, Amazon, Yahoo.. are all this web 2.0?
Enter RIA.
Rich Internet Applications (RIA) are web applications that have the features and functionality of traditional desktop applications. RIA’s typically transfer the processing necessary for the user interface to the web client but keep the bulk of the data (i.e maintaining the state of the program, the data etc) back on the application server. (definition from http://en.wikipedia.org/wiki/Rich_Internet_Application)
So, web applications vs. desktop application. Web is becoming our office so tools for this kind of office emerge. We keep out information on the web so we need tools to work with that information. We can now edit our documents on the net with Word like tools, we can edit images, write emails on dedicated servers and read news on special aggregators.
So we have web applications that behave more and more like desktop ones. Will desktop application change to behave more like web applications? Not likely. The changes will be on the web side. They will change to behave like desktop applications but not loosing their benefits.
The future
What will emerge, I think, will be a generic client-server application. The interface will be defined in a new definition language (maybe that language is here, XUL and MXML are potential candidates), the client application logic will be written in an ECMA n.0 language (JavaScript 2.0 and ActionScript 3.0, both look promising) and the data sharing between client and server will be done in an XML format(json supporters will hang me for the heresy but I have my reasons not to suspect a long life for it).
If everything is on the web, the data, the applications, we will need something to manage all this: WebOS. WEB 3.0?