how do I find out what server-side language I wanna learn?

Discussion in 'OT Technology' started by piratepenguin, Feb 14, 2007.

  1. piratepenguin

    piratepenguin New Member

    Joined:
    Jun 18, 2006
    Messages:
    1,067
    Likes Received:
    0
    Location:
    Ireland
    EH?

    I've been using PHP all the time for the last few years when I needed something server-side to happen, and it works, but I never learned how to use it properly and I've plenty of reasons to believe the alternatives might be worth properly-learning faster.

    Such as Ruby on Rails, Python/Perl (both of which I'd like to learn, and while I have been seriously looking at Python programming, I could NOT figure out how to do server-side stuff with it, wtf? (any pointers for that?)), etc..

    Or are there any commendable books on the topic? Something just generally about setting up not-tiny websites or web-apps, even. I wouldn't mind reading something which explains, after explaining CGI, how server-side programming happens in each language/framework.

    Finally just to throw out there.. anyone ever write bindings in any of these languages? I'd be interested in how they work, since it looks like I might need to write my own for a C++ library. (all these languages can, with work, interface with C++ libraries, right?)
     
  2. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    Hey

    Seeing as you've been using PHP for a while, you'd be pretty well served to stick with that.

    PHP is cursed a bit in that it's so easy to pick up, but also very easy to use badly. Due to its massive popularity and share of the web market, there's some really horrid stuff done in php.

    But don't let that put you off. Coding with good practices in PHP5 can be just as elegant and tight as J2EE, .NET etc.

    Learn how to use the OO features of PHP5, and read the Security chapter of the PHP Manual. Look into learning and using a templating system like Smarty to separate your code from your presentation.

    I could go on! But if you apply yourself you'll be amazed at how good PHP can be in comparison to the other languages, and likewise be very embarrassed at how you used to use it haha.

    Ruby on Rails could be nice for you to try as well. But I recommend you stick to PHP and you're already giving yourself a head start :)

    I don't know of any generic web application books that might compare the frameworks.

    And I can't help you with bindings sorry. There's tutorials out there for creating PHP C Modules which would be a good start (seeing as a tonne of the modules used in PHP are popular 3rd-party C/C++ libraries)
     
  3. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Badly-written code is always the fault of the programmer, not the language. I wish I knew why people always blame the hardware -- "I crashed in the snow because my traction control doesn't work well enough!" "No, you crashed in the snow because you're an idiot." The only time the language is at fault is when it doesn't provide the infrastructure needed to write good code; if the language is flexible and allows the programmer to choose whether they want to write clean code or dirty code, the fault lies with the programmer if they try to use dirty code where they should be using clean code.
     
  4. piratepenguin

    piratepenguin New Member

    Joined:
    Jun 18, 2006
    Messages:
    1,067
    Likes Received:
    0
    Location:
    Ireland
    Deadly! I guess I can get started with PHP then.

    Anyone have experience with, or understand, mixing server side languages, I wouldn't suppose?

    Thank yous!
     
  5. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Actually, PHP encourages bad code by tightly mingling the controller and the view. It is not a coincidence that almost all PHP code is completely shitty and unusable.
     
  6. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    If you are going to learn a server side language, then pick one with a framework that will save you time and provide structure for your applications, as opposed to manually handling everything in PHP. Ruby/RAILS, Perl/Catalyst, Django, etc. are good choices. To make scalable web applications, you want something that uses the Model-View-Controller pattern. I posted a video comparison of some here, some time ago. Check that out.

    Personally, I use Perl/Catalyst daily. I would recommend this... but it is not an easy learn. Especially if you are new to Perl. Once you've got it, it is great, as it handles things like sessions, authentication, deployment, redirects, writes my SQL for me, etc. and I never have to think about this stuff. But it was hard to learn, even with the tutorials, because it relies on DBIx::Class, which is hard. Worthwhile, but hard.
     
    Last edited: Feb 15, 2007
  7. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
  8. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    There's always ASP.NET...:hs:
     
  9. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    I'm not familiar, but I've never heard anyone say anything nice about ASP.NET.
     
  10. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    I'm currently in a Web Server Programming class at my Uni and we're using J2SE with MySQL. I know very little about perl/python/ruby but I know a little PHP. From my limited experience, I like Java a LOT more than PHP....especially since I know more about the Java language than I do about PHP.

    Servlets are like PHP script files that you call from an HTML page or link or from the URL directly. The nice thing is that they are just java programs so if you already know Java and HTML, programming servlets is a breeze.

    Both Java and the NetBeans IDE are free. NetBeans is cool because it has a built in Apache TomCat server so you don't need to install a seperate one. You can pretty much do what ever you want to by right clicking in NetBeans. It's a great combination that I'm really enjoying using.

    Here's our course text:
    http://www.amazon.com/Core-Servlets...=pd_bbs_2/102-6944009-9693715?ie=UTF8&s=books
    and I really like the way the material is presented. It's an easy to read book and if you've already had some experience then you can skip some of the early chapters.

    There are also supporting course materials online that are like cliff notes for the book. Here's the link for those:
    http://www.coreservlets.com/#CSAJSP2

    Anyways, hope that helps.
     
  11. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    People don't usually say nice things about Microsoft products -- as a general rule though, they still use them and they still get the job done. Word, Excel, Outlook, Sharepoint, SQL Server, .NET Framework...and so on. The problem with being the standard is that nobody sings your praises.
     
  12. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    I can't think of a single company (other than microsoft itself) doing anything innovative using ASP.net. Whats more ASP.net is far from the standard in this area. Can you name such an example?
     
  13. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    I would strongly suggest watching the video I linked.
     
  14. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    I just did and thanks for posting it.

    One thing I can say is that he's not using NetBeans so he has to manually code his servlets and JSPs. A LOT of the headache of this is removed by NetBeans, it provides the a template for about 90% of what he was doing manually. Hard for me to address the full application development he was talking about because I'm still learning how all this stuff works.

    In my limited experience tho, I can certainly see how difficult the UI is to program even with NetBeans. With just 3 assignments under my belt, I'm already cursing some things about this. However, it's hard for me to say whether this is due to limitations in NetBeans or Java or my own ignorance....I simply need more exprience to know where these problems lie.

    Anyways, good vid..thanks.
     
  15. piratepenguin

    piratepenguin New Member

    Joined:
    Jun 18, 2006
    Messages:
    1,067
    Likes Received:
    0
    Location:
    Ireland
    Thanks for all of your input!
    I certainly did get the idea that Java sucks from it... Since Java's becoming free, I'm interested in learning how to use it and possibly do useful programming with it, but it seems for web-based stuff, there are more interesting things out there.

    I think I can like Plone/Zope! So I'll work on playing with it..

    Whenever I saw the stuff that was done in the web-browser, that "should" have been done in a text editor.. I nearly cried, are these guys joking? But it seems to be the most serious of them all, or maybe I'm overrating internationalisation and taking things too heavily.

    We'll see when I start working with it. If it doesn't work out, I probably won't be arsed to look for another framework and just use PHP, which I have been able to handle.
     
  16. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I didn't list ASP.NET as the server-side programming standard, I was just making the point that, as the 800-pound gorilla in the IT room, Microsoft tends to be acknowledged but not praised, even when they do something well. When was the last time you heard anyone say "Thank God for DirectX!" Not lately, but it made game development a hell of a lot easier anyway.
     
  17. Supergeek

    Supergeek New Member

    Joined:
    Jan 23, 2007
    Messages:
    1,855
    Likes Received:
    0
    Location:
    Colorado
    Great video, and I thought the same thing when they were editing inside the browser. I mean, what about simple things like syntax highlighting, parenthesis/brace matching, search and replace, line numbers, etc?

    I'm kind of paranoid about a program auto-generating code for me that sits in the background somewhere. I'd rather have a good library I can just #include.
     
  18. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    Languages CAN be blamed for allowing bad code. PHP is a good example, with historical settings like register_globals creating insecure and ambigious code. But the responsibility is always on the programmer to be aware of these sorts of concerns.

    I've been using J2EE, PHP and .NET for years now, and all three are excellent, and I'd recommend them all. ASP.NET is a very good product. They've all got lots of free libraries and community support.

    J2EE and .NET are great in that because they've got OO frameworks, it's really easy to integrate libraries and 3rd-party code into them. Meanwhile PHP stuff is a mix of C Modules, PHP function libraries, PHP class libraries, all with different coding standards. Even the native PHP functions are inconsistent with their naming conventions ><

    The good news is that PHP is getting better.

    piratepenguin: I recommend you further your reading on PHP, and look into the Zend Framework. Zend are the commercial entity behind PHP if you aren't aware of them, and Zend Framework is an excellent starting point for making a web app. http://framework.zend.com/
     
  19. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    MFing :werd:

    At work I have to use Oracle Portal to make websites for the Navy. Not long after I started working with it, I gave up trying to use Portal's web based "development interface" (who says a database company can't make a better website editor than...oh...website editor companies? I do.) and started creating a single container for each page, filled with plain HTML and Javascript.

    My boss took one look at my first site, said "great job", and asked me how I built it. I told him I used HTML and JS while avoiding Oracle's shit -- "that's why it looks so good." He laughed so hard he cried, then sent a letter to the customer letting them know their new site was ready.
     
  20. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Why not code your own interpretter too? Why not make your own operating system?

    Your paranoia is totally unjustified. All of these frameworks let you take direct control of whatever is of interest to you. Otherwise for typical operations shit just works. It just works. These are not dogmatic frameworks. They are new. They work well. These languages and frameworks are optimized to solve the problems one encounters when building web services. Test them, and you will know they work and trust them.

    Kinda like a million other components you take for granted, and don't feel the need to recreate.
     
  21. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I can't speak for everyone, but at least in my case, it's not so much about paranoia that the framework is wasting CPU cycles without me knowing, it's more about wanting to get the shit to work exactly the way I want, the first time, without having to re-learn how to write my code. Hell, I think it's a pain in the ass to use the C++ Standard Template Library, but I suppose I'm in the minority on that one.
     
  22. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    Right, this goes back to experience. If you are coding anything of any complexity, and you're being PAID to do it... only an incompetent amateur wouldn't use STL. Period. You are wasting someone's money if you don't.

    Using STL lets you deliver results in less time. Same with a web framework. Coding your own auth, session, and ACL code is totally STUPID, if you're just being asked to write an application that happens to have those features but that seeks to accomplish something else as its main feature. You should be spending all the extra time using a framework, or the STL, gives you, improving what MATTERS. Because it takes multiple revisions to get something right.

    Hesitance to learn something new is no excuse. Don't feel too bad, though: your attitude is really common among lousy software engineers. This is why so many software projects totally fail to achieve their objectives: you've got some yin yang writing his own linked lists instead of getting real, valuable work done.
     
    Last edited: Feb 16, 2007
  23. Supergeek

    Supergeek New Member

    Joined:
    Jan 23, 2007
    Messages:
    1,855
    Likes Received:
    0
    Location:
    Colorado
    Since I'm not a professional software developer, I think I escaped being burned to death by Peyomp's ire, but I did get singed eyebrows.

    Anyway, for those interested, I found something else; the Zend Framework. http://framework.zend.com

    It's not 1.0 yet, but they say they're close. It's a framework for PHP that you can use as little or as much of as you want. Throw in a require_once() for the sections you want in your pages, for example just the database, just the auth, whatever.

    For me, basically a PHP hobbyist, this is a nice middle ground and I'm looking forward to seeing it mature. I may try it out before they hit 1.0.
     
  24. Peyomp

    Peyomp New Member

    Joined:
    Jan 11, 2002
    Messages:
    14,017
    Likes Received:
    0
    If you're a hobbyist... do what you want. After all, its about fun. If you are paid to accomplish business goals with software... that is another story altogether, and reinventing the wheel when there is rigorously tested code available for free is unacceptable in every way. That doesn't mean it doesn't happen all the time, though.

    I'm not shitting on PHP hobbyists. Its a swell language for an introduction. Personally I can't stand it, but to each his own. Zend looks like a reasonable web application framework.
     
  25. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Everybody is self-righteous about certain things. If it means that he won't try to kill me for looking at women's ankles, I'm willing to put up with Peyomp's bullshit about how I'm somehow not a professional software developer, despite being gainfully-employed as such.
     

Share This Page