<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>Fernando Lozano&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/" />
<modified>2007-07-31T16:04:09Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/flozano/217</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2007, flozano</copyright>
<entry>
<title>Shared web hosting versus Java frameworks</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2007/07/shared_web_host.html" />
<modified>2007-07-31T16:04:09Z</modified>
<issued>2007-07-31T14:40:56Z</issued>
<id>tag:weblogs.java.net,2007:/blog/flozano/217.7947</id>
<created>2007-07-31T14:40:56Z</created>
<summary type="text/plain">Why can&apos;t we run popular Java applications on shared hosting plans? There are real techinical issues, or is it just a perception problem?</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: Java Enterprise</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>
During the latest days I've been fighting with my hosting provider because I tried to deploy Xwiki (xwiki.org) in my hosted web site.  The core issue was XWiki requires that the web container security policy includes:
</p><p>
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
</p><p>
Actually, it's Struts and Velocity that requires that, not XWiki code itself. See for more info
</p><p>
http://struts.apache.org/2.0.6/docs/sunone-70.html
</p><p>
This permission allows the use of reflection to access private and protected methods and attributes.
</p><p>
My ISP argues that they can't grant this without compromising the shared web container integrity, and uses Sun Java SE Javadocs as proof, see:
</p><p>
http://java.sun.com/j2se/1.5.0/docs/guide/security/permissions.html
</p><p>
A quick google search convinced me that all major Java frameworks including but not limited to Struts, Hibernate and Spring needs this permission, so banning it from the security policy means the shared hosting plan is useless for the vast majority Java applications. 
</p><p>
Worse yet, mailing list postings from many sources indicates many other follow the same policies as my own.
</p><p>
Is this good business? Are all customers interested in Java hosting using “semi-dedicated” servers, or virtual machines? Can you imagine a PHP hosting plan that bans Pear, PHPlib, ADODB, PhpNuke, PhpMySQLAdmin and other popular PHP libraries and applications? Why the same reasoning doesn't applies to Java hosting?
</p><p>
Being pragmatic, all that Java frameworks, including many from Apache Software Foundation, couldn't be wrong. It doesn't make sense they would require something that poses a significant security treat.
</p><p>
I guess that using isolated class loaders for each web application context (as stated by the Servlet spec) should prevent any use of reflection to get sensitive information from other customers using the same shared web container, so there should no harm granting the permission required by Struts.
</p><p>
Besides I think granting suppressAccessChecks for ReflectPermission would not make a shared Java web container security worse than mod_php or mod_perl inside Apache or IIS. Am I wrong?
</p><p>
If I am wrong and the security implications of granting supressAccessChecks are realy severe, why don't pre-configure the most popular frameworks on the web container shared lib folder and granting permissions just to them, so that any Struts jar from the customer applications WEB-INF/lib folder are ignored? Would this be so hard for a hosting provider to do?
</p><p>
Anyway making it hard to deploy popular applications and frameworks on shared hosting providers hurts Java popularity and indirectly the profits of all who bet their carres and business on the Java platform. If there's a real problem, framework developers should fix their code so they can run inside a tightier security policy. If not, docs need to be updated to state the real risk and pactices to mitigate it. Letting eveyone be limited to use dedicated web containers may help selling java ee server licenses and suppport, but doesn't help the community in the long run.
</p>
]]>

</content>
</entry>
<entry>
<title>The real motives why industry analysts love to predict Java fall... and why they will spend another 10+ years being proven wrong.</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/09/the_real_motive.html" />
<modified>2006-09-29T22:22:25Z</modified>
<issued>2006-09-29T22:15:28Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.5655</id>
<created>2006-09-29T22:15:28Z</created>
<summary type="text/plain">I wonder why, after so many years of failed predictions, the so-called &quot;industry experts&quot; still insist that Java is doomed. My conclusion is that they are being mislead by parallels with technologies that are from both a marketing and from a technology point of view radically different from Java.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Business</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>The real motives why industry analysts love to predict Java fall... and why they will spend another 10+ years being proven wrong.</p>

<p>When I found a YAAPJF (Yet Another Article Predicting Java Fall) featured on Java.Net, I though it would, for a change, provide useful insights on the problems we Java developers would have to deal  with during the next years, as technology creates new opportunities, big corporations devise new strategies to achieve total market dominance and marketing hype diverts decision-makers from the real issues that makes dependable IT. But what I found was just another biased and badly-informed rant that adds nothing new on similar articles I've read during the latest 10 years.</p>

<p>The article repeats the old sayings about Java failure for desktop applications and Flash dominance as a web multimedia tool. But if you visit Dice.com, Google Trends or O'Reilly for a reality check, you'll see that Java still generates twice as much "market share" as the second-runner. As if web development were just about the browser, and enteprise or embedded development didn't matter.</p>

<p>I wonder why, after so many years of failed predictions, the so-called "industry experts" still insist that Java is doomed. My conclusion is that they (1) are serving their own interests (2) are being mislead by parallels with technologies that are from both a marketing and from a technology point of view radically different from Java.</p>

<p>1. We all know media and consulting firms needs new hypes to sell articles, conferences and reinventions of the wheel posing as new applications. A mature, stable and robust technology like Java limits their opportunities to cash. The web looked like the golden mine, with the promise for a complete revolution each year and a half, but no corporation can rebuild all its IS at such a pace. And fortunately they don't need to, thanks to Java. (To be fair, there are other web technologies, like PHP, that allows companies to build web applications and keep then running for a long time span. I have applications created for PHP/FI that still runs with PHP 5).</p>

<p>2. The IS arena was for a long time crowded with technologies that promised everything but world peace, but were replaced in just a few years by the next hype. Remember the 4GL languages, RAD IDEs and WAP? When I was at college, about fifteen years ago, Clipper was still the way to get a well-paid developer job; soon everybody was coding using VB under Windows 3.x; them PowerBuilder, Centura and Delphi were "the" solutions for IS development; but all they were left into oblivion by the web.</p>

<p>Enter the web era, there was a rush to learn Perl and CGI programming, which were quickly displaced by server-side scripting engines such as Cold Fusion, PHP and ASP. Even Java entered the wave with JSP. But only multiple-tiered development could deliver the reliability web applications needed, and soon everybody was talking about design patterns, MVC and frameworks like Struts. MS .NET did not had the impact they hoped for, and now the "market" seems to be in a quest to elect the new "must-use" development tool, with Ruby and Rails topping the bets.</p>

<p>Nothing against Ruby and .NET -- except the fact they are not Java ;-). I myself still develop lots of stuff using PHP, and I am also a good SQL Server DBA. But Java development is not about marketing hype. It's about building applications that stand the test of time and that can evolve to meet changing business needs. </p>

<p>The crazy state IS development was before Java was very convenient to lots of professionals and consulting firms that could not (or did *not wanted* to) deliver dependable applications. Their incompetence in building reliable software was masked by new looks, incompatible upgrades from development tools themselves, OSes and databases, and the novelty of each technology hype. Every customer was willing to live with a few reboots and lock downs to use the latest technology. Every one was eager to buy that networks and applications that would solve all their problems. And those professional / firms incompetency at building maintainable software was hidden by the need to re-create everything using the next cool technology. IS was the realization of the "motto continuum", the engine that feeds itself.</p>

<p>Now those professionals and firms are scared about the prospect of getting another 10 year of stability from the Java arena. I was at once reading articles and course material I wrote about Servlet development almost 10 years ago, and every word of them still applies. I took applications I developed 10 years ago for IBM Websphere  (at the time named Lotus Domino Webserver) and run then under the latest JBoss release. Of course nowadays I want to use Datasources, JMX management, Hibernate and Struts/WebWorks. But the fact I didn't had to change any of those applications just to stay current with system software is remarkable by itself</p>

<p>For the most part, Java evolution was not revolutionary. It was additive (and adictive). There were few times new JVMs and APIs broke production applications (and programming mistakes accounted for most of them), and it was easy to solve the eventual incompatibilities. I can't imagine having this stability from my dark years as a Windows developer.</p>

<p>So the parallel between Java and previous IS development "best sellers" will lead to wrong predictions about Java being at the end-of-life. Java is much more like COBOL, which still powers some of the most critical IS, but with the advantage that with Java you don't need to stay frozen with IS technology as it was 30 years ago. Rest assured during the next 10 years there will be a great demand for development of new Java applications, not just maintaining old apps like COBOL programmers do today.</p>

<p>I don't want to go back to the previous state of playing catch-up with each and every new cool technology. Neither do any of my customers. Nowadays IT users are much more cost-aware and concerned with ROI. I really doubt most of previous development best sellers would have had any serious market share if IT buyers were in the past half as careful as they are nowadays.</p>

<p>Of course there are lots of people and companies that can't see times have changed. The fact is: we aren't part of a booming market anymore. IT is now a mature market. Sad for them. Good for us Java developers.</p>

<p>Maybe the best parallel to Java is the now decades-old Unix system. It's heir, Linux, is at the forefront of OS and networking innovation. That's where new developments and new research happens, and where more and more companies trust their mission-critical applications.</p>]]>

</content>
</entry>
<entry>
<title>Afraid of trying JPackage?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/08/afraid_of_tryin.html" />
<modified>2006-09-01T02:59:05Z</modified>
<issued>2006-09-01T02:56:14Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.5474</id>
<created>2006-09-01T02:56:14Z</created>
<summary type="text/plain">Most Linux developers and sysadmins I talk to think JPackage is great, but repackaging Sun Java looks like mission impossible to them. So I created a shell script, that does everything you need to bootstrap your JPackage environment except for downloading Sun Java.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>
Most Linux developers and sysadmins I talk to think JPackage is great, once they are introduced to the advantages of not having tons of copies of every jakarta-commons-whatever and having each application automagically use the Java release (or even vendor release) it needs.
<p>
But mosf of them are scared of the bootstrapping procedure, except for the few lucy ones that already have a JPackage-compatible JVM as part of their (commercial) distros, or the few ones that are brave enough to try and find their applications already work with GCJ. Rebuilding a RPM package looks like mission impossible to them.
<p>
So I created the following shell script, that does everything you need to bootstrap your JPackage environment except for downloading Sun Java. Just save it on the same directory that has the Sun Java tarball and let it run. In the end, you'll have a few packages ready to copy and install on each Linux workstation or server in your network.
<p>
For the curious, this script (actually the JPackage RPM spec) generates the following packages:
<ul>
<li>java-1.5.0-sun-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-alsa-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-demo-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-devel-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-fonts-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-jdbc-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-plugin-1.5.0.07-1jpp.i586.rpm
<li>java-1.5.0-sun-src-1.5.0.07-1jpp.i586.rpm
</ul>
<p>
You may not be able to install the “sun-jdbc” package, but this does not means you won't be able to run JDBC applications. It just means you do not have installed unixODBC (and who does use the JDBC-ODBC bridge under Linux anyway?)
<p>
Likewise, you may not be able to install the “sun-alsa” package if you do not have the Alsa sound libraries installed. I personally don't think I need sound support to run my JavaEE application servers.
<p>
Finally, you do not need to install the “sun-fonts” package in every Linux workstation if you do use an X Font Server – you may need to install this only on the font server machine.
<p> After installing the repackaged Sun Java, you can start downloading Java application packages from <a href="http://www.jpackage.org">www.jpackage.org</a> or, better yet, configure your <b>yum</b> repositories to point to the JPackage Project one.
<p>
Here's the script. It could be enhanced, for example not being hardwired to 1.5.0 update 7. But it does the work.
<pre>
#!/bin/sh
# builds a JPackage-compatible Sun JDK RPM
# by Fernando Lozano <fernando@lozano.eti.br>
#
# This script can be used, redistributed and changed in the terms
# of the Apache License 2.0 (http://www.apache.org/licenses/)
# provided these initial comments are not deleted nor modified.
# Of course you can add more comments if you like.

bin="jdk-1_5_0_07-linux-i586.bin"
srpm="java-1.5.0-sun-1.5.0.07-1jpp.nosrc.rpm"

base="build-sun-java-jpp-rpm"

if [ "$1" = "-h" -o "$1" = "-help" ]; then
    echo "This script builds JPackage compatible binary RPMS"
    echo "from Sun JDK 1.5.0_07 binary download for 32-bits Linux/Intel"
    echo "options:"
    echo "  -h: ths message"
    echo "  -q: really quiet"
    echo "  -v: verbose (shows rpmbuild messages)"
    exit -1
fi

if [ "$1" = "-q" ]; then
    output="/dev/null"
else
    output="/dev/stdout"
fi

if [ "$1" = "-v" ]; then
    rpmout="/dev/stdout"
else
    rpmout="/dev/null"
fi

echo "Checking prerequisites..." > $output

if [ -z "`which rpmbuild 2>/dev/null`" ]; then
    echo "rpmbuild not found. Either you need to adjust your PATH" 1>&2
    echo "or you need to install package rpm-devel as root" 1>&2
    exit 1
fi

if [ -z "`which wget 2>/dev/null`" ]; then
    echo "wget not found. Either you need to adjust your PATH or" 1>&2
    echo "you need to install package wget as root" 1>&2
    exit 1
fi

if [ ! -r $bin ]; then
    echo "$bin not found. " 1>&2
    echo "You need to download it from http://java.sun.com" 1>&2
    exit 1
fi

echo "Configuring RPM build environment..." > $output

d=`pwd`
mv ~/.rpmmacros ~/.rpmmacros.sav.$$ 2>/dev/null
echo "
%_topdir        %(echo ${d}/tmp-$base/rpm)
%_tmppath       %{_topdir}/tmp

%packager       build-sun-java-jpp-rpm by Fernando Lozano <fernando@lozano.eti.br>
" > ~/.rpmmacros

echo "Creating build directories..." > $output

rm -rf tmp-$base
mkdir tmp-$base
cd tmp-$base
mkdir rpm
mkdir rpm/SOURCES
mkdir rpm/SPECS
mkdir rpm/SRPMS
mkdir rpm/RPMS
mkdir rpm/RPMS/i386
mkdir rpm/RPMS/i586
mkdir rpm/RPMS/noarch
mkdir rpm/tmp
mkdir rpm/BUILD

echo "Downloading SRPM from JPackage.org..." > $output

wget -qc http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.07-1jpp.nosrc.rpm

echo "Moving required files to build dirs..." > $output

cp ../jdk-1_5_0_07-linux-i586.bin rpm/SOURCES
rpm2cpio java-1.5.0-sun-1.5.0.07-1jpp.nosrc.rpm | cpio -imud --quiet
mv java-1.5.0-sun-*fonts.xsl rpm/SOURCES
mv java-1.5.0-sun.spec rpm/SPECS

echo "Building JPackage compatible binary RPMS..." > $output

rpmbuild -ba rpm/SPECS/java-1.5.0-sun.spec > $rpmout 2>&1

echo "Finished." > $output

echo > $output
echo "Sun JDK Packages are in $d/rpm/RPMS/i586" > $output

echo "You may need to mannualy create the Java plug-in symlink for Mozilla / Firefox:" > $output
echo "# cd /usr/lib/firefox*/plugins" > $output
echo "# ln -s /usr/lib/jvm/java-sun/jre/plugin/i386/ns7/libjavaplugin_oji.so . > $output
</pre>]]>

</content>
</entry>
<entry>
<title>Java One mini-talks for Linux users</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/05/java_one_minita.html" />
<modified>2006-05-15T09:22:23Z</modified>
<issued>2006-05-15T07:41:31Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.4730</id>
<created>2006-05-15T07:41:31Z</created>
<summary type="text/plain">The Java.Net Community Corner in the Java One Pavillion will feature a few talks of special interest for Linux developers.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>The Java.Net Community Corner in the Java One Pavillion will feature a few talks of special interest for Linux developers, ranging from on Sun proprietary JVM and new JCP standards to F/OSS JVMs.</p>

<p>If you are around, please come and join us!</p>

<table border="1" bgcolor="#e0e0e0">
<tr><td>Date/Time</td><td>Talk</td></tr>
<tr><td>May 16, 11:30am</td><td>Packaging Java apps for Linux using JPackage</td></tr>
<tr><td>May 16, 12:00am</td><td>Brazilian Portuguese JDK Translation Project</td></tr>
<tr><td>May 17, 11:00am</td><td>The Scripting java.net project</td></tr>
<tr><td>May 17, 02:30pm</td><td>Packaging the JDK for Linux and Open Solaris: Getting Started</td></tr>
<tr><td>May 17, 04:00pm</td><td>The State of F/OSS Java VMs</td></tr>
<tr><td>May 18, 12:00am</td><td>Fedora Core Linux bundled Java Apps</td></tr>
</table>

<p>Linux distributions packagers will have a special interest in the May 17, 2:30pm presentation. I can't tell the details, but it'll be about things you weren't legally able to do before. You probably heard about a new license Sun will announce during JavaOne, so stay tunned.</p>

<p>The full schedule of Java.Net mini-talks during JavaOne can ne seen on the <a href="http://wiki.java.net/bin/view/Javaone/CommunityCorner">Community Corner Wiki page</a>.</p>]]>

</content>
</entry>
<entry>
<title>I wanna a real NetBeans Day</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/03/i_wanna_a_real.html" />
<modified>2006-03-20T14:51:01Z</modified>
<issued>2006-03-20T14:50:07Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.4349</id>
<created>2006-03-20T14:50:07Z</created>
<summary type="text/plain">Remeber last year&apos;s javaOne NetBeans Day? It was more about JavaStudio than Creator. I hope this year we have en event centered on NetBeans itself and less on the closed forks mantained by Sun.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[Remember last year's JavaOne NetBeans Day? It was more about JavaStudio than Creator. I hope this year we have an event centered on NetBeans itself and less on the closed forks maintained by Sun.
<br><br>
NetBeans has a very active community and interest in it is growing because of the unique features of the open source software base, but Sun people always look more interested on marketing the closed derivatives than the open source project itself. I was disappointed every time I read a blog or saw a presentation about NetBeans that spent more time on Java Studio Creator and Enterprise than on what I could do with Netbeans itself.
<br><br>
I don't want to see previews of the next JavaStudio releases. I want to see previews of what NetBeans developers are doing as open source software I can get from CVS and try right now (and maybe contribute to). I don't want to learn about all the nice features JavaStudio offers me -- for this I can ask for a Sun representative to visit me, or I can go to the JavaStudio web site, or I can also join SDN and have the CD mailed to me.
<br><br>
It has not been very honest from Sun to use the NetBeans brand as a disguise to market JavaStudio. If you want, host a JavaStudio day also, But please, don't mislead me again to see a NetBeans presentation or article when what I'll really get is a JavaStudio advertisement!
]]>

</content>
</entry>
<entry>
<title>Echoing the Java Compatibility Call to Arms</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/03/echoing_the_jav.html" />
<modified>2006-03-15T18:08:02Z</modified>
<issued>2006-03-15T18:07:54Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.4311</id>
<created>2006-03-15T18:07:54Z</created>
<summary type="text/plain">Sun itself is asking developers to test their apps with third-part JREs to ensure the Java platform remain compatible. But missing from his claim was the need to test them also with the many cleam room, open source software JREs out there, and the need to throw out references to non-standard, vendor-provided JRE classes from application code.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[Sun itself is asking developers to test their apps with third-part JREs to ensure the Java platform remain compatible. But missing from his claim was the need to test them also with the many cleam room, open source software JREs out there, and the need to throw out references to non-standard, vendor-provided JRE classes from application code.
<p>
Sun David Dagastine in his blog
http://blogs.sun.com/roller/page/dagastine?entry=java_compatibility_call_to_arms asks developers to test their applications on all available JREs, citing Sun, IBM and BEA.
<p>
I agree with them that no matter how big are vendors and JCP efforts to promote compatibility and interoperability, the ability to run apps is the real measure of compatibility, and you will only get that if most developers test their code with as many JREs as they can, and report back any unexpected behavior.
<p>
But I have to add that it's not enough to test the biggest proprietary JREs, which are all of them Sun licensees. Java compatibility will only be real when there's also an independent JRE implementation that is able to run most if not any Java app and you are free to port this JRE to the platform of your choice. That's the true meaning of IT standards: not having to rely on a single vendor to run your apps. David's request is about relying on just Sun as the direct or indirect supplier of JREs.
<p>
Even if you argue that free software / open source software JRE implementations are not yet certified and may lack important parts of the JavaSE APIs, there's a good chance they already have enough to run your app, and the problems you may find when they don't run your app are actually <b>your</b> fault, not JRE flaws, as in the case of OpenOffice.org (see http://people.redhat.com/green/linuxworldfreej.pdf).
<p>
Hey, they already run Eclipse and Tomcat! Red Hat guys are even running JonAS under GCJ! Why then wouldn't your app run under a free software / open source JRE?
<p>
Here's a few good candidates you can try. <b>Please add at least one of them to your standard testing practices:</b>
<ul>
 <li>Kaffe - http://www.kaffe.org
 <li>GCJ - http://gcc.gnu.org/gcj (this already comes bundled with most Linux distros
 <li>JamVM - http://jamvm.sf.net (good for embebed devices, small RAM footprint)
 <li>SableVM - http://www.sablevm.org
</ul>
I could add more names to the list, but these already gives an idea of the possibilities. They are more or less ready to use, unlike Apache Harmony which is still in its infancy.
<p>
The developers of these free software / open source software JREs found that the single bigger headache, which prevents them from running even some open source Java applications, is the use of vendor-specific, non-standard classes by the applications. Most of the time they are com.sun.* classes bundled with Sun JRE.
<p>
So I add to David's request: <b>please treat any use of non-standard JRE classes as a programming error</b>. This will help a lot achieving true standard, compatible and ubiquitous Java.]]>

</content>
</entry>
<entry>
<title>What happened to all my Eclipse plug-ins?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/02/what_happened_t.html" />
<modified>2006-02-10T14:39:50Z</modified>
<issued>2006-02-10T14:39:42Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.4096</id>
<created>2006-02-10T14:39:42Z</created>
<summary type="text/plain">I must admit I&apos;m having trouble figuring out the inner workings of the Eclipse ecosystem. Almost all main tool vendors participate in the project and you can find hundreds (if not thousands) open source plug-ins. In spite of that, Eclipse remains a difficult environment to start with, and it&apos;s not easy to identify a successful set of “must-have” open source plug-ins.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Tools</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>I must admit I'm having trouble figuring out the inner workings of the Eclipse ecosystem. Almost all main tool vendors participate in the project and you can find hundreds (if not thousands) open source plug-ins. In spite of that, Eclipse remains a difficult environment to start with, and it's not easy to identify a successful set of “must-have” open source plug-ins.</p>

<p>During the early days of Eclipse 2.0 I created my work environment around a set of small open source plug-ins: SolarEclipse, X-Men, JFaceDBC, AstonWizzards, Webapp and GenerateEqualsAndHashcode. With those, I had basic HTML and XML editing capabilities, easy debugging of servlets (but lacked debugging JSPs), the ability of testing SQL statements against my database, and templates to create Web app projects, action classes, the like.</p>

<p>But all of them became unmaintained (maybe with the exception of AstonWizzards). SolarEclipse, with would arguably be the most useful of those, had two child projects (that quickly became unmaintained also) and was incorporated alongside X-Men to the JBoss-IDE, which now uses WTP for equivalent functionality.</p>

<p>I didn't liked more powerful plug-in sets like MyEclipse and Lomboz. Not because I am biased towards open source software, but because those plug-ins imposed a too restrictive project and coding structure. They were not easy to integrate to existing projects and limited developers to the plug-in way of doing things. What if I don't want to use XDoclet? What if I don't want that use of the business delegate design pattern?</p>

<p>Eclipse WTP itself was the reason many of the plug-ins I was used to stopped evolving. And WTP took two years or more to provide the replacement functionality. Hint to people asking why Netbeans looks to have gained momentum during the latest year: developers need easy access to basic features, that Netbeans provided that with 4.0, 4.1 and 5.0, while Eclipse remained the basic edit-debug-refactor IDE.</p>

<p>I have yet to try WTP to see how it fits my working environment. It looks too big and complicated to start with, but I know from following the project mailing lists they had a design goal of flexibility and were actively pursuing it. My main complain is that they took too long to provide something usable.</p>

<p>Take VE as another example. It also killed incipient open source plug-ins dedicated to visual development, but it is not usable yet, besides being older than WTP, and a smaller project. The current release is too heavy and crashes a lot. While I understand the Eclipse goals are not just provide Java development tools, but infrastructure for any language, any platform and any library development tools, it's a shame we still don't have a good quality open source visual editor for Eclipse, be it for Swing or SWT.</p>

<p>Maybe the Eclipse Foundation should rethink its goals and practices, to give Eclipse users simpler ready-to-use tools in shorter time frames, instead of letting this task solely for tool vendors, which still tend to provide mostly proprietary tools. Maybe the Foundation should look at ways to better work alongside the community of small and open source plug-in developers, say providing them hosting infrastructure a la SourceForge and java.net, or a catalog of third-party plug-ins, or simply be more active seeking their support and participation in extending the Eclipse platform. But maybe five years from now there will be only Eclipse and I'll realize how wrong I am now.</p>

<p>I see at BIRT as an example of what looks to me as weak interaction between Eclipse and the general open source community: while there are many open source powerful and mature reporting engines like JasperReports and JFreeReport, besides the charting engine JFreeChart, they created their reporting engine from scratch. Whatever the quality of the initial contributions to the BIRT project (I must concede they were quickier to provide results than VE and WTP) this sends out the message the Eclipse Foundation is not open to outside work.</p>

<p>After those rants, I'd like to know: what is your personal must-have set of Eclipse plug-ins?</p>

<p>Today I switched from Webapp to Sysdeo (and JBoss-IDE when I want EJB debugging), I hack X-Men to run with newer Eclipse releases, have my own set of AstonWizzards templates and add a couple more code-generation tools, besides PMD to remind me when I should be ashamed of my own code. I still do not have a preferred HTML / JSP editor, and sometimes use JBoss-IDE just for that.</p>]]>

</content>
</entry>
<entry>
<title>When Applets are not WORA</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/01/when_applets_ar.html" />
<modified>2006-01-27T21:34:37Z</modified>
<issued>2006-01-27T17:07:12Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.4014</id>
<created>2006-01-27T17:07:12Z</created>
<summary type="text/plain">During the end of 2005 I had a customer who could not run a Java Applet on his desktops, despite having the latest update from Sun. And the desktops ran the fastest-growing OS and browser in the market today</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>During the end of 2005 I had a customer who could not run a Java Applet on his desktops, despite having the latest update from Sun. And the desktops ran the fastest-growing OS and browser in the market today</p>

<p>This customer ran Fedora Linux 4 and Firefox 1.5. We tried other Firefox and Mozilla releases (but could not try old Netscape 4 because the portal uses recent CSS standards and they were planning to start using AJAX). We also tried other releases of Sun Java as far as 1.4.0, besides IBM and BEA JREs for Linux. None of them worked for that particular application.</p>

<p>And what the application did to break compatibility? Nothing so uncommon: it used JSObject to direct the browser window load another page. The applet was a virtual keyboard for user login and we tested it worked flawlessly under Windows with both Firefox, Mozilla and the virus / worms farm (IE). Applets that didn't use JSObject worked fine in both Linux and Windows.</p>

<p>The applet used only standard Java SE / Java Plugin classes, no com.sun.* stuff, no JNI calls and no third party libraries. It is a very basic Swing application.</p>

<p>Digging deeper into the problem, we found the cause was that Fedora 4 packages were compiled using GCC 4.0 while Sun, IBM and BEA Java for Linux were compiled using GCC 3.3 (and older releases with GCC 2.9). So memory layout differences between the code compiled with each GCC release made the interaction between the JVM and the browser lock both, but without generating a SIGSEGV.</p>

<p>We confirmed the problem running the applet under Fedora Core 3 (that uses GCC 3.4) and all went fine. So the customer was left with the option of re-engineering the web app to not use Applets at all, or downgrade the Linux desktop to an earlier Fedora release, that is about to have no support anymore. Unfortunately, free software JVMs like GCJ, Kaffe and JamVM do not yet support reliable applet execution inside the browser.</p>

<p>We would not have had this problem (and the stress it caused) if Sun had a more liberal license that allowed Sun Java to be bundled and distributed with community-supported Linux (like old proprietary but freeware Netscape 4 did) and recompiled / repackaged and redistributed by those distribution mantainers. I hope Harmony or some of the other free software JVM matures quickly enough to give me a real choice over Sun Java.</p>]]>

</content>
</entry>
<entry>
<title>How Should You Teach Software Development?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2006/01/how_should_you.html" />
<modified>2006-01-05T15:33:31Z</modified>
<issued>2006-01-05T15:33:24Z</issued>
<id>tag:weblogs.java.net,2006:/blog/flozano/217.3892</id>
<created>2006-01-05T15:33:24Z</created>
<summary type="text/plain">A lot of Java bloggers are complaining lately about the difficulty of finding good Java programmers and how universities seems to be doing a lame job of teaching computer programming. What about reading about the experiences of someone who actually spent some years teaching computer programming at college?</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[First of all, I have to admit that teaching in college was not the pleasant experience I expected it to be. I love teaching. But I found most students had no interest in what I was trying to teach them.  I know I am not a bad teacher, because when I do training I receive a good feedback from my customers. And I am proud a handful of my students actually became respected software developers and they openly state this happened thanks to me.
<br><br>
Working with IT for more than 10 years, I found the same problems other bloggers are complaining about to recruit people, specially undergraduates. And I feel each year the problem gets worse, that is, people become able to get a computer-related degree having less and less competence to write computer programs. But I was surprised to learn this was not just a problem in Brazil, where the educational system is deteriorating in all levels, but a problem hirers and project leaders also have in the US and Europe.
<br><br>
At first I blamed the then new easy-to-use generation RAD tools. People started to think software development was about drag-and-drop components from a visual palette and no one wanted to learn about coding. I remember since the early days of Clipper there were lot of tools promising “you don't need to be a programmer to write applications using this tool”. Well, decision-makers and potential software developers believed this falacy and now we are feeling the consequences.
<br><br>
You can't blame the universities or students alone for the low quality of today undergraduates. Who told the students to go the easy way and not to care about complex algorithms, data structures and CS theory? Today wanna-be software developers are at best computer power users, they are not old-time hackers in the sense as people addicted to computers that wish to learn how they work and find new uses for them.
<br><br>
While people discuss if they should start by teaching Java or whether they should adopt Scheme they are missing the point. A real good software developer will change from one language to another with the same ease he can change his shirt. He has to. Popular computer languages (specially for Information Systems) have a very short life span. Before the course ends either the language will be virtually dead (as Clipper is) or it will have become a new, different language, for any practical purpose (as VB.Net today). Even if you argue Java is more or less the same for 10 years, if you take into account the proliferation of new APIs and frameworks, you understand that a Java developer who stayed current since its creation should have studied enough to get one more college degrees or maybe a latu-sensu.
<br><br>
So the language you do use for teaching does not matter. What matters is what you are teaching. It's a fact that most students have a need for employment and so they'll chase whatever they see in employment ads. That's the reason so many universities are teaching Java early on. You'll never have interested students if you teach using an “underground” language and spends most of the time teaching boring examples like sorting algorithms. You won't also have results if you require the students to learn complex math like queue theory while at work (or at internship) all they do is CRUD applications.
<br><br>
It doesn't matter either whether functional programming, lambda calculus and finite automatus are important for solving complex problems if you can't show the students real-world problems, which they can relate to what they believe it will be their daily work routine. You also have to start with problems most of them are able to solve. Else they'll loose interest. Computers are perceived as being “user-friendly”. It won't work to focus only on the hard parts of the work.
<br><br>
Both educators and IT pros have to face the hard truth: the industry needs a lot of software developers. If you do work as a teacher it's your job to prepare as many people as you can to fill those jobs. You are not meeting your goals of you think you should only pass the computer hackers. The other way around, IT people have to start being honest about what they require from new pros. If they continue to send misleading messages to new workers they'll continue to get lame new pros.
<br><br>
Teacher really have a great part of the guilty. I found very few of them who would teach real-world OO practices and effective use of relational databases. Most of them still uses Turbo Pascal or whatever they learn when they were undergraduate students. And, when some of them are forced to new things, like Java, they prove to be lame developers using those tools. A teacher will never be respected by his students if he teaches Java (even if only as part of an OO design course) and cannot answer questions about Struts, Hibernate, JSF and other stuff students hear about.
<br><br>
So we have universities striving to meet his customers (the students) perceived needs, which are driven by an IT industry that has lied for many years about what it takes to be a real developer, and teachers who are too much frozen in academia and have no real-world experience. A sure recipe for failure.
<br><br>
The problem is made worse by the fact no school exercise, that you have at most a semester to complete (alongside five or six other assignments to complete in parallel for other courses) will ever force the students to deal with the real-world needs of maintenance, productivity, security and reliability. A college assignment ends when it's presented to the teacher, while a real software project has just started when users get the first release.
<br><br>
I think students should be required to complete something like medical residence before they get their degree. They need to spend some months working full-time on a real-world software project that requires team work to actually learning what it takes to create good software. And their involvement with this project should not end with release 1.0. Maybe they should be required to work in a maintenance or enhancement project instead of developing a new application.
<br><br>
But I see in Brazil (is that the same in the US and other countries?) a strong tendency to shorten the computer-related college courses, to meet the high demand for new IT pros. Instead of spending four to five years studying computers, you can now spend just two to three years. How could the curriculum be compressed to half the time span? Of course students won't learn many thing they are supposed to learn.
<br><br>
I see the computer field as a very deep field, which needs experts with proper training in different specialties, just like physicians. How long does it take to become a good DBA? To become a network-security expert? Or to become an operating-system level developer, who builds device-drivers? The problem is, neither the industry nor the academia recognizes this need. Both believe better software tools and faster computers will make up for the missing knowledge of software developers. And it's much easier for the students to believe in that than doing the hard work that will make then good software developers.
<br><br>
Whoever wants to be a good software developer today in on his own, he won't receive much help or guidance from either academia or industry. :-(]]>

</content>
</entry>
<entry>
<title>If you use Linux, you should use JPackage</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2005/12/if_you_use_linu.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-12-08T14:37:23Z</issued>
<id>tag:weblogs.java.net,2005:/blog/flozano/217.3756</id>
<created>2005-12-08T14:37:23Z</created>
<summary type="text/plain">Life of Linux System and Network Administrators and Developers would be easier if  all Java software vendors started to use JPackage guidelines when b uilding their installation packages.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>JPackage (www.jpackage.org) is an Open Source Software project that aims to provide popular Java applications and libraries in a manner that is compatible with Linux standards like the FHS and administrative best practices for the platform. But it goes well beyond simply packaging Java software as RPM packages used by most popular Linux distributions, it also provides ways to deal with conflicting Java VM and third-party library releases. It allows you to have at the same time one app that requires Java 5.0 and other that was certified to run only with 1.4.2 or even 1.3.1. It also allows you to have apps that require for example Hibernate 3.0 and other that works only with Hibernate 2.1 without requiring each app to have its own private copy of Hibernate libraries and their dependencies like Jakarta-commons and C3P0.</p>

<p>Major Linux distributions are already commited to JPackage, like Red Hat and Mandriva, and even Debian is using JPackage conventions and scripts for including F/OSS Java applications like RSSOwl and Eclipse in it's official download feeds.</p>

<p>In order to get a completely managed Java environment, JPackage even tells you how to repackage popular proprietary software like Sun JDK their way. Unfortunately they can't redistribute those packages because of license restrictions.</p>

<p>I manage a few Red Hat Enterprise Linux servers who already comes with JPackage RPMs for IBM  JRE. It was very nice to be able to use their dependency information to deploy applications to our internal network and let yum take care of updates. It was also very nice to be able to use the alternatives system (from Debian) to switch the default Java from IBM JRE to GCJ when I was mantaining one app that made use of GCJ CNI. And I had no trouble deploying this update alongside others that required IBM JRE (or Sun JRE). JPackage makes sure each app runs on the JVM it needs.</p>

<p>Bottom line, the fact RHEL4 already uses JPackage made deploying and updating Java apps (both desktop and server-side) to a wide array of users and needs much easier than when I had to manually install, configure and customize Sun JRE and many vendors apps.</p>

<p>But now I need Java 5.0 for a new app and but I do not have it JPackage-enabled. Of course I could follow JPackage web site instructions on how to repackage Sun JRE 5.0 (or the new IBM Java Runtime 1.5.0) but it would be much better if they already provided JPackage-compatible RPMs. After all, I could use this time to do more important things for my employee.</p>

<p>Nothing prevents them to do so.  The JPackage guys have already done all the hard work for Sun, IBM, BEA, Apache, JBoss and other Java vendors. Their work was already tested and validated by a number of users and corporations. And all major Java vendors already uses many F/OSS software as part of their products, so a few JPackage scripts should present no problem.</p>

<p>So, please, Java Vendors, make JPackage a standard part of your Linux packaging and support. You'll make your customers very glad.</p>]]>

</content>
</entry>
<entry>
<title>Great Expectations and a few disappointments with NetBeans 5</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2005/11/great_expectati.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-11-23T01:55:44Z</issued>
<id>tag:weblogs.java.net,2005:/blog/flozano/217.3687</id>
<created>2005-11-23T01:55:44Z</created>
<summary type="text/plain">I was always suspicious that NetBeans were a second-class citizen inside Sun, but a recent statement from Robert Brewin threw off many of my fears. Yet I think NetBeans is taking some wrong paths in spite of the great new features.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: NetBeans</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>Last Saturday (November 19th) I went to <a href="http://maisjava.soujava.org.br/Wiki.jsp?page=M4J_RIO_pt_BR">OneDayJava 2005</a>, an event hosted by Rio de Janeiro <a href="http://www.soujava.org.br/jsp/index.jsp">SouJava</a> affiliate and had the privilege of hearing a speech from Robert Brewin, NetBeans and Sun Java Studio Creator Chief Architect. It was a great opportunity to ask him about the relationship between NetBeans development and Java Studio Creator.</p>

<p>I was always suspicious that NetBeans were a second-class citizen inside Sun, as most of their marketing and development were focused in Sun Studio. Of course I know Sun Studio uses NetBeans as its base, but this fact was never made very clear by Sun marketing, almost as if it were a secret. Besides that, sometimes Sun Studio and NetBeans seems to be developing the feature in parallel, for example Matisse x Raven or the J2EE features.</p>

<p>Well, Robert admitted that in the past Sun Studio and NetBeans teams did not interacted as they should, and a lot of effort was duplicated, but assured us that his vision is that both teams will be working together to improve NetBeans and delivering Sun Studio as a set of value-added plug-in modules for NetBeans. He said the focus is now on NetBeans and not on Studio, that core features will be developed by both teams as part of newer NetBeans releases and Studio won't hide anymore the fact that it is NetBeans + plug-ins.</p>

<p>It takes courage for a person in Robert's position to admit mistakes from the past, kudos to him. Better yet, his vision should benefit both NetBeans and Sun Studio users, who will getter better software and more advances. But I would like to see NetBeans leave Sun's umbrella. I welcome Sun efforts into the product and I am very grateful for them, but NetBeans should have ideas from people outside Sun. The user community should decide how NetBeans would evolve, not only Sun by itself.</p>

<p>And NetBeans 5 can help this a lot. The new support for creating NetBeans plug-in modules enables many small developers to improve NetBeans. Sun should use that to foster a healthy ecosystem around NetBeans, a more open and participative one. But people won't join if they perceive NetBeans as being controlled by only Sun and being just a “demo” for Sun Studio.</p>

<p>If you think this has already been done by Eclipse, think again. Most Eclipse projects look like elephants, too slow to move and “owned” by big companies. Nothing against big companies, but it is not easy to participate and influence Eclipse as an individual, the way we can with other open source development organizations like the Apache Foundation.</p>

<p>The end result is that Eclipse projects are not quick to bring in results (but I have to admit when they do bring results they are great!). Check, for instance, Eclipse VE and WTP against current NetBeans 4.1 and 5.0 betas. Eclipse projects may look more powerful on the web site, but NetBeans is ready for use right now.</p>

<p>My main disappointment with NetBeans 5 is the Matisse GUI builder. It is really great, until you get the wrong layout constraints and find that very few layout properties are exposed. Of course a beta release for such a new software is expected to behave somewhat erratically and miss some functionality, and in fact beta 2 is much more reliable than beta 1, but I don't like to have the visual tools as my only choice. I also have nothing against generated, non-editable, code sections, if these sections are simply property initialization and registering event handlers. But I'd like to change anything I want from the properties and inspector windows, just like I can do if I use other layouts like GridBag and Border. I want to be in control, I do not want black boxes as part of the Software I develop.</p>

<p>By the way, Matisse relies on a non-standard layout, the “Natural Layout” or “Free Design” as it is called from NetBeans menus. Inside the generated code, we see lots of instances of org.jdesktop.layout.GroupLayout. If you know from where it came from, please tell me. Was it created by NetBeans folks, or is it part of other open source project? It looks a lot like JGoodies FormLayout. My complain is, no matter how easy this makes drawing Swing user interfaces, most newbie Java developer's won't understand why the project jar generated from NetBeans will fail to run on another machine having the JRE already installed. But there's still time to add a “distribution packaging wizard” to add a “lib” folder containing all libraries and external classes used by an application project.</p>

<p><br />
And what if I want to lower my app size for Swing-enabled smartphones, PDAs or just plain Applets? I'd like to have improved tools for dealing with other layout managers too. But if not using “Free Design”, we are stuck with the same NetBeans 4.0 features. It's a shame NetBeans still cannot visually edit a GridBag layout (the customizer is far from WISIWIG, although it is an improvement over 3.x). Eons ago I could do that using Visual Age for Java (today I could to this using Eclipse VE, but I'd need a faster machine than my 2.0 Ghz Athlon).</p>

<p>Other statement from Robert let me a little bit worried: he said the future of development tools lies with visual tools. I can understand the strong desire to get all VB developers out there using Java, but I don't thing cloning VB style of visual development is the key. Eclipse got its strength from helping coding, and newer Software Engineering practices like Agile Modeling focus on coding. Many tools that became indispensable to Java developers today like Ant and JUnit also focus on coding. Even Microsoft seems to be realizing this.</p>

<p>The VB style of development is opposed to current Java culture, and I don't think you can become the new “number one” by just imitating the current number one. You have to to make something different that proves to be better. So I think NetBeans (and Studio by extension) development may be constrained by the current Sun vision of fighting Microsoft by imitation.</p>

<p>But, if you do believe this the way to go, why not pursuing it from an Open Source project or JCP Expert Group? Why dont't we have  yet “data-bound controls” as a standard part of the Java platform, ready to be used by whoever wants them, no matter the IDE of choice? Sun Studio won't win VB developers by being just another RAD tool. Delphi and PowerBuilder already tried that but with only limited success. Sun Studio per se is not compelling enough, but the Java Platform may be.</p>

<p>We should also wonder why haven't any open source library taken this space like Struts did. Maybe the RAD style of development actually does not matter so much.</p>

<p>Bottom line, NetBeans is a great IDE and Sun is still putting great technology within it. It is best of breed in many respects, but still has rough edges where such an old and mature software shouldn't. It is probably being hurt by too much Sun control over it and would benefit immensely from ideas coming from outside. The question is, what will Sun do to attract outside developers to NetBeans, and will Sun be willing to let them take control?</p>]]>

</content>
</entry>
<entry>
<title>What makes programming languages easier?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2005/10/what_makes_prog.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-10-21T16:27:31Z</issued>
<id>tag:weblogs.java.net,2005:/blog/flozano/217.3471</id>
<created>2005-10-21T16:27:31Z</created>
<summary type="text/plain">Do natural languages have anything to do with computer programming?</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Programming</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>Vickan's Goyal blog <a href="http://weblogs.java.net/blog/gvix/archive/2005/10/making_it_easy.html">Make it easy</a> about <a href="http://www.onjava.com/lpt/a/6241">Bruce Tate's article</a> started some debate about the advantages (and disadvantages) on programming languages being closer do English. I think booth have missed the point, and was typing a reply, but it became so big I decided to publish it on my own blog.</p>

<p>Natural language is imprecise, ambiguous, and its real meaning has to be inferred by the reader. Not all people who reads an article will understand exactly the same thing the author intended to tell them. This doesn't look to me as a good way to express computer instructions that should produce a reliable and predictable result.</p>

<p>If natural language were the way to develop better software, why would be invest so many time developing new modeling languages like UML, new specification languages and the like?</p>

<p>The problem is most people have trouble in thinking the precise, well-defined way a programming language requires. Learning how to program computers is hard. But people make the wrong assumption that it is hard because we use tools that are hard to use; the fact is that computer programming <i>per se</i> is very hard, and no tool will ever change that.</p>

<p>What did we get from "easier" development tools? The ones that from time to time promise "you won't need a real programmer if you use this tool"? Gartner and etc still says 80% of all software projects misses deadlines and cost by more than 50%.</p>

<p>That's why I like Extreme Programming: they focus on the real issues, that are people interactions and quality control.</p>

<p>We will always need programmers to develop software, and those programmers need to get proper <i>education</i> -- not just proper <i>training</i>, because they need to get the logic and other skills to be able to effectively use any programming tool.</p>

<p>It's just like giving a good programmer a course of drawing software. He may learn all about using the software, but he won't be able to create nice, pleasant figures. You need a different skill set to create graphics than to create software.</p>

<p>Actually, I think we non-English speakers (I'm Brazillian, my language is Portuguese) have a little advantage over Americans and other native English speakers: we don't fall into the mistake of trying to read a computer program as if it were natural language.</p>

<p>Programming language keywords are symbols with no relation to their usual meanings, same with function and method names: they are just like logical operators. But there are too many of them, so you cannot use symbols as mathematicians have used for centuries, and the fact most computers can't render and type symbols like "exists" (&exist;), "infinite" (&infin;) and so on simply gave more force to the temptation to "use natural language".</p>

<p>Our advantage is not bigger because most technical docs are in English.</p>

<p>I agree with Vickran in that I don't want Java to become neither more bloated neither more simplified. I also agree with <a href="http://weblogs.java.net/blog/johnreynolds/archive/2005/10/beyond_java_but_1.html">John Reynolds</a> that the Java Platform could make good use of domain-specific languages (that is, dynamic languages). But my vote in this respect is for <a href="http://www.jython.org/">Jython</a> (a Python compiler / interpreter that generates standard JVM bytecode, built itself using Java).</p>

<p>We will always have new products and new technologies that promise to make computer programming easier, and most of then will continue to be vapor, although some of them will sell very well. But only the few ones that attack real issues, like Java did, and like Python, Ruby and others are doing right now, will have a real impact on programmer productivity.</p>]]>

</content>
</entry>
<entry>
<title>How to Make Java Suited For Desktop Apps</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2005/04/how_to_make_jav.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-04-01T16:01:10Z</issued>
<id>tag:weblogs.java.net,2005:/blog/flozano/217.2241</id>
<created>2005-04-01T16:01:10Z</created>
<summary type="text/plain">Even if you manage to create a terrifc first Swing app for your users, the second one will probably hurt you.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[How to Make Java Suited For Desktop Apps.

Even if you manage to create a terrific first Swing app for your users, the second one will probably hurt you.

Joshua Marinacci's asked on his Blog <a href="http://weblogs.java.net/blog/joshy/archive/2005/03/why_dont_you_sh.html">Why don't you ship Swing apps?</a> and suggested some usual reasons like deploying the JRE, Swing API complexity and corporate focus on web apps. I'd like to add and discuss one more reason:
<br /><br />
<i>- No class / code sharing</i>
<br /><br />
When you develop apps for in-house use it's almost certain there will be users who run many of those apps at the same time.
<br /><br />
For the first one you strive to become a good Swing programmer, get all fancy third-party libraries from JNDC and JGoodies, bundle the JRE (or deploy it on all clients by using you preferred enterprise management system / login script hack) and get the work done, hoping the cross-platform compatibility you get will pay for the extra effort, specially with so many new Linux desktops out there.
<br /><br />
But when it comes the second application, it'll load another JVM and spend another 25+Mb with standard and third-party libraries. There's a reason all GUI platforms are based on (1) OS-Level code or (2) Shared / Dynamic Link Libraries.
<br /><br />
I remember using the first Java installer for Oracle 8i, I needed more RAM to run the installer than to run the development and sometimes the production servers, just because the installer called two or three other Java apps for creating the database and configuring networking parameters.
<br /><br />
It should be easy to create a "Java Launcher" that justs calls each app main method and runs everything as different threads inside the same JVM, but Swing developers screwed this up by creating hidden threads and requiring us all to call System.exit(0) to finish the application.
<br /><br />
You can see almost every other GUI toolkit for Java lets you control the event loop and would not suffer from this problem. Check, for example, <a href=”http://www.eclipse.org/swt”>Eclipse SWT</a> and the <a href=”http://java-gnome.sf.net”>JavaGnome Project</a>. (Well, I really don't know if these would allow many independent GUI apps running on the same JVM, but I can imagine they allowing this without requiring me to rewrite my apps, just internal changes.)
<br /><br />
Research projects like the <A href=”http://research.sun.com/projects/barcelona”>Sun MVM</a> can aleviate this, if their features are integrated into Mustang or another Java release, but I wonder how this will affect the classloading magic application server and other Java apps have to perform.
<br /><br />
Besides, when everything runs on the same JVM, you get to manage conflicting versions of the same libraries. Java classloaders have the abilities to work around this if we come with a standard for describing / naming library releases used by each app.
<br /><br />
Other possible solution is used by the <a href=”http://gcc.gnu.org/java”>GCJ Project</a> which extends the famous GNU C Compiler to compile Java sources. When the standard class library and popular third-party ones are natively compiled as shared libraries, you get code sharing among apps for free. GCJ can mix native code and standard bytecodes, so this could be an interesting option. Shame it doesn't includes a JIT for speeding up the bytecodes.
<br /><br />
Sun itself provides the JMF as both a pure-Java package and as optimized “performance packs” with native code for Windows and Linux. What about a “Swing Performance Pack”? What about a JCP standard for compiling and deploying Java libraries as native shared libraries, requiring the standard bytecodes to be supplied alongside the native code, so there's no platform lock-in? And what about a standard feature by which the JRE compiles whole packages into native code (it should be easy from its own JIT) and caches the results?
<br /><br />
I think these two ideas (class sharing and native compilation) are not conflicting, but complementary. After all, both depends on solving the problem of managing multiple versions of the same libraries / jar packages around the system. I personally would love not having dozen copies of Jakarta Commons and other popular libraries around my system.]]>

</content>
</entry>
<entry>
<title>Why don&apos;t open source developers help make open source java real?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2005/03/why_dont_open_s.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-03-15T19:36:47Z</issued>
<id>tag:weblogs.java.net,2005:/blog/flozano/217.2178</id>
<created>2005-03-15T19:36:47Z</created>
<summary type="text/plain">In spite of all the rants about the need of open source Java, the open source / free software community itself is doing very little to make it real.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: linux.java.net</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>In spite of all the rants about the need of open source Java, the open source / free software community itself is doing very little to make it real.</p>

<p>Not to disregard the efforts of the kaffe, gcj, classpath teams and other involved with F/OSS Java VMs, but what are big open source java projects from Apache Jakarta and Eclipse, small projects like HSQLDB and JUnit, and even individual open source developers, doing to help them?</p>

<p>I remember a few months ago someone posted at an Apache mailing list a complain about the huge help the foundation provided to identify and fix bugs on Sun Java, receiving almost nothing in return. He asked, why weren't some of these efforts spent trying to identify where and how to improve kaffe and etc so they become reliable platforms for running apache software?</p>

<p>Now I ask the same question for open source developers in general: Why don't you spend a little time testing your apps under kaffe and/or gcj? If only to provide them useful bug reports. But most things that prevent current applications to run under these free JVMs are just a few lines of code away, if some more developers decide to contribute patches.</p>

<p>After all, if the community itself don't think F/OSS Java is worth their time and efforts, why should Sun think different?</p>]]>

</content>
</entry>
<entry>
<title>EJB 3.0: two steps ahead, one step backwards?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/flozano/archive/2005/03/ejb_30_two_step.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-03-07T17:21:04Z</issued>
<id>tag:weblogs.java.net,2005:/blog/flozano/217.2141</id>
<created>2005-03-07T17:21:04Z</created>
<summary type="text/plain">Should deployment descriptors really be dealt as second-class citzens by the new EJB spec? This may lead to highly unportable EJBs.</summary>
<author>
<name>flozano</name>

<email>fernando@lozano.eti.br</email>
</author>
<dc:subject>Community: Java Specification Requests</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/flozano/">
<![CDATA[<p>While everyone praises EJB 3.0 ease of use through annotations and the new POJO persistence model, a ring bells in my head that this new spec could lead to even higher ties to app-servers than previous releases.</p>

<p>The idea of using source-code annotations to replace deployment descriptors is not new. XDoclet did this for years, and it was the preferred tool by EJB 3.0 main drivers, the JBoss Group. But XDoclet allowed for misuses of its capabilities that were replicated by the current EJB 3.0 drafts. These are the specification of app-server dependent configurations on the EJB source code.</p>

<p>The Java platform is about compatibility and interoperability, but the J2EE platform have failed so far on this respect because their standards were not always complete enough to let the app developer do this job without interference from the app deployer. An example of this was the absence of a standard for OO/Relational mapping, but this is being solved by the EJB 3.0 spec.</p>

<p>See this fample from JBoss EJB 3.0 Preview docs: http://docs.jboss.org/ejb3/tutorial/security/src/org/jboss/tutorial</p>

<p>@Stateless<br />
@SecurityDomain("other")<br />
public class CalculatorBean implements Calculator<br />
{<br />
   @Unchecked<br />
   @TransactionAttribute(TransactionAttributeType.REQUIRESNEW)<br />
   public int add(int x, int y)<br />
   {<br />
      return x + y;<br />
   }</p>

<p>The @Stateless, @Unchecked ad @TransactionAttribute annotations are fine. I agree these aspects are deeply affected by business logic so it's easier to deal with then using only one source file instead of two (the bean class and the deployment descriptor). But the annotation @SecurityDomain is not fine: this references a JBoss-specific feature, the use of JAAS-based application policies to configure a security realm. If I want to deploy this EJB using another app server, this won't work at all or this will become noop, just trash inside the class files.</p>

<p>If you take a deeper look at this, why the app developer should worry about application policies? Shouldn't this be the sole concert of the app deployer, or the app server administrator? See that if the app deployer want's to use another policy (say he has just configured the use of LDAP for authentication) he'd have to recompile the source code. Your QA department won't be happy with this.</p>

<p>Another example of misuses of EJB 3.0 capabilities come from the persistence example:</p>

<p>@Entity<br />
@Table(name = "PURCHASE_ORDER")<br />
public class Order implements java.io.Serializable<br />
{</p>

<p>It looks pretty harmless until you talk to your DBA. Why should my persistent object specify the table name? Reading on the example (left out because of space), why should it specify the way relationships are implemented (foreign key, join table) and the look ahead strategy for loading related data? Shouldn't this be left for the DBA to decide, and not the app developer?</p>

<p>If the DBA, after some benchmarks, finds another way to map the relationships will yield better performance, or another read ahead strategy prove better given the current usage pattern of the application, he'll have to recompile all Java sources to effect the changes. I don't expect my DBA to be a senior Java programmer, and I also don't expect my Java programmers to be able to take the DBA job, so should one have to change the artifacts created by the other?</p>

<p>This was about performance. But about portability, the current spec and samples define the SQL column type as an annotation on the Java getter. If I use Oracle, a String property becomes a VARCHAR2 column. But this really matters to the developer, who could well be using MySQL? What about many ERP and CRM systems out there, which have to support whatever database the customer does have? Will they have to provide different binaries (ejb3 or ear) for each supported database? A new port should require recompiling Java sources? Wasn't persistence frameworks about database independence?</p>

<p>The current EJB 3.0 drafts encourages developers to write EJBs that are very dependent on the app server and database used and not portable without changing sources and recompiling. Previous releases, if they did not get real portability because they did not defined important things, allowed the app deployer, DBA and others to adapt the application to new environments without touching Java code, but only deployment descriptors. And in this respect the proprietary deployment descriptors most J2EE app servers require are a good thing: just one new / changed file for each new supported app server. Not many changed Java classes for each server. So the new release is a step backwards as along as a step ahead in ease of use.</p>

<p>I am very worried because the EJB 3.0 specs treats deployment descriptors as useful just for backward compatibility. The syntax is not even described on the latest drafts, although they say something about the descriptor overriding what was specified by source code annotations. If this is left for late including on the specs, we may get a deployment descriptor that's not useful at all.</p>

<p>So, please, EJB 3.0 EC members, take a careful look at this. I don't want to use annotations for everything. I don't think deployment descriptors are a bad thing that should be taken out of J2EE development. I want to use they as the main source of info about security policies and OO/Relational mapping for my EJBs. I want my app developers to work without interfering with app deployers, DBAs and infrastructure administrators, and vice-versa. I want to be able to fine-tune for performance without recompiling Java sources. The only way to do this is having deployment descriptors.</p>

<p>Of course, deployment descriptors needs a simpler, more concise and consistent syntax. There's much room for improvement here, and much to gain.</p>

<p>J2EE developers, beware: many people on the EJB 3.0 EC do work for app server vendors. They won't be hurt if you cannot easily migrate your EJBs from one server to another. That's not to say they will consiously produce a spec that generates non-portable EJBs, but they have a big pressure to offer ease of use to their customers and will easily forget about portability issues.</p>

<p>Don't be fooled by the simplicity of “hello, world” examples, they won't scale to full corporate Information Systems. Everything you may hate today about EJBs was created for a reason, and these reasons may still be valid. Please remember the mess that was created by “source code only” compatibility on Unix standards.</p>

<p>Making an analogy among the current EJB drafts and web development, the url-mapping for Servlet classes would be a source-code annotation. If you do not like the standard “*.do” pattern for Struts actions, you'd have to recompile Struts itself. Would Struts become such a widely deployed and successful MVC framework if it were not the flexibility of web application deployment descriptors?</p>]]>

</content>
</entry>

</feed>