Mar 13th 06
Posted by Remus Stratulat in Programming
On his site, Joel on Software, Joel Spolsky writes a very interesting article about How Microsoft Lost the API War. If you have about 20 minutes I recommend the read as it is a good spent time.
In this article he describe the wrong turn taken by Microsoft with it’s Windows API. The less experienced self has to agree with him as also had to implement an application in .NET and had to decide as a beginner (I’m primarily a Java developer) what I should learn from the whole suite of .NET languages (decided to go with C#).
I have some additions to the Enter the WEB part of the article.
Quote:
But there’s a price to pay in the smoothness of the user interface. Here are a few examples of things you can’t really do well in a web application:
- Create a fast drawing program
- Build a real-time spell checker with wavy red underlines
- Warn users that they are going to lose their work if they hit the close box of the browser
- Update a small part of the display based on a change that the user makes without a full roundtrip to the server
- Create a fast keyboard-driven interface that doesn’t require the mouse
- Let people continue working when they are not connected to the Internet
These are not all big issues. Some of them will be solved very soon by witty Javascript developers.
I want to say this: Enter the AJAX.
AJAX is not the universal solution for all this but it solves some of the problems. Ajax allows for a web application to update only a part of the display. And it can (at least partially) create a keyboard-driven interface.
For the last (and I think) the most important feature, offline working, a new candidate has emerged Flex 2.0 from Adobe. It’s Data Service provides also that among other nice features.
And in fact Microsoft did responded to the threat: Atlas: Microsoft’s Ajax toolkit.
Mar 9th 06
Posted by Remus Stratulat in Java
Tonight, having nothing better to do, I’ve start to look around on how I can improve the chances for the KTML4 to be bought.
My starting point in this search was Sun Java Studio Creator 2. This new IDE from Sun is a really cool tool in my opinion and it has a lot of nice features especially in the new AJAX way of writing a web application. Creator 2 has a components palette from where you can drag and drop new items into your page. That palette would be a nice place for KTML4 to be.
Looking around on how can I implement a component for Creator 2 I’ve realized that there is nothing special to them (or maybe I didn’t searched enough), they are simply JSF components. And this is even better as JSF components are supporter by other IDEs and that means a bigger market for us. So keep in touch as KTML4 JSF will soon be out.
Mar 5th 06
Posted by Remus Stratulat in Java
Online HTML editor for JSP
A JSP CMS as any other CMS, needs a good content editor. InterAKT has unveiled their last version of KTML, 4.0, that comes now in a new flavor: JSP. This editor is very easy to integrate and offers a lot of very useful features. Quoting from InterAKT site:
KTML is an online HTML editor that helps you edit your website content directly in a browser. The editor loads fast and has an easy-to-use interface (similar to desktop editors). The latest version offers superior Word compatibility, a revolutionary Image Editor and XHTML 1.1 support. KTML has wide browser compatibility and supports most platforms (including MAC).
Mar 1st 06
Posted by Remus Stratulat in Tools
As the AJAX is the buzz word of the day more and more developers are looking for a good tool for developing an AJAX application. But what are the tool’s features to be considered an AJAX development tool.
First let see an “AJAX ready” tools’ list, in no particular order:
- Open AJAX group backed by BEA, IBM, Google, Oracle, Mozilla, Red Hat, Eclipse, and more. This is actually not a tool yet, is only an initiative but is worth keeping an eye on it.
- Sun Studio Creator 2
- MyEclipse 4.1 was released with Ajax support
- IntelliJ IDEA
- Microsoft Visual Studio 2005 – they are planing an add-on layer to ASP.NET but only for Atlas.
- Eclipse WTP
- JSEclipse from InterAKT
As we can see from the list, anyone that has a name in a WEB development related bussiness has jumped into the wagon.
From all this major players you may be wandering why I have included JSEclipse. Will see about that later.
What have come to my attention is that all this tools are AJAX ready because all have a JavaScript editor. There are too few other features to make one tool better in the AJAX development (I will not include here Visual Studio as I did not tested it yet).
Sun Studio Creator comes with AJAX JSF Components a library of AJAX components. This seems to be a nice addition.
So, with respect to JavaScript editing, JSEclipse seems to be a very good tool:
http://www.andrewwooldridge.com/blog/2006/02/jseclipse-powerful-javascript-editor.html
http://ajaxian.com/archives/jseclipse-javascript-editor-with-code-completion
Right now the AJAX tools market is new and while developers are still trying to figure out what web 2.0 is and how AJAX can help them to implement a web 2.0 application, the tool developers are also in a foggy place (just have come out of the dark) trying to understand the needs of their clients. What is certain is that AJAX means JavaScript and XML and while the XML will be generated by the server, the JavaScript must be written by somebody and that somebody will need a good JavaScript editor. That is how far the tool makers have gone. It is also sure that they will not stay here. This is only a transit station and the first one to arrive at destination will write history (aka “MAKE THE BIG BUCKS”).
Feb 25th 06
Posted by Remus Stratulat in Others
I have just finished my last exam for the master. Right now is the last sprint to the end, I have to make a paper and an application on Web services for a modern educational system.
I have decided to make a challenge out of this paper and write the application in C#. I’m a Java developer mostly and making it in JSP would render in me learning almost nothing out of it. So as the paper will start to progress I will try to post all my findings, all that I learn in this blog or maybe writing longer articles in the article section of this site.
Feb 15th 06
Posted by Remus Stratulat in Tools
I’d just had the opportunity to create my first beta testing group.
For JSEclipse 1.5 release InterAKT opened on it’s site a new beta testing program to let JavaScript developers have an early preview on the next version and let the actual users become involved in shaping a great product.
Feb 2nd 06
Posted by Remus Stratulat in Java, Others
Another PHP function that is very used is strip_tags.
This function tries to return a string with all HTML tags stripped from a given string.
1: public static String strip_tags(String text, String allowedTags) {
2: String[] tag_list = allowedTags.split(",");
3: Arrays.sort(tag_list);
4:
5: final Pattern p = Pattern.compile("<[/!]?([^\\\\s>]*)\\\\s*[^>]*>",
6: Pattern.CASE_INSENSITIVE);
7: Matcher m = p.matcher(text);
8:
9: StringBuffer out = new StringBuffer();
10: int lastPos = 0;
11: while (m.find()) {
12: String tag = m.group(1);
13: // if tag not allowed: skip it
14: if (Arrays.binarySearch(tag_list, tag) < 0) {
15: out.append(text.substring(lastPos, m.start())).append(" ");
16:
17: } else {
18: out.append(text.substring(lastPos, m.end()));
19: }
20: lastPos = m.end();
21: }
22: if (lastPos > 0) {
23: out.append(text.substring(lastPos));
24: return out.toString().trim();
25: } else {
26: return text;
27: }
28: }
Dec 11th 05
Posted by Remus Stratulat in Java
The search has continued and no solution has been found yet.
As I was not pleased with the performance of my previous approach I worked out the following one:
StringBuffer sb = new StringBuffer();
for(int i=0; i<content.length(); i++) {
char c = content.charAt(i);
switch (c) {
case '<' :
sb.append("<");
break;
case '>' :
sb.append(">");
break;
case '&' :
sb.append("&");
break;
case '"' :
sb.append(""");
break;
case '\'' :
sb.append("'");
break;
default:
sb.append(c);
}
}
content = sb.toString();
This verision is a lot faster then the previous one. On the page source from the slashdot site this version performed in under 8ms while the other one had it’s best performance in 20ms (usually in the range of 30ms).
Nov 23rd 05
Posted by Remus Stratulat in Java
In PHP there is a very useful function: htmlentities().
What this function does is to replace < with <, > with > and so forth. This is very useful when editing into a page some html code stored inside a database.
I can not find something similar for JSP. If you are using Struts, there is no need for something like this, but if you are using plain JSP you may not be so fortunate.
So I approached this through brute force:
<%
content = content.replace("&", "&");
content = content.replace("<", "<");
content = content.replace(">", ">");
content = content.replace("\"", """);
content = content.replace("'", "'");
%>
But this is no elegant solution and I will try to find a better one. Do you know a better one?
Oct 24th 05
Posted by Remus Stratulat in Others
I was watching the other day a movie. It’s not important what movie it was, what is important is the movie pictured a smart and cool character. Well… the problem was that I did not consider him to be quite so smart. There were certain situations where I thought he could have behaved better.
Now I’m just bragging.
OK. But now let’s be serious about it. How smart a book character can be. Well, I guess, not smarter then the author who portray him. But a good book is not required to have a smart character. There are books written to be funny, to inspect the human mind or soul or whatever. But there are books in which the action revolves around a character, a strong character, a smart character. He defines the book.
I’m a S.F. fan and one of the characters that have impressed me is was Hari Sheldon from the Foundation series written by the Isaac Asimov. But hey, he was a university professor with a PhD in chemistry and with over 500 volumes written. So, I may say, quite a smart man. No wander his characters are very well written. And the list can continue.