Thursday, April 30, 2009

Adding Velocity tools to a velocity context

I could not find a basic example on how to add the Velocity tools library (in my case the EscapeTool) so I can use these helping routinged in my templates.

So here is mine: escTool = new;


you can then call in your templates $esc.html($text_to_be_escaped)

I hope it helps

Tuesday, April 28, 2009

MySQL Limit - how to simulate with Microsoft SQL Server 2005

Much less strategic that previous post, I am quicly cooking a primitive web interface for which I need pagination.

In MySQL the limit added to the select helps verymuch retrieving a block of rows then the next one for the next page etc

What about MS Sqlserver ? You may start with TOP (takes the first rows) or set rowlimit.

But how to start at a given row ?

I found a few desperately incorrect proposals for this (but at least one pointed me to the ranking functions) , here is my best shot:

"with ordtab as (select p_users_id , ROW_NUMBER() OVER (order by p_users_id) as rownumber from ph_users) select * from ordtab where rownumber >= 10 and rownumber <= 20"

Will give you the equivalement of limit 10,20.

The solution is based on what is in the Microsoft manual, too bad we don't have time to read that much manuals, however it is still much less elegant than the MySQL attribute (which is right to the point)...

Tuesday, April 21, 2009

Apache Pivot

A small Dzone article about Pivot. Pivot is an incubating project from Apache to make Swing based RIA application.

Also the link to Pivot (not that much doc, so better read the Dzone article before).

Monday, April 20, 2009


Continuing thinking on this Oracle-Sun deal, I don't think GlassFish has that much future anymore...

It is too early to make good prediction. Some analyst see here a thread to Microsoft (I don't think so) others think that Oracle will drop the hardware line, few think they will valorize the software line (I don't think so either).

Wait and see. In my readings, there is however a consensus... not good for open source...I agree.

Orcale & Sun - applications to disk ?

Quoting the Sun site:
"The acquisition of Sun transforms the IT industry, combining best-in-class enterprise software and mission-critical computing systems. Oracle will be the only company that can engineer an integrated system – applications to disk – where all the pieces fit and work together so customers do not have to do it themselves. Our customers benefit as their systems integration costs go down while system performance, reliability and security go up."

Like it or not, clearly that's a vision. The One of a monolithic vendor...

Oracle to acquire SUN

Sun and Oracle today announced a definitive agreement for Oracle to acquire Sun for $9.50 per share in cash. The Sun Board of Directors has unanimously approved the transaction. It is anticipated to close this summer.

Is it good or bad ? I never though to such a deal. So this is my humble reactions on very hot news.

Oracle will now become a kind of new IBM, concentrating hardware and software. Not sure that's indicating a sign toward openess...

Today, I received one mail from Sun : "Need more scalability for your MySQL application". With the key message being : we own it and we know better how to run it on our boxes ! Hm, if we extend this to the new portfolio, not sure that's so pleasant for all other hardware vendors proposing Oracle software...

What for Java? I don't think Oracle did very great contributions to the community, however I must admit that they are great at charging for anything (the main difference with Sun) . Will Java continue to be free ? Oracle is used to charge developer tools. Time to check the NetBeans licenses and ownership ?

And what about MySQL? Oracle is buying its single open source competitor. Isn't that a monopoly ? Will innovation continue on this DB Engine? It is funny to see Sun being acquired while they just finished building their application stack... oh bad is live when all you did is good but too late...

My last thinking. Sun managed Java poorly but on the other side this commercial weakness has been sustaining a relatively open ecosystem. Now with Oracle and IBM face to face, the major Java love triangle is over and the fight is almost guaranteed. I am betting on competition by so called innovation that will result in incompatibilities... Not good.

With Java and Lamp (MySQL) at stake, the winner might be... Microsoft !

Sunday, April 19, 2009

Download Sless 11 - Novell organisation at its best

I am preparing an upgrade of our main prod server to the new Suse Linux Enterprise Server 11. The latest, greatest, etc stuff from Novell Inc (pardon me,my excuse, I was a Suse users years ago).

After a (somehow slightly complicated) password recovery I could finally start downloading my ISO images.

Great Novell sent me an e-mail "Thank you for trying SUSE Linux Enterprise Server 10 from Novell."

Cool ,they forgot the mention concerning Netware 2.15 !

My point, e-business is not more complicated than business - but not less...

Friday, April 17, 2009

About Java, market, technology and attitude

I read this morning a small article from Timothy M. O'Brien
The article highlights the relation between Sun open/not so open behavior and its current market situation. Also, I agree entirely on the desperate JavaFX approach.
Would buying Sun be good to IBM ? If stock continues to drop, probably. Would it be good for Java: I think yes. IBM has been a fair player in the open-source community since several year and is good to listen to market and make money with services.

Yesterday, I saw a smart and interesting article "Meet Sun Software Engineering Manager Masood Mortazavi, Part 2: Java DB, Project Models, and More".
This is plenty of smart thinking, and I am sure Sun is full of these very talented people. Considering the situation, I will pardon the self-congratulating style of the article. However I was damned shocked by the following paragraph :

"SC: What are the biggest issues that companies have getting the most out of Java technology-based applications?

Mortazavi: I would point to problems related to a mishmash of technologies, the lack of ability to select properly, and a relative increase in nonstandard, de-facto programming platforms."

Well. I cannot agree. First, what is the sense of choosing and "open" solution to stick to a single vendor ?

Second, Sun pushed developers to these so called 'mishmash' by regularly delivering technologies not matching business expectations. Remember the first releases without JDBC, crappy AWT, poor Swing performance, have you saw there was no reporting solutions built-in, still no clean integration with desktop under Windows... In fact, Java has been saved by these 'mismatch' like (to cite a few) Eclipse, Tomcat, Spring, Hibernate,JasperReports, Struts etc

We must understand that a lot of mishmashers just tried to fill the gaps... and they continue and continue. Why is Sun then endorsing Ruby , Groovy... Why are web applications more often built with PHP than Java...

I will one more quote this article "Don't forget that billions of dollars of revenue have been generated and millions of people have been employed because someone at Sun Microsystems invented Java,..."

That's correct, but I am sure we could have done much more money if Sun started to listen more to the market and the developers needs. The Java platform remains a very attractive but not so productive platform with a difficult learning stage (again the mentioned article is worth reading). Look at how much shrink wrapped software are written in Java... How much solutions for small business... well we missed a lot of business opportunities because of blind smart people...

Thursday, April 16, 2009

UltraLigt Client - Canoo

Still searching for an easy way to build these Java apps quicly and smoothly.
I will surely put this on in my list :

This is a pure Java toolkit/framework. Client side runs as normal Java app (including web start) or as an applet. All the logic (event handling) is on the server.

An interesting compromise I think.

Wednesday, April 15, 2009

JavaFX ... Sun did it again

I am currently reviewing various architectures / frameworks etc for building (more – if possible) easily database backed applications.

Ideally we would like to leverage or Java knowledge (we did a lot with Java but little WEB/GUI stuff).

The idea of being able to deploy within a browser or outside is of course appealing.
So I had a look at JavaFX.

I quickly spotted the next link… . Waouw the next generation bablabla will not use text right now ! Cool ! “Forget about any business apps” for now could be on the web site banner. Know a business database apps without a single text edit?

So announcing so much, and providing so little, that reminds me how Java itself was launched (without proper GUI, no database API, even writing a file was an issue). Yes they did it again.

This is not only a technical exasperation, I cannot catch this strange blind marketing attitude !

Java is relatively standard for business software but the client side has to rely on a crappy mix of HTML/JavaScript to look a bit more responsive and stay easy to deploy?

Wouldn’t it be smart from SUN to capitalize on this market needs instead of trying to compete with Adobe Flash with an under capable product?

The latest Java runtime is much less deployed than Flash, the platform seems less capable and imply learning from scratch a new (said to be easy to learn) language.

Why would Flash developers move to this FX stuff ?
Why would Java developers move to this FX stuff ?

Well no clear replies and at this stage I give up on that one…