ie8 fix

Is Java Windows for Unix?

By | April 7, 2008, 3:15am PDT

Summary: The key conceptual difference between C and Java as used in business applications development and run-times is simply this: the C you learn in school is the C you find in things like Solaris, but the Java you learn in school has very little, if anything, to do with the Java you see in things like Sun’s identity management packages.

Java is an incredibly successful toolset - but what is it really and how did it get to be so popular?

To understand what it is and how it got this way you have to start with the problem it was meant to solve: manufacturers working on digital consumer products like cell phones and set top boxes (intended to add internet connectivity to television sets) wanted their software to be updateable in use and able to run unchanged on multiple hardware generations.

Although digital TV has now brought the set top business back in volume, it was the cell phone that saved Java at the time - and because Java gives companies making those exactly what they need: a standardized software platform that’s essentially independent of the hardware, it’s now used on more than a billion such devices.

Think of the problem the phone makers faced as platform instability induced by rapid hardware change and it’s obvious that the PC software makers faced the same problem: platform instability, in their case brought about by Microsoft product churn. In response Sun released Java for Windows, got into a licensing deal with Microsoft, and advertised Java as the write once, run everywhere target of choice for developers.

It didn’t work out that way largely because developers soon discovered that memory and processor limitations on the average user computer coupled with bandwidth restrictions pretty much crippled the downloadable applications idea.

In response people did the obvious: moved their code from the slow and and distant client to the fast and local server - but when that worked didn’t follow through by abandoning Java.

Instead people who wanted to hang onto to working code and what they’d learned writing it presured Sun to incorporate increasingly complex libraries, work-arounds, methodologies, and related kludges into the standard release - thereby eventually producing what we have today: an enormously successful, absurdly over-complicated, utterly out of control monster devouring resources at an ever increasing rate.

In an ironic parallel Sun replicated this process with its own transition from the JavaStation to the Sun Ray. When the JavaStation, a “client” intended to run applications downloaded as Java byte codes for local execution, failed miserably because of bandwidth, local performance, and compatibility limitations Sun responded by abandoning its planned MAJC based smart display to create, instead, the Sun Ray -essentially a JavaStation with all processing moved back to the server.

Thus I’d argue that the use of Java in handhelds and digital TV support makes perfect sense: i.e. that its success in this role has been fairly earned because it’s the right tool for the job. But, I’d also argue that the rationale for the use of Java in business computing applications vanished as soon as the execution environment for those applications moved from the client back to the server - or, in other words, that it makes no sense at all to incur the overheads associated with trying to run downloaded applications on a Windows client when the application you’re writing will actually run on your Solaris server.

More generally, I’d argue first that the Unix mindset calls for spare, elegant, simple programming languages encapsulating principles that are easy to learn and can be widely applied; and second that “business Java” doesn’t meet this standard. Thus the C you learn in school is the C you find in complex applications like Solaris or Apache but the Java you learn in school isn’t what you get in heavyweight business applications where frameworks get piled on libraries piled on methodologies - producing about as convoluted, localized, over-complicated, and resource inefficient a mashup as you can get short of the Windows/BASIC pairing.

Notice that this isn’t generally true for Java as used in cell phones and similar devices. There the existence of space constraints and the lack of generality means that new hires have to learn company standards, a custom API or two, and a development framework but then work with recognizable Java code on the actual applications.

Unfortunately the image of crap piled on crap is the bottom line for business applications developed and maintained using Java tools - if you ever have the misfortune of having to deal with multiple Java development frameworks in large organizations or just get lumbered with trying to make something like Sun’s all Java identity management work you’ll soon learn exactly what I mean: this stuff isn’t Unix like at all - it’s windows like: byzantine, often disfunctional, defined by exceptions, and ultimately dependent, not on your ability to learn, but on your willingness to memorize.

Kick off your day with ZDNet's daily e-mail newsletter. It's the freshest tech news and opinion, served hot. Get it.

More from “Managing L'unix”

Topics

Paul Murphy (a pseudonym) is an IT consultant specializing in Unix and related technologies.

Disclosure

Paul Murphy

I do not work for, or otherwise receive anything from, any of the companies I write about. I have some money in a number of funds that bet on the markets, including the technology market, but have no direct control over how these funds are administered or what investments are made. I use Sun and Apple technology both at home and at work.

Biography

Paul Murphy

Originally a Math/Physics graduate who couldn't cut it in his own field, Paul Murphy (a pseudonym) became an IT consultant specializing in Unix and related technologies after a stint working for a DARPA contractor programming in Fortran and APL. Since then he's worked in both systems management and consulting for a range of employers including KPMG, the government of Alberta, and his own firm. In those roles he's "been there and done that" for just about every aspect of systems management and operation.

Related Discussions on TechRepublic

Did you know you can take part in these discussions with your ZDNet membership?
98
Comments

Join the conversation!

Just In

Net Framework etc
atari8bit@... 20th Apr 2008
I put Netframework 1.1 on and immediately there's a patch. Now it's up to 3.5 and it's not installed yet. That bothers me.

Yes, Windows needs to be done over 100%. But M$ won't do that. We can all wish for this but the problem of listening to your clients is NOT a M$ option.
0 Votes
+ -
Amen brother!
Roger Ramjet 7th Apr 2008
Java completely violates the Coupling/Cohesion rule of software quality. A "module" in Java consists of 5/6+ files containing interfaces, beans, functions, etc. This makes for low cohesion (BAD!). All of these files also need to be connected to each other plus those "frameworks". This introduces a high degree of coupling (BAD!).

The smartest thing the US government ever did with computing was to create Ada. It was designed for software quality, to be provable, and to scale to millions of lines of code. They achieved their goal with the language Ada - and relatively quickly made the mandate that ALL future US government code would be written in Ada.

That (almost) never happened! Ada was new and was not taught in schools. C coders were used to having plenty of rope (to hang themselves) - like untyped pointer addition, while Ada took ALL of the rope away. NO POINTERS? HOW will I get my job DONE? No department of the government took the Ada mandate seriously, and kept on coding in C (or FORTRAN) - so the promise of a better way was squandered.

As bad as untyped pointer addition is, writing several files to do ONE thing in Java is worse.
0 Votes
+ -
Ada...
Erik Engbrecht 7th Apr 2008
I worked on a project once with:
~3 million lines of Ada
~30k lines of C
~30k lines of Java

Pretty much all of the errors were in the C portion, and the
errors in the C portion were by far the hardest squash.

I'm not sure why anyone in their right mind would write
business applications in C.
language, well, that is what you get.
0 Votes
+ -
"Ada programmer" vs "C programmer"
Erik Engbrecht 7th Apr 2008
Most software engineers I know can competently program in
a variety of languages. If someone strongly identifies
themselves with a particular language, it's almost a sure sign
that they aren't much of a professional.

And no one was trying to prove that Ada was good and C was
bad. The existence of C (and Java) in the codebase were
reflective of limitations of Ada.
attitude about C, and it is the trickiest part of the project (that is why you could not do it in ADA). The results are not necessarily unexpected, a not necessarily a reflection on C.

I am not convinced that you had the right people doing the C programming.
0 Votes
+ -
~200 software engineers at the peak
Erik Engbrecht 7th Apr 2008
I think we could have found some solid C developers in
there...
0 Votes
+ -
Actually - probably not
murph_z 7th Apr 2008
Donnie boy's right about this - if a few tens of thousands of lines of C had most of bugs found in a 3E6+ line project, it's pretty clear that your C guys weren't that good.

In my experience C is so simple that it takes a near genius to understand and use it correctly - you probably didn't have one of those.
0 Votes
+ -
Too many cooks spoil the broth ...
fr0thy2 7th Apr 2008
... you may have had some fantastic C programmers in there, and then a less experienced one uses a (***) to the wrong place, just happy that he got his bit "to work" ... wink
Alas, the problem goes right up the tree to the teaching material. I've seen highly regarded programming books with entry-level mistakes in them, bad explanations, bad code from people who's primary field is, for example, mathematics and all sorts of skimming over important details.

Maybe this explains why I see so much abuse of preprocessor directives, cludges, workarounds where simple solutions are already available and some of the worst abuse of the stack this side of 1999 with up to four nested intrinsics or, in the case of one FOSS graphics effort, MMX code borrowed from elsewhere with the 16 byte alignment being done after the ASM, which had already done the alignment as this is required prior to the movaps.

Yes, assembler is essential to efficient programming, it helps you understand why interleaving and loop unrolling work so well and why dividing by the same number more than once is a waste of CPU cycles.
because you get to learn wtf is actually going on.

A bit like riding a motorbike makes you a better car driver.
0 Votes
+ -
Learn assembly first
Mark Miller 7th Apr 2008
I've met people who've worked in C and didn't understand what was going on. It happens all the time. The reason being that C tends to fool people into thinking they're programming in a HLL, when they're really programming in a high level assembly language with strict type checking and high level structures. To see what I mean, check out "Top 10 Ways to be Screwed by C" at http://www.andromeda.com/people/ddyer/topten.html

Some of the problems described come from the fact that whoever wrote this "top 10" list didn't understand the language that well. I suspect the author came to C from Python. One of the example "bugs" in C's design is its "weird indentation rules". There's nothing weird about them as far as I'm concerned. If people don't like them, use curly braces, for god's sake!

What I say is learn assembly language first, then you'll REALLY understand what's going on in C.
0 Votes
+ -
Yes, good point Mark ...
fr0thy2 8th Apr 2008
... that way learning C becomes a lot easier, and is much more productive too .. happy
0 Votes
+ -
LOL, I remember my first C class
SnoopDougEDoug 9th Apr 2008
That was funny. This list should be more properly titled "Top 10 Beginner C Mistakes". Most would be exposed by lint or any halfway decent programming editor with syntax highlighting.

I am ambivalent about learning assembly first. I'm not even sure it's necessary to learn C nowadays, but then again I prefer to leave memory management and pointer handling to the machine.

doug in Seattle
0 Votes
+ -
I don't know about learning
alaniane@... 9th Apr 2008
Assembly first, but it is definitely advantageous to learn Assembly regardless of what language you use. To be fair though every language has its gotchas. Even VB.net as simple as it is has several gotchas. I've been burned by an expression like this:

iif(x=0,0,y/x)

in c if you write
if you write: x==0?0:y/x;
the y/x will never get executed if x is zero; however, vb evaluates both expressions regardless of the value of x so that you end up with a runtime execution. Also enums in vb have given me headaches since the default toString() for the enum is to print the label and not the value. You have to cast the enum to the value type to get it to print out right.
0 Votes
+ -
Assembly?
Erik Engbrecht 9th Apr 2008
Real men don't need no stinkin' assembler! Real men just
need ones and zeros.

...and REAL CS programs teach machine language, tell you
what an assembler is, and then tell you to go write one!
0 Votes
+ -
Assembly first
Mark Miller 10th Apr 2008
Assembly gets you familiar with the mechanics of what C is really doing. This was important in the days when K&R C was the standard everyone used (back when I was in college). The ANSI-based C today acts more like a HLL than K&R did, but still assembly is helpful, because it'll help you understand why, for example, you can assign an integer to a char variable, and why it works. You'll understand how the call stack works. You'll understand pointers really well, including pointer arithmetic. One of the more important lessons you'll learn is that there are different sized memory slots that you can put values into, and you'll see that these different sizes correspond to the types you have in C:

byte = signed char
word (16 bits) = signed short
double word (32 bits) = signed integer, long, or any pointer

I tried to match these up as best I could. Maybe the designations are out of date, but you get the idea.

Since there's no memory protection in assembly language, it'll help you understand why it's necessary to check the bounds of data you're moving around between memory spaces in C.

I would say assembly is helpful but not as much for C++, because you tend to deal more with references and less with pointers, and objects and vtables instead of variables that are stored in memory slots.

The way I thought of C almost from the beginning was as a high level assembly language. Once programmers see it that way I think they'll use it more wisely.
0 Votes
+ -
Personally, I think any software engineer
alaniane@... 11th Apr 2008
should learn Assembly. They don't have to be proficient in assembly; however, Assembly helps you understand how the computer works. That's useful for both developing and testing programs. It makes a poor automotive engineer who has not learned how a combustion engine works. He may not have the same familiarity as a mechanic, but if he's going to design a user-friendly auto, he should know the basics. Assembly helps you understand the basics on how your code is being executed.
0 Votes
+ -
Then learn reading the Java ByteCode
PhilippeV 11th Apr 2008
Learn reading the Java bytecode produced by your java compiler. It will be instructive. Reread several times the JVM specs, and learn how the data flows in your Java programs between local variables and how they get mapped to native registers. Learn the side-effects of load and stores in Java, and the constraints that the JVM enforces to ensure fully predictable program results including in multithreaded applications and in presence of exceptions.
You'll learn lots of things about the way you can really improve the performance of your Java application.
Learn also the way the Java GC works, and how you can benefit from writing and using your own Java ClassLoaders to enforce evn more the security and strong isolation of applications in a shared application server.
If you have learnt the assembly language several years ago, learn it again with the modern processors that have multiple parallel pipelines, because the Java VM uses them extensively and optimize your code according to the fully specified VM constraints. If you don't care, your Java application will have to run with lots of wait states and misuse of internal fast processor caches...
Thanks to the VM specs, the Java language allows full control by the programmer of such aspects. You'll get optimizations that are also portable across environments (not the case with C/C++ or Native-Assembly optimizations that behave badly on other platforms or processors, so that the same code needs to be rewritten and optimized for each of them).
Thanks, Java platforms embed very solid performance analysers that can be run transparently of the application: this is the same code that you'll debug and finally run on the target platform, there's NO need for separate builds.
If you're adventurous, you'll learn to generate runnable Java ByteCode directly from your application, and you'll be able to test it in your application within a very secure sandbox (using your own ClassLoader). That's something that is notoriously difficult to do in C/C++, if your runtime-generated code needs to get the *same* level of performance of your existing C/C++ code: it requires very system-specific APIs to manage the memory and the processor's state. In Java you can do that, andthis code will use standard APIs that are also portable on all systems and VM environment (except MSVM which is NOT Java).
0 Votes
+ -
AL
atari8bit@... 20th Apr 2008
Back in the days of Mode 13h I was more than happy to write code and watch it FLY. Now with all the CPU registers and closed source for Video cards....well I'd have alot of trouble and have to pretty much relearn.

But yes, it made a big difference then. There's nothing I'd like more then re-writng Crysis in machine code and see what happens
0 Votes
+ -
Ya'll are my type of programmers
storm14k 8th Apr 2008
I wasn't then but I'm very happy now that I had to learn C and assembly. You can easily spot those that didn't when they complain about languages or IDE's.

And motorcycle riding DID improve my driving.
0 Votes
+ -
Agreed
murph_z 7th Apr 2008
Of course it depends on what you mean by "business applications". I like to use 4Gls for those - but the 4Gls are usually written in C.

I think it's a "horses for courses" situation. C isn't the right tool for all jobs - but neither is java.

Roger likes ada but I've never used it - on the other hand I dispise both cobol and fortran and have used pl1 (which sucked) so I suppose I've avoided ada for heritage reasons. Maybe not too smart...
are written in C, including Solaris. Linux being the largest cooperative development the world has ever seen. The newer C compilers are getting much better and catching lots more errors, but, I do understand the dangers of C . . . .

Java is still probably the best choice for enterprise applications. Myself, I am partial to C++.
0 Votes
+ -
My example...
Erik Engbrecht 7th Apr 2008
...was most certainly not a business application.
0 Votes
+ -
A well written Ada program
Roger Ramjet 7th Apr 2008
requires few or no comments. Ada is basically function/procedure calls - and reads like pseudo-code for algorithms.

What I don't get is that with Ada using so many context switches, how come the only place it has gained traction is with real-time?
0 Votes
+ -
Of course with C it's possible to write a slow program still, such as one dumb SQL statement annihilating any code advantages.

Ruby is great 'cos you type in what you want the program to do and it just does it.

Erlang, I had a good look at it, poked it, played with it and eventually just thought nah you're alright, I'll pass on that one.
0 Votes
+ -
I've also played with Eiffel. Good!
PhilippeV 10th Apr 2008
If there was a better language than Java to choose (only to speed up the development and make cleaner code that requires less change in the code if you want to change something in one place), I'd go with Eiffel, because it's also so clean that such changes will be more easily isolated.

Anyway, every OO-language should really focus on the architecture design that is ALL within the interfaces. Classes are part of the lower layer of implementations, and should be transparently replaceable.

The beauty and magic of Java is in its interfaces, not necessarily in its classes implementing them. But it's true that Java would merit an encapsulation of the concept of "properties" instead of having to write and use getters/setters that the language does not enforce itself (such enforcement is provided by frameworks, notably those based on EJB / beans), and serialization. However, most IDEs offer help or code generators for these basic features, so it's just a matter of more lines generated, but it's certainly not something dificult to read as these code fragments come so frequently that they are almost always the same (that's why their code generation can be automated, without degrading the code readability).

Note: I've got more than 20 years of C, 15 years of C++, 10 years of Java; I have also worked with VB, assemblers (various including microcontrolers), and lots of other languages (notably Ada, Forth/PostScript, Fortran/Basic/VB, COBOL, PHP, ..;).

I also use .Net since 5 years (but I'm fed up with the way the CLR is so badly architectured). May be I'll come back to .Net when its platform will support *standard* Java (not J# or the outdated, incompatible and very slow MSVM). But I would be ven more pleased if .Net compiled applications were allowed to run in a standard JVM (But I have real doubt this will work, because the .Net VMs are too much dependent on the background OS, especially Windows, and incompatible with each others, including on the same platform with distinct versions: just wonder why Windows has to support simultaneously at least 3 distinct versions and why you need to run all of them constantly, and why they need to be upgraded simultaneously with Windows Update. What a mess! This is really not made for ease of deployment on application servers).
Because it's frequently the only way to do what you need to do. There was a reason that 3 million line Ada project had 30k lines of C in it, at a guess it was because Ada couldn't do what the C did.

And, BTW, I'm usually more or less in my right mind, and I write my apps in C, and have been doing so for almost a quarter of a century. Certainly C can be a dangerous environment and takes a lot of experience to code without causing problems, but it's by far the most powerful language out there--there's a reason it's used, exclusively, so far as I know, to write kernels.
0 Votes
+ -
I think that was one of the best parts of the C learning curve.

Doing some deterministic fly by wire stuff (CanBus) was probably the most interesting thing I ever did with it ...

Downside : Some of the libraries that you want to use can have really weird interfaces or callback mechanisms ...
0 Votes
+ -
More to the point...
Henry Miller 7th Apr 2008
...C allows you to know precisely what your data structure looks like, something Java hides under the covers. Sure, you don't always need to know the details of a struct, but it sure comes in handy sometimes.

And, yeah, there's a definite lack of consistency in the C libraries, but that's slowly fading as POSIX-compliant libs and the like displace older libs. (But, OTOH, Java's not all that consistent either--even after years, on and off, of coding Java, I still can't keep straight when I need whatever.length vs. whatever.length() and things like that.)
0 Votes
+ -
Try a decent coding editor then
SnoopDougEDoug 9th Apr 2008
Any decent coding editor will give you whether you are trying to access a property or method when you type ".l" after the object instance. Save the brain cells for real issues.


doug in Seattle
0 Votes
+ -
Kernels and compilers
alaniane@... 9th Apr 2008
is what C was designed for. However, that doesn't make an appropriate language to write everything in. Fortran outshines C when it comes to writing engineering apps and Cobol is excellent for writing transaction heavy apps.
0 Votes
+ -
writing kernels
PhilippeV 10th Apr 2008
Of course, OS kernels are still developed in C. There's a reason for it: it is because it can be very near from the hardware, but it is also its weakness: non-portability, lots of maintenance and debugging, lots of difficulties for making it evolve.
And anyway, how many enginners are actively working on developing a kernel? Very few compared to the millions working for enterprise applications and web services.

Development in C is growingly becoming a niche-market for very delimited domains or very small applications. It does not integrate very well with the development of application framework, as the code is almost unverifiable (except by the humane coders themselves). IT is also difficult to transmit the C project to other developers and difficult to work in teams for large projects. Its development cost is also higher (due to much longer and more difficult debugging), so it survives only in applicaitons that will be very widely deployed, like OSes where this cost is easily divided by the wide number of installations.

I'd also say that every utility library that has been developed in C, using lots of incompatible conventions (including at the source level where each project adopts its own conventions) in the various software components that make their mutual integration difficult, tricky or inefficient, is available in Java. But if you still need something that you can't do in Java because it requires things that are specific to a OS, you still have JNI for interfacing with your utility C/C++ library, and Java offers a good isolation mechanism for allowing these interfaces to be well delimited with minimum dependencies.
0 Votes
+ -
Coupling, Cohesion, and Java
Erik Engbrecht 7th Apr 2008
"Java completely violates the Coupling/Cohesion rule of
software quality. A "module" in Java consists of 5/6+ files
containing interfaces, beans, functions, etc. This makes for
low cohesion (BAD!)."

...and all the files go into one directory, called a package.
I don't think the one-source-file-per-class rule affects
cohesion at all. Cohesion applies to how the classes relate
to each other and consistency within a module, not to how
they are stored.

"All of these files also need to be connected to each other
plus those "frameworks". This introduces a high degree of
coupling (BAD!)."

Coupling is a more complex topic. What you're really
complaining about here is the tendency of Java "architects"
to introduce a pile of dependencies. This coupling isn't
inherently bad. It depends on how much the frameworks
provide, and how they affect the cohesion.

Often times using several frameworks/libraries from
multiple sources can significantly decrease your cohesion.
This can be anything from style to using different support
libraries - such as XML, regex, logging, etc.

This problem applies to any language with a substantial
base of frameworks and libraries. It can happen in C/C++,
too, and is often worse because the standard libraries are
so anemic in those languages. Also, you get awful
incompatibilities such as using custom allocators
(replacing malloc/new), different memory-ownership
transfer protocols (which piece of code is responsible for
freeing a chunk of memory), etc.

The problem happens more in Java because its clean
memory semantics and large standard library make it so
frameworks/libraries are much less likely to have
substantial incompatibilities than in C/C++, so they have
been able to proliferate much faster and focus on narrower
bands of functionality. A C/C++ framework will usually
contain everything and the kitchen sink and have very few
external dependencies, while a Java one will usually
depend on half a dozen or more other libraries.
0 Votes
+ -
Cohesion and Coupling
DevGuy_z 7th Apr 2008
I may be missing something but in my estimation you are confusing some things. Code layout in terms of how many files per module etc. has nothing to do with coupling and cohesion. I don't think languages are the issue. Developers are the issue.

Coupling and cohesion is in regards to classes and methods and not to binaries which may export many classes and methods.

For example, C# supports the partial keyword which allows a class definition to span multiple source files. Now obviously this could be abused, but as long as the class minimizes dependencies on other classes (low coupling) and represents a clear representation of single object reality (high cohesion) it doesn't violate the rule. Such code will be testable and maintainable.


Architectural design and packaging have different goals and principles. Those vary depending on the size of the team, the amount of parallel development, convenience vs. performance, and other factors.

In my view, the UNIX way of a source file per method had nothing to do with cohesion/coupling. It was simply a way to minimize compile time which at that time was more valued than convenience. This is a trade-off issue.
0 Votes
+ -
Gotta think
Erik Engbrecht 7th Apr 2008
I think your argument is wrong on many levels, but it would
take some time to properly address it. We'll see if I have
some time this evening...
0 Votes
+ -
Clearing the way for .Net
Anton Philidor 7th Apr 2008
Java gives the impression of being geological strata of past solutions. If Sun were still able to make money on Java instead of donating it to IBM, with a license of forlorn hope, a new version, simplified and optimized, might hold off .Net.

Java needed a Mr. Allchin, someone willing to "take hits" (as he referred to it in an interview about Vista) in order to rationalize the code and instead found a Carlo Ponzi, extemporizing continuously.

May I suggest, Murph, that the current condition of Java cannot be discussed without the context of how Sun managed a valuable property. The politics, as often, outweighed quality.
0 Votes
+ -
They need unsigned byte.
CobraA1 7th Apr 2008
One thing that really gets me pounding my head time and time again is the lack of unsigned data types (especially the unsigned byte).

It's insane. It makes accessing binary data and performing encryption and decryption much harder than it should be.

. . . and if you want something enormously complicated, just look at Microsoft's APIs and libraries. They'll make Java look trivial in comparison.
0 Votes
+ -
Java for Business
t_mohajir 7th Apr 2008
I agree with some of the conclusions, but I think Java is still a far better language for your run of the mill business application than C or C++. There are way too many incompetant developers out there, and managed languages like Java and .NET protect them from their stupidity/ignorance somewhat.

Also, I've been developing in Java for businesses for quite a while now, and have done some .NET development as well. The most striking issues with using Java when writing business software are the complexities involved in dealing with dates and money. Just about every business application deals with money and dates, and either performs calculations or enforces rules based on them. In my opinion, those libraries are painful and need a complete re-write. From my experience, .NET development is often faster than Java development simply because it is a bit better in both of those areas.
0 Votes
+ -
What the right language is depends on your assumptions about the appl and its delivery.

With something like Sun Rays a late 80s 4GL blows everything else away on all measures: performance, ease of development, re-use, etc

With web delivery, I think PHP sucks against many criteria but is the best overall choice wink

And so it goes.. pick a model and an application and it's possible to pick a development toolset that makes sense - but there's no do everything for everyone option right now. Not Java, not C, and certainly not something as proprietory as dot.net.
0 Votes
+ -
Hard to get dates and money right...
Erik Engbrecht 7th Apr 2008
I've never seen an implementation of either that I've liked,
although the standard two date/time components (Date and
Calendar) in the JDK is probably one of the worst...
0 Votes
+ -
So where's your implementation?
SnoopDougEDoug 9th Apr 2008
I get tired of folks complaining about components, but never step up to show how they would do it. Why? Because it's d*mmned hard. Want to create your own Date component? Ok. Don't forget to figure out how to compute Easter every year. And Unicode support. Formats--is 3/4 March 4 or April 3? And Money. Again Unicode, format (the Euro symbol for which countries?), comma versus period separator.

My solution has always been to create my own classes where I handle the tricky bits by abstraction. Throw TODAY at the static method "string getShortDate()" and I'm good to go.


doug in Seattle
0 Votes
+ -
Well, I wish you were right,
peter_erskine@... 7th Apr 2008
but badly produced java apps are pretty rife, and they're unreliable. Memory leaks are commonplace, sockets die, things just stop working and the supplier company can't say why. You get into a situation where you have to keep rebooting Unix servers as though they were Windows.
0 Votes
+ -
Poorly written apps
t_mohajir 8th Apr 2008
You can write an application poorly in any language. My point is basically that a clueless developer can do more damage with a language like C because of it's inherent flexibility. Managed languages like Java to some degree protect developers.

For example, from a security perspective, buffer overflows are pretty much a non-issue in Java, unless it is the JRE itself which is affected (i.e. the native code within the java runtime environment). And code within the JRE is not really the application developer's problem to fix. It's the JRE vendor's problem (Sun,IBM,etc).

Similarly, garbage collection works pretty well most of the time to protect you from memory leaks. But it isn't a silver bullet by any means, and static collection classes that refer to objects are often the biggest culprits when an object doesn't garbage collect properly. Still, the situation is a lot better than C where all memory has to be freed up explicitly.
0 Votes
+ -
Although I wished languages
alaniane@... 9th Apr 2008
that used garbage collection would allow bypasses for special purposes. I haven't used Java in a while, but with .net I run into the garbage collector not collecting fast enough. It creates real problems when your running your app through Citrix.
0 Votes
+ -
Java is a mistake,...
Henry Miller 7th Apr 2008
...a giant mistake!

It may be okay for small apps, but in any real-world app of significant size it quickly becomes apparent that the coding paradigm it imposes is simply too rigid, resulting in code that's obscure to the point of unreadability and ridiculously inefficient. The simple, single-inheritance hierarchy of Java just doesn't match the real world, an implicitly complicated, messy, place.
Java is still the premier enterprise language, and it will be many years before anything gets close to it. .Net will never be better than Java, the best Microsoft can do is play catchup with open source, as it cannot otherwise keep up with the pace of open source innovation. nHibernate? nSpring? How pathetic. Give it up, just use the real thing, Java!
0 Votes
+ -
To the contrary...
Henry Miller 7th Apr 2008
I wasted a couple of years on Eclipse, wherein the single greatest impediment to getting anything done was the rigidity of Java, and am presently involved in a large Java-based project that looks like it's about to abandon Java due to it's inadequacies and migrate to C/C++.
0 Votes
+ -
Good luck
jslarochelle 12th Apr 2008
I really mean this because the probability that Java is the problem is very small (even not knowing anything about the project).
If I were the technical lead on a project that was using Java and I really thought that Java was inapropriate (there are very few cases where it is inapropriate) I would carefully study the problem and consider every other possibility before switching to C/C++. Now, don't get me wrong I have done a lot of programming in C and several project in C++ (some using frameworks like: Borland Turbo Vision, OWL, VCL and a one using MFC) so I can program in C++ (I still use C++ for some projects or components). However, in the hands of many programmers C++ is a loaded gun that can quickly get you in trouble.
Before turning to C++ I would look at other options. Without knowing exactly what your problems are it is difficult to give precise suggestions but knowing that you already have a lot invested in Java code I would start with looking at Java platform alternatives:
1) Groovy as limited Mixin capability but might be sufficient for your project. It has good dynamic capabillity that might help you with your problems.
2) JRuby has full Mixin capability and even better dynamic programming support.
With both of those options you would be able to switch the code base gradually. With both of these you will get a performance hit however (less with Groovy).
If these options are not satisfactory I think you should consider anything else before C++ (C#, etc...). Unless all your programmers are top-notch C++ programmers.
JS
0 Votes
+ -
Java inheritance
Erik Engbrecht 7th Apr 2008
You can emulate multiple inheritance in Java using interfaces
and composition/delegation. The big difference is that
you're doing the composition/delegation yourself with Java,
so it is explicit, rather than having the compiler do it for you.
0 Votes
+ -
I'll probably get crucified for saying this,
peter_erskine@... 7th Apr 2008
but when a program just needs a procedural approach (subroutines), trying to force it into a series of "objects" is pretty difficult. The need for OO hasn't been convincingly shown, for many real-world situations.
0 Votes
+ -
Net Framework etc
atari8bit@... 20th Apr 2008
I put Netframework 1.1 on and immediately there's a patch. Now it's up to 3.5 and it's not installed yet. That bothers me.

Yes, Windows needs to be done over 100%. But M$ won't do that. We can all wish for this but the problem of listening to your clients is NOT a M$ option.

Join the conversation!

Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]
ie8 fix

The best of ZDNet, delivered

ZDNet Newsletters

Get the best of ZDNet delivered straight to your inbox

Facebook Activity

White Papers, Webcasts, & Resources
ie8 fix