Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Java Books Media Software Programming Book Reviews Linux IT Technology

Java Application Development on Linux 428

r3lody ((Raymond Lodato) writes "Java was developed to be a cross-platform language. In other words, it shouldn't matter what processor or operating system you used, just the language itself. Write Once, Run Anywhere is the slogan, and an admirable ideal to attempt to reach. So when I first saw the title of the book Java Application Development on Linux, I expected to find descriptions of some idiosyncrasies in the Linux environment that affected the Run Anywhere part of the equation. What I got was a lot more." Read on for the rest of Lodato's review.
Java Application Development on Linux
author Carl Albing and Michael Schwarz
pages 600
publisher Prentice Hall
rating 9
reviewer Ray Lodato (rlodato AT yahoo DOT com)
ISBN 013143697X
summary An eminently readable book covering all you need to develop commercial-quality Java programs on a Linux platform.

The authors, Carl Albing and Michael Schwarz, chose to create a book that is a complete guide to writing commercial-quality Java programs. With the burgeoning presence of Linux, they focused on how to use the tools of the Linux platform to assist in the creation and maintenance of Java programs. They have broken the book up into five major parts: Getting Started, Developing Business Logic, Developing Graphical User Interfaces, Developing Web Interfaces, and Developing Enterprise Scale Software. Each chapter is self-contained, and the knowledgeable reader can pick and choose what they would like to read without losing track. Carl and Michael have properly started each chapter with a summary of what you'll learn, and conclude with a What You Still Don't Know section. A Resources section is included to give you more references for further study.

Part 1, Getting Started, provides a 10-chapter overview of Linux, Java, the SDK's (Software Development Kits) from Sun and IBM, version control via CVS, and IDEs. The first two chapters cover enough command-line Linux to manage your files and directories, plus the Vi editor to create and edit your programs. Chapter 3 gives you a summarized but complete overview of the Java language (minus the standard classes), and Chapter 4 covers how the program can deal with the context in which it's running. The next two chapters cover Sun's SDK and (mainly for comparison) IBM's development kit. In some instances, the Java program may be so large and/or so complex that running the byte codes in the Virtual Machine may not be quick enough, so Chapter 7 describes how to use the GNU Compiler for Java (gcj) to create native-code programs.

Larger programs definitely need some form of source control (actually, any project larger than a classroom exercise needs it), so source control using CVS is clearly laid out for you. While other products are available, CVS (Concurrent Versioning System) is widely available, robust, mature, and reliable, so the authors chose to describe its use in detail. For building and deploying the numerous files of a larger project, Ant provides value beyond what the make facility can offer, especially with the RMI (Remote Method Invocation) dependency problems that make can't address. Finally, Integrated Development Environments are covered. While Carl and Michael focus on NetBeans, SunONE Studio Community Edition and Eclipse are also covered.

If the book stopped after Part I, you would still have a valuable addition to your bookshelf. However, it continues with a five-chapter discussion on how to properly develop business logic. One chapter is totally devoted to the business aspects of getting requirements, documentation, and buy-in. The next covers how to use a simple software development methodology to analyze the program and discover the objects to be created. The following chapter goes over a frequently overlooked aspect of programming - automated testing - with JUnit. The last two chapters of Part II cover storing data in databases using Oracle, PostgreSQL, and MySQL, and using the Java Database Connector (JDBC) to access them.

While Linux users (at least the older ones like me) are more used to command lines, most users want some form of a graphical user interface (GUI) to access the program and their data. Chapters 16 and 17 describe how to create a GUI using Swing and the Standard Widget Toolkit (SWT).

By far the most popular way to access programs is via a browser. Java Servlets are (maybe not so) little programs that run on the targeted web server, relieving the user of having to install an application on their local computer. This allows the user to always have access no matter which machine they're on (how many times have you complained that the program you want is on the PC where you're not?), and to always be accessing the latest version of the software (assuming the web administrator keeps it updated on the server). Chapters 18 and 19 cover Servlets and JSP (JavaServer Pages), then Chapter 20 describes Java-based web application servers (JBoss and Geronimo) for serving the servlets.

Finally, Part V covers Enterprise JavaBeans (EJBs) in what the authors describe as an almost criminally brief introduction. While it is definitely an overview, they still cover more than enough about EJBs to get you rolling, and provide many references to where you can fill in the blanks. They wrap up the book with a plea for help. The book is an Open Content book, and therefore they are requesting comments, suggestions, and patch files to help improve the text and examples.

I have to admit that Java Application Development on Linux is an extremely readable, very informative, and deep without being lengthy book. (The only complaint I have is that they tried to cover a little too much in a single book. EJBs, for instance, definitely warranted more coverage than they provided.) Carl and Michael use a very conversational tone, just as though they were sitting with you and giving you their personal attention. I found it enjoyable, interesting, and highly informative.


You can purchase Java Application Development on Linux from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.

Java Application Development on Linux

Comments Filter:
  • by I_am_Rambi ( 536614 ) on Tuesday January 25, 2005 @05:19PM (#11473157) Homepage
    I do some of my development in linux, and some on windows. I have found some differences in linux but very few. There is one huge advantage of java, and one huge downfall.

    The advantage: Java has abstracted alot.
    The downfall: Java has abstracted alot.

    For anyone who has done alot of programming in Java, they will understand.
  • The biggest issue with cross platform development is the "Gotchas". I'd like to see a list of what is actually different between all the OSes. What os specific parameters are there. What classes are unique to Linux devices. Especially with the native IO that 1.4 and later have included.
  • The Java trap (Score:2, Interesting)

    by jmkrtyuio ( 560488 ) on Tuesday January 25, 2005 @05:23PM (#11473197)
  • by Anonymous Coward on Tuesday January 25, 2005 @05:31PM (#11473286)
    The book seems to cover all the major aspects of Java Development. Nice and fair and all. But what makes it so special for Linux users? All the tools mentioned are available for Windows or MacOs too. Either the book has the wrong name, or the review missed some important point?

    Maybe the important point is "it does not matter which platform you use for Java programming, but by throwing in some buzzword into my booktitle, I can target more nerds and make some extra bucks". ;-)
  • Re:The IDE Issue... (Score:3, Interesting)

    by pzarecta ( 775947 ) on Tuesday January 25, 2005 @05:47PM (#11473474)
    I've been programming Java for years and I've always used vi. How much time have I wasted? I find IDEs a bigger waste of time. IMO, every second my right hand leaves the keyboard to reach for the mouse is time wasted. The only thing you get from a graphical IDE is the ability to step through the instructions. But there are other ways to compensate for that...
  • by MightyMartian ( 840721 ) on Tuesday January 25, 2005 @05:48PM (#11473497) Journal
    > JAVA is a big fat marketing lie.

    Which, amazingly enough for a lie, I am now using to rewrite some of our inhouse utilities in preparation from the move from Win2k to Linux servers. There's not too much overhead on CLI Java programs, and I've ported one app so far, rewritten on my Windows box, and it ran without a single hitch on the Linux server it's destined for. No recompiles, no nothing.
  • by Raul Acevedo ( 15878 ) <raul&cantara,com> on Tuesday January 25, 2005 @05:51PM (#11473533) Homepage
    I work for a fairly high profile Internet commerce company that uses WebLogic and pure Java. Our production servers all run Solaris, most of our developers run Windows XP (previously Windows 2000), and I run Linux.

    We have hardly ever had any issues with "Write once, run everywhere." It works. Really. Probably writing Swing/GUI apps is different, but on the server side, developing and deploying across different platforms works like a charm. Admittedly the issues you get on development vs. production can be very different, so deploying a production system on multiple operating systems might give you different results. But as far as testing and developing on two platforms, then deploying on a third, we have no complaints.
  • Java and Linux (Score:4, Interesting)

    by MarkWatson ( 189759 ) on Tuesday January 25, 2005 @06:04PM (#11473702) Homepage
    Actually, this book sounds like a good idea - cover deployment issues like database installation and configuration with Java, tips for deployment, etc.

    I usually do my development on OS X (except for new JDK 5 coding - use my Mac as an X display for a Linux box -- annoying that Apple is slow getting JDK 5 out except for in a $500 developer's preview). Anyway, I do most of my deployment on Linux, and the ease of this depends on which hosting company I am renting a server from. For example, is a usable (i.e., PostgreSQL) database installed, easy to administer, etc. I have not read the reviewed book, but hopefully a lot of practical issues are addressed.

    One interesting thing about the Linux platform is that now all new distros have RPMs (or equivalent) for installing runtime and developer support for GNU GCJ.

    I find GCJ to be very interesting (a bit of a nuisance to run on OS X) because not only is it a way to run Free Software (GPL) on Linux, but it also makes it possible to take large Java applications like Lucene, compile them natively, and then use the compiled code in Python, C++, Ruby, etc. programs. Very cool, really.

    If Linux was my development platform, GCJ would be a much more important tool for me - it would be great if Apple installed GCJ runtime libraries by default (yes, they are large). While Java is not as productive a language for many programming projects as Python, Ruby, etc., Java is a great language and platform for many types of projects; having GCJ runtime installed by default on OS X, Linux, and Windows (well :-) would make Java a more suitable language for small applications and utilities. This would get around Sun's lame Linux/Java licensing issues also.
  • by sscanf ( 131650 ) on Tuesday January 25, 2005 @06:13PM (#11473801) Homepage
    I use Xemacs, JDE, and make on Linux to create commercial products in java/jsp.

    At my last job, back on 2002, ant forced me to hate it when:

    1. I had to get the next version of ant to ask it to pass a -ea to the java compiler.

    2. We had this crazy huge build.xml file that was created for our project. It started off life as a rats nest and only got worse from there (OK, probably not ant's fault but it had the same effect on me). On top of it being huge, its in XML which is way hard to read compared to a makefile.

    3. I never could figure out how to ask ant to echo the compile line. Make echos it by default and I like it that way.

    That was three strikes.

    On my current project we are using make but one of them whipper snappers came along and made a build.xml file for the project. Its just one big, ugly, build.xml but it is much faster. The project has 30 or so small, easy to read/understand, makefiles (and I figured out how to make it go much faster on a clean build but its still not as fast as ant).

    Sure, make has its quirks (e.g. the tab thing) but I figured all thouse out 15 years ago.

    I tried Eclipse last fall after seeing an interesting presentation on it. I tried it for a couple of days but it felt so bloated that I soon abandoned it.

  • by aschneid ( 145265 ) on Tuesday January 25, 2005 @06:25PM (#11473955)
    I recently wrote a multi-threaded socket based server that uses the NIO classes. This application uses not just the network portion, but also utilizes the DirectAllocate functions for memory allocation. DirectAllocate does use system calls to allocate memory directly in order to speed up all the manipulations of the buffers. I.E. Sun recognized the fact that when manipulating large buffers in memory....it can be slow when having to go through a translation layer. So, there are native libraries needed for this.

    I developed the code using JDK 1.4.1 on Linux (Red Hat 9). Tested it on my workstation at work that ran Windows 2000 using both JDK 1.4.1 and 1.4.2, and have deployed it on two Solaris boxes and it has run under 1.4.1 and 1.4.2 (albeit better under 1.4.2).

    There was no porting needed whatsoever. I used pretty much all of the NIO classes in my code.

    Andrew
  • by owlstead ( 636356 ) on Tuesday January 25, 2005 @09:37PM (#11475785)
    Any program you write completely from scratch with C++ could be compiled for any platform. But if you use a third party API in C++ chances are it is not available to you in source, so you are stuck.

    Close, but no cigar. If there are enough binaries for the different platforms, you might not need the code. The bigger problem is that people tend to stack libraries - e.g. on the Windows libraries. That will really get you stuck.

    The thing about java is that everyone is forced to distribute "source", or more specifically, bytecode, which amounts to the same thing for cross-system compatibility purposes.

    Byte-code is far from source. Though many names (public class names, method & field names) are preserved, none of the code within methods, as well as parameter names will be preserved. Please stick to the Virtual Machine paradigm instead - it pretty much explains itself.

    Can you make non-portable "libraries" in Java? Yes.

    Well, only if you move outside the Virtual Machine (JNI/exec() calls from the VM), since the default API is available on any supported platform. So that's pretty difficult indeed.

    We are probably in the same mind on this issue, but it seems that your explanation is more confusing than it needs to be.
  • by Anonymous Coward on Wednesday January 26, 2005 @04:10AM (#11478031)
    Yeah, show me a website powered by Java and I'll show you one slow ass website. No big websites use Java. Yahoo, MSN, Google, Dell, eBay, CNN. Imagine Google trying to use Java....lol. -Nazz


    You have clearly been misinformed:

    eBay uses Java:
    http://www.sun.com/service/about/success/re cent/eb ay_5.html
    They actually dumped .NET in favour of Java

    Google uses Java:
    http://www.ccombs.net/weblog/2004/08/28/109 3666433 000.html
    They were even part of the JCP (Java Community Process):
    http://eyeonit.itmanagersjournal.com/ar ticle.pl?si d=04/11/19/1618217&tid=105

    Yahoo uses Java for their sitebuilder and chat, among other things. Don't know what they use for the main site but it wouldn't surprise me if Java was in the mix somewhere.

    MSN:
    Gimme a break!

    CNN does use java in a limited way:
    http://sportsillustrated.cnn.com/java/

    If you still think Java is slow pay a visit to EBay and check out the number of transactions they process in one hour.

"God is a comedian playing to an audience too afraid to laugh." - Voltaire

Working...