I don;t know how much of this i can take. I am really going to a phase of really just hateing java. I went for java not too long ago. The language itself, more than a year, i quite disliked it. Belive it or not, i was really enjoying the pointers in C++. Then not too long ago, mostly the time i registered on the forum, i got me a book on databases, curse the day that i did
, and it had a nice picture of EJB. It talked about easying the developement. We all know how big of a lie is that.
We come to the point of App Servers. (I am currently unemployed, looking for work, guess i would settle at 400E if i am lucky to get a job anyway as i have not yet participated on any big projects as required). So what would my next employer use as an app server: WebSphere, WebLogic, JBoss also the Spring framework maybe, others...? How about the clients? Guess i will have to learn to swimm in at least 2-3. Ok let's talk about EJB and bang the J2EE a little later.
EJB really made sense for me back then. Actually no, when they talked about entity beans. The ORM mapping seemed some theoretical fad for book writters and pattern designers. Not good old sql where u can control every tinny inch of what's going on the low level database. Well i finnally got it after some time. Te answer is cache. Entity beans means data ready in the same process as the application. Not abideing by the rule that on every call of a method of the bean the container does an ejbLoad to read from the database and actually serving it from what was left in the memory from serving another user's call without doing an inter process communication with the database would really show some improvements. Granted that, but the programing overhead is a killer. They moved away from the SQL and we got a whole bigger package the EJB-QL and of course the SO MUCH HATTED BY ME XML. Everything is in xml. Whole pages of code. There is not that much java left as there is XML. Pretty soom everyone will know XML tags better that java classes. Every container with it's plus XML descr. of course. XML for servlets, tag libraries, for session, entity, message beans. How about the mappings of hibernate- come on...- Spring it seems i will have to learn, can;t coment on that i haven't got to that part yet. More XML right?
Entity Beans means you are no more tied to a particular database. Yeah right. Like i would just go in the middle of the project : Hey this database really is crap, let;s change to MS SQL or better yet lets do ORACLE.
Hibernate gives u more control, but it's much more harder to learn. With EJB you don't optimise at the database level, u don;t care if the data is in a normal form or not, you just need to think how would it fit more your object design. You wanted to have a separate a table with cities name, and pass the city id in the Person table an id to that. No more, that would mean you would have to create a Cities object and set a relationship with that also. More easily to just put the city name as a String in the Person table.
Session Beans, well they're good for mostly one thing i guess. Distributed transactions and implementing the bussiness logic at the middle level in case of another type of client besides the web tier. Anyone can think of another use for them ?
Sure the resource pooling seems nice in theory, i can;t confirm in practice.
More about descriptors now
There is no problem. We have tools for descriptors generation. And IDEs. Yeah, another problem. Best IDE i've work was Intellij IDEA, only 500$(got the crack for it, of course, 500$ that's like 5 months rent for me, i;m not that stupid). More likely the companies i guess they work with Eclipse or with some Aplication Server project designer. And for Eclipse be prepared to spend some time just fixing and finding a colection of plugins that barely do the job done. And be prepared to write some descriptors by hand. For most of them, Eclipse will of course sugest the keywords for you, but not offer some graphical tool to just set the parameters, or an already configured example. No, that would be too easy. And of course, learn Ant, which is in itself a new language.
Why this seemed like a good solution? What chance do we have against .NET? Well for me something on the serverside that was supposed to run on Windows....... hmmmm........ hmmm...... bad idea i said back then. But what do u know? The Java JVM seems it's not the optimal one for linux, and the Aplication Servers run on Windows. SAY WHAT??? So we're competing with a tehnology that can and probably uses native code. Windows became more stable and there seem to be not that many patches coming up every day. So the .NET have on us the following advantages. Only one AS, u just learn that to the bone, just one IDE, and that IDE is all everyone has, and you can be as productive as anyone. Just concentrate on the bussiness developement.(the EJB motto, how funny that sounds
) That one stuff for microsoft means everyone is ussing that and so more tutorials, more people out who may have encountered your problem. The cost u say.... The most expensive asset in a company are the employs. Investment in tehnology and hardware is one time only or at least, not every month anyway. And how about the GUI Interface. That;s mostly crap in Java and a web based IDE is not enough. Most users care how theyr GUI looks and how they can interact with it.
Ok enough writting. It went away from the subject. Sorry, i should have started a new thread. On the other hand there is PHP just to take care of JSP. Most web pages just need to pull something from the database. Simplicity in it;s purrest form. You don;t get to cache at the middle tier, granted the transaction support is lacking, but...
So does anyone have the same fear that J2EE will have maybe not such a slow death?
[ July 18, 2005: Message edited by: Balamaci Serban ]