SitePoint Sponsor

User Tag List

Page 1 of 4 1234 LastLast
Results 1 to 25 of 90
  1. #1
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP Devs, Ever Considered a Second Language?

    I thought i'd start another thread for this specific subject.

    What I would like to ask the current PHP dev "gurus" (im assuming this term since this is the advanced forum) if they have ever considered another language to takeup as a serverside technology. Now before you go running off thinking what im about to mention stinks, please read on as it is factual information.

    Enter Java...

    Why did I say "Java"? Many don't truely know Java as a language, what it really is for and meant to do. Also, many underestimate its capabilities and features. Infact to those who have already said the following:

    "It stinks, its slower than a tortise on a soap dish!"

    That actually is true for the client side of Java, Applets and client-side applications. What im discussing here is server-side, the higher end of Java. The Server-Side end of Java was introduced a few years ago as a corporate Inter/Intranet solution over the current fad of perl and ASP. Since then it was exclusively for the enterprise market and gained little notariety due to its lack of community support for open-source.

    This has changed recently, as now some application server companies have "developer versions" and the Apache Jakarta project which strives to create new Java based projects and applications. However, even after this bold move the Java community is absolutely nowhere and utterly small. For a good example, try asking a question on the Java forums here and wait for some type of answer a week later.

    I am kindly asking.inviting some PHP devs like myself and you to see if we could work on making things easier for the PHP guys to switch over or pickup Java as their second language. The reason for this is to make Java/JSP/Servlets a little more popular as an alternative solution to PHP possibly.

    I will explain this in the next post.
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  2. #2
    + platinum's Avatar
    Join Date
    Jun 2001
    Location
    Adelaide, Australia
    Posts
    6,441
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I started learning Java2 at university, but I found it waaaaay too boring (the whole course). Then I moved onto PHP since the syntax was similar. I quite like java, but i prefer loosly typed languages =p

    I do miss having a compiler that actually spits out decent error messages though

  3. #3
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Java Servlets are the serverside technology of the Java language which have many advantages over other languages, explained below.

    - The language is a compiled, interpreted language with actual built-in exception handling with advanced handling of variables and control flow.

    - When you load your Servlet into the Application server, it becomes resident in memory, this is where it stays along with the interpreter. This allows for the non-cgi approach to not creating new memory allocations and threads per request but instead just handling the request over memory instead, tracking each request.

    - You have a persistent database connection pool. This being you don't have to reconnect to your database everytime a new request comes in, you simply bring up the JDBC driver and make your queries. Also, the JDBC drivers allow for query queueing for low-level and scheduled maintainence queries for garbage collection.

    - Complete control over the output stream, you can choose what content you stream to the client and when you do so. You can stream or output dynamic images, graphs, files, and more to a client using header manipulation.

    - Everything is a component with Java, from your XML/SOAP handler to your JDBC driver, you can pick and chose what you want to use or even write your own components which can be used by all applications.

    You are probably still arguing about speed, though this is going to shock you. JSP as a technology has grown over the years and the speeds of its execution and delivery are now comparable to flat html files being transmitted over an http server. The Servlet and JSP technologies have come a long long way in their technology development and they are just beginning to scratch the surface.

    I am probably leaving a few things out, but I made a good set there of some reasons to check out Java. Keep in mind that i am not trying to be like Darth here, bringing you into the Darkside. I am just tyring to see if PHP programmers want a serious language to checkout for web development. Plus I do want to see if Java and PHP can be side-by-side in popularity someday.
    Last edited by Theiggsta; Jan 12, 2003 at 10:28.
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  4. #4
    Talk to the /dev/null Theiggsta's Avatar
    Join Date
    Mar 2001
    Location
    Tampa, FL
    Posts
    376
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by platinum
    I started learning Java2 at university, but I found it waaaaay too boring (the whole course). Then I moved onto PHP since the syntax was similar. I quite like java, but i prefer loosly typed languages =p

    I do miss having a compiler that actually spits out decent error messages though
    I am not trying to knock PHP, just showing programmers out there, there are other languages ya know.

    Most Java classes focus on application development versus Servlet development and deployment, where the real stuff is hiding.
    Aaron "Theiggsta" Kalin
    Pixel Martini
    Ruby and Rails Developer

  5. #5
    No. Phil.Roberts's Avatar
    Join Date
    May 2001
    Location
    Nottingham, UK
    Posts
    1,142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im considering taking up Java, I figure learning a more advanced language will help me out in my PHP coding and whatnot.....
    THE INSTRUCTIONS BELOW ARE OLD AND MAY BE INACCURATE.
    THIS INSTALL METHOD IS NOT RECOMMENDED, IT MAY RUN
    OVER YOUR DOG. <-- MediaWiki installation guide

  6. #6
    SitePoint Member XiXora's Avatar
    Join Date
    May 2002
    Location
    Birmingham, UK
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I havent read the thread but
    i've been messing with c#/ASP.NET lately i love it.

    i'm way too tired atm.

  7. #7
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's an interesting article here: http://www.theperlreview.com/Issues/v0i7.shtml - Perl compared to PHP (in detail - not saying one is better than the other but useful for both PHP and Perl developers to learn the other).

    As to Java, wrote a little something comparing the two here and a more "scandalous" piece on how PHP may interact with Java in the future here

    The way I see it, Java is the workhorse for enterprise "back end" systems (a domain outside of PHP's sphere) while PHP makes a better choice for delivering a web interface.

    With PHP 5.0 the two should start to play together nicely. Knowing Java is a definate plus for PHP developers when that time comes...

  8. #8
    SitePoint Zealot
    Join Date
    May 2002
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im taking up C

  9. #9
    chown linux:users\ /world Hartmann's Avatar
    Join Date
    Aug 2000
    Location
    Houston, TX, USA
    Posts
    6,455
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I think that the whole .NET framework is awesome stuff. C# has everything you need to build fast (read: faster than Java) web apps. I think that Java is slowly but surely dying.

  10. #10
    Sidewalking anode's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, US
    Posts
    2,205
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's a few things on my plate, but I haven't started them up right now. Like many of you, I'm considering a more "serious" language(Objective-C.) I also want to get a bit more into Python so I can get a bit deeper into Zope, and I'm pretty intrigued by REBOL.

  11. #11
    SitePoint Zealot
    Join Date
    Oct 2002
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got into Java2 at university and I like it very much. Unfortunately I didn't try the server-side flavors of Java until now - have to get into that when my internship is finished and I have time for that.

    I've learned PHP for use in my actual project. I found it very easy to learn because of the Java background (you don't have to learn 'progrmming' anymore - just syntax).

    I think they both got positive and negative aspects and seeing them work together flawlessly would be great.
    include_once('./sig.inc.php');

  12. #12
    SitePoint Addict richard_h's Avatar
    Join Date
    May 2002
    Location
    London
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm starting to read up on Python

  13. #13
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think that the whole .NET framework is awesome stuff. C# has everything you need to build fast (read: faster than Java) web apps. I think that Java is slowly but surely dying.
    Tsk tsk tsk. Those MS types have been brainwashing...

    Java does need a serious shot of adrenelain. Sun have let it wallow methinks and have wasted many opportunities to push it into the mainstream (MS does know their marketting).

    Thankfully there's also IBM who've probably done more to make Java happen in business than Sun - 75% of the Fortune 100 companies have enterprise systems written in Java which probably has alot to do with IBM pushing it via it's sales channels.

    There's a great article on: When will IBM buy Sun?. I don't think Java is dying but Java has a massive lead which Sun failed to capitalize on. The real question is perhaps when will IBM be allowed to make Java really happen? As they've demonstrated with Eclipse, Java is capable of high performance if you do it right (Eclipse uses SWT / JFace rather than AWT / Swing).

    Overall Java has a massive lead over .NET and with the current economic climate, Microsofts less the nice reputation right now and issues relating to platform independence, there's still plenty of time for Java to squash the bug.


    Back on topic - looking at the PHP Jobs on Jobserver it's interesting to see PHP is finally being taken seriously - a year ago the types of PHP job listed there were "HTML Designer - PHP nice to have" - now we're talking "Chief Technical Architect" and "Software Engineer"... If you look at that list, it's normal for them to expect you to have knowledge of other languages, most commonly Perl, Java and C++ along with XML / XSLT knowhow.
    Last edited by HarryF; Jan 13, 2003 at 05:58.

  14. #14
    SitePoint Addict
    Join Date
    Dec 2002
    Location
    Gent, Belgium, Europe, World, Univers
    Posts
    397
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I already know and worked in ASP, JSP (you know, the java stuff scripting dude) and C# ...

    Gonna pick up ASP.net soon

  15. #15
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As someone who learnt VB before having written a line of code in PHP - I agree that the .NET thing is very exciting - especially now that it has a common runtime compiler with a decent object model that is cross language on that platform. c# as the windows version of java is very enticing.

    However, one has to make decisions - and the primary decision is platform. I have chosen the LAMP platform. While I am a PHP fan for web development - if I had to master another languate, it would have to be perl.

    Java is a good language - it has it's downsides, just like PHP has it's downsides.

    The .NET platform is good in that VB has always been a RAD platform - great for integrating Access or MS SQL data straight into an application without worrying about N-tier architecture. Got a data source - got a user interface - slap some busines rules in the middle and away you go!b ADO and all that.

    Java IMHO will always suffer from being a language without a platform. It's cool, and I agree a good academic first year programing teaching language, but as someone already mentioned, strongly-typed for web applications is not a natural mix.

    Given my choice of platform specialisation, I must say, what I must learn now is Perl, after that perhaps Pyton as a next language of choice.

    I think too often we overlook platform choice. Yet it is the most significant choice. As much as people carry on about abstraction and platform independence - this is just a pipe dream. We have to choose a platform as developers. I turn down busines everyday (in Australia, which neaven only knows is a very Microsof-centric place - especially in business) - because I have made a choice about platform.

    I never have to justify to a customer about whether I should use perl, php, python (zope) etc. but damn it, too often I have to turn away customers because I don't support Windows stuff.

  16. #16
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I find it funny that Harry's response to "should I learn a second language" is "PHP does all taht better anyways".

    Personally I'll learn anything that will make my job easier, and to the extent it will make it easier. For me that means that, in the same way that .NET may not be best for freakysid, things like Perl/Python aren't that advantageous.

    I won't knock anyone who learns them though, and, I think Java's a great technology. One which we use a little, but not too much since we've got .NET

    J
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  17. #17
    Ribbit... Eric.Coleman's Avatar
    Join Date
    Jun 2001
    Location
    In your basement
    Posts
    1,268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've already took up Java.. and am thinking about .NET

    I have ASP 2.0 knowledge as well, though it's a bit outdated
    Eric Coleman
    We're consentratin' on fallin' apart
    We were contenders, now throwin' the fight
    I just wanna believe, I just wanna believe in us

  18. #18
    SitePoint Wizard Mincer's Avatar
    Join Date
    Mar 2001
    Location
    London | UK
    Posts
    1,140
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I came to php from a grounding in software engineering in c/c++. I also know a little Java and some Perl. I intend to use my c knowledge to dabble in some c#.net, and to learn a bit of Python.

  19. #19
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I find it funny that Harry's response to "should I learn a second language" is "PHP does all that better anyways".
    Remind me - where did I say that?

    My opinion if similar to FreakySids in the sense that different languages are applicable to different problems.

    As I see it;

    Perl - best choice for process automation on Unix servers. There's a big demand for Unix sysadmins who know Perl.

    Java - best choice for modelling complex businesses in house (within an intranet) i.e. building a layer of intelligence on top of your data. Learning Java means you can get jobs building middleware in banks for example. That might also apply to C# were it able to run on Unix

    C++ - best choice if you want to build GUIs. On Windows this is superceded by C# but if you want your apps to be cross platform, you might consider GTK+ instead of MFC as your library. Always jobs for C++ developers. Also means you can write PHP extensions.

    C - best choice for lower level operating system stuff and writing PHP extensions. Know C well and there'll always be work for you.

  20. #20
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I dont personally see JAVA as a logical PHP partner(contrary to most here I assume) , if you are going to extend PHP then you need to find a lot of good reasons to say no to C/C++.

    For all its memory juggling and connection pooling JAVA is still slow, it has to be by its very nature, and I dont believe that true dynamic content can be served at near vanilla HTML speed via JSP though yes I have seen 'stats' that say it can, I have yet to see a JSP site that reflected that though.

    JAVA & JSP especially has depended on increases in hardware performance to compete, but these performance gains are fast gobbled up as soon as they are available in all languages/procedures, faster JAVA, faster everything else.

    I am trying to get back up to speed with C/C++ as I have not touched it for donkeys & want to extend .. & of course GTK , but everytime I learn a bit more I realise how much more I don't know... its frustrating innit

  21. #21
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hehe - firepages - I have only every programmed in C++ as an undergrad - but, oh yes, it is a lovely language. It doesn't wrap you in cotton wool like other compiled laguages such as Java - if you write it and it complies, then it's your fault when it crashes at run time- hehe.

    But, as much as it is a language that gives you enough rope to hang yourself, it has the most sophisticated object model of any language I have come accross. Multiple inheritence - no problem! Please tell me one other language that can do this so well? It handles scope as a geneologist would your grandmother's bones - especially things such as abstract base classes and multiple base classes.

    However, I think C++ may have seen it's day to a degree. When it comes to writing low level stuff - hardware drivers, and operating systems and such - C is still the engine room. When it comes to writing more IT level stuff, business applications, C++ has some drawbacks. First, in Java everything is a reference. In C++ this is where the OO side of things falls down. Is it a reference, is it a pointer or is it the object itself? Ah, too damned confusing. And when my object needs to speak to your object how shall I pass it - by pointer, by reference, by copy?!?!How do you destroy an object to which you only have a pointer as opposed to an object to which you have a direct handle? Blah. Also, one thing about C++ is that it has crude absract object collections - it has tempates which I've never been able to understand very well. But, in Java every object is derived from the great poo-bar object, so everything can be thrown into a collection if you treat it with the right scope.
    Last edited by freakysid; Jan 13, 2003 at 12:29.

  22. #22
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Recently picked up .NET using C#, and I've found that development is much less painful than with PHP. I've heard Java is similiar to C#, so I'm going to check it out once I've reached a decent level in .NET.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com

  23. #23
    SitePoint Wizard gold trophysilver trophy
    Join Date
    Nov 2000
    Location
    Switzerland
    Posts
    2,479
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I recently played with C# and ASP.NET.

    After a while I thought: "What's better? Spending my time on Sitepoint discussing an amazing open source project or working for Microsoft for free."

    Just throwing in the usual arguments I know Jeremy and Mattias are just fishing around for something, those ASP.NET forums having gone all quiet again.

  24. #24
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,121
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    :lost:

    ... I thought we were trying to have a worthwhile discussion. If I do PHP I don't work for the PHP group. If I do Java I don't work for Sun.

    ... Is it really that you don't use .NET simply because it's MS?

    That's really odd to say in a discussion about how we can all become better developers
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  25. #25
    Wanna-be Apple nut silver trophy M. Johansson's Avatar
    Join Date
    Sep 2000
    Location
    Halmstad, Sweden
    Posts
    7,400
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by HarryF
    I recently played with C# and ASP.NET.

    After a while I thought: "What's better? Spending my time on Sitepoint discussing an amazing open source project or working for Microsoft for free."

    Just throwing in the usual arguments I know Jeremy and Mattias are just fishing around for something, those ASP.NET forums having gone all quiet again.
    Rhethoric AHOY! What's better? Spending my time on Sitepoint discussing an amazing commercial project or working for the PHP Group for free?

    Finally, some action!
    Last edited by M. Johansson; Jan 13, 2003 at 17:04.
    Mattias Johansson
    Short, Swedish, Web Developer

    Buttons and Dog Tags with your custom design:
    FatStatement.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •