When should I use Java, Perl, PHP, or Python?
Java is a good language for bigger systems ... teams of programmers writing bits of code that interact with each other. In fact, Java is so well tuned towards the bigger systems that it's not the ideal language for smaller systems - for the people who are just looking to write a quick piece of code to comb something out of their log files, or who are adding a straightforward little piece of program to their web pages. Those smaller systems are better in PHP (web page content), Perl (short utility) or Python (typically for things which are more than just a few lines, but don't come up to the Java size). OK - that's a simplification
but I have no axe to grind one way or the other as we offer courses in all of them - it's a question of selecting the right tool for the right job. The diagram above / alongside shows a graph of application size (along the bottom) with appropriateness up the left hand side.
One of the ways that Java is tilted towards being a "big system" language, and the others tilt in the opposite direction, is its requirement for all variables to be declared and typed, and for all methods [named blocks of code] and static (class) and dynamic (object) variables to have a scope of visibility associated with them. The diagram alongside shows these various scopes
- you have
- visible only within the class in which it is defined
- (default - you do NOT declare this) - visible within the class in which it is defined and within other classes in the same package - i.e. visible to its brothers and sisters, but not to its parents, children, nieces, nephews or other more distant relatives.
- visible within itself, to its siblings, and to their children (and their children's children, etc) too. Not visible to parents.
- visible from within any other class.
Please do get in touch if you want to discuss your own specific requirements and which language suits you best; I'm always happy to talk through things with people so that they make the right choice. And it's not always a strict technical issue - if you already know PHP, it may be better for you to expand your use of it to cover non-web applications rather than learn something new, with all the extra maintenance needs for your company. Or if you already have a Java programming resource in house, it may be better to expand the use of that rather that branch out anew. (written 2009-12-13, updated 2009-12-15)
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articlesJ709 - Java - Class Access 
Accessing variables across subroutine boundaries - Perl, Python, Java and Tcl - (2015-01-18) 
Private and Public - and things between - (2011-01-22) 
What is a universal superclass? Java / Perl / Python / Other OO languages - (2010-11-13) 
Where is my Java class? - (2009-09-24) 
Who can use which access door? - (2006-09-21)Q102 - Choosing your language 
Programming languages - what are the differences between them? - (2012-06-27) 
Shell, Awk, Perl of Python? - (2012-06-14) 
Ruby v Perl - a comparison example - (2012-02-21) 
Python or Lua - which should I use / learn? - (2011-12-21) 
Rekeying a table - comparison in #Ruby #Perl and #Python - (2011-02-14) 
Ruby - how does it compare and where is it the right language? - (2010-07-11) 
The same very simple program in many different programming languages - (2010-03-31) 
All the Cs ... and Java too - (2009-12-13) 
Admission - (2009-11-19) 
Learning to program in PHP, Python, Java or Lua ... - (2009-02-19) 
I have not programmed before, and need to learn - (2009-01-19) 
Speaking all the languages - (2009-01-12) 
Learning to program in - (2004-10-07)
Some other Articles
Changing ImagesOpen Source Training Centre and Courses for 2010Faster network, but not faster browsing until ...When should I use Java, Perl, PHP, or Python?And now for some posts a bit more technicalFive guests, three groups, one carAnalysing Google arrivals by country of originMelksham - new Tuesday MarketTaking a knock over Santa
4688 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94 at 50 posts per page
This is a page archived from The Horse's Mouth at
the diary and writings of Graham Ellis.
Every attempt was made to provide current information at the time the
page was written, but things do move forward in our business - new software
releases, price changes, new techniques. Please check back via
our main site for current courses,
prices, versions, etc - any mention of a price in "The Horse's Mouth"
cannot be taken as an offer to supply at that price.
Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).