Forgot your password?

typodupeerror
Programming

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

Posted by timothy
from the use-a-lot-of-blink-tag dept.
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:
  • There's two parts (Score:3, Informative)

    by sribe (304414) on Saturday June 02, 2012 @07:53PM (#40197213)

    For the client side, you want to use at least JQuery (& SASS & CoffeeScript), and learn about non-intrusive scripting. You may also want to investigate other libraries that layer on top of JQuery.

    For the server side, the choice is less clear. I happen to like Rails--it was the first web app framework that felt even remotely "right" to me, but since then there's been a lot of development and a lot of cross-pollination of good ideas across languages/frameworks, such that there's now a number of choices that rate as "pretty damn good" in my opinion.

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

    I just started playing around with the Play framework (Java/Scala) I'm loving it, and I'm coming from *gasp WebObjects, and .Net. I can't speak too much about its features but it's really simple to get up and running connected to a database and serving content, as well as creating REST api. Deployment is a single command.
    This is what I'm using for a tutorial: https://github.com/jamesward/play2torial/blob/master/JAVA.md

  • by Lumpy (12016) on Saturday June 02, 2012 @08:00PM (#40197261) Homepage

    If it does not load perfectly every time, you failed.

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

    any usability bug is an epic fail.

  • CMS and done. (Score:4, Informative)

    by adosch (1397357) on Saturday June 02, 2012 @08:02PM (#40197269)

    Just use a CMS and call it good. I remember the days before very customizable templating where you hand-roled all that web site crap yourself. There are plenty of CMSs out there (TomatoCMS, Wordpress, Joomla, LightCMS, ezPublish, etc) that will do exactly what you want in about 20 minutes of your time. There's also lots of customizing and add-on's you can get for the more popular CMS's that I mentioned, too. And to keep to your Java roots, you can do all the client side stuff you want in JQuery or equivalent.

    That's my $0.02.

  • by schlesinm (934723) on Saturday June 02, 2012 @08:04PM (#40197287) Homepage
    GWT is decent if you are building a web application that will be doing one thing. If you are looking for a more broadscale application, then GWT doesn't hold up well.
  • by rHBa (976986) on Saturday June 02, 2012 @08:22PM (#40197379)
    To be honest you're gong to have to know some HTML/CSS at some point. It's considered impolite these days to insist (or expect) that the client side understands Java.

    In other words, assume that Java ISN'T supported on the clientside.
  • by AncientPC (951874) on Saturday June 02, 2012 @08:50PM (#40197533)

    For reference, I come from a LAMP + CodeIgniter background. I've done some Java stuff for university and at IBM, but nothing on the web side.

    If you're coming from a Java background, I'd suggest a Python + Django (heavier framework) / Flask (lighter framework), or Ruby on Rails on top of Heroku. PHP is cheap for hosting, expensive for developing. What's more important to you?

    You can Google the differences between Python / Ruby. They're roughly the same, with Python requiring you to be more explicit while Ruby tends to do a little more "magic". Also, whitespace code blocks is a deal breaker for some people. I like Python more.

    Heroku is free for a single web worker and a small shared database. They're built on top of AWS and charge a premium for the convenience of abstracting away dev ops. It's cheaper to use AWS directly or using a VPS, but at a time cost. How much time do you really want to spend doing dev ops rather than working on your core product?

    I would worry about the web app first, then expose an API for use with mobile apps when it comes to it.

    Web app development is drastically different from enterprise code. It's about constant iteration and deployment, scaling if necessary. Breaking out of your Java comfort zone will also help you grow as a programmer. You're going to have to learn HAML / LESS / JavaScript anyway for the front end.

  • by jasenj1 (575309) on Saturday June 02, 2012 @08:58PM (#40197591)

    I'll throw in a vote for Grails. It is a convention over configuration app framework that has you code your domain objects and then it generates CRUD pages for you.

    The documentation is pretty good. There's lots of tags for the web page side.

    It lives on top of Spring, Hibernate, & JQuery so it has some solid frameworks at its core.

    It uses Groovy as its language rather than Java, but Groovy is 100% compatible with Java and is mostly syntactic shortcuts & convenience tricks on top of Java (like no need for semicolons). So it is very easy to learn if you're a Java guy; you can slowly start using more idiomatic Groovy while still writing very Java-esque code.

    If Groovy scares you, try Roo (http://www.springsource.org/spring-roo). It's a pure Java based app framework also from Spring that uses the Spring libraries.

    Now, having said all that. If you plan to deploy to iOS or Android, you may want to consider RhoMobile (http://rhomobile.com). It is a Ruby-on-Rails environment that runs on top of the native OS. So developing a RoR app for the client-server PC side and then porting to RhoMobile should be very easy. I don't know of a solution on the Java side that will take a Java servlet based app and move it over to the mobile OSes conveniently.

  • Re:Use a Framework! (Score:4, Informative)

    by ZombieBraintrust (1685608) on Saturday June 02, 2012 @08:59PM (#40197593)
    Given the description of what he wants to do I would encourage him to use a framework. Web Frameworks are setup to do what he described.
  • by c0lo (1497653) on Saturday June 02, 2012 @09:01PM (#40197599)

    If you're familiar with Java but not web development,...

    +

    In the long term, writing a view-only version as an Apple and/or Android app is on the radar

    +

    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.

    In my opinion, give GWT [google.com] a try. Why should make it exciting for you: the entirely dev cycle (this includes debug) is Java based - including the code in the "views" that will be shown in the browser (even if this code will be transpiled [wikipedia.org] to javascript - a very compact one for the functionality it implements).

    Using GWT, the "presentation logic" is totally separated by the lower layers (in both "architectural" and "exploitation" senses): i.e. your business logic will implement only "services" type of functions, the "presentation logic" - in browser - will be in charge to render the data the way you see fit - no more server-side resources to be consumed by layouting the page, applying "data model basic consistency validation", etc - (oh, how I hated JSP at their time). Let the "client CPU" do a bit of this effort - if your application will be highly used, a bit from every client-side that takes some care about itself will get you some serious server-side savings.

    As I write, I'm digging into a piece of GWT [google.com] that promises to take care of the integration with JPA entities, e.g. bringing Hibernate into the picture without the need of heaps of "plumbing code".

  • Facebook, Google+ (Score:4, Informative)

    by ZombieBraintrust (1685608) on Saturday June 02, 2012 @09:11PM (#40197637)

    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.

    Doesn't Facebook, Google, Microsoft, Yahoo, and RSS feeds already have this down? You may want to consider using API's that hook into existing infrastructure rather than reinventing the wheel.

  • Re:Most important (Score:3, Informative)

    by thisisauniqueid (825395) on Saturday June 02, 2012 @10:21PM (#40198053)
    You're right on the list of four languages. But Gmail (at least the frontend) is written in hand-coded Javascript. The whole point of the Closure javascript-to-javascript compiler was to optimize and obfuscate hand-coded Javascript for Gmail.
  • Re:Most important (Score:5, Informative)

    by PCM2 (4486) on Saturday June 02, 2012 @11:29PM (#40198429) Homepage

    You're talking at cross purposes here. Obviously the front-end UI of any modern Web application is going to be written using a lot of JavaScript. Java, Python, and PHP -- and many other languages -- are primarily for the back-end code. Gmail is certainly not accessing its database or implementing IMAP and SMTP in JavaScript.

  • Re:Most important (Score:3, Informative)

    by Anonymous Coward on Saturday June 02, 2012 @11:55PM (#40198563)

    Maybe it was JavaScript after all?

    At the USENIX annual conference last month, Gmail engineer Adam de Boor surprised the audience by noting that the company's Gmail service was written entirely in JavaScript, and that all of its code, around 443,000 lines worth, was written by hand.

    http://www.infoworld.com/d/developer-world/google-executive-frustrated-java-c-complexity-375

  • Re:Ignore PHP (Score:1, Informative)

    by Anonymous Coward on Sunday June 03, 2012 @12:24AM (#40198749)

    I read the nice rant in your sig and it's incorrect in a lot of places. I could spend the time to write several paragraphs explaining in detail several areas you got blatantly wrong, but it's apparent you wouldn't listen. One thing I will mention is no interactive debugging. There exists more than 1 interactive debugger for PHP. Yes, one is a commercial product produced by Zend. However, there are free alternatives that are just as good (xdebug is one). Guess what, they also show stack traces on fatal errors.

    You tried so hard to show how superior you are to PHP developers, but the only thing you demonstrated was your ignorance of the language you have an irrational hatred of. Some of your points are correct, but they're overshadowed by your ignorance. I suggest you do more research and update your article so you don't continue to look like a fool.

Children begin by loving their parents. After a time they judge them. Rarely, if ever, do they forgive them. - Oscar Wilde

Working...