Slashdot Mirror


It's Time to 'Re-Align' the JCP?

jgeelan writes "The original glorious premise behind a J2EE container was to abstract multithreading issues, server memory management, wire protocols, and so on, from Java programmers and allow them to focus on implementing solutions, not server infrastructure. Yet in the current issue of Java Developer's Journal, the director of technology at Personified Technologies, Jason Weiss, has lit a flame under J2EE, the jewel of the Java specification crown. The spec, writes Weiss, is too complex. As a community Java developers must pay attention to the beleaguered JCP process and realign it with creating solutions, like those routinely released by the Apache Software Foundation. Weiss argues that by taking steps now, Java developers would be investing in the future both of Java and the community that has grown up around Java. 'The entire JCP process must thematically reflect our desire to build solutions that simplify complex technologies for programmers,' Weiss continues. 'In fact, the JCP process should continue to use the JSR acronym, but with new meaning: "Java Solution Request," he adds. 'Somewhere during this journey the JCP has shifted from its solution-oriented roots to merely implementing specifications. This trend must be reversed ... for the sake of our community.'"

79 comments

  1. about damn time by sydlexic · · Score: 2, Interesting

    J2EE is vendor slop. Not only is it overly large, but simultaneously incomplete. The abstractions are useles in the real world because they were designed for the very special case of JDBC databases. And when XML or any other du-jour technology came floating by, they were thrown in, too. Not because it necessarily made sense, but because one or more committee members had a vested interest.

    The things that J2EE aims to accomplish can be (and have been) done with far less in a more architecturally palatable (read sensible) and scalable way. Please, please. I hope J2EE dies.

    1. Re:about damn time by MrBlack · · Score: 2

      I'm not a Java Bigot (tm) - I'm not even a Java developer actually, but I am interested in what technologes you (or other /.ers) consider equivalent to J2EE. The only one I know of that offers similar services is MTS err... COM+...sorry Enterprise Services from M$ (when will those marketting guys ever make up their minds).

    2. Re:about damn time by Anonymous Coward · · Score: 0

      Actually, the .NET platform would be the closest analogy to J2EE and it remains to be seen whether it can truly compete in the J2EE realm.

      However, when you boil all these technologies down to the core you end up with the idea of component based services. Big fscking deal. May the product that provides the best all-around support for easy enterprise application development and deployment win.

    3. Re:about damn time by Anonymous Coward · · Score: 1, Insightful
      The abstractions are useles in the real world because they were designed for the very special case of JDBC databases.

      Yes, because as we all know, relational databases are not part of the "real world" of the enterprise middleware.

      Moron.

    4. Re:about damn time by battjt · · Score: 2

      Actually, with the size of J2EE, the cost of figuring it out is greater than the cost of implementing your own services from scratch.

      I've found that building my own server, but using some of the simpler protocols like JMS, JDBC, the whole XML set is easier than trying to fit my logic into a J2EE server.

      You need a server to answer JMS requests?

      while (true) {
      process(queue.receive());
      }

      You need to to answer multiple messages in parallel?

      while (true) {
      final Message message = queue.receive();
      new Thread(){
      public void run() {
      process(message);
      }
      }.start();
      }

      What is hard about that? Why do I need a billion dollar copy of WebSphere for that? And that is what I have seen companies using WebSphere for, because that is what IBM is seller J2EE for.

      I think that the important technology is the low level APIs, not the server chunk of J2EE. And MS does have good APIs that perform the same function.

      Joe

      --
      Joe Batt Solid Design
    5. Re:about damn time by mattc58 · · Score: 0, Troll

      I'm telling you, .NET makes it tough to go back to J2EE. With the combination of a superb IDE, a well thought out framework, superb abstraction from the platform, and performance better than Java, you can't go wrong.

      Of course, I'll just be called a M$ lunatic...

    6. Re:about damn time by liloldme · · Score: 1
      No, you'll be called the idiot who bound their software to a single vendor OS and Intel hardware.

      That's about the most stupid thing you can do at the server side.

    7. Re:about damn time by liloldme · · Score: 5, Informative
      Why do I need a billion dollar copy of WebSphere for that?

      You don't. You use JBoss. Why would you build your own server from scratch when you can already customize and extend the JBoss core server as much as you need (be it for J2EE purposes or not).

    8. Re:about damn time by mattc58 · · Score: 0, Troll

      Idiot, lunatic, blah blah blah. You guys kill me.

    9. Re:about damn time by battjt · · Score: 2, Insightful

      Did you not understand my post? There is nothing to a Java server. Why use JBoss if all you need is those code snipets that I posted?

      We had a home grown web server that was extremely secure because we hard coded the only two files it would serve. It was small and fast. It was less than 100 lines of code. Management required that we junk it and install Apache. Apache's configuration file is over 600 lines! I have the same problem with the rest of the J2EE server infrastructure. Normally what comes prepackaged as 10,000s of LOC can be written from scratch for my specific domain in a couple dozen LOC. I can completely understand those couple dozen LOC, where as I have a rough time understanding just the configuration of Apache, WebSphere, JBoss, etc.

      --
      Joe Batt Solid Design
    10. Re:about damn time by liloldme · · Score: 1
      Did you not understand my post? There is nothing to a Java server.

      I guess there's nothing to a server in case you don't need pooling, caching, transactions, security.

      But then your server sucks hairy old goat balls.

      that was extremely secure because we hard coded the only two files it would serve

      Ahhh! All middleware problems solved! Congratulations.

  2. Specifying Java by fm6 · · Score: 3, Insightful
    The problem with Java specification is the same as with so many other aspects of Java. It's a question of ownership. Sun wants to own Java, period. Their feud with Microsoft is as much about not wanting to accept criticism of AWT as anything. Oh yeah, they have a "community process" that's supposed to make for non-Sun involvement in the product. It even succeeds to some extent. But mostly, the process is dominated by Sun's culture of possesion.

    This is not just a matter of corporate policy. When I worked at JavaSoft, I actually met people who would not distribute their specifications in editable format, for fear of losing control of same.

    1. Re:Specifying Java by JasonRWeiss · · Score: 0, Offtopic

      And you can't forget to mention IBM when you talk about Sun "wanting" to own Java. Just think about the name of IBM's open-source IDE Eclipse. What is eclipsed? The Sun. Jason Weiss Personified Technologies, LLC. http://www.getpersonified.com

    2. Re:Specifying Java by liloldme · · Score: 0, Offtopic

      Eclipse is a fucking IDE, how does that bear any relevance to the J2EE spec.

  3. Oh please... by Anonymous Coward · · Score: 4, Insightful

    Overly large, my ass. We're talking about server-side here, not client-side apps (where I'll admit, Java is far too large). Since when has providing a full feature-set been a problem for a server-side app? A development project with an intelligent architect will pick from the best of the J2EE apis (who needs to know about message beans if you're not going to use them?), and ignore the rest. Follow that standard, enforce it amongst the team of developers, and the 'overly large' API isn't going to be a problem.

    1. Re:Oh please... by Anonymous Coward · · Score: 0
      (who needs to know about message beans if you're not going to use them?)

      Answer: the people who need to consider all options and use the best available. What your saying is nearly as bad as saying you shouldn't read about sax based parsing if you're going to use dom based parsing. Of course you should, otherwise you don't really know for certain that you shouldn't used sax based parsing. Even if the point of message beans is completely irrelevant to your application you need to read a paragraph (maybe a page) on it to know it's irrelevant. The more relevant the technology seems to be, the more you need to read about it. The relationship is near exponential towards the low relevance section and then starts to plateau towards the middle and high end of relevance. So if it may be applicable you should read (relatively) almost as much as if it were the technology you're definitely using.

  4. Whats interesting is also that by javastylz · · Score: 2, Informative

    These guyz arent the normal M$ biggots. Looks like Personified Technologies is an ISV who actually bets their business on Java. Just very interesting to see some self-criticality and not ranting from the M$ sloths.

    js

  5. IDE is the missing link by adamy · · Score: 1

    What Java needs is a good IDE.

    I'm working with Eclipse on Solaris; Dog slow. not sure why.

    I love IDEA from intellij.

    But neither of them allow WYSIWYG jsp development coupled with Automatic definition of Data bindings.

    Maybe Dreamweaver MX will get it right.

    --
    Open Source Identity Management: FreeIPA.org
    1. Re:IDE is the missing link by HFXPro · · Score: 1

      Its because its coded in Java. Everything major in Java which requires a gui is extra slow. I don't think anyone can fix this short of coding a Java compiler in some native compiling language such as C\C++. Now there is an interesting thought, would it disrespect Java to have its IDE built in another language.

      --
      Reserved Word.
    2. Re:IDE is the missing link by zaqattack911 · · Score: 2, Informative

      It doesn't disrespect java.. it just puts java in it's place. Java is a terrific server side , and web-based, and distributed OO language. (hense j2ee being the topic) As far as speed client GUIs go, java swing sucks goat nuts. Dunno why.. it just does. if I were to right a client side app (in windows), I'd go for .NET / C#. It's as easy as swing... and much much faster and cleaner. --noodles

    3. Re:IDE is the missing link by steve_l · · Score: 2

      hey, have you tried an early access version of IDEA3.0? Great JSP editing, even refactoring inside jsp code -not that that is ever a good thing.

      good point about data binding though. JSTL is not the answer, at least to me.

    4. Re:IDE is the missing link by liloldme · · Score: 1

      Eclipse does not use Swing....

  6. J2EE is the C++ of our time by melquiades · · Score: 5, Insightful

    J2EE, the jewel of the Java specification crown

    Oh, come now. The jewel of the Java spec crown is the JLS itself -- Java's a gorgeous language (complaints from Lisp and Smalltalk purists aside), it's the language itself that won developers' hearts, and it's the language itself that underpins the good work of all the other specs.

    J2EE is nobody's jewel. It's more like what C++ was about 15 years ago -- big, ugly, stinky, convoluted, overfeatured, overspecified, yet still incomplete, and works best if you just pretend that certain parts of it just don't exist ... but it does the job, it's practical, and the industry's behind it. Like C++, J2EE opened up a whole world of options that were reserved for elite programmers and academic researchers before it came along (J2EE opened up distributed computing much as C++ opened up OOP).

    And, like C++, in about 10 years somebody will come along with something much better that looks like the vague picture of perfection we all almost have now, something cleaner and smarter, which picks the right problems and solves them well -- something that does to J2EE what Java did to C++.

    The question is, will that something in 10 years also be a specification based on the Java language? That's what I think Jason Weiss's questions may really drive at. And I'm not willing to take guess at the answer.

    1. Re:J2EE is the C++ of our time by battjt · · Score: 3, Insightful

      I don't like the language, but it is better than anything else out there.

      - why are packages and classes treated differently? They are both just namespaces.
      - Why can't I 'Object i = 5;'? There should be a 'void*' type.
      - Why can't I 'Method m = Object.toString;'
      - Why can't I
      Object f(String s) {something(s);}
      Object f(List l) {somethingelse(l);}
      void main(String [] a) {
      f(a.length == 1
      ? a[0]
      : Arrays.asList(a));
      }
      and get the right method called!?
      - Why can't I 'import java.util.*String*;' or 'import java.*.*;' ?
      - Why do we have 'new' instead of alloc and init? ObjC/NeXTSTEP used '[[MyClass alloc] init]' seperating the process of allocation from initialization. It would even allow MyClass to return an instance of a different class, so if you need to make a short term change to the system (ie. replace all occurances of MyClass with MyClass2), just change MyClass.alloc to return a new instance of MyClass2 instead.
      - Why aren't static methods inherited?
      public class MyClass1 {
      static MyClass1 alloc() {}
      }
      public class MyClass2 extends MyClass1 {}
      public class Main {
      public void main(String [] a) {
      MyClass1
      arg. And these are just off the top of my head.

      Joe

      --
      Joe Batt Solid Design
    2. Re:J2EE is the C++ of our time by acroyear · · Score: 5, Informative
      Actually, the language itself isn't the greatest. It won over c++ developers because of 3 reasons : a standard network library, closely tied to a (reasonably) well-designed, truly OO I/O library; a standard GUI api that worked across platforms, and considerable simplicity and code-readability over full-effect-templates in C++ (read Alexandrescu's Modern C++ Design recently?).

      A fourth capability, in the first released version of java, but not used to its fullest capacity until Java2, was the use of "interface" over abstract base classes as a means of building frameworks in the newer library components such as JDBC, Collections, and XML. C++ always had this, but "interface" is a much simpler syntax and means of expression verbally over "abstract base classes with only pure virtual functions" (the C++ version of a Java interface). Also, newer C++ libraries and designs tend to rely on templates and traits to enforce an interface (ala generic programming) rather than class design, because its easier to just write a class than to design a hierarchy -- java's "interface" took the hierarchy out of places it didn't need to be).

      Now, one of those ended up an utter failure (AWT), and its replacement (Swing) though amazingly more successful as far as design and power goes, is as noted dog-slow (though its something that does get faster as machines get faster; moore's law does help Swing considerably). I personally love swing just because (when used properly) the WORA DOES work (layout management is the #1 problem for almost every bad interface out there, and that's not unique to swing; i recall a lot of bad motif layouts too from windows programmers not used to Xt's approach); also, the power in using renderers for complex components and dividing up responsibility of showing the look vs managing the data, is something i miss in any other gui library out there.

      The second, the standard networking library tied to the I/O library, remains its brilliant point and the basis for Java's most successful libraries and projects, including all its server-side work. Bjarne is most impressed that the standard socket + stream library that works on ALL platforms (its the one that's most reliable in that respect of WORA) that he's planning to propose a standard socket interface to C++, though I think its now too little too late. I'm not saying that java.net and java.io aren't flawed. The use of abstract base classes for Socket and URLConnection, which likely dates to before the interface keyword was introduced is a "bad thing"; java.util.Dictionary was like this as well, but at least that's been deprecated out. Similarly, java.nio addresses most of java.io's problems, but at the considerable cost of code simplicity; if you need java.nio, it'll take a lot of time and work to use it correctly, and few books and articles are really making it clear when you actually need it. In the early stages of new technology, the "how do i use it" well-buries the "when do i need it" question.

      The language itself has remained simple, with only 2 partially-incompatible changes over the years (inner classes including anonymous, and assert), and this may be its one saving grace against C# (which has a more complex syntax, but currently a much simpler library based on a cleaner syntax to most of MFC -- that will change in the future as M$ will always code-bloat their products).

      The "interface" syntax is to me still Java's most powerful feature; again not in that it provides any more capabilities over C++'s abstraction (as i worded it above), but by being so simple, did more to improve inexperienced developer's OO code than any other OO syntax out there (IMHO). I'm not suprised at all that C# also chose to keep the interface keyword.

      --
      "But remember, most lynch mobs aren't this nice." (H.Simpson)
      -- Joe
    3. Re:J2EE is the C++ of our time by melquiades · · Score: 5, Informative

      Why can't I 'Object i = 5;'? There should be a 'void*' type.

      You don't want a "void*" type; you just want int and the other primitives to be fully privileged objects (subtly different). This is probably the most common criticism of Java, and it's reasonable. There are also reasonable arguments for having primitives apart from objects, however. They didn't do this without some thought. Still, I lean toward your opinion on this one.

      Why can't I 'Method m = Object.toString;'?

      Reasonable -- it's a little shorter than Method m = Object.class.getMethod("toString", new Class[0]). But it's not a big issue -- in most cases where you'd use that, an interface paired with an anonymous inner class is more appropriate (and typesafe).

      Why can't I [stuff] and get the right method called!?

      Because that's a pretty wacky idea. Think for a moment about the implications of what you're proposing here -- x ? y : z is an expression...what is its type?

      You could make this work, but would it be worth the hideous mess it would make of the spec to save you from having to type the words if and else?

      Why can't I 'import java.util.*String*;' or 'import java.*.*;' ?

      Because it poses tremendous potential namespace conflict problems with little clear benefit.

      Why do we have 'new' instead of alloc and init?

      Separating instantiation from initialization is reasonable; static factory methods do this just fine, but require foreknowledge of the problem. Such a facility, however, would still need to provide the guarantee that you can't actually obtain a reference to an object until it's fully initialized, which is where a naive implementation looking like like MyClass.class.alloc().init() would fail.

      Why aren't static methods inherited?

      Because that's an absolutely hideous idea. Static methods aren't part of the signature matching that underlies the type system, and don't participate in polymorphism; they are semantically equivalent to methods on the class, not the object (which is how Smalltalk does it).

      I'd add to your list the lack of generics (which they're working on) and some of the unpleasant aspects of the memory model on multiprocessor machines.

    4. Re:J2EE is the C++ of our time by j3110 · · Score: 5, Insightful

      Large and bloated or not, it's the best thing right now for what it does. It does remove security, clustering, distributed transactions, as well as the hardware abstraction that java removes, from the list of things the programmer needs. This is a complex problem that I can't really think of a better way to solve. If I named all the class libraries there where and said it was bloat and we didn't need them all, I'ld be laughed at, but this guy names several API's that are each useful in their own way. What's he want to do about it? Drop SOAP, RMI, EJB? You don't have to use any one of those to use any one of the other. The average server side programmer isn't going to avoid SOAP or RMI by not using J2EE. All the technologies he mentions don't go away when you don't use J2EE. He offers a lot of critisism with only the evidence that it is complex. If he thinks it's complex now, he should have had to write clustering, distributed transactions, and security for an application. At least then he would be qualified to call it complex. I don't want VB for the server side, it screwed up the client side enough. Sounds to me like the guy needs a book :)

      Where I will attack J2EE is it's redundancy of input. How many times do you have to tell a computer that there is a public function of this bean that people in the role of admin can call? This is just a tool problem though. There are some nifty tools out there (XDoclet, objectfrontier) that help, but nothing that integrates all knowledge of a bean into one single point of access AND comes with a deploy tool to reconfigure the bean.

      --
      Karma Clown
    5. Re:J2EE is the C++ of our time by truth_revealed · · Score: 1

      I agree that a large feature-filled standard library (J2SE not J2EE) was key to Java's success. I would also add that late (runtime) method binding and standard binary class file formats also helped Java tremendously. Extensive run time type identification (reflection) was also key as this filled a hole left by the lack of generics and Java's lack of first-class function pointers.
      I for one wish Bjarne would add all of these features to C++. It's all doable of course, but it goes against his vision of imposing details on C++ compiler implementors and breaking C compatability.
      And one last point - C++'s iostream library has got to go - what a useless, slow, needlessly complicated and unextendable piece of shit that is!
      Ironically, C++'s own IO library is the worst example of design that a new C++ programmer could face.
      At least C++ projects such as Boost are starting to catch up with Java's standard library functionality, so there is hope.

    6. Re:J2EE is the C++ of our time by battjt · · Score: 2

      you just want int and the other primitives to be fully privileged objects
      Yes, but most people don't understand that so I worded it the other way.

      it's a little shorter than Method m = Object.class.getMethod("toString", new Class[0])
      It is also compile time, not run time.

      Because that's a pretty wacky idea.
      Using the types of the arguements for the method lookup is not wacky. Haskell does it. I don't know the right words to use, but it is like polymorphism including the arguments, not just the target. I would save using lots of switch statements that just switch on the type of the argument. I suppose in most cases you wouldn't need it and it would unecessarily significantly slow down the method look up. Not wacky, just dumb.

      Because it poses tremendous potential namespace conflict problems with little clear benefit.
      If I could use patterns for imports than we would put fewer classes in packages and have a bit more organization to the packages. With more packages I could be more selective about what I want to import instead of exact match or package.*.

      Because that's an absolutely hideous idea. Static methods aren't part of the signature matching that underlies the type system, and don't participate in polymorphism; they are semantically equivalent to methods on the class, not the object (which is how Smalltalk does it).

      OK. I guess I just have problems with static methods. This goes back to implementing alloc().init(). You can't do it with static methods. If I could use a subclass of Class then I could add the methods there and be happy (is that the way to do it in smalltalk?).

      I use arrays in cases where I need type safety, though generics would be better. I just hacked up something that is close to generics with Proxy. You still have to specify the interface to the resulting class, but you don't have to write it. This would solve some problems I had with clients that really needed the type safety and needed more complexity than just arrays.

      Joe

      --
      Joe Batt Solid Design
    7. Re:J2EE is the C++ of our time by Anonymous Coward · · Score: 0

      Agreed, Jason Weiss doesn't appear to be very knowledgeable of J2EE or the problems it tries to solve. It may not be perfect today, but it sure beats the alternatives we had to deal with in the past!

    8. Re:J2EE is the C++ of our time by melquiades · · Score: 4, Informative

      Using the types of the arguements for the method lookup is not wacky. Haskell does it. I don't know the right words to use, but it is like polymorphism including the arguments, not just the target.

      Java does use the types of the arguments. For example, the following will do what you want:

      Object f(String s) {something(s);}
      Object f(List l) {somethingelse(l);}
      void main(String [] a) {
      if(a.length == 1)
      f(a[0]);
      else
      f(Arrays.asList(a));
      }


      The reason the code you posted doesn't work isn't that Java doesn't use the compile-time types of the arguments to resolve overloaded functions. Rather, it's that x ? y : z is an expression, and it needs to have a single type. What is that type in your example? Do you want expressions to have a set of possible types, like {String,List}? That's what I was saying would play hell with the spec. Or do you want the expression to have the type Object, and have overloaded function resolution use runtime types? If so, you lose a lot of compile-time type checking.

      The reason Haskell lets you do this is that it's much more weakly typed than Java. Personally, I like the strong typing, and I think the inconvenience here is minimal.

      I guess I just have problems with static methods. This goes back to implementing alloc().init(). You can't do it with static methods.

      Actually, you can. What you're looking for is the static factory method pattern. Here's an example that returns a single shared "empty instance" of a class if an argument is null or empty:

      public abstract class Thinger
      {
      public static create(String thingerValue)
      {
      if(thingerValue == null || thingerValue.length() == 0)
      return EMPTY_THINGER;
      return new Thinger(thingerValue);
      }

      private static final Thinger EMPTY_THINGER = new Thinger();

      private Thinger() // empty thinger ctor
      { ... }

      private Thinger(String thingerValue)
      { ... } ...
      }


      You then say Thinger.createInstance("foo") to use it. The static method takes the place of your "alloc", and the constructor is the "init". You can also use this technique to return a subclass of Thinger; give the subclass a package-private constructor if you're worried about outsiders instantiating it.

      I think this does everything you want. The only problem with this technique is that you have to know that you're going to do it ahead of time -- you can't retrofit a constructor as a static factory without breaking the API.

      generics

      Your proxy thing is nifty at a glance. Generics are supposed to be there soon -- quite possibly in 1.5 -- and promise to be good.

    9. Re:J2EE is the C++ of our time by battjt · · Score: 2

      At runtime, Java has to look up the method based on the target type and the signature(method name, method parameter types). I'm suggesting they could have used the target type and the signature(method name, the real types of the parameters (or super classes)). I also think it would be too slow. My example is confusing in its simplicity. Write a parser. Those huge case statements could be processed by the runtime system instead of explicite switches.

      So how do you instantiate a subclass of Thinger? You write another create method. Wouldn't it be nice of ThingerSubclass.create(String s) called Thinger.create(String s) and assigned this to ThingerSubclass.class so you didn't have to copy and paste the factory method? What is so hidious about that?

      Joe

      --
      Joe Batt Solid Design
    10. Re:J2EE is the C++ of our time by javastylz · · Score: 1

      PMJI but you need to be careful to not create a race state when you use a Singleton pattern like this. You should create a critical section around the if/new region using a syncrhonized block.

      public static Thinger create(String thingerValue)
      {
      syncrhonized(Thinger.class)
      {
      if(thingerValue == null || thingerValue.length() == 0)
      {
      return EMPTY_THINGER;
      }
      return new Thinger(thingerValue);
      }
      }

      js

    11. Re:J2EE is the C++ of our time by javastylz · · Score: 1

      Actually I'm wrong, sorry. I didnt fully read this and thought it was sharing a static instance of Thinger. Blah. One of those days. Ignore me. js

    12. Re:J2EE is the C++ of our time by SimonK · · Score: 2

      - why are packages and classes treated differently? They are both just namespaces.

      Because classes define the behaviour of instances, whereas packages are just namespaces ? The only reason packages exist at all is to break up the class namespace.

      - Why can't I 'Object i = 5;'? There should be a 'void*' type.,

      No there bloody well shouldn't, but there certainly should be type that is a sypertype of both the primitive and the reference types. I would personally prefer something between the "everything is an object" model of Smalltalk, and the automated boxing and unboxing of the .NET languages. The current system is pretty nasty.

      - Why can't I 'Method m = Object.toString;'

      I don't know. It would be a lot nicer, wouldn't it ? Probably because reflection only appeared in 1.1, and changing the way the class namespace worked to allow this would have broken existing code.

      - Why can't I [stuff] and get the right method called!?

      Because Java doesn't do multiple dispatch. It only does static method overloading. The example you give (and multi-dispatch in general) conflicts rather with being statically typed. There are, of course, well known cases where multiple dispatch is useful, but they're not *that* common, and one of the design goals of Java was not to scare C++ programmers.

      - Why can't I 'import java.util.*String*;' or 'import java.*.*;' ?

      Ewww.

      - Why do we have 'new' instead of alloc and init?

      Given that instantiation is not polymorphic, I don't see what the benefit would be. Having said that, it would be nice for instantiation to be polymorphic, but it is hard to do without metaclasses, and once again static typing might get in the way

      - Why aren't static methods inherited?

      They are. If f() is static and visible on X, and Y extends X, you can call Y.f(). It isn't very useful, though, because they aren't polymorphic. A method in X that called f() would always call X.f(), rather than Y.f() even if it was actually invoked on an instance of Y, and Y had another method f() that hid it.

      If that is what bothers you, you really need metaclasses. In languages with metaclasses the class of an object is represented by an instance of a unique class (the metaclass), specific to that class. The metaclass can define methods and data that the class will possess. f() above would be a method on the metaclass of X and Y, so Y could polymorphically override it.

      The fact most readers of this comment will already have given up, have their toungues lolling out, or be preparing to flame me for suggesting anything so obviously stupid and useless (ie. not in C++), should given you a clue as to why the designers of Java did not do this.

    13. Re:J2EE is the C++ of our time by Tablizer · · Score: 1

      it's the language itself that won developers' hearts, and it's the language itself that underpins the good work of all the other specs.

      In my observation the popularity of Java is from a combination of PHB's and newbies who bought Sun's hype, and people who hate Microsoft so much that they will back just about anything that looks like it can hurt them.

      I see nothing magic about Java as a language. OO-Pascal and Eiffle were not significantly different from Java (if you like that static-typed OO sh*t) when Java was being concieved. Many people want procedural-friendly constructs in Java anyhow. Some of us don't like OO and don't buy into its software engineering claims. Even many OO fans agree that one-paradigm-does-not-fit-all situations and apps.

      Java is a marketing triumph, NOT a technical one. There is nothing original in it.

    14. Re:J2EE is the C++ of our time by battjt · · Score: 2

      Classes can act like namespaces.
      --
      package test;

      public class Test2 {
      static public class A {
      static public class B {
      static public String c = "C";
      }
      }
      static public void main(String [] a){
      System.err.println("test.Test2A.B.c="+test.Test2.A .B.c);
      }
      }
      --
      Why differentiate packages from classes?

      Ah, 'multiple dispatch'. That was the term I was looking for. After more thought this afternoon, I have to agree that the efficiency trade off would not be worth it all the time, but it would be a nifty answer to the huge switch statements that occur when parsing.

      Ah, 'meta classes'. Another term. That would fix that problem.

      I guess the only difference we have is import with globing or regular expressions. I just figure that the extremely limiting import a package, but not a group of packages is a silly limit.

      Thanks for taking time out this afternoon.

      Joe

      --
      Joe Batt Solid Design
    15. Re:J2EE is the C++ of our time by liloldme · · Score: 1
      In my observation the popularity of Java is from a combination of PHB's and newbies who bought Sun's hype, and people who hate Microsoft so much that they will back just about anything that looks like it can hurt them.

      Then your observations are extremely limited, considering for example that Java is widely used across universities to teach people to program. And people tend to stick with what they know.

    16. Re:J2EE is the C++ of our time by Tablizer · · Score: 1

      considering for example that Java is widely used across universities to teach people to program. And people tend to stick with what they know.

      Okay, but why did the Universities pick Java in the *first place*?

      Note that Pascal was widely used in schools, but still never really caught on.

    17. Re:J2EE is the C++ of our time by liloldme · · Score: 3, Interesting
      Okay, but why did the Universities pick Java in the *first place*?

      Because by and large the world had moved from procedural programming to object oriented programming and Java was the 'cleanest' mainstream OOP language at the time therefore matching two critical requirements:

      a) easy to teach good OO progamming practices with
      b) relevance in the job market therefore motivating the students

      Those would be my guesses. a) is not driven by marketing where as b) is

      No one denies there was a huge marketing effort to get Java accepted in the mainstream but that does not mean the language itself is bad.

    18. Re:J2EE is the C++ of our time by Tablizer · · Score: 1

      Because by and large the world had moved from procedural programming to object oriented programming

      In name only. Actual production code still tends to be procedural in nature, dispite all the doctrinaire nagging from the evidence-free zealOOts. (I know, I'm being flamey.)

      easy to teach good OO progamming practices with

      Smalltalk? Python? OO-Pascal?

      relevance in the job market therefore motivating the students

      This sounds like it was chosen to match the market, yet you said that schools were one of the reason for market acceptence. Is the egg laying a chicken?

      No one denies there was a huge marketing effort to get Java accepted in the mainstream but that does not mean the language itself is bad.

      Doesn't mean it is good either. If a bunch of experts looked at it and rated it, they would have given it a C.

      Then again, languages are probably subjective. There are no agreed-upon metrics for measuring.

    19. Re:J2EE is the C++ of our time by liloldme · · Score: 1
      In name only. Actual production code still tends to be procedural in nature, dispite all the doctrinaire nagging from the evidence-free zealOOts.

      Which is a good reason to start teaching people how to solve problems using the OO paradigm, using a OOP language, such as Java.

      Smalltalk? Python? OO-Pascal?

      None of which are mainstream OOP languages. That's the leg up Java had.

      yet you said that schools were one of the reason for market acceptence

      I said no such thing. It plays a part to the popularity Java enjoys today.

      If a bunch of experts looked at it and rated it, they would have given it a C.

      Who would those experts be then?

    20. Re:J2EE is the C++ of our time by Tablizer · · Score: 1

      [Actual production code still tends to be procedural in nature, dispite all the doctrinaire nagging from the evidence-free zealOOts.] Which is a good reason to start teaching people how to solve problems using the OO paradigm, using a OOP language, such as Java.

      Appearently animals and shapes examples are not good enough. Time to try torture?

      None of which are mainstream OOP languages. That's the leg up Java had.

      You are missing my point. You still have a chegg problem. I give up explaining.

    21. Re:J2EE is the C++ of our time by liloldme · · Score: 1

      Fine by me, your contrived explanations had very little of substance in them anyway.

    22. Re:J2EE is the C++ of our time by Anonymous Coward · · Score: 0

      Fine by me, your contrived explanations had very little of substance in them anyway.

      Does that mean the marriage is off?

    23. Re:J2EE is the C++ of our time by Scotch+Game · · Score: 1

      Just would like to point out that there are many of us who still believe that C++ is the C++ of our time.

      Also, when I think "gorgeous" I think of Gwen Stefani in that new video where she's jumping up and down on the bed. Java never springs to mind. But if I *were* to code Gwen, she'd be "private", "friend" ... and "double". But Java has no "friend" so to heck with that, man ...

    24. Re:J2EE is the C++ of our time by melquiades · · Score: 2

      I'm suggesting they could have used the target type and the signature(method name, the real types of the parameters (or super classes)

      Right, but you lose all kinds of compile-time type safety if the language allows your example. Think through the static typing of your example's parse tree -- if we allowed the code you suggest, you also have to allow f(new Object()) to compile, even though there would be no matching method at runtime.

      So how do you instantiate a subclass of Thinger? You write another create method.

      Not necessarily -- you can have a single method that dispatches to a bunch of different constructors: return foo ? new Quux() : new Fruux();. If you have all the different subclasses in the same package, you can keep the constructors package-private.

      If your subclasses are all in different packages, and you want to control instantiation within your project, I suggest you take a look at Macker (see sig).

    25. Re:J2EE is the C++ of our time by drxenos · · Score: 0

      Hear, hear!

      --


      Anonymous Cowards suck.
  7. so ... by Anonymous Coward · · Score: 0

    you've got a speed issue. so you solve it by moving from one VM to another VM where you like the language interface to the graphics better. and ... this will make it go faster.

    wtf?

    1. Re:so ... by Anonymous Coward · · Score: 0

      Our clients do not have the luxury of changing JVMs for each application. I am already using 5 different JVMs for development and testing - and it sucks.

    2. Re:so ... by zaqattack911 · · Score: 1

      Actually yes,, the .NET VM for client side gui apps are much faster than java Swing. Dunno why it just is. Guess MS realises that MFCs suck, so they better make .NET GFX worthwhile. --Etan

  8. J2EE not nearly as difficult as you describe by Anonymous Coward · · Score: 1, Funny

    J2EE is not difficult - you just need to open a JAXP connection to a JNDI/JMS gateway to a JDBC bridge via a JSP RMI IIOP GI-JOE EBGBs ... ah fuck it.

  9. Good point. by Anonymous Coward · · Score: 0

    Java is not slow - but J2EE is snail-like by design.
    All remote calls are done via bloated and slow RPC-style mechanisms.
    And what exactly is "bean-like" about a message bean? Nothing at all - just its name. Sun just realized that J2EE's design blew chunks and tried to hide their lousy design behind yet another specification. Maybe the Swing team should give the J2EE team some design advice! (ha!)
    Java will never be the VB of intra-office applications that Sun hopes it will be.
    Beans beans beans beans beans. Whatchu want for breakfast? Beans beans beans. Gimme dem java beans!

  10. C++ is the C++ of our time by Anonymous Coward · · Score: 1, Interesting

    Your assumptions are not correct. Complexity and elegance are relative. To an english speaker the Chinese language must be extremely complex, but to a Chinese person it is natural and elegant. Likewise C++ programming is easy for those proficient in the language. Where is this definitive proof that Java somehow "beat" C++? Hmmm, the last time I checked C++ was alive and well. In fact, the number of Java job postings have been declining on all the job boards to make C++ programmers once again the most sought after developers. Most Wall Street firms have seriously cut back or cancelled their Java projects in favor of retooling and extending their C++ systems. Java has its place in the programming ecosystem, but C++ is once again gaining momentum, quietly, and without a PR machine. It just gets the job done.

    As a side note, Java still does not have generic programming as does C++ which is very useful in scientific modelling. The proposed java generics solution does not work on builtin types without awkward and inefficient runtime boxing.

    1. Re:C++ is the C++ of our time by Anonymous Coward · · Score: 0
      Hmmm, the last time I checked C++ was alive and well.

      Uhh, face it, C++ is dieing a slow death.

      Slow because there's so much C++ code out there (unfortunately) that the amount of maintenance required will keep C++ skills relevant for some time to come but the reasons to start new fresh projects using C++ are rapidly diminishing.

      C++ is going to go the way of COBOL (and so will Java eventually, but not as soon as C++ will)

    2. Re:C++ is the C++ of our time by truth_revealed · · Score: 1

      You're a moron spreading FUD. C++ is as popular as ever.
      How do you explain the great success of KDE?
      Gee, what language do you think that is written in?
      It's good ol' C++ code written in the last few years. And it's only getting better with each new release.
      Add to the list: Microsoft Office and Sun's OpenOffice.
      Face the fact that there does not exist a general systems language that can rival C++ for low memory footprint and speed (other than C).
      Java has its place - but not in the desktop or operating system arena.

    3. Re:C++ is the C++ of our time by Anonymous Coward · · Score: 0
      So you managed to list projects that have been under development several years. Congratulations. I never said C++ wasn't used to write a lot of software. That why it's death will be slow, there's so much maintenance that needs to be done (unfortunately).

      But the fact of the matter is that C++ is dieing, slowly. Today, new projects tend to be started using either Java or maybe C# now. There needs to be a special reason why one of these two would not be used, and C++ picked instead. For your average app (KDE, Office etc.) those reasons don't exist anymore.

      The future is not in C++.

    4. Re:C++ is the C++ of our time by Anonymous Coward · · Score: 0

      The very program you used to type in your clueless slashdot post was written in C++.
      Please name a few successful shrinkwrap software packages I that can buy at WalMart or BestBuy written in Java.
      Hmmm... there aren't any. Gee, I wonder why?
      Can it be because program memory use and speed still matter for the consumer market?
      Get a clue.

    5. Re:C++ is the C++ of our time by Anonymous Coward · · Score: 0
      Hey moron,

      the GUI software is written in VB, not C++ you dumb fuck

      C++ is fucking dead. Face it. Nobody is so FUCKING STUPID as to start writing GUI in fucking C++.

      You want C++ lookalike you use C#, you write for the server side, you use Java.

      THERE IS NO FUCKING FUTURE IN C++, GET THAT INTO YOU THICK FUCKING SKULL, IDIOT. IT IS DEAD DEAD DEAD DEAD. And we should piss on its grave, it was such a fucking mess of a language.

  11. huh? by mmcshane · · Score: 1

    I don't understand the "like those routinely released by the Apache Software Foundation" comment. Much of what is created by the Jakarta project is implementations of the very same "overly-complex" specifications that the author laments. httpd is an implementation of the more-complex-than-you-think HTTP 1.1 spec, and the Apache XML project has implementations of the DOM, SOAP, and SVG (very complex, pretty complex, and kinda complex, respectively)

    Don't get me wrong, I love and appreciate what ASF has been doing, I just question how one can derride the specification while praising the implementation?!

  12. JMS does a bit more than that by SimonK · · Score: 2

    Although it isn't the most useful standard (for several reasons), JMS does more than you imply. The container infrastructure takes care of resource sharing issues for you, but even that isn't the main benefit. The main benefit is that JMS messages can be enlisted in distributed transactions, and support limited reliable delivery. This makes them usable in really serious system where failure costs $1m a second.

    One of the best criticisms of J2EE is in fact just this: EJB, JMS and so on allow blue-collar engineers to build really serious enterprise scale systems, but in fact most systems do not need anything like the firepower J2EE provides, and most engineers don't even know what XA *is*. It therefore gets used in lots of cases where it is analagous to using an Apache helicopter gunship to crack a nut. The average website just doesn't need most of J2EE.

    This is what MS were playing on, whether they realise it or not, when they rewrote the pet-store application using ADO alone a claimed some incredible speedup. J2EE is just not needed, even some something like Amazon. Certainly not for Slashdot. Banks and airlines do need it, but not everyone works for a bank or an airline.

    1. Re:JMS does a bit more than that by battjt · · Score: 2

      Would you use J2EE when failure costs were $1m/s? I wouldn't. I would want a system that could more easily be audited, where I could read all the code. (Even using JBoss, you couldn't understand all the code due to the complex execution path.)

      Banks need something much simpler than J2EE that can be completely understood. Airlines need something that is more efficient than J2EE. Once you implement a system in J2EE that is efficent, you will have removed all the OO effects that make it convenient. You might as well have implemented it in COBOL.

      Joe

      --
      Joe Batt Solid Design
    2. Re:JMS does a bit more than that by Anonymous Coward · · Score: 0
      Banks need something much simpler than J2EE that can be completely understood. Airlines need something that is more efficient than J2EE.

      Interestingly, both are where J2EE gets sold the most. Both banks and airlines are keen on replacing their old proprietary tx monitors and converting them to a standardized platform. Finding a J2EE developer is easier than finding, say, a Tuxedo developer I guess.

  13. Use a database by Tablizer · · Score: 3, Insightful

    Using databases to manage concurrency (and a whole lot of other things) greatly simplifies projects IMO. Databases do a lot of things better than programming code can, and I like to take advantage of that.

    Some people still prefer the code-centric approach for some reason, and that is fine. But keep relational technology and tables in mind when doing complex projects. Try to communicate between processes via relational tables instead of language-specific constructions and see how it turns out. It takes a little while getting used to and to get skilled at sometimes, but worth it IMO.

    Java represents the pennicle of the code-centric approach to managing complexity, and I think the pendulum will start to swing the other way soon (no pun intended).

    (oop.ismad.com)

    1. Re:Use a database by mzito · · Score: 2

      "Using databases to manage concurrency (and a whole lot of other things) greatly simplifies projects IMO"

      This is only partially true, and the "partially" derives from the scale the application is being built on. It's very possible to realize development time savings by whacking your mp3 playlist information into mysql rather than parsing out data yourself - but that won't work quite as well when you're indexing 30,000,000 mp3s.

      Using a database will make WRITING your application easier - but the job is not done when QA gives it the green light. That application has to be maintained, either by you, or by the customer (and since we're talking about J2EE server applications, we'll presume its by you).

      Databases are expensive, not just in the cost of the software/hardware, but in the cost to manage them. The whole model of tightly coupling data together in one place is what allows you to realize development savings ("Rather than write an efficient Java function to find every person who lives in the specified state in the same zip code, I'm going to let the database figure it out with two lines of SQL!!") - coupling, though, also forces you to have big databases - you won't get any benefit if your data is spread across farms of different servers. When I'm referring to databases, btw, I mean OLTP-style databases, as it is very rarely acceptable for web applications to have data warehouse-equivalent delays in data retrieval.

      As your database increases in size and complexity, the cost to operate it increases EXPONENTIALLY. So, while dedicating a 2-processor linux box to database traffic is highly cost effective (say $2000), the cost of dedicating a 10-processor, 64-bit Sun box to database traffic is not (market price $100k-200k depending on new vs. reman, discount structure, etc.). Likewise, software and storage costs grow in a similar fashion - two 36GB scsi disks will cost you a few hundred dollars, while a 3.6TB enterprise storage array will cost you in the hundreds of thousands of dollars. Management costs as well begin to come into play - it takes a very different skill set to run a 2GB database from a 2TB database.

      If you expect your application to grow exponentially, relying on a database will make your costs grow exponentially as well.

      The right way is to only put long-term, persistent data in your database. Nothing transient should ever hit your database, ever. Even old and unused persistent data should be periodically dumped out to tape or to a data warehouse and purged from your production database. Scale horizontally, not vertically. Put yourself in a situation where when your site gets slow, you need to buy another 5 linux web/application servers, not forklift upgrade your 4-processor database to an 8-processor database.

      This fundamental flaw in the all-in-the-database system is why companies like Oracle have invested millions of dollars in allowing their software to scale horizontally - in effect, to get the best of both worlds. But, you still have the management problems associated with large centralized storage, backups, plus licensing costs, etc.

      None of this is to say that centralizing business intelligence in a database is always a bad idea. But I have worked in situations where people put intelligence in the database with the best intentions, only to discover themselves victims of their own success. Look at google for possibly the ultimate example of de-centralization. They do nothing BUT scale horizontally, and while that isn't necessarily the answer either, it shows it can be done.

      Here's what you have to ask yourself as you write any serious, enterprise-grade application:
      1) As my data grows, does my revenue grow exponentially (or even linearly) with it?
      2) How long does this data need to persist?
      3) How can I group my data in such a way that groups can be completely uncoupled from each other within the database as my environment grows?
      4) How can I accomplish my purpose without touching the database?

      Of those, 1) is the longest term - very rarely does revenue grow at the same pace as data, so the cost of data storage has to be kept down. 2) and 3) is pure practicality - never store anything that you don't plan to eventually delete, and 4) is getting yourself into the mindset that the OLTP database is the location of last resort for data.

      Phew. I've been wanting to get that off my chest for a while.

      Thanks,
      Matt

      --
      me@mzi.to
    2. Re:Use a database by NorthDude · · Score: 1

      I tough everything you said was brilliant...
      Until I saw your domain name

      --


      I'd rather be sailing...
    3. Re:Use a database by mzito · · Score: 1

      Hey, just because I've got a crackpot idea doesn't mean its not true. :)

      Thanks,
      Matt

      --
      me@mzi.to
  14. nice try by sydlexic · · Score: 2

    but you misunderstood. JDBC isn't the special case. J2EE promotes a special case of JDBC. That special case is one which prevents most of the more interesting uses and locks you into scenarios that are almost guaranteed to have crappy performace characteristics. That's why it's not real world. If you've done any real database work and any real J2EE work, you'd know this.

    1. Re:nice try by liloldme · · Score: 3, Informative
      1) No one forces you to use CMP in an J2EE application. It's just one feature of the EJB component contract.

      2) A well written CMP2 engine will give you a great deal of flexibility on how JDBC is used (read-ahead buffering, load groups, etc.)

  15. yes, but... by sydlexic · · Score: 2

    that was the whole purpose of all that nice abstraction. if you write your own engine then you're basically hard-coding against known assets. bye bye abstraction. the whole idea was to eliminate ugly vendor-specific hooks. but that turned out to be unrealistic for anything beyond the proverbial "hello world" any everyone was back to writing their own engines. so the new spec dispenses with some of the fiction and adds it's own stripped down sql queries. now you get the look of sql, but few of the benefits. and as an added bonus you dispense with the nice object model.

    In the end, the whole exercise gets you no closer to a solution with a whole lot of baggage.

    1. Re:yes, but... by liloldme · · Score: 2, Insightful
      abstraction is not easy, especially for a complex problem such as O/R mapping, that's why the evolution exists in the CMP spec

      the abstraction is there however, today I can easily switch between different databases I use for my projects (from postgres to oracle for example). The abstraction exists there to a level where I can use these tools to manage most of the migration of the db schema from one db to another.

      The performance issues are a matter of configuration of the CMP engine. My code stays the same. The abstraction is very real.

  16. Packages and classes by SimonK · · Score: 2

    I think I see what you mean now. You could get rid of the packages entirely and rely on the classes scope hierachy to do the same thing. Aside from the difficulty with separating source files, that might be interesting.

  17. I would by SimonK · · Score: 4, Interesting

    The complexity of Really Big Systems is such that no one person could understand all the business logic, let alone the systems code. The stories I could tell, if men with large sticks wouldn't come and kill me ...

    The reason they end up with J2EE is it is *relatively* cheap and reliable, standard and easy to find developers for, while allowing for distributed transactions that ensure their databases don't become corrupt. That tends to be what really matters to them: if the system fails, which it will, regardless of what it was written in, and we bring it back up, will it Just Work ?

  18. The Jakarta code is clean. by mparaz · · Score: 2, Interesting

    I've had the chance to pore through the Axis and Batik sources. Since they follow coding standards and common paradigms (or the overused "patterns"), it doesn't take much to figure out how they work, and extend them if need be.

    1. Re:The Jakarta code is clean. by Anonymous Coward · · Score: 0

      what does code cleanliness has to do with this??

  19. You said it by drxenos · · Score: 0

    They DARE compare this java crude to C++??? I don't want a language that takes low-level features/abiliteis away from me, because the creator "thinks" I may abuse/misuse them. C++ is the most elegant, adaptable, expressive language I have ever used, and I'm used many professionally.

    --


    Anonymous Cowards suck.
    1. Re:You said it by Anonymous Coward · · Score: 0

      There's not a single 'elegant' piece to C++. It might not be quite as bad as Perl, but it really tries hard to get that crown.