Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming

Ask Slashdot: Tips For Designing a Modern Web Application? 409

New submitter sdoca writes "I am a Java developer and for the past number of years I have mainly been working on server side code. I have an idea for a webpage/application that I would like to develop. For the general public, it will be a site where they can view upcoming events, filter them by type, date etc. and view details of events they're interested in. There will also be an admin section to the app where organizations who want to post their events can log in and set them up. In the long term, writing a view-only version as an Apple and/or Android app is on the radar, but I want to focus on the generic web app for now. I'm not sure what languages/frameworks to look at using for the webpage portion of my project. Many (many!) years ago, I wrote some applets. After that I did some work in WebObjects and after that I tinkered with Wicket. I have no experience with PHP and would like to stay in my Java comfort zone as much as possible, but want to use the right tool. I'm concerned about browser compatibility issues. Chrome didn't exist when I last did web page development. I'm looking for good resources (books, internet) that will guide me through the potential issues and your recommendations for a web development framework."
This discussion has been archived. No new comments can be posted.

Ask Slashdot: Tips For Designing a Modern Web Application?

Comments Filter:
  • by pushing-robot ( 1037830 ) on Saturday June 02, 2012 @07:45PM (#40197145)

    If you're familiar with Java but not web development, it sounds like Grails [wikipedia.org] might be a good place to start.

  • Ignore PHP (Score:3, Insightful)

    by Osgeld ( 1900440 ) on Saturday June 02, 2012 @07:56PM (#40197231)

    its the worst thing you could ever attempt to learn

  • by Anonymous Coward on Saturday June 02, 2012 @07:59PM (#40197253)

    Forget PHP. The language has seen very little progress lately. But even that wouldn't matter, as PHP is slow and horrible. Very inconsistent as well, as the it's little more than glue between some libraries.

  • by Anonymous Coward on Saturday June 02, 2012 @08:18PM (#40197355)

    You're talking about desktop GUI development - the submitter is asking about Java for web development. That's quite different. How many GUI apps do you use regularly that are written in Python, Ruby, or even Tcl/Tk?

  • by cowdung ( 702933 ) on Saturday June 02, 2012 @08:19PM (#40197365)

    PHP is garbage. Bad design all over the place. And I'm talking both about the language as well as the standard mess it calls a "library". It is the new BASIC.. stay away it'll damage your brain. For details see:

    http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/ [veekun.com]

    There are better alternatives if you want to go the dynamic route: Ruby on Rails and I hear Python / Django is great too.

    There's nothing wrong with Java as long as you know how to use it. But its always good to learn a new language. ASP.Net is also nice if you don't want to go dynamic.

    The hardest part about moving away from Java is losing all the cool static analysis tools that are incorporated in Eclipse as well as tools such as FindBugs. But our experience with RoR (in spite of it missing some needed feature many Java frameworks have).

    In summary: learn anything but PHP.. it truly is garbage that must die.

  • by AuMatar ( 183847 ) on Saturday June 02, 2012 @08:34PM (#40197437)

    Frameworks are good only if all of the following are true:

    1)You want to do exactly what the framework was set up to do. (in other words, everything about your app is cookie cutter)
    2)You aren't a very good programmer
    3)You already know the framework
    4)You don't want to do something wild and crazy, like write an sql query (the framework way tends to use 3 objects which define interfaces and require you to jump through hoops, all so it will automatically grab the data and unbox it for you in the format it assumes you want it in, rather than the format you actually want it in).
    5)You absolutely don't want to use any advanced database functionality whatsoever, since most frameworks these days assume that they can create and alter tables at will.

    If those first two things aren't true, you're going to spend an order of magnitude more time working around the framework's limitations than you will save by using it. If 2 and 3 aren't true, you'll spend more time learning how to use the framework than you'd save by using it.

    Frameworks are good for getting low to moderately skilled developers to pump out cookie cutter type apps quickly (so long as those apps don't need to worry about little things like scale and performance). They're absolutely horrible if you want to do anything novel, you need performance, or you actually know sql and just want to write a simple god damn query.

  • Re:Most important (Score:5, Insightful)

    by countach74 ( 2484150 ) on Saturday June 02, 2012 @08:49PM (#40197529)
    What do you mean you cannot build a 'modern' webapp using Java? It's done all the time. If memory serves, Gmail is in Java. I also disagree with PHP being the obvious choice. It's a lot like JavaScript: it's everywhere, so people use it. It doesn't change the fact that it's a piece of rubbish. Ruby and Python are much better suited towards modern web development. PHP is glorified template system that is extremely inconsistent and overall ass backwards. The whole notion of mapping a URI to a file is so 1990's.
  • by Kergan ( 780543 ) on Saturday June 02, 2012 @08:52PM (#40197553)

    CoffeeScript... That way, when your console tells you you've a JS error on line X, you need to check the code output by CS, and locate whatever code you wrote that could have generated the relevant lines, all the while coping with the fact that CS doesn't cover 100% of JS, and introduces its own set of bugs and quirks on top of those in JS. Good luck with that in the long term.

  • by Fnord ( 1756 ) <joe@sadusk.com> on Saturday June 02, 2012 @09:01PM (#40197597) Homepage

    Parent was me, forgot to log in

  • by htnmmo ( 1454573 ) on Saturday June 02, 2012 @09:09PM (#40197631) Homepage

    Almost all the sites I've built are written in Java. Stick with Java. I've written sites in PHP and I've also had to work on updates to some PHP sites. If you're already familiar with Java dealing with PHP will feel like a joke. PHP is great when you don't want to write your own software since there are so many publicly available stuff out there in PHP. Don't worry, you won't find a lack of Java libraries that will do anything you want to do.

    Don't bother trying to learn a new language because you'll just slow yourself down trying to learn the semantics of the language instead of the details of the new libraries you'll be using. I know java gets a bad wrap in terms of performance but I've always found that Java kicks PHP's ass in terms of performance in the tests I've done.

    The main issue with java is that when you're using a servlet container like Tomcat, the process runs constantly and takes up memory. It's not that much but it's hard to find Java hosting because the memory issues makes it hard for a webhost to put thousands of websites on the same server.

    Your best bet is going to be to find a cheap VPN when you get started but check the big webhosts to. I remember LunarPages used to offer JSP support in the past.

    There are a bunch of different frameworks. Stick to ones that are popular because you'd rather have some limited functionality now rather than an unsupported framework in the future. Which has happened to me.

    I believe right now that's Spring [springsource.org] but Struts is still pretty popular too.

    I've found NetBeans [netbeans.org] to be a great IDE and it supports Spring.

  • by SplashMyBandit ( 1543257 ) on Saturday June 02, 2012 @09:13PM (#40197647)

    GWT is great if you want interactivity. Also fits in well since you are a Java programmer. I've also recently discovered vaadin (http://vaadin.com) which extends GWT and provides much nicer themes than the default. Best of all, all the tools you need for GWT/vaadin development are free (both zero cost and source is available); Java, Tomcat, Eclipse or Netbeans, GWT + GWT plugin (for debugging in your browser), vaadin and the all-important community documentation/forums (that is, you don't have to pay for a subscription like MSDN). Best of all vaadin/GWT handles almost all of the browser variation for you (although there are differences in CSS for advanced styling).

    Since you are already a Java programmer I would say you'd be mad to go past GWT (which you also develop for, and can debug in Java). Other solutions are ok for static page-oriented viewing but for a complex dynamic site it is hard for a competent Java programmer to be more productive than with GWT (except for the smaller sites with not a lot going on). How do I know, well I use GWT daily - including building complex sites for managing medical information for our national-level health ministry.

  • by rev0lt ( 1950662 ) on Saturday June 02, 2012 @09:45PM (#40197825)
    While I do understand your point (and agree to a certain extent), frameworks usually provide you a nice set of consistent components that have been used and TESTED by a ton of people before you. Shure there are bugs, and for simpler applications they may be overkill, but you also get the benefit of a (mostly) tried-and-true library. If your task is designing an application, it makes no sense wasting your time developing, testing and debugging every single core funcionality you need (eg. database api, routing, caching, locale handling, etc). If even the code produced by some (very smart) framework programmers has bugs after extensive testing and usage by third parties, imagine your own code.
  • by Jah-Wren Ryel ( 80510 ) on Saturday June 02, 2012 @09:52PM (#40197869)

    Any of the Gawker Media websites, some times you have to reload t hem 3 times to get the fricking hyperlinks to work.

    A little tangent....

    Gawker's websites suck in other ways that relate to usuability too. I use noscript religiously, there is nothing about the gawker websites that need javascript, but all you get is a nearly blank page if you don't enable javascript. UNLESS you change your brower's user agent to something Gawker doesn't recognize as supporting javascript (I change mine to an old version of googlebot). Then they send you pages that work perfectly well without javascript.

    So clearly they can do non-javascript pages, but if they recognize your browser they won't give them to you and even worse, they won't even explain what's going on, it just silently fails with a blank page. They can't even be bothered to tell you to enable javascript, which is really just pathetic.

  • by shutdown -p now ( 807394 ) on Saturday June 02, 2012 @10:04PM (#40197937) Journal

    TL;DR version is that PHP is crap. For a lengthy treatment of the subject, see my sig.

  • Re:Ignore PHP (Score:4, Insightful)

    by shutdown -p now ( 807394 ) on Saturday June 02, 2012 @10:06PM (#40197957) Journal

    Because it's crap. See sig for details.

    And It works so "well" for Facebook that they essentially had to re-implement it as a PHP-to-C++ translator just to get decent perf out of it.

  • Re:Most important (Score:5, Insightful)

    by Jane Q. Public ( 1010737 ) on Saturday June 02, 2012 @10:12PM (#40197993)
    I second countach74.

    Python, or my personal preference Ruby, are vastly superior choices. Django and Rails are intentionally -- and more to the point, well -- designed to be friendly web frameworks, built on top of their respective languages.

    I don't even call PHP a "language". It is just a hodgepodge of inconsistent utility functions bundled together. PHP was originally designed with the Web in mind, and only later added pretensions of being a general-purpose language, with Object Orientation kind of bolted on even later as an afterthought.

    Because Python and Ruby are far more internally consistent than PHP (Ruby even more than Python, in my opinion), they are also easier to learn. However, learning the language and also the framework entails some serious work. That is just the nature of the beast... there is no getting around it. You need to know the language, the framework, HTML, CSS, and JavaScript.

    Nobody said serious web development was easy.
  • by Arker ( 91948 ) on Sunday June 03, 2012 @05:57AM (#40199847) Homepage
    I dont care what language(s) and toolkit(s) you use on your backend. But when you get ready to send code to my web browser, send HTML.

All seems condemned in the long run to approximate a state akin to Gaussian noise. -- James Martin

Working...