Saturday, June 28, 2008

What is it with roseindia?

Cry or laugh?

There's another Java related website at roseindia.net which hosts lot of basic Java EE tutorials along a huge mass of advertisements. There are also some JSF tutorials over there. Since I saw that site for the first time, about 1.5 years ago, I quickly realized that almost every article and code sample at that site must be taken with a huge bag of salt. But OK, I thought, that kind of websites unfortunately exist, nothing to do against, so I ignored it for the rest of the time.

And today, while surfing over the net I accidently came across http://www.roseindia.net/jsf/actionListener.shtml (screenshot). Now I don't know whether I have to cry or laugh about it. Initially I laughed hard, very hard. Running a Swing JOptionPane component from inside a server side Java class with the intention to display a message at the client side!! And showing that off as a tutorial?!? But then I realized that there might be many new-to-JSF developers who came across the roseindia.net site and took the gross of the articles for serious and implemented it for production. Ouch, that hurts! Also see the comments at the bottom of that article.

Update: here and here are another examples of a horror story related to roseindia.net. A poor programmer decided to implement the JSP file upload example as described at http://www.roseindia.net/jsp/file_upload/Sinle_upload.xhtml.shtml (ouch, note the typo and double extensions in the roseindia.net URL, how professional). The code example is bad in almost every way. The HTML code contains nasty uppercases (the author is apparently hanging in the '90s HTML style). The HTML code contains the <center> tag which is deprecated since 1998 (yes, that is 10 years ago!! the same applies on the <font> tag which appears everywhere in roseindia.net's HTML source, how professional). The Java code is written entirely in a JSP file rather than a Java class (scriptlets are receipt for trouble). The uploaded file is allocated completely in memory instead of in a memory buffer (server will crash if the file or all files together are larger than JVM's available memory). The bytes are unnecessarily converted to String without respect to request encoding and using the system default encoding (ouch, what would happen with binary files? and with text files in another encoding?). Also read the comments at that article. Heck, almost every article has that kind of comments, shouldn't that already say something about the quality of the articles? See further also this stackoverflow.com answer.

Update 2: another horror story can be found here. One decided to download and install JSTL using the procedure as described at http://www.roseindia.net/jstl/downloading-jstl.shtml. Did you read it? It suggests to extract the complete JAR file, duplicate all of its TLD files in the WEB-INF and duplicate all of the TLD declarations in the web.xml of every webapplication which is going to use JSTL. Terrible. Just placing the JAR files in the classpath was been enough. The myth of extracting the JAR file is only applicable if you have downloaded the wrong JSTL version for your webapp which causes that EL (those ${} things) in JSTL tags may possibly fail. For more detail of the proper approach, read JSTL wiki page on stackoverflow.com.

Lesson learned: if you are new to Java EE, do not use roseindia.net! It might contain some good articles -which are generally copypasted/rephrased/changed from actually good sources (I've seen exact copypastes of parts of official TLD and API documentations, e.g. Tomahawk TLD and Java Servlet API, how lame..), or are in very rare cases just by coincidence good-, but for the rest it only introduces bad practices and/or contains stupid examples. That site almost seems to be maintained by amateurs with zero professional experience and targeted on the advertisement incomes only. If you are new, you never knows which is good and which is bad. So, just ignore that site. Forever.

Good JSF sites

At least here is a list of trusted and good JSF 1.2 related sites:

Update: we're now already at JSF 2.0/2.1, here's a list of trusted and good JSF 2.0/2.1 related sites:

And, of course, the JSF related articles at this blog. Check them out at the 'Tags' or 'Articles' section in the right column. The JSF wiki page at stackoverflow.com is also a nice starting point. Further I've collected all top Stack Overflow answers at JSF.ZEEf.com.

32 comments:

rubberben said...

You're right. A lot of developers I know are confused with various view technologies and mixed them up together.

Rajkumar P B said...

yes it really a bad site that i ever came across.. Even for the beginner it doesn't seems to be suit.. It really sucks..

Krishna said...

I too have one website for Java : Javabeat
I am trying to put more useful resources.

Armen said...

I think roseindia's life is no longer :)))))))))))

Jessica said...

Holy heck. I stumbled across roseindia today while trying to solve a Spring issue. The horror! I still feel a bit upset and disoriented...

MyTechTroubles said...

Was waiting for someone to say this,since I knew from the very appearance of the site when I first visited it.

Sadly lots of people do get into the trap of following all the crap on roseindia.

chamika deshan said...

U r exactly correct. they only target their income. Thanks for giving these instruction to new comers like me.Ah thanx for your great contribution at JSF forum!

CEO,Hackerzhut.Inc said...

Its one hell of a junk site!

SagarR said...

I didn't knew that, but its most accessed site and its surely misleading..

Stumbled from JavaRanch..

Chris Andre said...

Its hilarious your posting this BalusC because Ive had the same impression aswell, but your pointing at it very well. Im very new with Java EE and especially JSF, and I used Roseindia alot in the beginning. Then things started to go wrong, logic was breaching, things seemed cumbersome to accomplish, and I realised theres alot more brilliant sources of info out there than that page.

dileeph said...

Well .. balus, i beg to differ on your JSTL comment. I saw the JSF tut, where they were using the Swing component..that is pretty tragic.

However the place were they talk of copying the tld files into WEB-INF and adding entries in web.xml, they are pretty spot on.
Here they are talking about Tomcat 4.0 server. The auto-tld finding thing came up only in Servlet 2.4/JSP 2.0 spec. Tomcat started supporting said spec only from version 5.0. So with all Tomcat server's prior to this, we have to do what they suggest in the tutorial.

On a different story, really liked your REDIRECT-GET pattern solution for JSF :-)

BalusC said...

They've apparently changed it afterwards. All of the negative comments are also removed from that article. Too bad I didn't took a screenshot of it.

dileeph said...

seems they are also reading your blog :-)

Cheers!

BalusC said...

Because I still find it very odd to have the tld's extracted and taglibs definied in webapp's web.xml (I have never heard before that this was required), I tried the combination Tomcat4 + JSTL 1.0 today. And guess what? It just works flawlessy without any nasty changes/handlings. Just place JAR in classpath and declare taglib in JSP the usual way. So that roseindia article still doesn't make any sense.

Rebecca said...

Thank you, BalusC, for this article. RoseIndia so often comes up when I Google for answers to problems, and I was just wondering who the heck he/she/it was. Now I know it it is just some company trying to make money by attracting people to look at advertising and they are evil, EVIL!!!

S.Praveen said...

Hi BalusC, Thank you very much for your suggestions and guidelines. basically i am java instructor. i used to give advise to all my students refer this roseindia.net. but now i came to know about that. i realized a did big mistake. now on words, i will advice to my students not to refer that. Thanks BalusC for your blog.

jwenting said...

I love roseindia, it generates a lot of incompetent programmers who won't ever be serious competitors to the real professionals in the marketplace, forever ensuring our position and income as we have to recreate yet another disaster coming out the Indian bodyshops.

mstocker said...

You have to see this one.

http://www.roseindia.net/answers/viewanswers/2838.html

Aswatham said...

Hi,

I was following ur blog to upload files from JSF Portlet page.
I am using GlassFish Webspace Server, JSF, Spring & Hibernate FrameWork.

Issue:
Page is not getting submitted.
If i remove , i am getting java.lang.NullPointerException
at uploadedFile.getContentType().

Can u pls help me to solve this Issue ASAP.

Doug said...

Roseindia is a piece of crap website. I wish there could be a way to block that site from my google search result. Remember you get what you pay for.

aby said...

its 25-75(gud-bad) some examples are gud and some are really bad,

mstocker said...

aby,

1) I don't believe it's anywhere near 25% "good"

2) You seem to have missed the point that if a site is that bad (even your 75% figure) then it cannot be trusted. At all. Ever.

3) I have no idea why anyone would even partially want to "defend" roseindia. It's a terrible site. Period.

Did you actually read the blog entry here? The article it describes is pathetic.

Bill the Lizard said...

I'm glad I'm not the only one who feels this way. They've probably only gotten worse since you wrote this.

In case anyone hasn't heard yet, you can now hide sites in Google search results.

Anton Shaykin said...

You're right. This site along with the java2s.com are actually driving me nuts. Every time I come across it, I just want to bang my head against the wall...

Prashant Bhate said...

Well Said. But sadly for many google searches these site pops up as first result. Solution is simple, Use http://www.google.co.uk/reviews/t?hl=en to block unwanted sites from google search results :) that way you will never see it anymore

hannes said...

I also want to share my upset here in the comment thread and share my anger and frustration from total mess which can be found at roseindia.com or java2s.com web sites.

Thanks!

jaswanthsingh said...

For freshers i always recommend www.java4s.com wonderful site.

I love it.

nisha2212 said...

roseindia is everywhere!!! its so frustrating.. i hope i can filter it out when I google for things ..

Jimmy Ljungberg said...

It is possible to block search hits from displaying when googling. Log on to google and go to this page: http://www.google.com/reviews/t

osagbemi sunday said...

No doubt, you've made an excellent point.
But rely? what makes your site better?
You are a good programmer, but you make simple things look so hard. In short, you are not a good tutor for beginners. In contrary, roseindia does it better in term of explanation, at least for a beginner.

mstocker said...

5 years on and this is still collecting comedy gold.

Roseindia doesn't do *anything* better stupid. Information that is wrong is just wrong. No matter how "simple" the explanation is. To even attempt to argue otherwise is just patently absurd and stupid.

Lance E Sloan said...

Unfortunately, roseindia is still alive and well.

At some point, maybe two or three years ago, maybe the first time I saw the site, I found something there that was useful, so I registered an email address for that site. Fortunately, whenever I register for any site, I always use an email address made for that site and used for nothing else.

In the past few weeks, I've started receiving spam for the address I registered with roseindia. That tells me that either roseindia has given my email address to spammers (maybe roseindia is the spammer) or they have carelessly let their user registration information fall into the hands of spammers (maybe by publishing addresses online with comments from those users, maybe just by poor security). Since the spammer in this case is a company from India, too, I'm inclined to think roseindia is friends with the spammer or let the spammer have access to their data.

I realized sometime after I registered with roseindia that they are crap. I should have deleted my email address for them at that time, but I didn't, so I ended up receiving more spam. At least the spam is well-contained and I have learned something from the experience.

My advice to anybody reading my comment or this fine article on "The BalusC Code", if the article and comments haven't convinced you to avoid roseindia, maybe this will: They are spammers or are aids to them. Spammers can't be trusted and neither can roseindia. Not only can't they be trusted because of the spam, but the programming "tutorials" and "examples" they offer are wrong, too. Don't trust roseindia at all.