Java Overview for a C# Guy

I've been a C# developer for 3 years and I'm very proficient.  I've just changed jobs and have moved into a Java shop.  I have absolutely no problem reading and understanding Java Code.  

I am looking for a detailed description of the mechanics of Java and JSP from a developers standpoint, ideally, to help make the transition from C# to Java.

For example...

When I compile my C# app, the classes get compiled into a DLL in the bin folder.  Simple enough.  What happens when I compile a Java app? Also, when I make a change to an ASPX page in ASP.NET, the change is immediate without the need to rebuild.  Is this case for Java or do I need to recompile?  And what the hell is a BEAN and how do I use it?

Basically, I am looking for as many of the differences (and similarities) to get me off to a good start.  I understand there will be a learning curve as I familiarize myself with Java objects, but right now, my biggest hurdle is that I don't yet understand the BIG picture in how all the pieces fit together.

Thanks in advance...500 PTS
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Having worked with both, there is almost a direct relationship and amazing similarities between the C#/ASP.NET and the Java/JSP environments.  Since you already understand the concepts behind both, you should have no trouble apart from what I consider to be very annoying aspects of the Java language.  In my view, C# is what Java would have been if it hadn't been developed by "purists" who appreciate the "beauty" of a language rather than its utility.  If "beauty" is so great, why is Pascal an eternal also-ran??

>>When I compile my C# app, the classes get compiled into a DLL in the bin folder

That would only be due to the fact that you've chosen to build DLLs and not applications, i.e. EXE file.

>>Also, when I make a change to an ASPX page in ASP.NET, the change is immediate without the need to rebuild

Not the case...  The JIT compiler re-compiles the updated ASPX page the first time it's accessed.  JSP is almost identical in its approach.

>>And what the hell is a BEAN and how do I use it?

A Java Bean is analogous to an object or component in .NET.  ActiveX controls are similar to Beans.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
>> When I compile my C# app, the classes get compiled into a DLL in the bin folder

DLL's are libraries. Java usually stores libraries either just in a directory structure, or in a JAR (Java Archive File) file (which can be considered a cross between a DLL and a ZIP file in some ways).

C# apps are generally compiled into EXE's however. Java's equivalent of an EXE as you may already know, is a CLASS file - which stores the Java Bytecode (much like .NET has the MSIL).

jhance is correct in the answer to your other 2 questions.

But here's my explanation on Beans:

As you will no doubt already know from your C# experience, one of the advantages of object-oriented programming is the capability to reuse an object in different programs. If you have created a spellchecker object that works with your word-processing program, you should be able to use the same object with an e-mail program also.

Sun has extended this principle by offering JavaBeans: software objects that interact with other objects according to a struct set of guidelines—the JavaBeans specification. After you know how to work with one JavaBean according to the guidelines, you know how to work with them all.

Several programming tools have been developed with beans in mind. These environments, including the free Sun ONE Studio JDE, make it possible to develop Java programs quickly by using existing beans and establishing the relationships among them.

JavaBean's are pretty much a platform-independent version of Microsoft's OCX technology...

Bean's are certainly something you can easily avoid with J2SE development, but they're everywhere in J2EE.. And then you get all EJB (enterprise java beans ( etc.
mmarksburyAuthor Commented:

So if I added a JSP page with inline logic to a JSP web app, and accessed that would get compiled into a servlet on first access.  Is that correct?  If so, where is that servlet stored, or do I even need to care?

If I wanted to build a bean, for portability and reuse, I would need to compile it first (into a .class), add it to the JSP app (how) and call it using the jsp:bean tag?
> it would get compiled into a servlet on first access
exactly, jsp will be first converted to servlet. This happens only when jsp is first accessed or there is some changes in jsp.
The compiled servlet will be present in the web server or application server that you are using.
you really dont have to bother about it.

Java Bean is just another object.  To make use of bean in jsp you will have to add an import in your jsp...

<%@ page import="java.util.*" %>
this imports all the classes in java.util package
I have been working in Java tech for 3 years now I had oppertunity to work on Microsoft tech for last 6 months

1) Working with core java that is Classes,networking,threads,i/o. reflection,collection classes(though less in number in c#) are similar  so i think no porblem here

2) There are no DLL's here so all are java classes so don't worry about DLL versioning problem, this is also removed from asp.net2.0 vs2005 its more class oriented now

3)  If you want to work in Swing API t, It gives you lot of flexibliyt on all the components like Tree, Jtable,Jslider,Jtextbox now even you have taskbar icons and popups there are other components availble most of them free of cost.  It follows a very clear arcticture of MVC and can be managed through a xml config file. Then there is applet for bringing dynamic content on web. there is concept of java web start throuh which you can run desktop swing application on internet advantage of it is that application can be downloaded and update where every you are.

4) When we talk of JSP and ASP.NET2.0 they are totally different so if you are ASP.NET guy its better to go for JSF ie Java Server Faces its more like component driven)    and there are nice tools like jbuilder and Sun one studio creator(
5) JSP basically is tag based system more like ASP.   There are lots of tag(funcionlity) for working on JSP like tree structure,table,loops,textareas and you can make your self
6) Best arctecture for using JSP is to have Servlet,JSP,Bean arctecture with bean managing your clinet side issues and servlet acting as controller (filter servlet), business logic (giving you complete three tier architerture) which you might not have witnessed in  But now in asp.net2.0 there is  3 tier arcitecture.
hope this helps

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.