paragkalra has asked for the wisdom of the Perl Monks concerning the following question:
Hi All,
I am doing a project where we interact to Database, execute SQL queries, validate flat files, upload it to database, again do the validation etc.
So far we have been doing it using Perl and we have faced no issues what so ever. Perl is very fast and uncomparable. We know that but client doesn't understand it.
For some odd reason client wants to switch to Java. Can Java match Perl to do the database related tasks as easliy as we can do in Perl and is there any reason to love Java against Perl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reasons to hate Java?
by Tux (Canon) on Jun 25, 2010 at 11:48 UTC | |
My biggest problem with java is not the language itself. Just as perl, it serves a market, and the language is grown-up enough to be useful. What makes me hate java to the bone has nothing to do with the end product: what the customer will see, but is all about developer time. Performance-wise, java seems to be able to match perl in many aspects nowadays. You'll probably be requiring java6 and a lot of memory, but database access is well supported from java's point of view. I agree that client that want java over perl for no reason are stupid. There are however enough reasons for some client to choose java. There is a perfect tool for every problem, and that tool is not always perl (but it quite often is). Enjoy, Have FUN! H.Merijn | [reply] |
|
Re: Reasons to hate Java?
by moritz (Cardinal) on Jun 25, 2010 at 11:35 UTC | |
For some odd reason client wants to switch to Java. Maybe you should try to talk to the customer, find out why she wants to switch, and maybe explain that since you know Perl better than Java, development in Java will take longer. There are reasons why some people don't like java, but most of them are rather technical (for example that you need much more code to express something than in Perl, and some oddities like type erasure), but they are typpically not what a client is interested. Typically clients want to have a product implemented in a way that's fast, cheap, reliable, finished early, easy to maintain, easy to find maintainers for (that's probably easier for Java than Perl, given the shear amount of Java programmers) etc. You can use the knowledge for your own ends, and argue that you have better Perl expertise and than Java; however that might backfire if the client doesn't want to make a compromise, and rather choses a different consultant.
Perl 6 - links to (nearly) everything that is Perl 6.
| [reply] |
|
Re: Reasons to hate Java?
by rovf (Priest) on Jun 25, 2010 at 11:10 UTC | |
Reasons to prefer Java over Perl:
-- Ronald Fischer <ynnor@mm.st> | [reply] [d/l] |
|
Re: Reasons to hate Java?
by cdarke (Prior) on Jun 25, 2010 at 12:43 UTC | |
Or maybe the client just wants the rest of the project in Java, so now you have language compatibility problems. Switching languages for no good reason mid-project just does not make sense, these must be something more to it, surely? There are non-technical reasons for choosing Java (or any other language), maybe the client is Sun or Oracle, in which case it would be understandable. I have seen some clients, commercial and state, that only employ programmers with some certification track qualification. Java has that and Perl does not. More likely though the client has a skewed view of Perl as a language. In some quarters Perl still has a reputation for not being a serious language, but more a hacking tool. Google "Perl success stories" might find what you are looking for. Java is backed by a big corporate with pots of money, which makes the suites more comfortable. That's a completely false sense of security (as the current banking crisis shows) but its hard to fight. | [reply] |
|
Re: Reasons to hate Java?
by dHarry (Abbot) on Jun 25, 2010 at 13:07 UTC | |
Perl is very fast and uncomparable "Uncomparable" definitely, but "very fast"? ;) we have faced no issues what so ever This must be the first project in the world without issues! We know that but client doesn't understand it What have you tried to make the client understand it? I would like to know the reason behind changing to Java. You mention nothing about the size of the project. A database, SQL queries and file validation doesn't sound too complex. What type of client are you looking for? Will it be a web-based system or are you aiming for a rich/fat-client? How many (concurrent) users? How complex is validation of the flat files. etc. etc. In other words it is impossible to make a proper judgement wether it is justified or not to change to Java. Depending on the complexity it might be an unrealistic amount of work to rebuild the system, that would be a good argument not to do it. Can Java match Perl to do the database related tasks as easliy as we can do in Perl Yes, I'm convinced about that. Database communication is done through JDBC but it doesn't stop there. You can do it the old-fashioned way and write SQL code and execute it, or use the new approach utilizing the JPA (the Java Persistence API) and maybe JTA. You don't have to write any SQL code. The object-relational mapping, generation of the database schema etc. is all handled by Java for you. I especially like the so-called "named queries". You work with tables and records like they were (collections) of objects. If the project is not too big and you have to change to Java I would simply go for the Apache Tomcat a few JSPs/servlets and mySQL or Javadb. This works for small to medium sized applications. If you want scalability (think thousands of users and many concurrent users) or if you need some of the features that go with it you might consider using an Application Server. As the system gets bigger or more complex using an AS makes sense. I have good experience with Glassfish. But beware, Java EE 6 is a complex beast. 28 specifications for the proverbial everything but the kitchen-sink. It's a very powerful environment but has a learning curve. Although it has been simplified recently it's still complex (IMO). Cheers Harry | [reply] |
|
Re: Reasons to hate Java?
by Anonymous Monk on Jun 25, 2010 at 11:21 UTC | |
Bean envy? | [reply] |