Forum Moderators: coopster & phranque

Message Too Old, No Replies

.net or java - which should I learn?

         

jamesf4218

9:08 am on May 17, 2002 (gmt 0)

10+ Year Member



Hello,

I am a programmer who currently uses php to do my dynamic stuff. I want to seriously get into .net or java but which one is better? Any ideas? To be honest, I'm still not really sure what .net involves aside from XML and ASP.

Brett_Tabke

9:55 am on May 17, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Why do either one? Since MS has disavowed Java, it is relegated to an also ran position. I think it's dead as a viable language.

Why .net at all? ASP could be valuable at some point, but I just don't get the whole infatuation with it. As far as I can tell, it's a corporate thing only. Stand alone sites really aren't going to reap any reward for the awesome amount of time it takes to learn it. After you learn it, you are then chained to the Microsoft machine - for life. Who's to say it won't be obsolete by this fall?

There are some excellent content management packages out there right now. Sure, some are pretty pricey, but they do _everything_. There are even some perl open source projects that are basic mini-portals in a box - some with good ecomm features too.

jamesf4218

10:11 am on May 17, 2002 (gmt 0)

10+ Year Member



Purely because I can get a better job paying more money if I have one of those skills.

ppg

10:31 am on May 17, 2002 (gmt 0)

10+ Year Member



I have to take issue with anyone that says Java is a dead language because MS has 'disavowed' it.

What MS has done is to stop supporting java in IE out of the box. This means that if an IE user wants to see java applets embedded in a web page, they have to download a java runtime seperately. This has no effect whatsoever on server-side Java, which is by far the biggest push for Java now. Applets are pretty much dead in the water if you ask me anyway since they're so slow loading. They're used very rarely now. All MS has done is put the final nail in the coffin for applets IMHO.

I agree with all your other comments though Brett.

James, If you want to choose between .net and Java from a point of view of making yourself as employable as possible, the only real solution is learn both, but this is a very big mountain to climb.

If you do plump for .net, I would advise you to learn C# - this language is so close to Java in architecture its incredible - its the usual MS apprach as far as I'm concerned: find something that works and buy it. If you can't buy it, then bring out your own version that changes just enough aspects to stop you being taken to court. Even most of the keywords are the same. The upshot of this for developers is that it doesn't really matter which you learn, migrating from one to other will be fairly easy since they're so similar.

The reason that jobs using languages like Java pay well is that its not a trivial matter to learn them, but there is still much demand for the skills.

Everybody's talking about 'web services' now, apparently its the coming thing, but its pretty hard to pin anyone down to exactly what they are beyond an extension of what we all already do.

My personal opinion is that both .net and server side Enterprise Java will both have good uptake, so which you learn is largegy a matter personal preference.

Its worth pointing out that Java is still in the top 3 of expected 'most required' IT skills for the next couple of years (according to silicon anyway).

txbakers

1:04 pm on May 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry Brett, I too will take exception that Java is dead.

I think MS made a big mistake in not supporting it and will probably backtrack quietly.

Real Java is the core of any J2EE operation and JSP web languages.

Web services are coming, albeit slowly, and either JAva or .Net will be used. The theory is that they will be interchangable once written since the underlying languages will be XML.

If the end goal, however, is to be a programmer, there are many more languages than Java or .Net. There is still a good market in RPG, VB, C++, and web technologies such as ASP/JSP/PHP.

If you are looking forward, many community colleges are giving crash courses in .Net and XML.

korkus2000

1:44 pm on May 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Based on your question .Net will probably an easier learn then Java. It allows you to choose your own language. It really is not that hard to learn. ASP for that matter is quite easy. I have to interface both at work and java seems more complicated to me. It is a full blown object oriented programming language. VB and Jscript are much easier to get up and run with.

<added>
.Net allows interface with client side applications and runs your ASP.Net pages on the server like a client side app. It really is an amazing technology. It is very easy to learn and thats what makes it so appealing to web coders.
</added>

(edited by: korkus2000 at 1:48 pm (utc) on May 17, 2002)

backus

1:46 pm on May 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It's a fact that ASP is the more important language, as you say, you can earn much more money knowing that. Go with .net. Every man and his dog knows PHP.

korkus2000

1:49 pm on May 17, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can always learn both by using j# in .net.

m77_lv

2:08 pm on May 17, 2002 (gmt 0)

10+ Year Member



I suggest Java.

Xoc

6:05 am on May 19, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I now feel I have a pretty good understanding of .net.

.net isn't any one thing: it's programing languages such as VB.NET and C#, and the underlying Common Language Runtime (CLR). It's a set of classes in the .net framework. It's a web platform in ASP.NET. It's a platform for calling and serving Web Services. And more.

Java is a programming language.

I've been using .net heavily for the last month. The productivity gain from using it is amazing. It is so easy to do things that were darn-near impossible with previous tools.

ppg

12:58 am on May 20, 2002 (gmt 0)

10+ Year Member



From what I can can gather thats a pretty good description of the .net framework, and also a pretty good description of how java on the web works. The Common Language Runtime is similar to the Java Virtual Machine: - raw code is compiled into bytecode and then 'just in time' compiled on a method (function) by method basis into native code as the methods are needed.

Theres two main differences that I can see - the Common Language Runtime supports a range of languages - C++, C#, ASP+, VB - whereas the Java Virtual Machine Machine supports only Java.

The flip side is that .net is going to tie you in to the MS platform and Java can run on any platform enabled with a JVM - Unix, Windows, whatever. You're not tied down.

What you also get with .net is a bunch of ready made components for stuff like networking and database access. The Java equivalent is the Java APIs (which people seem to mean really when they talk about the 'Java language')- a set of ready written classes covering that stuff and a fair bit more. In practice at work I use a fairly small subset of the whole Java APIs - database access, JSP (roughly equivalent to ASP), servlets (all the HTTP request and response handling) and the odd supporter class for string processing and the like when I need them.

One thing .net _will_ give you is a nice visual programming environment to bolt components together in. I'm no MS fan, but Visual Studio 6 is a nice environment, and I'm sure the .net version is too. I would expect it to be pretty easy to build powerful web apps with a .net programming GUI.

That said, its not that much effort to learn how to compile Java code from a DOS command line or a Unix shell. maybe its a bit less friendly but its still not rocket science.

They're really very similar.

If you do all your stuff on windows, chances are you'll find it much easier to work with .net, especially if you only use ASP because all you do is web stuff and the components provided are supplying everything you need. I'm sure in the vast majority of cases they will be.

From having done a bit of web programming in ASP and VB and a bit more in Java, I personally much prefer Java, but thats probably because I learned Java before I did any VB.

Basically no-one has a looking glass. I think its very difficult to predict whether one will come out dominating web development or not. If this happens the detemining factors are more likely to be business related than technology related. Personally I think they'll both be around for some time time to come.

The real silver lining is that on the back end, and for persenting what you see in your browser, they'll both be interfacing with XML, and thank god thats a standard, we only have to worry about one version!

Xoc - are you an ex - ASP user who'se moving over to ASP+? I'd be interested to know what kind of tasks you find easier to get done with the .net framework?

I've got the impression that the majority of people here work independently, have to wear many hats and therefore are scripting in PHP primarily for its ease of use and widespread support by hosting companies. Sadly I havn't found time to look at it yet - I'm curious to know what support PHP has for interfacing with XML? I would have though that this will be pretty crucial for its future on the web. Are there any PHP users here who are also using XML? (sorry to go a bit off-topic)

Lisa

1:24 am on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, I use PHP and XML. I have to say I am very impressed by the XML parsing support in PHP. The parser is an event driven model. I could go into it more but that is another thread (but very nice!).

If I was forced to learn something for a job (I would choose .NET, not that I already don't know Java, C++, and VB)

Java I find annoying, Can't explain it. But I just hate it. Runs everywhere, but runs everywhere slow. I was on one of the few teams that completed a Java API to NetSol to register domains. There where so many problems. I think only one other company completed the integration. (but sadly after completing the Java API NetSol killed it because of the difficulty lots of other companies had interface with it using Java)

Corporate America will embrace .NET, so learn it if you want to work in corporate America. Personally, I would hire an open source developer over a .NET developer. No licensing fees and all the other nightmares. Plus, the developer can utilize thousands of free programs w/ source. Seems like all the standard components that ship with .NET all have just basic functionality. You see people all over the place selling more improved versions. And they all want money for it. You just don’t have this problem in the open source world. Everyone shares. What a nice world that is.

Xoc

2:14 am on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The impression I have is that almost everything is easier in .net. If you are used to the ASP scripting model, though, you have to rethink how you do things, because ASP.NET is way different.

Let's just take two examples from things I have needed to do that were really hard that .net made trivial:

1) I had a web page with a listbox on it filled from a database. I needed the capability of clicking on an add button to go to a dialog where a new item could be added to the list. Then when the dialog is closed, refresh the page to have the new item show up in the listbox. This had to happen without losing the current contents of any other textbox or other control on the web page. Very difficult in ASP, almost trivial in ASP.NET.

2) When a web page was downloaded, I needed to grab a .png file, draw on it based on the contents of some data maintained in real time, and supply it to the IMG tag at that moment. Very very difficult in ASP, trivial in ASP.NET. I expected to spend at least 3 days on it based on my ASP experience. Took half an hour in .net.

Almost everything that I try in .net is easy. I needed to validate an XML file when I read it into the DOM. The class they supplied in the .net framework didn't do it, but by inheriting from their class, overriding the constructor and adding the validation (using other .net functionality) at that point, I then had a class that did what I wanted. Easy.

The hardest thing about .net is that the framework is so large that finding what you want to do in the framework sometimes takes some time.

ppg

2:32 am on May 20, 2002 (gmt 0)

10+ Year Member



Thanks Lisa. I think I will start a new thread!

ppg

2:38 am on May 20, 2002 (gmt 0)

10+ Year Member



Interesting Xoc, so would you say that the main difference you find with .net is that you have a more comprehensive set of components to work with? Or that they're better integrated, or both?

Did you use C# for extending the class?

Xoc

3:01 pm on May 20, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd say both. The number of classes in the framework is huge. But they all work together. So, for example, once you learn how to do something to a stream, it generally doesn't matter what kind of stream you are working with.

Yes, I used C#, but I could just as well have used VB.NET. Or, heck, even COBOL (there is a version done by a third party that compiles to the common language interface). Languages become irrelevant in .net since they all compile to the same intermediate language.

The main difference between .net and Java is that Java uses P-Code. That means that running code is always interpreted. .Net uses true native code. That means that .net applications will always run faster that Java.

ppg

11:06 pm on May 20, 2002 (gmt 0)

10+ Year Member



I've been reading a few reviews and comparisons lately, I'd say whats emerged for me as the main difference between the two that will _make_ a difference is the visual studio .NET environment. Everybody's raving about it, and it sounds like a great way in to .net for developers.

To get back to the original question, it seems .net is the one to go for. You'll be up and running much quicker and there'll be plenty of work for you.

Xoc

5:37 pm on May 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, Visual Studio is cool. But remember that .NET is [6]Free[/6]. Yes. Just go to [windowsupdate.com...] and download the .NET framework (20 MB download). You get both VB.NET and C# compilers as well as the .net framework. Unfortunately, you don't get Visual Studio. The compilers are command line only. But the price is right. So if you are a command line sort of person, you can do .NET for no cost. It's just that the development tools in Visual Studio are good: debugger, forms designers, editors, etc.

Brett_Tabke

7:09 pm on May 21, 2002 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



ahem, just don't try to visit any of that site without using IE...

Xoc

7:17 pm on May 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can also download it from the main Microsoft web site [msdn.microsoft.com].

Filipe

8:27 pm on May 21, 2002 (gmt 0)

10+ Year Member



Stand alone sites really aren't going to reap any reward for the awesome amount of time it takes to learn [ASP].

I'd have to disagree. I didn't find ASP very hard to learn - at least if you're learning VBScript. The learning curve on it is lesser than that of C rooted languages (which excludes, then, JAVA, JScript, and C#) not to say that those are hard, per se, but harder than VBScript.

Unless you're looking for real ripping performance for ultra-high end applications, then VBScript will serve for most any task. It does not require data-typing, it's flexible on variable declaration and use - though aside from getting a job with it, I'd stick to PHP (the whole reason I learned ASP is for a job, but I found it very easy-to-use).

mivox

8:35 pm on May 21, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think he meant stand-alone sites aren't going to reap any reward from .NET as a system. Obviously, .asp can be very useful to the "single webmaster."