I am interested in the best object-oriented programming language, and am wondering some pros and cons to both Delphi and Java. I am first learned to program in Pascal so Delphi would be an easy transition into the oo style, however Java seems to be the wave of the future. Any ideas out their?
Miles, I've done a lot of work in Delphi; its real strength is its support for component-based development. For me, its the most "Rapid" of all the RAD tools. Java's strengths, however, outweigh Delphi's from almost every other perspective. The future seems to lie in distributed systems, and that's what Java was made for. If you've narrowed your choices to these two, pick Java. Just my opinion, of course. I could be wrong... jply
I too have done quite a bit in both languages, and use them side by side. IMO Delphi is the better choice if you do not expect to be working in non-Microsoft environments any time soon. Learning Java after Delphi is quite easy (easier I think than learning it without OO knowledge at all, though I cannot be certain, having learned Object Pascal and C++ before Java). Java's main strength lies in serverside distributed processes across multiple operating systems. Delphi on the other hand is strongest in clientside and Client/Server systems on Windows platforms. With the new Linux version of Delphi coming soon and more versions planned (rumours of possible ports to Solaris and Mac OSX), crossplatform development in Delphi is becoming reality sometime next year. If you decide on Delphi, wait for Delphi 6, as it will bring quite a few changes to the language (new component framework for crossplatform development, new database access framework, etc). Delphi is of course more expensive to start of in, as you really need the Pro version, which costs a hefty $700 or so, where you can get Java compilers and IDEs for free. I say learn both, and get the best of both world
Delphi is far superior to Java: 1. Not having JVM, with slllowww garbage collector makes exe's fly. 2. Having native properties and events built into the language, and the component model elegant design makes writing components fun. 3. There is nothing that you cannot do with Delphi on the Windows platform. the same is not true for Java. Where its performance is prohibitive for some tasks. Kylix (Delphi for Linux) makes Delphi cross platform. Although Java is supported on many more platforms, nothing prevents Delphi from being ported to Mac OS and Solaris. The new CLX architecture should make it pretty painless for Borland to do. When they get around to it the cross platform issue will not be as strong for Java. 4. Delphi supports web development on both Windows NT/2000 and Linux, running native code ISAPI/NSAPI, or apache loadable modules (Linux). The raw speed produced by Delphi will never be matched by Java. 5. Delphi's elegant IDE and form designer separates object definition and source code into two files. This makes code readability much better for Delphi developers. Why do I need to see the coordinates and simple properties of every visual object in my source code. It clutters and contaminates my code. Delphi code is 10 times more readable. But to repeat.. SPEED SPEED SPEED. Java failed on the client side because performance was unacceptable. So, what did the Java world do? Hide it on the "Server side". Why? Cause no one can visually measure it and see it's crappy?.. Delphi shines on the client and the server. With version 6, it now supports SOAP/XML, web services like no other development environment. It supports the .NET initiative (web services portion) better than Microsoft or Sun will ever be able to. I have tried C#, Java and of course Delphi. Trust me, there is no comparison. You owe it to yourself to try it for a while. It will blow you away, like it did for me. People don't know just how many commercial applications, which are used by millions of people were and are written in Delphi. It's the industry best kept secret. WELL, it's about time it should receive the credit it deserves. I'll be happy to go one on one against any Java developer that can prove me wrong.
Originally posted by Miles Endicott: > I am interested in the best object-oriented programming > language, and am wondering some pros and cons to both Delphi > and Java. Some of the points that Doron Grinstein brought up are valid. However, if your objective is to learn OO programming, I think Java would be a better choice. I am certified in both Delphi (4 & 5) and Java 2. In terms of being object-oriented, I found that Java is a lot "purer" than Object Pascal (OP). Also, there are more books about OO that use Java for their examples. Don't get me wrong though, Delphi is a very powerful and useful tool. I enjoy working with Delphi a lot. But I have seen too many OP programs that were some weird mix of OO and procedural techniques. That's why I decided to try Java. While it is still possible to write non-OO code in Java, the language itself makes thinking in terms of objects more natural than OP. Switching from Pascal to Java was easy for me though. I doubt that it would have been easier for me to switch from Java to Delphi had I learned Java first. But that's just me.
[This message has been edited by JUNILU LACAR (edited June 18, 2001).]
I wonder... could this be a Troll? Posting something that basically boils down to "D31F1 RU13Z D00DZ" on a Java board would certainly indicate that...
1. Not having JVM, with slllowww garbage collector makes exe's fly.
Speed was a problem for Java... and I say was... after 1.1 the execution speed increased alot. And anyway, garbage colloection isn't really a big factor in this... smart Java programmers don't make thousands of objects just to discard them... so garbage collection usually runs only at the end of the program...
2. Having native properties and events built into the language, and the component model elegant design makes writing components fun.
I don't see how you reach the conclusion native == fun... And if you are talking about the drag-and-drop design that comes with Delphi... most commercial Java IDEs let you do that too...
3. There is nothing that you cannot do with Delphi on the Windows platform. the same is not true for Java. Where its performance is prohibitive for some tasks. Kylix (Delphi for Linux) makes Delphi cross platform. Although Java is supported on many more platforms, nothing prevents Delphi from being ported to Mac OS and Solaris. The new CLX architecture should make it pretty painless for Borland to do. When they get around to it the cross platform issue will not be as strong for Java.
I think you are confused as to what "cross-platform" means... Kylix basically runs in a Windows Emulator on Linux... this could make VC++ "cross-platform" by your definition...
4. Delphi supports web development on both Windows NT/2000 and Linux, running native code ISAPI/NSAPI, or apache loadable modules (Linux). The raw speed produced by Delphi will never be matched by Java.
Don't really know what he's arguing about here... looks to be some kind of argument that Delphi can do server-side development followed by yet another jab at Java citing Delphis blazingly fast speed ( at least according to him...) Looks like it's not platform independent, though... and Delphi can't do applets... the other side of web development in Java...
5. Delphi's elegant IDE and form designer separates object definition and source code into two files. This makes code readability much better for Delphi developers. Why do I need to see the coordinates and simple properties of every visual object in my source code. It clutters and contaminates my code. Delphi code is 10 times more readable.
Whatever... you can get IDEs to design forms in drag-and-drop mode for Java, too... and as far as "cluttering and contaminating" code... if you are a good Java programmer, you will design these things in seperate classes anyway...
But to repeat.. SPEED SPEED SPEED. Java failed on the client side because performance was unacceptable. So, what did the Java world do? Hide it on the "Server side". Why? Cause no one can visually measure it and see it's crappy?..
Java supposedly "failed"? Hmmm... I see alot more Java apps out there than Delphi apps... And anyone can measure server side speed... this is an idiotic argument...
Delphi shines on the client and the server. With version 6, it now supports SOAP/XML, web services like no other development environment. It supports the .NET initiative (web services portion) better than Microsoft or Sun will ever be able to.
Whatever... Java supports XML through all kinds of packages (SAX and JDOM being the most popular ), and .NET is Micro$ofts version of functionality that has been available in J2EE for years now... only they are charging for it, making it only run on Windows, and adding lots of crap vapourware around the edges...
I have tried C#, Java and of course Delphi. Trust me, there is no comparison. You owe it to yourself to try it for a while. It will blow you away, like it did for me. People don't know just how many commercial applications, which are used by millions of people were and are written in Delphi. It's the industry best kept secret. WELL, it's about time it should receive the credit it deserves.
Yes... Delphi is good for RAD ( Rapid Application Development ) of GUI front-ends to Windows applications... Java is good for alot more...
I'll be happy to go one on one against any Java developer that can prove me wrong.
Java is actually object-oriented... Delphi still allows procedural programming...
Java is freely downloadable... Delphi is $100 for a "personal" version, and $1000 for a "professional" version...
Java is actually platform independent... Delphi only runs on Windows and Windows emulators...
There are alot more Java books and Java code out there to learn from... as well as JavaRanch (shameless plug)... is there a DelphiRanch out there somewhere? I don't think so...
As I said... Delphi is mainly used for throwing up a quick GUI frontend... if you actually want to learn to program... choose Java...
My $0.02 cents...
-Nate [This message has been edited by Nathan Pruett (edited June 18, 2001).]
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Miles, It's obvious that questions like yours will evoke passionate replies from either side. Take these replies with a grain of salt -- all developers love their tools and will defend them tooth and nail I have been fortunate to have worked in both environments. I favor Java now though just because I'm an IT "ho" and will do whatever pays me most. One thing I have to confess though: Before I crossed over to Java, I could not understand why I didn't get a whole lot of respect as an OO guy who did Delphi. To me, the language plays a smaller role to having knowledge of OO design principles and practices and the ability to apply them. Why should it matter whether I used Delphi/OP or Java? When I crossed over to Java and got a deeper understanding of the language, I began to see why Delphi/OP could be considered a second-class OO language by Java folks. I think a lot of it has to do with the RAD aspect of Delphi and other key differences in the two languages and the fact that you can still do procedural programming in Delphi (not that you can't do that in Java either). Whatever you end up choosing, just remember: OO is not really about the programming language as much as it is about the way you think about the problem and solve it. Know your OO principles, stick to them and you should be fine. Good luck!
I'm not going to debate languages, but I was just thinking that the whole speed issue is a short sited argument. If folks continue to depend on this as a basis for an argument (realize this is just one of several points brought up - but,like I said, this just popped into my head as I read this) it will be a kin to saying 40 bit DES cryptography is unbreakable (thinking only of the processing power at the time). While there is inarguably an upper limit on cpu speeds we still cannot say what it is. My point is that it is a very good bet that the speed of cpu's and array's of cpu's in the future will eventually nullify any arguments based on speed. Sean
I can see your point Sean, but I'm sure Microsoft thinks the same way with each version of MS Office.
Why should I try to improve my code? CPU's will keep up with my bloatware.
Why should Java try to get faster? CPU's will keep up with bytecode interpretation.
Joined: Nov 07, 2000
I'm not saying that we shouldn't try and optimise (though, from and software engineering perstpective, the last thing you should do is optimise, but that's another discussion). I simply argue that there is a convergence in the future at which point the differences in selecting one language over another is going to be so miniscule that it won't be a debate. Consider the fact that it used to be common place for a C programmer to write chucks of code in assembly simply because they needed the performance. Now, C compilers have gotten so good that you probably couldn't do a better optimization by hand anyway - so no one really does that (I'm speaking of general programming here. A friend of mine does embedded system with very limited memory specs and so...). All issues have to be weighed in chosing language, but it seems that the first thing that folks grab hold of is the speed issue. "This is 10% faster, therefore, it's the best for my needs - now about this OO stuff, how do we do that in VB?". Sometimes I wonder how priorities got so screwed up. This restaurant serves the biggest portion = the best place to eat. That car is the fastest = the best car. That stereo is the loudest = the best stereo. Wow. A bit cynical there Sean
I use both languages and C++, and I think that it really does what you use. Get your concepts clear and build your logic. And please optimize your code. Okay for the heck of an argument and since those on the side of Delphi are less, I take the side of Delphi: ------------------------------------------------------------ I think you are confused as to what "cross-platform" means... Kylix basically runs in a Windows Emulator on Linux... this could make VC++ "cross-platform" by your definition... ------------------------------------------------------------ Could the person explain how he got this wrong info? Please download Kylix and try it out. You will be shocked at how amazing it is. Oh! BTW rejoice everyone. Kylix and Delphi6 (Standard Editions) are FREE and you can download it. People with dial-up connections, have patience (147 MB). You can also download Borland C++ compiler (no IDE) from borland.com. Borland C++ is also being ported to Linux. And who said that Java is good on the server side? Try using Delphi. Delphi6 also allows communication with EJB. There is also a huge Delphi community on the net, the best being www.delphi-jedi.org . For gamers, I would say Delphi and C++ win. Pure Speed man! X-platform: Java win, but who needs X-platform when you have CORBA and Delphi combination. Oh and don't forget the pesky JVM or Java is not X-platform. Garbage collection: What a joke! This is not for programmers, but for beginners or people who don't understand the internals. Oh! it also exists in Delphi, but who needs it. So what is java good at: Ah! those cute applets. *GOSH* how amazing! That is pure eye candy (but the world likes sissy things). It is also good for people who have the patience to wait and look at the monitor for something to happen. <damn slow>. Requires at 256MB RAM and an Athlon 1.2GHz. I guess for a java app to run. Imagine what code written in Delphi can do.
Not like anyone probably reads this thread anymore but... Just thought I'd mention that I'm moving from Delphi to Java -- currently studying for the programmer cert. The reason? Oracle is now tightly integrated with Java, and there are a lot of Oracle sites in my city. I love Delphi... and I'll still use it at home for my OpenGL projects. But it does absolutely nothing for me on my resume (other than show I'm familiar with OO). And even though I'd like to write Windows applications for clients in Delphi, their support usually consists of VB or C++. I will say that learning Java after knowing Delphi has been a snap. And the great thing: Borland's JBuilder8 feels very familiar to the Delphi IDE
Of course, if you *really* basically want to learn OOP, you should also think about learning Smalltalk, Ruby or the like. I just saw a presentation on Squeak this week - hell, it really rocks...
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Joined: Feb 07, 2003
Like I said... Delphi doesn't do much on my resume except indicate that I'm familiar with basic OO concepts. The reason I picked Delphi over C++ was because I was doing 3D coding in OpenGL at the time. In that environment, C++ code can get downright scary and unmaintainable. I haven't looked into C# yet but as it's also written by Anders Hejlsberg, I suspect a lot of Delphi coders will be curious. Anyway I'd say to the original poster that Java is probably a better language for learning OO. Compared to C++ and VB though, Delphi would be a better choice.
i have programmed in Forth, Prolog , Turbo Pascal, VB , Java , DELPHI , C++ and recently C# and here are my comparisons between Java , C# and DELPHI: Java - multiplatform - small code - unfortunately too slow for 'number crunching' and speed-intensive program - awful editor - almost every object has to be created by the programmer initially except if u use JBUILDER ( which is from DELPHI BORLAND ) - it's a pure OO language and cannot be used for structured/procedural programming - slow application development time (SAD !!!)
C# - a Java-like language with a DELPHI-like programming environment - both structured and OO programming - best of both worlds - unfortunately it's still in its early versions - lots of objects are not included - one may have to program them himself - still slow coz it's an interpreted language - unsuitable when speed is a requirement - not multi platform - not very readable - it takes MINUTES and more than one pass to compiled into bytecodes ( or whatever microsoft calls it ) - hard to debug - a nightmare to debug - has IIS ( latest web thing from microsoft ) - Rapid Application development language (RAD) DELPHI - i love this language - both structured and OO programming - best of both world - it is a compiled language - fast and very fast on string manipulation - it takes only one pass and literally SECONDS to compile - a very comprehensive and complete language with lots of pre-programmed objects to click from - small code - unfortunately some programmers think PASCAL ( which DELPHi is derived from) is not hip - most readable language - Rapid Application Development language (RAD) - multi-plaform - DELPHI (windows) , KYLIX (Linux version) - DELPHI 7 has IIS too - i think it's a trade off between microsoft and BORLAND - BORLAND loaned anders to Microsoft and gets to use IIS in DELPHI in return - interfaces with other languages. - Kylix even compiles C# !! i choose DELPHI over Java anytime because i can write a same DELPHI program in a third time of developing a JAva program I choose DELPHI over C# coz C# 's system / compiler is still at initial stage and under-developed. Lots of pre-programmed objects are missing from C#'s menu tool bar lastly, i choose delphi coz it's produces fast codes, comparable to C++
Joined: Feb 07, 2003
Personally, I think you're unfairly putting down or hyping points for each language. For example, both Java and Delphi can easily be RAD depending on the IDE (what the heck does "awful editor" mean -- you're using Notepad?!) For example, if your shop is running Oracle iAS and you use JDeveloper, you can write AND deploy a fully J2EE MVC compatible Struts based JSP application with views, browsing, updating, editing et al... IN TEN MINUTES. What do you mean that a pure OO language cannot be used for structured/procedural programming? And therefore why do you think Delphi is not a pure OO language? What exactly do you think procdural code "knows" about OO? You missed a few points for Delphi: -Bad: Nearly all clients are going either J2EE or .Net. If they go J2EE they go Java. If they go .Net (so far from what I've seen) they've gone VB.Net (with C# neophytes pushing C#). Delphi is simply not considered by any client I know of for web-services. Yes, Delphi supports .Net, but so does Fujitsu COBOL and a host of other MSIL capable languages. -The fact that you're comparing Java, C#, and Delphi puts Delphi in a losing position because Delphi doesn't excel at web-services. If you would have compared VB6, C++, and Delphi I would have said Delphi was the clear winner.
Programming environments and programming languages are entirely distinct concepts. You can develop in Java "from the toolbar" with JBuilder or JDeveloper, or you can go at it from JEdit, vi, or insert your favorite programming editor here. Personally, I'm falling in love with Eclipse. Unlike Java however, it makes little sense to program in Delphi/Object Pascal outside of the Delphi IDE, or likewise, C# outside of Visual Studio. I have yet to see a "real-world" business application in which the constraint on development time was how fast programmers could type code, or how quickly and easily they could drag and drop GUI widgets onto a form. As languages, Java and C# are virtual twins. Or more correctly, C# is a near clone of Java. I much prefer the Java libraries, but C# libraries will certainly improve. Java was a little weak-kneed at first too. Java continues to improve as well, and Java applications since 1.4.2 are a lot snappier than before. For most users the difference from native code will be barely perceptible. Java gives you more choices to choose exactly what you need. You can use Tomcat or WebSphere, for example, as the situation demands. I can use Struts, Cocoon, Velocity, or roll my own. Different languages and environments for different needs. Java, C#, and Delphi all have a use. (Not to mention C/C++ which are far from dead.) As Windows moves exclusively to the .Net framework, there does not seem to be a compelling argument for Delphi over C#. If Delphi is your preference, fine, but you will no longer be at an advantage as it was with programming against the Win32 API. I don't see any reason to develop applications that are limited to a single platform. Java gives me more choices in designing an application, and Java has all the firepower you need for business applications of all kinds. To me at least, these are the advantages that make the argument in favor of Java compelling.
Joined: Sep 05, 2003
recently i had to develop a stock-forecasting system and was in a fix on which language to write it in - java , C# or DELPHI 7. finally after weighing the pros and cons , i decided to develop it in DELPHI coz i need a FAST RAD language. With the help of a real great RAD language, i finished developing that system in 2 months ( simultaneously doing other projects too) and i think i made the right choice. DELPHi was fast and my software could produce thousands of forecast readings in less than 3 minutes. i dare not imagine how long that would take to develop and produce forecast readings if i had written it in bytecodes languages like Java or C#. in the real world, programmers are always given a ridiculously short time to develop a software.that is why a great RAD language like DEPHI is greatly welcomed.Also, usually execution SPEED is the most vital of criteria specs in speed hungry applications like a forecasting system. Trust me , no one would be interested whether your codes are OO or procedural or a combination of both. what they would be interested in is how rapid can you develop your program and how fast can they run.
DELPHI has something that JAva and C# doesnt have - SPEED ! [ September 19, 2003: Message edited by: Jon Denim ]
Joined: Oct 12, 2000
Delphi uses 2 pass compilation now... This was introduced in Delphi 4 I believe, give or take a version. What Java editor are you using? Netbeans indeed isn't the best (IMO, others disagree). I like the Delphi IDE but it is getting cluttered with Borland adding ever more features. You can develop quickly or slowly in either language, depending on your skills and priorities. Never much liked point and click IDEs, though they are handy for building other GUIs (which I hardly do anyway except websites and those I handcode). Delphi isn't quite multiplatform, the same way that C and C++ aren't While you can now create code that works on Linux (with promised Mac and Solaris versions still not released) by using Kylix you need very careful coding to prevent using platform specific libraries. You also need to recompile for each platform. With Java you need to actively choose to use platform specific code and code compiled on one platform will run on another without recompilation. Delphi does NOT come with IIS. It CAN create CGI code for IIS and Apache both. For GUIs I prefer Delphi for the performance and ease of development (IF I'm not building a web application in which case JSP is the platform of choice). For serverside stuff it's Java. More portable (which is nice as we're deploying the servers on AIX and Linux depending on the requirements of the customer), easier to code than CGI modules, etc.
Here are the languages that I've tried using for development. Turbo Pascal, C/C++, Java, Visual Basic, Cobol, IBM-RPG,and Delphi.
Pascal was my very first language, so I love Delphi so much above all programming languages. But it does not mean that I won't be using other languages. I definitly still use all of them.
If you want to enter the realm of REAL WORK. Then consider these tips: 1. Learn all of them if you have the time to do so. 2. Your client is the most imporant person in your life. 3. They don't need your code, they need your program or application. but IT managers definitly will need your code for record keeping. 4. The faster you make your program with less bugs, the earlier you get your money. 5. what your clients need is a program that meets their demands.
Remember that Programming Languages has their own advantages and Disadvantages including their limitations.
One thing I like most of Delphi is... I get to finish any programs within just a small amount of development time. I get the money earlier. And I can still get to play my video games and have some fun.
Doing business to a client who needs a certain program in just a few day or so... gives you the flexibility to raise the cost of your program to the highest value.
Don't take programming to seriously... it can kill you... "just like that".