Article View: aus.computers.java
Article #424Re: Formatted date/time via environment variable?
From: Paul Murray
Date: Tue, 10 Oct 2000 00:00
Date: Tue, 10 Oct 2000 00:00
53 lines
3692 bytes
3692 bytes
"Doug Rickard" <rickard@primus.com.au> wrote in message news:39e1b447@news.iprimus.com.au... > Thank you very much for your in depth response. It makes me wonder however > if Java is appropriate as our upgrade language. If what we consider as a > simple but integral feature of our applications becomes such a complex issue > under Java, we may well be better off staying away from Java completely. Well, I think Java is wonderful, so I'll take moment to advocate it. I regret frigtening you off, if that's what Iv'e done. The complexity is there only because these internationalisation issues were considered from day one. Those things that become problems later on are already taken care of, at the price of a small learning-curve increase. If you need full-on tricky things to do with calendars, then it's not a separate library you have to load: it's integrated into the APIs. If all you want to do is convert strings to and from, using the local calendar, then you call DateFormat.getInstance() to get a class to do it. It has a parse() and a format(). t doesn't get much simpler than that. Particularly considering how difficult it can be to make a "simpler" system do exactly what you need, if the fit is not perfect. Another issue is text input and output streams - "Writers" as opposed to "Streams". The complexity is there because java, quietly and without fuss, will handle greek, crillic, chinese, kanjii etc without these windows "code page" things. Most of the time it just doesn't matter. You can string compare two strings, dump them to a file, save them in a database, send them across the world via a CORBA call and never worry that one of them might be in thai or telugu. As for environment variables - there's ongoing discussion as we speak. Yes, java is still a work in progress. Java has a general config mechanism - properties in property files. Environment variables are not always relevant (eg, in EJBs). In windows, they are an anachronism - aren't we supposed to be using the registry for this kind of thing these days? That said: if you are writing a windows app to run on windows, Visual Basic or Visual C++ are still excellent choices. There's an existing skill base, the tools have fewer bugs, and it's faster. If there are reasons you were looking at Java, specifically, they are probably still good. However, learning the APIs and the Java-ish way to accomplish things is a significant task, and not to be underestimated. You can fool around for hours trying to break your string into chunks using .substring() and .charAt(), or you can use a StringTokeniser, which is what it's for. You have to know it's there first, though. Or you can hire me <g>. -------------------------------------------------------------- Repent! Quit your job! Slack off! http://www.users.bigpond.com/pmurray ICQ: 26066755
Technical Details
Message-ID:
<YABE5.67451$c5.186717@newsfeeds.bigpond.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39e107db@news.iprimus.com.au> <STgE5.66838$c5.184944@newsfeeds.bigpond.com> <39e1b447@news.iprimus.com.au>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,e9a2d875ce6c6a1d X-Google-Attributes: gid10d6db,public From: "Paul Murray" <pmurray@nospam.bigpond.com> Subject: Re: Formatted date/time via environment variable? Date: 2000/10/10 Message-ID: <YABE5.67451$c5.186717@newsfeeds.bigpond.com> X-Deja-AN: 679660145 References: <39e107db@news.iprimus.com.au> <STgE5.66838$c5.184944@newsfeeds.bigpond.com> <39e1b447@news.iprimus.com.au> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 X-Trace: newsfeeds.bigpond.com 971171256 139.134.123.235 (Tue, 10 Oct 2000 19:47:36 EST) Organization: Telstra BigPond Internet Services (http://www.bigpond.com) X-MSMail-Priority: Normal NNTP-Posting-Date: Tue, 10 Oct 2000 19:47:36 EST Newsgroups: aus.computers.java