Earlier quoted context omitted.
Verbosity and increased complexity in Java comes mainly for two reasons, none of which is about minor syntactical issues. Java doesn't abstract very well beyond objects and classes. This becomes pretty irritating in stuff like event handlers, where you'd really like to use something like a lambda/delegate, but the only option you have is an inner class. This might change in the future, but right now some minor langua…
>> Also, Java library design often tends towards the obfuscated. [...]Adapters, [...]Implementations and [...]Factories, the usually bloated read/write beans, checked exceptions… I've been using Java for 10 years+, and never used any of that.
Ask HN: Any web startups using Java?
121–130 of 164 posts
Re: Ask HN: Any web startups using Java?
#122Earlier quoted context omitted.
Ruby can use both "{...}" and "do ... end", with a slight difference between the two (precedence): def some_method { ... } def some_method do ... end
I don't believe the second one works. Usually you'd define a method using: def some_method # do something end Usually you'll only use do after a method that's already defined, in order to pass a block of code to it.
ruby-1.9.2-p0 > def something; "hey" end
=> nil
ruby-1.9.2-p0 > something
=> "hey"
Adding the do makes it not work. def doesn't have a do.Re: Ask HN: Any web startups using Java?
#123Re: Ask HN: Any web startups using Java?
#124Earlier quoted context omitted.
I used to think so as well but now there is a great framework called Play: http://www.playframework.org/
The problem with frameworks like Play, or Symfony in PHP world is that they only play catchup to frameworks like ROR and Django and since they started way later, they still lack the polish.
Re: Ask HN: Any web startups using Java?
#125I sold a Java-based program for about four years and have a previous background in Big Freaking Enterprise Java Web Development. You can certainly write web applications in Java. They're harder to deploy than PHP but easier to deploy than Rails, in my experience, depending heavily on how experienced you are at administering systems and how much Java enterprise coffee you want to drink. Java is a mature language. Libr…
They're harder to deploy than PHP but easier to deploy than Rails, in my experience, depending heavily on how experienced you are at administering systems and how much Java enterprise coffee you want to drink. Have you tried Phusion Passenger ( http://www.modrails.com/ )? It is trivial to install and makes Rails deployment a snap.
Re: Ask HN: Any web startups using Java?
#126Earlier quoted context omitted.
>> Also, Java library design often tends towards the obfuscated. [...]Adapters, [...]Implementations and [...]Factories, the usually bloated read/write beans, checked exceptions… I've been using Java for 10 years+, and never used any of that.
You never used checked exceptions?
If you just avoid all the enterprisey crap, Java is a very nice place to be.
Re: Ask HN: Any web startups using Java?
#127Re: Ask HN: Any web startups using Java?
#128Of course, we aren't doing content management or anything, the front-facing stuff is a tiny minority of what we do, so that makes Java an even better choice. If I was writing a CMS or an app that was primarily webby in nature, I'd take a look at a more dynamic language (possibly still on the JVM).
Re: Ask HN: Any web startups using Java?
#129Earlier quoted context omitted.
Java for most startups won't be Java EE. My best experience with Java recently has been with Jetty as an application server. It's fast and it's lightweight. I usually run Jetty behind nginx and don't generally need to configure Jetty to do anything. The whole Tomcat and connectors for apache configuration from a few years ago is well and truly behind me.
++Jetty. It's also great for development as it handles hot swapping of code changes, so they can be tested immediately without a container restart.
Re: Ask HN: Any web startups using Java?
#130I sold a Java-based program for about four years and have a previous background in Big Freaking Enterprise Java Web Development. You can certainly write web applications in Java. They're harder to deploy than PHP but easier to deploy than Rails, in my experience, depending heavily on how experienced you are at administering systems and how much Java enterprise coffee you want to drink. Java is a mature language. Libr…
(str "There is" "an easier route")
Enlive and Fleet are other options and I've briefly explored both at certain points, but I personally just found them both unwieldy and unnatural, with other disadvantages as well. I'm sure they suit the needs of some people but I dismissed them before I got past the minimal learning curve.
The same goes for StringTemplate. It seems really cool and everything, but I just don't want to have to learn (and use half the time) a whole new different syntax just to stick dynamic strings in a page.
PHP just makes it so damn easy that it's hard for me to pass up when it comes to churning out webpages.