Hi everyone, I'm a long-time developer on the Windows/Microsoft Technologies platforms. I've been a .NET developer for over 3 yrs. now specializing in C# - it's how I make a living. In the past 2 years I've become *VERY* fond of Linux and the open source community as a whole. I am very much interested in making a transition from the .NET/Windows platform lock-in to a more open Java/Linux platform. I am *completely* new to Java and only understand it from the very brief brush-overs I've done while researching for myself online. To be more succinct, I've never once written or compiled a java class, I have no idea what the difference between a JavaBean is compared to an EJB, and I'm a little fuzzy on the whole SessionBean/EntityBean Java-speak lexicon. I am however quite familair with OOP, Design Patterns, web application development, class library development, etc. In order to avoid the "canned" responses most newbies encounter - I will clear the air by saying I've read the tutorials, I've looked over the code, and these are the simple, general questions I've come up with. Also, to be very clear as to "my use" of Java - I build mostly medium-sized, data-driven web applications and am in need of something which will allow me to write & debug code at least as quickly and elegantly as I can with C# and visual studio .net. Here are my first-round Newbie questions: 1. For those of you with at least a general understanding of C#, .NET, and SQL Server, what is the equivilent "knockout-combo" I should be evaluating when transitioning to Java? Java + J2EE + PostgreSQL? JBoss + JDBC + MySQL? Obviously I'm shooting in the dark here, hit the deck! I mention open source databases here because I'm interested in keeping my choices as open source as possible. 2. What exactly *is* J2EE? How does it differ from J2SE? What implementation of Java should I install and develop against on Linux? 3. I really like the looks of JBoss, at least initially, what are your thoughts on JBoss as a "development platform"? JBoss + Eclipse looks like a fantastic environment at first glance. 4. Can JSP completely replace Servlets? Could I use a servlet as an abstraction layer behind my jsp's which would be used to talk to my middle-tier object layer? 5. Is there an open source implementation of Java? If yes, how does it stack up to the real deal? 6. What is JDO? Is it an ADO-like layer for working against a database? How is it performance-wise? Does it use JDBC? 7. Is JDBC the de-facto standard for data access in Java? Is it really as "slow" as I hear it is? Is it stable? Scalable? 8. Is it true that GUI fat-client types of apps can be developed at a level far above what was around in the Java world a couple of years ago? I just remember very unsightly gggrrrrraaayy java apps with boring industrial looking widgets. I remember java developers telling me a couple of years ago that developing fat-client java GUI-based apps was very cumbersome. .NET does this very well, this is why I ask. Last but not least, what are the recommended books for a Java beginner like me with considerable programming experience and background? Thanks everyone, any feedback is much appreciated!! -Vin
4. Can JSP completely replace Servlets? Could I use a servlet as an abstraction layer behind my jsp's which would be used to talk to my middle-tier object layer?
Being relatively new to JSP/J2EE, but a Java veteran, I quickly became addicted to the ability of using Java as a scripting language (similar to PHP, ASP, etc.) within web apps to handle all the middle-tier processing. So naturally, I dove in and started creating wild JSP pages with alot of Java code (what are called scriplets). I came to find out, however, this is not necessarily a good design. Even though you can effectively use JSP to replace Servlets (in fact, JSP pages are translated to servlets by the JSP container), this is not a good idea. If you're familiar with the MVC architecture, JSP pages belong at the first-tier, and are predominately for displaying data and other presentation material to the client. I've moved from using JSP exclusively, to using JSP with Servlet support (where the Servlets handle data exchange with database, data processing, etc.). I believe this is a better way to go.
8. Is it true that GUI fat-client types of apps can be developed at a level far above what was around in the Java world a couple of years ago? I just remember very unsightly gggrrrrraaayy java apps with boring industrial looking widgets. I remember java developers telling me a couple of years ago that developing fat-client java GUI-based apps was very cumbersome. .NET does this very well, this is why I ask.
From my point of view, coding GUIs in Java is still a task (this coming from someone who uses your basic, run-of-the-mill JGrasp to develop Java apps). Layout is the hardest part, but once you get the hang of it, you can create some powerful and sleek-looking GUIs. Event handling is a breeze. I haven't noticed any performance issues, even in large GUIs (but I don't have much experience with Visual or .NET so I really can't compare). There are point-and-click IDEs that will make the GUI process easier, but like all point-and-click stuff, you're going to become somewhat "detached" from your code.
I can answer only a few questions, but running linux nearly exclusive, I like to welcome you. to 1) I favor Postgres over MySql. - When I started with linux in the mid-90's, MySql looked poor. - I didn't and don't like the name. - Postgresql's frontend looked much like Oracle5/sqlPlus where I learned sql on Dos (no joke . - Whenever I read a comparision of postgres/mysql, postgresql was much more advanced, closer to sql-standards and as far as I know it is still. There are no views and no subqueries in MySql as far as I'm informed. - I don't like webapps, and mySql is intensively used in webapps - Postgres looks professional, mySql looks like a clown. If you go for WebApps MySql might be a better choice - if you like to be close to standards, postgres is the better choice. related: to 6) As far as I know, JDO is available in dependence of the vendor, for example available for oracle, not for postgres - but I'm not sure about that - better you wait for a better answer. to 7) It is the de-facto standard, but often people use jdbc-odbc, due to old (and I mean: really old) tutorials, books, habits. I can't proove it is slow, but often people use it in a slow way/ bad habit - combined with a lack of sql-knowledge, missing indexes and so on, you can make it really slow. I didn't see a comparision/ performance-test till now. to 5) What do you mean with 'open source implementation'? The gnu compiler has a gcj - java compiler but I don't know why to use it, since I don't intend to extend it . The classes (API, jars) for linux are released at same time to linux as to windows. The jre may be distributed (to run your programs). You're free to distribute the j2sdk-classes (don't know about j2ee) so I don't see a real need for OpenSource release. The API-source is open in that way, that you may look at it (src.zip) which is very useful for debugging and in the rare-case you search for a bug. It is not open in the way the Open - Source - Community talks about it: changeable, redistributable. There was/(is?) a (FSF?)-project blackdown.org but I didn't visit it for a longer time. There is a freely available compiler 'jikes' from ibm too, which has been faster in former times - but again I'm not up to date. Being not a dogmatic OpenSource - hacker, I don't see much benefit in searching for a non-sun-java. Of course this could change in the future, but as John M. Keynes told: in the long range we all are dead. If you visit blackdown, see how far they are on the upcoming standard of j1.5 - I guess beeing up to date was the most important point for me sticking to sun. to 8) The fat-GUI is much enhanced by the swing-projekt, which isn't that new any more . Eclipse uses it's own GUI-LIB: SWT, which is told to bring more beauty on the desktop. Well - I like eclipse, but don't spend much observance on GUI - Look-and-Feel - not enough to learn one more API. to Number Nine) I'm sorry, being unable to give you a good hint. To an experienced programmer, coming from a language which was inspired by java and being comfortable with design-patterns etc., I guess you will need two things: Experience with the API, and the pitfalls of starting a java-app, generating a jar and so on. A 'Java-core' book from sun was quite well for me, and 'O'Reilly: Examples in a nutshell'. Hope you soon feel comfortable with java on linux
Two appendixes: I often create quite lean GUI-Apps and after first being confused by the LayoutManagers, used for GUI-Layout, I'm now impressed by their ability to handle the resizement of windows, and don't want to miss them. Related to this: Using eclipse for development (which has blendend refactoring abilities), is worth a test! It has no GUI-Builder build in. There are plugins for this issue, but as mentioned above, I don't need them.