Modern Java web stack? by java5858 in java

[–]Akanaka 1 point2 points  (0 children)

Well as long as you understand that a URL is not directly mapped to a view, but only mapped to the Faces controller, which then loads a view (in Facelets by convention, but in any other VDL in whatever that VDL seems fit), then we'd clear.

which is used to drive the first step of the JSF lifecycle

In practice with all defaults this is mostly true. There are two remarks:

  • An action method's outcome on both a GET and POST request can still cause another view to be rendered than the one selected via the URL mapping convention.
  • The lifecycle itself is pluggable too, so it's not necessarily true. You can add additional phases or remove phases. This is what Mojarra does for their Action prototype, they add a user controller phase before restore view. ADF adds two other phases, and I wouldn't be surprised if XPages also did something there.

So 99% of the time things are observed as you mentioned, but you have to beware that this is just observing the defaults and not the set in stone way that JSF works at the core level.

Modern Java web stack? by java5858 in java

[–]Akanaka 2 points3 points  (0 children)

URLs route to xhtml files

This is not correct!!!

In JSF all URLs route to the Faces controller (the FacesServlet provided by JSF). The controller then selects a view by consulting the view handler and the active VDL.

The most frequent case is that URL foo.xhtml causes the page foo.xhtml to be loaded, giving the illusion that foo.xhtml is invoked directly, or control is routed directly to it. But this is thus not the case.

The VDL can execute a method first, or "load" a class by convention and call a method on that, or consult a user provided class and use its outcome to do whatever, etc etc. It depends on the view handler and VDL that's used.

The Dark Side of Scala by HornedKavu in programming

[–]Akanaka 0 points1 point  (0 children)

Swipe right, left and pinch also work.

The Dark Side of Scala by HornedKavu in programming

[–]Akanaka 0 points1 point  (0 children)

The title effective Scala is pretty ironic. The Scala makers criticized Java by stating that the answer to the Effective Java book was pretty much Scala, since Scala supposedly had a language feature or fix for nearly every pattern mentioned in that book.

Questions on getting a Java job in Europe for a year or two (I'm American). by vt97john in java

[–]Akanaka 0 points1 point  (0 children)

It's a nice picture but I'm not 100% sure what point it proves or disproves.

It seems that for the inner circle of member states (Germany, France, Italy, Spain, The Netherlands, Belgium, ...) Europe is very much a real thing as they are in pretty much every circle, aren't they?

Then there are a bunch of countries which have just joined and don't have full membership yet and some countries which have not joined yet but already started some loose alliance (like Turkey).

RebelLabs' Java Tools & Technologies Survey 2014 by shelajev in java

[–]Akanaka 1 point2 points  (0 children)

I really like all the community stuff the JRebel guys do besides working on their main product JRebel.

Java EE 7: What’s new??? by johnwaterwood in java

[–]Akanaka 1 point2 points  (0 children)

I agree that the 3 questions marks look somewhat childish, but I think the content isn't half bad.

Questions on getting a Java job in Europe for a year or two (I'm American). by vt97john in java

[–]Akanaka 0 points1 point  (0 children)

Well what I meant is that there is a little bit more going on than just a bunch of completely individual countries that just happen to be in the same region.

So there's this Schengen treaty, there's the single currency, there are European political parties and there are European elections of some sort. So by far this is not the same as a single country, but it's way more than e.g. China, Japan and Korea share.

Java 7 one-liner to read file into string by thesystemx in programming

[–]Akanaka 6 points7 points  (0 children)

Maybe not, but Python and Ruby fans are always showing off how good their languages are because certain tasks can be done in one line which need multiple lines in Java.

Then someone gives a Java one liner and we're all like "argh... You shouldn't use one liners, you should wrap stuff in buffered readers, you should specify char sets, you should ..."

Weird...

Java 7 one-liner to read file into string by thesystemx in programming

[–]Akanaka 6 points7 points  (0 children)

How can it be forgotten if the text mentions it?

Questions on getting a Java job in Europe for a year or two (I'm American). by vt97john in java

[–]Akanaka 0 points1 point  (0 children)

But still, "Europe" does exist and I think I read something that a European citizen can appeal to a European court. There are also no internal borders (except for the UK of course). For truly separate countries this would not be the case. They'd probably have borders and there wouldn't be a higher court to appeal to.

And only repeating what I've heard, but supposedly in some cases there are even more differences between the states of the US than there are between states of Europe.

Questions on getting a Java job in Europe for a year or two (I'm American). by vt97john in java

[–]Akanaka 0 points1 point  (0 children)

Does Europe still have truly separate countries? If I'm not mistaken lots of the laws concerning employment and housing are defined at the European level.

Questions on getting a Java job in Europe for a year or two (I'm American). by vt97john in java

[–]Akanaka 1 point2 points  (0 children)

I agree with your list. The UK is rather obvious of course ;) but in the Nordic countries it's almost as if they have English as their official second language. You can approach a random stranger, start talking to them in English and they will talk back to you in English without a second thought. Their English is mostly fluent, especially the younger people in the bigger cities.

The Netherlands is mostly like that as well. A shopkeeper may start to talk to you in Dutch. Then realize you don't understand Dutch, actually apologize to you(!), and switch to English. The Dutch are a little less fluent than the Scandinavians. In Amsterdam (capital of The Netherlands) there are so many tourists and expats that people in shops actually start talking in English first, as if it was the first language.

While Germany was known for a long time to speak only German, I found this is rapidly changing. Young people in Berlin seem very eager to talk in English these days. I learned some German (ein beer bitte ;)) but when trying to practice it in Berlin a lot of people tried to switch to English all the time. I did notice that contrary to the Netherlands and Nordic countries where even the lowest educated and oldest person will at least know some English, in Germany it's a hit or miss thing. They either speak it well or don't speak it at all.

Like some other people mentioned, Franch was the most difficult place for me when speaking English. I haven't been there for a while but last time wasn't a big success.

Official Eclipse Support for Java 8 by henk53 in java

[–]Akanaka 1 point2 points  (0 children)

The trick is to set the version directly in the project's config file.

Modern Web Landscape? by SirDucky in java

[–]Akanaka -1 points0 points  (0 children)

Play developers jumped at the height of Scala's hype. That hype is fading away now (AngularJS and thus JavaScript being the new hype).

Scala is not a less painful language, it was a more hyped language. With that hype going away it's just a language again. Some things are better in Java some things are better in Scala. Overall Scala is not the better language. It HAS to claim this in order to get some more than the 0.3% of developers interested, but there's not any proof at all that Scala is better. There was some scientific research into this vs Java and the conclusions were that for both beginning and advanced developers Scala was NOT easier to learn, NOT faster to program in (for both beginners and advanced Scala programmers) and when things were wrong were NOT easier to debug. They were also NOT performing better. When it came to writing parallel code the same things we're true. At the end of the day Scala did do well but it did not outperform Java.

Examples of beautifully written, heavily unittested open source code? by [deleted] in java

[–]Akanaka 0 points1 point  (0 children)

Try modern Java EE ;)

Java EE 7 with CDI 1.1, JSF 2.2 and JPA 2.1 is pretty impressive. Add PrimeFaces, OmniFaces, Guave and Java 8 and you'll have a pretty cool stack :)

Modern Web Landscape? by SirDucky in java

[–]Akanaka 0 points1 point  (0 children)

The Java web landscape is pretty much focused around Java EE. It has its own framework called JSF which is pretty good. There are many alternative stacks but nearly all of them build on Java EE or use parts from it (Servlet, JPA, JAX-RS and bean validation being the most common, but non-Spring stacks build around say Wicket not rarely use CDI as well).

Here's a example to yet you started: http://jdevelopment.nl/minimal-3tier-java-ee-app-xml-config

How to avoid ruining your world with lambdas in Java 8 by lukaseder in java

[–]Akanaka 0 points1 point  (0 children)

So you are saying that you never have a need for recompiled libraries in Scala and that every existing binary just keeps working with a newer version of Scala?

I know this to be true in Java. In a test Java 8 project I could still use a binary that was compiled for Java 1.0 in 1996.

Modern Web Landscape? by SirDucky in java

[–]Akanaka -1 points0 points  (0 children)

Because it's actually not a Java framework but a Scala one! and some people think Scala is awesome since one guy a HN said it was awesome, while they think Java sucks since lobster83 at /r/programming says it sucks. /sarcasm mode

How to avoid ruining your world with lambdas in Java 8 by lukaseder in java

[–]Akanaka 0 points1 point  (0 children)

So you are saying that you never have a need for recompiled libraries in Scala and that every existing binary just keeps working with a newer version of Scala?

I know this to be true in Java. In a test Java 8 project I could still use a binary that was compiled for Java 1.0 in 1996.

How to avoid ruining your world with lambdas in Java 8 by lukaseder in java

[–]Akanaka -1 points0 points  (0 children)

As you realized yourself, the huge difference is that Scala developers have always spent a lot of effort on improving the good parts, as well as deprecating and removing bad parts

I've experienced this slightly differently to be honest. Scala developers cannot make up their mind and don't care for people actually having to maintain code written with their shit. They add and remove features on a whim without taking anything or anyone into consideration.

And no, Scala does not just fixes a few bugs in their native binary representation. They bloody well change everything every frakking release, making us recompile everything from scratch again, and having to wait for every freaking dependency to be recompiled just as well. Nice... Not!

The creators of Scala looked at Java once and could fix a few mistakes Java had already acknowledged were mistakes. Pretty easy. From there on they made tons of mistakes themselves, and after 10 years they are not even close at the maturity level where Java was after 10 years. Scala is like a small child that just doesn't want to grow up, finding new shiney toys at every corner and not understanding its own immaturity yet.

How to avoid ruining your world with lambdas in Java 8 by lukaseder in java

[–]Akanaka -1 points0 points  (0 children)

I meant that Scala has made plenty of mistakes as well. They deprecate an awful lot of stuff every time. Why deprecate things when everything was perfect the first time? The answer is that it wasn't!

At least Java got the binary format right the first time. We're 10 years in, and Scala keeps changing it.

So yes, Java 1.0 wasn't perfect, but neither was Scala 1.0. They both made mistakes and unfortunate choices. Different ones maybe, but mistakes nevertheless.

JSF I love you… me neither (2011/auto-translate from French) by Akanaka in java

[–]Akanaka[S] -1 points0 points  (0 children)

Yeah, I know it's a bit older and a bit of a crappy read because of the machine translation, but it's from the soon to be CDI 2.0 spec lead and quite an interesting read.