Earlier quoted context omitted.
I'm not sure if you are being sarcastic, but you do realize that your version is entirely static while the other one is ready for future evolutions? By changing a single line, the java version can also produce XML or text response. By changing two lines, it can also respond to POST requests. And that's just the top of the iceberg. Oh, and in the ends, it's way faster than Node, Ruby, Python and most of the dynamic la…
That's a funny complaint when evaluating 4 lines of code one of which is end . Java makes the assumption that you need a lot of boilerplate code, so being able to make changes easily seems like a big deal. Other languages avoid that boilerplate and can make the changes just as easily for free .
Why isn't Java used for modern web application development?
181–188 of 188 posts
Re: Why isn't Java used for modern web application development?
#182I've been hacking Rails since 2004, and I've made the switch to Java (dropwizard+mustache) for basic web development this year (sometimes with a meteor-like micro-framework I rolled myself). Benefits: - Higher quality code. Java is easier to refactor than Ruby, which makes up for the lower language power. - Performance! - Actual concurrency! - Faster server spinup and incremental changes. Rails with 20 gems in develo…
> Higher quality code. Java is easier to refactor than Ruby, which makes up for the lower language power. Let me rephrase: "It's easier in Java to rename identifiers than ruby, because my IDE does it for me." Now that's fine, but I don't see how do you conclude: Easier to rename identifiers => Higher quality code. How on earth? Easier to rename identifiers => Makes up for lower language power. What language deficienc…
This has got to be the most honest statement in this thread.
Re: Why isn't Java used for modern web application development?
#183Earlier quoted context omitted.
> Your Java IDE also lets you move methods and fields, extract interfaces from concrete classes, push members up or down, find all references to a member (reliably), view inheritance relationships, and much more. And it can do all of those safely, warning you if you'll shadow another name. I wish I had that stuff in a Ruby IDE. Some of it isn't applicable to Ruby, and some of it has to be done manually. True that you…
I'm usually in a 64-bit Linux VM (in VMware Workstation) on a 4 core i5 Xeon from about 3 years ago. 5 GB RAM total, Oracle Java 7 with -Xmx800M for Eclipse. My workspace includes 50 projects, most of them are Eclipse plug-ins themselves. In my experience, if Eclipse "stops the world", Java is collecting garbage. Java 6 and 7 have become much better at doing incremental collection more often (maybe parallel is the de…
Without eclipse 90% of the Java dev work would come to a grinding halt.
And that says a lot of about Java and its ecosystem. And not to mention its developers.
Re: Why isn't Java used for modern web application development?
#184Earlier quoted context omitted.
> Reading your post I suspect you've had very little exposure outside of Ruby. Reading your post, I see that you just throw claims around. > I've used both Java and Ruby Congratulations. You aren't the first or the only one. > Java is by far the more advanced runtime with better support. There are a lot of good things about JVM. I never contended that. > but better tooling is NOT one of Ruby's strengths. I don't reme…
On a large project the ability to refactor is important. Making structural changes to a large Ruby project is extremely time consuming and error prone. Pretty much anything is better at dependency management than bundler/gem. If you have to compile your dependencies at install time you're probably doing something wrong. Not to mention the version incompatibilities between gem versions and syntax changes.
Only the structural changes which are some form of rename. Refactoring is more than renaming. What eclipse provide is a very limited form of refactoring. Most of the refactoring is to be done by the programmer and can't be done by the IDE.
> Pretty much anything is better at dependency management than bundler/gem.
Yeah. How so?
> If you have to compile your dependencies at install time you're probably doing something wrong.
1. There is no compilation when the code is ruby.
2. When there are native extensions, the compilation is required. Dev platform isn't the same as production most of the times, and precompiled so can't be bundled up.
3. If there are only ruby dependencies, `bundle package` will pack them in vendor/cache and next `bundle install` will install from the cache.
> Not to mention the version incompatibilities between gem versions and syntax changes.
How has this got to do with anything? I am maintaining a gem. In this version, it does pagination. In next version, it will delete your home directory. Version compatibility you say? Go cry me a river. What is bundler supposed to do? Does maven stop me from doing this?
Re: Why isn't Java used for modern web application development?
#185Earlier quoted context omitted.
> You do realise there is more than "renaming variables" to refactoring don't you?!? You do read before responding, don't you? >> Other than renaming(which can be done for ruby, though it requires manual effort), there is no refactoring which Java does better than Ruby.
>> Other than renaming(which can be done for ruby, though it requires manual effort), there is no refactoring which Java does better than Ruby. Perhaps you could name this mysterious IDE which you claim provides reliable refactoring support for Ruby which is equivalent to the refactorings provided by Java IDEs? RubyMine is the best one I've seen http://www.jetbrains.com/ruby/features/index.html , but it doesn't match…
Is it just you, or does everyone using eclipse take "what eclipse does" to be refactoring?
I didn't mention IDE even once. A small part of refactoring can be done by eclipse. Rest of it is to be done by the programmer.
I am not a Fowlerian, but this is the only reference I could find. http://www.refactoring.com/catalog/index.html
Eclipse helps with a small subset - rest has to be done by the programmer. And most of it is easier to do in Ruby than in Java.
Compare the ruby edition http://www.amazon.com/Refactoring-Ruby-Edition-Jay-Fields/dp... to the java edition http://www.amazon.com/Refactoring-Improving-Design-Existing-...
On an average, ruby code ends up easier to modify and concise.
Re: Why isn't Java used for modern web application development?
#186Earlier quoted context omitted.
For folks outside of JavaEE, its common to deploy jars though. I have never run the software that takes .wars.
You deployed jars for web applications? War files are not JavaEE, you might be thinking of EAR files. A war file is just a jar file with a different name and manifest, and expects a few things, WEB-INF directory with a web.xml and that is about it. More info can be found here: http://en.wikipedia.org/wiki/WAR_file_format_(Sun)
Re: Why isn't Java used for modern web application development?
#187Earlier quoted context omitted.
You do, of course, understand that when a Ruby project gets large, it's still about 10% the size of a similarity functional Java project, right? I don't like all the magic involved in Ruby for web (in particular Rails), but it's much more concise than Java.
That doesn't mean that Ruby is so compact that it's impossible to get a large code base in it. When Ruby projects get large making changes to the code is both painful and scary (I would know since I've had to do just that).
Re: Why isn't Java used for modern web application development?
#188Earlier quoted context omitted.
I'm kinda testing the same setup. There are a couple nice things, but one thing that hurts me coming from Python is that in Python an SQL row was just an dict with data, and I could change my schema (and add/remove entries from this object) and then return it as JSON quite easily. Now in Java/Dropwizard the tendency is to map from SQL rows to objects, then from objects to JSON. Which is a PITA, even more when your de…
I tend to work more with document-like stores than SQL these days, so there may be more idiomatic solutions.... If you're complaining about having to update the fields in your object, I think thats kinda silly. You bought into the idea of static typing at some point, and now your data has type constraints. If you need need need flexibility you can of course make some field a Map . If you're complaining about boilerpl…