<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>VULab</title>
	<atom:link href="http://blog.vulab.com/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.vulab.com</link>
	<description>IT Training, Java Training,J2EE Training, Spring Training, Hibernate Training, Android Training, Spring Hibernate Training</description>
	<lastBuildDate>Sat, 12 May 2012 11:44:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Websockets with tomcat 7</title>
		<link>http://blog.vulab.com/2012/05/12/websockets-with-tomcat-7/</link>
		<comments>http://blog.vulab.com/2012/05/12/websockets-with-tomcat-7/#comments</comments>
		<pubDate>Sat, 12 May 2012 05:07:55 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Tomcat websocket]]></category>
		<category><![CDATA[Web socket]]></category>
		<category><![CDATA[websockets]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=421</guid>
		<description><![CDATA[Apache tomcat team recently added websocket support to tomcat. WebSocket is a web technology providing for bi-directional communications channels over a TCP connection. WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. The WebSocket protocol makes possible more interaction between a [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.vulab.com/wp-content/uploads/2012/05/HTML5_Logo_256.jpg" alt="HTML5" title="HTML5" width="256" height="256" class="alignleft size-full wp-image-425" />Apache tomcat team recently added websocket support to tomcat.<br />
<strong>WebSocket</strong> is a web technology providing for bi-directional communications channels over a TCP connection. </p>
<p>WebSocket is designed to be implemented in web browsers and web servers, but it can be used by any client or server application. The WebSocket protocol makes possible more interaction between a browser and a web site, facilitating live content and the creation of real-time games. This is made possible by providing a standardized way for the server to send content to the browser without being solicited by the client, and allowing for messages to be passed back and forth while keeping the connection open. In this way a two-way (bi-direction) ongoing conversation can take place between a browser and the server. A similar effect has been done in non-standardized ways using stop-gap technologies such as Comet.</p>
<p>In addition, the communications are done over the regular TCP port number 80, which is of benefit for those environments which block non-standard Internet connections using a firewall. WebSocket protocol is currently supported in several browsers including Safari, Firefox and Google Chrome. WebSocket also requires web applications on the server to be able to support it.</p>
<p>Vulab will provide code with example shortly.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/05/12/websockets-with-tomcat-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips and Tricks to write better articles (not coding!!)</title>
		<link>http://blog.vulab.com/2012/05/12/tips-and-tricks-to-write-better-blogs/</link>
		<comments>http://blog.vulab.com/2012/05/12/tips-and-tricks-to-write-better-blogs/#comments</comments>
		<pubDate>Sat, 12 May 2012 04:17:38 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[strategy]]></category>
		<category><![CDATA[blog writing]]></category>
		<category><![CDATA[writing better]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=408</guid>
		<description><![CDATA[Recently I was helping a colleague to write an article for html5rocks. We used tips from Kevin at google to write the article. Use the tips for your own blog or article. These are the same industrial-strength tips used by 9 out of 10 technical writers. (That one writer who doesn’t follow the rules explains [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-413" title="Writing tips" src="http://blog.vulab.com/wp-content/uploads/2012/05/writing-color.gif" alt="Writing tips" width="333" height="360" />Recently I was helping a colleague to write an article for <a title="HTML5Rocks" href="http://www.html5rocks.com" target="_blank">html5rocks</a>. We used tips from Kevin at google to write the article. Use the tips for your own blog or article.</p>
<p>These are the same industrial-strength tips used by 9 out of 10 technical writers. (That one writer who doesn’t follow the rules explains some of the bad docs out there.)</p>
<p>Literary writing and tech writing have their own sets of conventions. Other writing forms are like strolling on meandering paths in a meadow where you’re supposed to take in the words and enjoy them; technical writing is like driving a taxi with a surly passenger who is in a big hurry to get to the airport. The passenger (your reader) would scream colorful words if you decide to take the scenic route.</p>
<p>So here are ten tips to improve your technical writing.</p>
<h2><a name="The_10_tips_at_a_glance"></a>The 10 tips at a glance</h2>
<p>Tip 1: Know your audience.</p>
<p>Tip 2: Have a conversation.</p>
<ul>
<li>Pretend you are writing an email to a friend.</li>
<li>Use simple words.</li>
</ul>
<p>Tip 3: Know your goals.</p>
<ul>
<li>Tell them what you’re going to say and then tell them.</li>
<li>Wrap up.</li>
</ul>
<p>Tip 4: Make the organization clear with good headings.</p>
<ul>
<li>Make your headings task-oriented.</li>
<li>Use parallel structure.</li>
<li>Show sequence.</li>
</ul>
<p>Tip 5: Assume that your reader has the attention span of a gnat.</p>
<ul>
<li>Get to the point.</li>
<li>Bulleted lists are your friends.</li>
<li>Break up concepts.</li>
<li>Use graphics and charts.</li>
</ul>
<p>Tip 6: Be consistent.</p>
<ul>
<li>Just pick a word and stick with it.</li>
</ul>
<p>Tip 7: Write lively.</p>
<ul>
<li>Use the active voice.</li>
<li>Use action words (verbs).</li>
<li>Let your personality shine through.</li>
<li>Avoid Latin.</li>
<li>Don’t start a sentence with “There&#8230;”.</li>
</ul>
<p>Tip 8: Be precise.</p>
<ul>
<li>Stay in the present; don’t use future tense.</li>
<li>Use the right auxiliary verbs.</li>
<li>Keep the pronouns clear.</li>
<li>Don’t anthropomorphize inanimate objects.</li>
</ul>
<p>Tip 9: Explain enough.</p>
<ul>
<li>Explain why you&#8217;d want to use anything.</li>
<li>Catch the pitfalls.</li>
<li>Examples, examples, examples.</li>
<li>When saying something odd, back it up.</li>
<li>Don’t lie or oversimplify.</li>
</ul>
<p>Tip 10: Read your own stuff.</p>
<ul>
<li>Read your docs out loud.</li>
<li>Get rid of all that dead weight.</li>
<li>Test your sample code.</li>
<li>Have someone read your work .</li>
</ul>
<p><span id="more-408"></span></p>
<h2><a name="Tip_1:_Know_your_audience"></a>Tip 1: Know your audience</h2>
<p>The first rule of technical writing is knowing your audience. Determine who you are talking to. Have a single person in mind throughout your writing.</p>
<p>If you are writing to a novice, have more overviews and introductory materials. You shouldn’t suddenly use jargon or refer to techniques that a beginner wouldn’t know. If you’re addressing a pro, just dive right in.</p>
<p>For HTML5Rocks, the audience is a web developer who is familiar with general web concepts but is not familiar with the technology you are discussing. If you are assuming that they already know something, say so up front and then point them to another article that will help them catch up. (Example: “This article assumes that you are familiar with SQL ”.)</p>
<h2><a name="Tip_2:_Have_a_conversation"></a>Tip 2: Have a conversation</h2>
<p>You talk conversationally, so write conversationally. Somehow when we are writing, we think it’s an entirely different mode, so we employ artificial structures and an elaborate vocabulary. True, talking and writing are not exactly alike, because they are entirely different forms of communication with their own sets of rules and conventions, but they don’t have to be too divergent in technical writing.</p>
<p>Generally, if you don’t talk in semicolons, don’t write in semicolons. If you breathe while you talk, don’t write sentences that don’t breathe (you know, like writing a single sentence that spans an entire paragraph&#8230; with a long chain of that and which and wherefores).</p>
<h2><a name="Trick_2a:_Pretend_you_are_writing_an_email_to_a_friend"></a>Trick 2a: Pretend you are writing an email to a friend</h2>
<p>Think of a single person and answer specific questions he or she might have.</p>
<h2><a name="Trick_2b:_Use_simple_words"></a>Trick 2b: Use simple words</h2>
<p>Those high fallutin’ words that you learned for your SATs? You don’t need most of them in technical writing.</p>
<h1><a name="Tip_3:_Know_your_goals"></a>Tip 3: Know your goals</h1>
<p>What single idea do you want your readers to take with them after they read your article? Put the core idea in the first paragraph so that skimmers of search results know right off the bat what your article is about. Allow people to quickly tell whether your article meets their needs without investing too much time.</p>
<p>Keep the intro short and jump to the meat right away. We ain&#8217;t writing no stinking literature, where we establish that It was the best of times and the worst of times&#8230;.</p>
<p>Give context and background to orient your readers, but don’t lose track of your main goal. And remember, you don’t to have to explain everything. You can link to other articles.</p>
<h2><a name="Trick_3a:_Tell_them_what_you’re_going_to_say_and_then_tell_the"></a>Trick 3a: Tell them what you’re going to say and then tell them</h2>
<p>Very early on, as early as the introductory paragraph, tell your readers what your article covers, and then cover exactly that! If you say you&#8217;ll cover three points, then cover all three points.</p>
<h4><a name="Example"></a>Example</h4>
<p>This article discusses why Princess Leia’s fancypants hairdo is not practical for intergalactic warfare. While astro-archeologists have proposed 38 different reasons, the article focuses on the five most obvious reasons.</p>
<p>( Discuss the five main points, as promised. )</p>
<h2><a name="Trick_3b:_Wrap_up"></a>Trick 3b: Wrap up</h2>
<p>When you’re done, don’t leave your reader hanging. Have a conclusion. You can summarize your main points, tell them what they can do now, or where they need to go for the next step. Answer the question, “What do I do now?”</p>
<p>If you leave people hanging, they won&#8217;t know if you&#8217;re done or if the article just got cut off. And where do they go to learn more? They read all the way to the end of your article, so they probably trust your opinions (Ha! Suckers!). Use your credibility to point them to a good resource or nudge them to the next step.</p>
<h1><a name="Tip_4:_Make_the_organization_clear_with_good_headings"></a>Tip 4: Make the organization clear with good headings</h1>
<p>Let your users determine how your article is organized at a glance. Clear, well-organized headings let them skip the boring parts. If your headings are descriptive, readers can jump from heading to heading and read only the parts that they need.</p>
<h2><a name="Trick_4a:_Make_your_headings_task-oriented"></a>Trick 4a: Make your headings task-oriented</h2>
<p>Forget those mouthful of noun phrases, like “The database” or &#8220;The transaction&#8221; What about the database? Why not just say, “Storing data” or &#8220;Starting a transaction&#8221;?</p>
<p>When people are reading technical docs, they want to get something done, so they care about tasks and actions that they can do. Your headings should mirror that and tell them what they can do.</p>
<h2><a name="Trick_4b:_Use_parallel_structure"></a>Trick 4b: Use parallel structure</h2>
<p>Parallel structure is having the same pattern of words that could highlight similarities in concepts. Parallel structure works well on headings, as well as the rest of your writing. You can apply them to words, phrases, clauses, and sentences. Parallel structure adds a little artsy fartsy flair to your docs and creates rhythm in the flow.</p>
<p>At the multi-sentence level, it takes on a poetic quality (as in the opening paragraph in the Tale of Two Cities).</p>
<h4><a name="Example"></a>Example</h4>
<p>“On Saturdays, I like to eat sushi, watch movies, and ambush my neighbors.” Notice that &#8220;eat sushi,&#8221; &#8220;watch movies,&#8221; and &#8220;ambush my neighbors&#8221; have the same verb+object structure.</p>
<p>The following are headings that follow a parallel structure: Storing data, Retrieving data, Deleting data, Displaying records.</p>
<h2><a name="Trick_4c:_Show_sequence"></a>Trick 4c: Show sequence</h2>
<p>Generally, tutorials should have a sense of procedural sequence of required steps. Organize your article that way, so that your readers have a sense of progress.</p>
<h1><a name="Tip_5:_Assume_that_your_reader_has_the_attention_span_of_a_gnat"></a>Tip 5: Assume that your reader has the attention span of a gnat</h1>
<p>Most people would really rather play Angry Birds than read docs. The only reason why they’re reading your docs is because they need to get something done but don’t know how. They just want to retrieve the info, get the stuff done, and move on to killing more pigs in Angry Birds.</p>
<p>Who is this demanding reader? It’s you. Think of when you’re reading docs. You just want to get the information you need as fast as you can without being forced to read all the junk about why HTML5 is soOo great or all the other marketing blankety blank.</p>
<h2><a name="Trick_5a:_Get_to_the_point"></a>Trick 5a: Get to the point</h2>
<p>Don’t take four paragraphs before unveiling your solution. Tech writing has no time for building suspense. It’s not a post-modern Kurosawa film either. Present the answer off the bat. You don’t have to describe problems in gnarly detail (here’s the past, blah blah blah, and then, more blah blah blah), because chances are, web developers are already familiar with them. Why else would they be reading your articles? They are seeking the answer to a known problem.</p>
<p>If you think that they might not fully grasp the inferiority of a previous technology, and you need to explain why it’s not the right solution, don’t take up a huge intro section, because that’s primo space. Instead, create a separate section describing the problem.</p>
<p>If the problem statement needs to be in the introduction, just briefly describe the problem in a few sentences and then quickly introduce the solution.</p>
<h2><a name="Trick_5b:_Bulleted_lists_are_your_friends"></a>Trick 5b: Bulleted lists are your friends</h2>
<p>Use a bulleted list if you are introducing a series of ideas that are equal in importance. If you are writing a paragraph with clauses or sentences that are taking on a parallel structure, that’s a cue for bulleted lists.</p>
<p>Why do this? People prefer reading bulleted lists instead of one big fat paragraph. It’s roughly the same number of words, but you create chunks of info that are easier to grasp.</p>
<h4><a name="Before"></a>Before</h4>
<p>As a kungfu-fighting panda, you should be able to master various martial-art techniques (including juijitsu, aikido, thai kickboxing, taekwando, and wingchun), use non-projectile weaponry, talk to other kungfu-fighting animals who normally should not be able to speak English, and exhibit bipedal proficiency alien to your species.</p>
<h4><a name="After"></a>After</h4>
<p>As a kungfu-fighting panda, you should be able to do the following:</p>
<ul>
<li>Master various martial-art techniques, including juijitsu, aikido, thai kickboxing, taekwando, and wingchun</li>
<li>Use non-projectile weaponry</li>
<li>Talk to other kungfu-fighting animals who normally should not be able to speak English</li>
<li>Exhibit bipedal proficiency alien to your species. ← Notice how the conjunction (“and”) is gone.</li>
</ul>
<h2><a name="Trick_5c:_Break_up_concepts"></a>Trick 5c: Break up concepts</h2>
<p>Don’t have too many long paragraphs and sections. Have subsections. If you have too many subsections, you might have a difficult concept that has to be split up into multiple articles. Bonus! Impress your taskmaster manager with two articles instead of one.</p>
<h2><a name="Trick_5d:_Use_graphics_and_charts"></a>Trick 5d: Use graphics and charts</h2>
<p>Who says that you can use only words to convey ideas? Charts are magnificent for describing really complex processes and interactions. Pictures with labels are great for identifying parts or pointing out spatial orientation.</p>
<p>For example, if you are describing orientation on a mobile device, showing a picture of a device with the x,y,z quadrants is so much better than explaining all the concepts with long strings of sentences. You need blocks and blocks of text to just describe one of the quadrants. A picture conveys all that at a glance, whereas words require the reader to work really hard to get what you mean, and even then, the reader&#8217;s not too sure if he or she got it.</p>
<h2><a name="Tip_6:_Be_consistent"></a>Tip 6: Be consistent</h2>
<p>Sometimes, you can write things in multiple ways. Just pick one style and stick with it. Variety is the spice of life, but it’s the bane of tech writing.</p>
<p>Some writing rules have nothing to do with good writing or even being grammatical, because they really are a matter of preference. It matters anyway, because we want a consistent style to appear professional.</p>
<h2><a name="Trick_6a:_Just_pick_a_word_and_stick_with_it"></a>Trick 6a: Just pick a word and stick with it</h2>
<p>If a doohickey has multiple synonyms, name them up front (so that people who know one of the variants can be sure you&#8217;re talking about the same thing). Pick one variant and use the same one throughout the article.</p>
<p>If the word has an abbreviation, you should do this at the first instance: Spell out the word fully first, followed by its abbreviation (for example: “Robot Monkey Army (RMA)”). You can switch to the abbreviation throughout the article after that.</p>
<h1><a name="Tip_7:_Write_lively"></a>Tip 7: Write lively</h1>
<p>Just because the topic you are discussing is dry doesn’t mean your writing has to be. Use the following techniques.</p>
<h2><a name="Trick_7a:_Use_the_active_voice"></a>Trick 7a: Use the active voice</h2>
<p>Voice is the relationships among the verb, the agent, and the target or recipient. The two voices are: the active voice and the passive voice. Voice is like a spotlight. You use the active voice or the passive voice depending on what you want to highlight.</p>
<p>If you want to highlight the agent or the doer of the action, you use the active voice.</p>
<h4><a name="Example"></a>Example</h4>
<p>Kevin took Ernest’s lunch money.</p>
<p>If you want to highlight the recipient or target, use the passive voice.</p>
<h4><a name="Example"></a>Example</h4>
<p>Ernest’s lunch money was taken by Kevin.</p>
<p>If the sentence has this structure, &#8220;something something was done BY something something,&#8221; that’s passive. Sometimes, you won’t see the BY because you can drop it.</p>
<h4><a name="Example"></a>Example</h4>
<p>Ernest lunch money was taken (by Kevin).</p>
<p>In general, you want to keep the voice active to liven up the writing. Second, the active voice makes it crystal clear who’s doing the action. It removes ambiguity (see Tip 8). Passive voice is sometimes OK, but know why you are using it.</p>
<h2><a name="Trick_7b:_Use_action_words_(verbs)"></a>Trick 7b: Use action words (verbs)</h2>
<p>Some words are just more dynamic. Use more verbs. And not all verbs are equal. For example, which of the following sentences sounds more specific and dynamic? I attended the Fixit. (Fine, you existed.) I participated in the Fixit. (OK, well, you did something.) I contributed to the Fixit. (Oh, look, you actually got something done.) All are true, but each sequence becomes more dynamic and specific. Just picking the right verb conveys more information.</p>
<h2><a name="Trick_7c:_Let_your_personality_shine_through"></a>Trick 7c: Let your personality shine through</h2>
<p>If you remember that you are just “talking normally” and not “Writing” (with a capital W), your personality would just come out naturally. I find that some articles start out stiff and then get better as the writers get tired and loosen up.</p>
<h2><a name="Trick_7d:_Avoid_Latin"></a>Trick 7d: Avoid Latin</h2>
<p>It’s back to my tech writing philosophy of if you don’t talk like that, don’t write like that. Using English instead of Latin makes you more approachable and less like a bespectacled dweeb in a lecture hall.</p>
<h4><a name="Before"></a>Before</h4>
<ul>
<li>e.g.</li>
<li>etc.</li>
<li>i.e.</li>
</ul>
<h4><a name="After"></a>After</h4>
<ul>
<li>for example</li>
<li>and so on</li>
<li>that is</li>
</ul>
<h2><a name="Trick_7e:_Don’t_start_a_sentence_with_“There...”"></a>Trick 7e: Don’t start a sentence with “There&#8230;”</h2>
<p>Starting a sentence with “There are/is” adds extra words that unnecessarily slows down the pacing. You can almost always reconstruct the sentence to have a more powerful form.</p>
<h4><a name="Before"></a>Before</h4>
<p>There are three types of bookish people: Nerds, dorks, and dweebs.</p>
<h4><a name="After"></a>After</h4>
<p>The three types of bookish people are: Nerds, dorks, and dweebs.</p>
<h1><a name="Tip_8:_Be_precise"></a>Tip 8: Be precise</h1>
<p>Remember the goal that you set in the beginning (Tip 3)? Well, if the new section or aside that you have doesn’t help with your goal, ditch it. Remember, we’re the taxi driver barreling to the end destination. No side trips!</p>
<h2><a name="Trick_8a:_Stay_in_the_present;_don’t_use_future_tense"></a>Trick 8a: Stay in the present; don’t use future tense</h2>
<p>Don’t use future tense or wishy washy terms. Technical writing is about the here and now.</p>
<p>The present tense provides immediacy and clearly conveys the cause and effect nature of an action.</p>
<h4><a name="Before"></a>Before</h4>
<p>If you bite Grendelzilla, Grendelzilla will bite back.” (This introduces ambiguity. When will Grendelzilla bite back? Maybe now? Or maybe some other time? And it sounds like there might be conditions that have to be fulfilled first before it will bite back. Or maybe it might not even bite back at all. Not too sure&#8230;)</p>
<h4><a name="After"></a>After</h4>
<p>“If you bite Grendelzilla, Grendelzilla bites back.” (This implies that Grendelzilla will indeed bite back, and it will bite right back.) Besides clarity, you get the other incredible bonus of being able to be consistent with your tenses without exerting too much effort. And when you’re consistent, your readers find you predictable and trustworthy.</p>
<h2><a name="Trick_8b:_Use_the_right_auxiliary_verbs"></a>Trick 8b: Use the right auxiliary verbs</h2>
<p>Don’t misuse the auxiliary verbs. “May” implies permission “Can” implies ability “Might” implies possibility though not certainty “Could” implies choice “Should” implies recommendation or projected outcome &#8220;Would&#8221; implies desire or possibility &#8220;Must&#8221; implies requirement In most cases, you&#8217;d be using just &#8220;might&#8221; and &#8220;can.&#8221; In some rare cases, you might use &#8220;must&#8221; to express a strong requirement.</p>
<p>Many technical writers don&#8217;t like using &#8220;should,&#8221; because of its ambiguity. &#8220;Should&#8221; could be expressing that the readers must do something (for example, &#8220;You should set the path first.&#8221;), or it could be expressing an expectation (for example, &#8220;This should work.&#8221;). So for that reason, avoid should. If you must use it, use it only to express strong recommendation.</p>
<p>In most cases, the other auxiliary verbs are suspect. You would almost never use “may” in technical writing, because developers do not need permission to do whatever they want. Search for these verbs in your docs and replace them with the right auxiliary verbs.</p>
<h2><a name="Trick_8c:_Keep_the_pronouns_clear"></a>Trick 8c: Keep the pronouns clear</h2>
<p>Be mindful of pronouns and their antecedents. Sometimes, you can confuse the reader with a series of pronouns to the point where they no longer know that “it”/”that”/”this” refers to. From time to time, reset the antecedent by naming the noun before you use pronouns again.</p>
<h4><a name="Before"></a>Before</h4>
<p>&#8220;Once you put the monkey under the robot, it stops howling.&#8221; What stops howling? The monkey or the robot? The reader could guess from the proximity of the words that the antecedent is the noun (&#8220;robot&#8221;) right before the pronoun (&#8220;it&#8221;). But why make your readers work? Why make them guess what kind of writer you are? You could be one of those blasted inconsistent writers who swaps the intended antecedent around.</p>
<h4><a name="After"></a>After</h4>
<p>&#8220;Once you put the monkey under the robot, the robot stops howling.&#8221;</p>
<h2><a name="Trick_8d:_Don’t_anthropomorphize_inanimate_objects"></a>Trick 8d: Don’t anthropomorphize inanimate objects</h2>
<p>Computers, games, and apps don’t want to do anything. Web developers and users do. So don’t say things like: “The app wants to get more memory.”</p>
<h1><a name="Tip_9:_Explain_enough"></a>Tip 9: Explain enough</h1>
<p>OK, this sounds schizo, because I just said in Tip 5 that you should be brief, and now I want you to yak more. Technical writing is an art, you see. So it’s hard to summarize years of practice in ten tips. It’s a hard balance between providing enough background and not boring people silly.</p>
<h2><a name="Trick_9a:_Explain_why_you'd_want_to_use_anything"></a>Trick 9a: Explain why you&#8217;d want to use anything</h2>
<p>When you’re introducing a new technology or an alternative way of doing something, tell your readers why they might want to use it or what it’s for. If you document all the methods in an API, but your readers don&#8217;t have a reason to use that API, they won’t read your docs.</p>
<h2><a name="Trick_9b:_Catch_the_pitfalls"></a>Trick 9b: Catch the pitfalls</h2>
<p>What confused you when you first learned the technology? Chances are, they’re the same things that will snag your readers. Write about that. If you save readers time and keep them from feeling stupid, they would think you’re a total pro.</p>
<p>For example, IndexedDB is different from other database systems. It’s transactional, and it’s mostly asynchronous. Most people stumble on those points. It’s enough of a hazard that it warrants a special section just dedicated to explaining how IndexedDB is different and why it requires a shift in thinking.</p>
<h2><a name="Trick_9c:_Examples,_examples,_examples"></a>Trick 9c: Examples, examples, examples</h2>
<p>As pictures are to children’s books, examples are to technical docs. You can explain all you want, but sometimes, a single example seals the deal. Make sure that the sample code is error free.</p>
<h2><a name="Trick_9d:_When_saying_something_odd,_back_it_up"></a>Trick 9d: When saying something odd, back it up</h2>
<p>Don’t make strong claims without backing them up, because that raises questions in people’s head that might niggle throughout the article. Second, unsubstantiated claims can damage your credibility, because readers might think you are making stuff up.</p>
<p>Having said that, you don’t need to explain everything. You can have just a single clause explaining things and then link to another resource.</p>
<p>Avoid absolutes, unless you are absolutely sure that they are absolutely true under all circumstances.</p>
<h4><a name="Before"></a>Before</h4>
<p>&#8220;Myfavoritebrower™ never crashes, so everyone uses it at all times.&#8221;</p>
<h4><a name="After"></a>After</h4>
<p>&#8220;Myfavoritebrower™ rarely crashes, so most people use it often.&#8221; You can tone things down further, especially if you&#8217;re not confident. For example, you can say &#8220;does not crash often,&#8221; instead of &#8220;rarely; &#8220;many people,&#8221; instead of &#8220;most people&#8221;; &#8220;frequently&#8221; instead of &#8220;often.&#8221;</p>
<h2><a name="Trick_9e:_Don’t_lie_or_oversimplify"></a>Trick 9e: Don’t lie or oversimplify</h2>
<p>Sometimes, things are so complicated and hairy that they get too messy, so you oversimplify stuff. This can backfire on you, because a more knowledgeable reader might obsess over that and wonder what else you lied about. Your credibility is damaged.</p>
<p>But this doesn’t mean that you have to take long side trips. You can hedge with wiggle phrases like: “You can think of this as&#8230;”, “It&#8217;s as though&#8230;”,”In some cases&#8230;”.</p>
<h2><a name="Tip_10:_Read_your_own_stuff"></a>Tip 10: Read your own stuff</h2>
<p>Yeah, dogfooding works on docs, too. Take a break. Leave your work for a bit, and then come back.</p>
<h2><a name="Trick_10a:_Read_your_docs_out_loud"></a>Trick 10a: Read your docs out loud</h2>
<p>When you&#8217;re reading your writing, does it sound like you? Or does it sound like some bookish professor reading his lecture notes? If it all sound stilted and unnatural or if you start looking for a monocle, that&#8217;s your sign that you have to rewrite your work.</p>
<p>If you don&#8217;t want to read things out loud, at least listen to your mind&#8217;s voice as it reads through the words. For some people, it&#8217;s better to read things out loud, because the awkwardness and the errors in the writing become startlingly obvious.</p>
<h2><a name="Trick_10b:_Get_rid_of_all_that_dead_weight"></a>Trick 10b: Get rid of all that dead weight</h2>
<p>Rip out words that are unnecessary. Show no mercy. Flourishes, excess adjectives, and mouthful of dense noun phrases—all that fake bling—just weigh your doc down.</p>
<h2><a name="Trick_10c:_Test_your_sample_code"></a>Trick 10c: Test your sample code</h2>
<p>Make sure that your sample code works. Elegant writing means nothing if you mislead your readers with sloppy code. They&#8217;ve wasted time trying to figure out why their code doesn&#8217;t work, and they might have felt a bit stupid, too. Not good. The metaphorical taxi has now taken a wrong turn that takes a number of U-turns to recover from. The passenger is definitely not happy. Consider, would you retweet an article with errors in the sample code? Can you trust any of the prose?</p>
<h2><a name="Trick_10d:_Have_someone_read_your_work"></a>Trick 10d: Have someone read your work</h2>
<p>Sometimes, you can&#8217;t smell your garlic breath (from that incredible pasta dish you cooked and devoured), because you&#8217;re steeped in the aroma. In the same way, sometimes, you can&#8217;t see your own typos and grammatical errors, because you were so immersed in creating the content. It takes a second person to notice garlic breath and some writing errors. You can comb through an article, but you might still miss an error or two.</p>
<h2><a name="The_next_steps"></a>The next steps</h2>
<p>Now that you&#8217;ve learned a few tips and tricks of technical writing, go write that article. As with coding, the best way to improve your writing is by doing it a lot. If you want to learn more about writing well, read the relatively short but informative Elements of Style. It&#8217;s a classic loved by writers.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/05/12/tips-and-tricks-to-write-better-blogs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encryption with java</title>
		<link>http://blog.vulab.com/2012/05/12/encryption-with-java/</link>
		<comments>http://blog.vulab.com/2012/05/12/encryption-with-java/#comments</comments>
		<pubDate>Sat, 12 May 2012 03:59:59 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[Core Java]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[encrypt password]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[jasypt]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[java encryption library]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=403</guid>
		<description><![CDATA[Security is one of the most important aspect of any web or mobile application. It is a very common practice to encrypt sensitive information like passwords in the database. Jasypt library is a good and simple solution for any java project to have encryption capability. Jasypt is a very advanced library with support for integrating [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.vulab.com/wp-content/uploads/2012/05/Microsoft_Security_Essentials_icon.png" alt="Java Encryption" title="Java Encryption" width="256" height="256" class="alignleft size-full wp-image-405" />Security is one of the most important aspect of any web or mobile application. It is a very common practice to encrypt sensitive information like passwords in the database.</p>
<p><a href="http://www.jasypt.org" title="Jasypt" target="_blank">Jasypt</a> library is a good and simple solution for any java project to have encryption capability.</p>
<p>Jasypt is a very advanced library with support for integrating with Hibernate, Spring, Spring Security and number of other java frameworks and technologies.</p>
<p>Basic usage example code is as below:</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
</pre>
<pre><span class="js">...
BasicPasswordEncryptor passwordEncryptor <span class="js-operator">=</span> <span class="js-reserved-keyword">new</span> BasicPasswordEncryptor<span class="js-bracket">(</span><span class="js-bracket">)</span>;
<span class="js-native-keyword">String</span> encryptedPassword <span class="js-operator">=</span> passwordEncryptor.encryptPassword<span class="js-bracket">(</span>userPassword<span class="js-bracket">)</span>;
...
<span class="js-reserved-keyword">if</span> <span class="js-bracket">(</span>passwordEncryptor.checkPassword<span class="js-bracket">(</span>inputPassword, encryptedPassword<span class="js-bracket">)</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
  <span class="js-comment">// correct!
</span>
<span class="js-bracket">}</span> <span class="js-reserved-keyword">else</span> <span class="js-bracket">{</span>
  <span class="js-comment">// bad login!
</span>
<span class="js-bracket">}</span>
...

More security<span class="js-operator">:</span> the StrongPasswordEncryptor util <span class="js-reserved-keyword">class</span> <span class="js-reserved-keyword">with</span> a much more secure <span class="js-bracket">(</span>but slower<span class="js-operator">!</span><span class="js-bracket">)</span> algorithm<span class="js-operator">:</span>

...
StrongPasswordEncryptor passwordEncryptor <span class="js-operator">=</span> <span class="js-reserved-keyword">new</span> StrongPasswordEncryptor<span class="js-bracket">(</span><span class="js-bracket">)</span>;
<span class="js-native-keyword">String</span> encryptedPassword <span class="js-operator">=</span> passwordEncryptor.encryptPassword<span class="js-bracket">(</span>userPassword<span class="js-bracket">)</span>;
...
<span class="js-reserved-keyword">if</span> <span class="js-bracket">(</span>passwordEncryptor.checkPassword<span class="js-bracket">(</span>inputPassword, encryptedPassword<span class="js-bracket">)</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
  <span class="js-comment">// correct!
</span>
<span class="js-bracket">}</span> <span class="js-reserved-keyword">else</span> <span class="js-bracket">{</span>
  <span class="js-comment">// bad login!
</span>
<span class="js-bracket">}</span>
...</span></pre>
</div>
<p>Enjoy your code. Vulab provides hands-on training in java, android, apple ios and many other technologies.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/05/12/encryption-with-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring MVC 3 returning JSON to Web User Interface</title>
		<link>http://blog.vulab.com/2012/05/12/spring-mvc-3-returning-json-to-web-user-interface/</link>
		<comments>http://blog.vulab.com/2012/05/12/spring-mvc-3-returning-json-to-web-user-interface/#comments</comments>
		<pubDate>Sat, 12 May 2012 03:16:25 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[spring mvc 3]]></category>
		<category><![CDATA[web programming]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=396</guid>
		<description><![CDATA[Spring MVC can return data in the JSON format to your front end. You can use jQuery to make ajax requrest to the MVC controller and controller can return the data in json format. Let us see how this can be acheived. Assuming you are using Maven for dependency management. Add this dependency to your [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.vulab.com/wp-content/uploads/2012/05/Logo_Spring_252x150.png" alt="Spring Logo" title="Spring Logo" width="252" height="150" class="alignleft size-full wp-image-397" />Spring MVC can return data in the JSON format to your front end. You can use jQuery to make ajax requrest to the MVC controller and controller can return the data in json format. Let us see how this can be acheived.</p>
<p>Assuming you are using Maven for dependency management.<br />
Add this dependency to your pom.xml</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
</pre>
<pre><span class="js"><span class="js-operator">&lt;</span><span class="js-operator">!</span><span class="js-operator">-</span><span class="js-operator">-</span> Jackson Dependencies <span class="js-operator">-</span><span class="js-operator">-</span><span class="js-operator">&gt;</span>
		<span class="js-operator">&lt;</span>dependency<span class="js-operator">&gt;</span>
			<span class="js-operator">&lt;</span>groupId<span class="js-operator">&gt;</span>com.fasterxml.jackson.core<span class="js-operator">&lt;</span><span class="js-operator">/</span>groupId<span class="js-operator">&gt;</span>
			<span class="js-operator">&lt;</span>artifactId<span class="js-operator">&gt;</span>jackson<span class="js-operator">-</span>core<span class="js-operator">&lt;</span><span class="js-operator">/</span>artifactId<span class="js-operator">&gt;</span>
			<span class="js-operator">&lt;</span>version<span class="js-operator">&gt;</span><span class="js-number">2</span>.<span class="js-number">0</span>.<span class="js-number">0</span><span class="js-operator">&lt;</span><span class="js-operator">/</span>version<span class="js-operator">&gt;</span>
		<span class="js-operator">&lt;</span><span class="js-operator">/</span>dependency<span class="js-operator">&gt;</span></span></pre>
</div>
<p> Make sure you have enabled mvc in your configuration as below:</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
</pre>
<pre><span class="js"><span class="js-operator">&lt;</span><span class="js-operator">!</span><span class="js-operator">-</span><span class="js-operator">-</span> Enables the Spring MVC @Controller programming model <span class="js-operator">-</span><span class="js-operator">-</span><span class="js-operator">&gt;</span>
	<span class="js-operator">&lt;</span>mvc<span class="js-operator">:</span>annotation<span class="js-operator">-</span>driven <span class="js-operator">/</span><span class="js-operator">&gt;</span></span></pre>
</div>
<p>In your controller method use the following style of code to return json.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
</pre>
<pre><span class="js">@RequestMapping<span class="js-bracket">(</span>value<span class="js-operator">=</span><span class="js-string">&quot;/testjson.html&quot;</span>, method <span class="js-operator">=</span> RequestMethod.GET<span class="js-bracket">)</span>
	<span class="js-reserved-keyword">public</span> @ResponseBody User getUserInJSON<span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>

		User user <span class="js-operator">=</span> <span class="js-reserved-keyword">new</span> User<span class="js-bracket">(</span><span class="js-bracket">)</span>;
		user.setActive<span class="js-bracket">(</span><span class="js-reserved-keyword">false</span><span class="js-bracket">)</span>;
		user.setEmail<span class="js-bracket">(</span><span class="js-string">&quot;test@test.com&quot;</span><span class="js-bracket">)</span>;
		user.setFirstName<span class="js-bracket">(</span><span class="js-string">&quot;test&quot;</span><span class="js-bracket">)</span>;
		user.setLastName<span class="js-bracket">(</span><span class="js-string">&quot;user&quot;</span><span class="js-bracket">)</span>;
		user.setUserId<span class="js-bracket">(</span><span class="js-number">1</span><span class="js-number">0</span><span class="js-bracket">)</span>;
		<span class="js-reserved-keyword">return</span> user;

	<span class="js-bracket">}</span></span></pre>
</div>
<p>@ResponseBody annotations is the most important annotation in the code below. This annotations is making the framework to convert the user object into json format and return to the front-end.</p>
<p>http://localhost:8080/vulab/testjson.html</p>
<p>When you invoke the controller&#8217;s method you will get back output in json format as below:</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
</pre>
<pre><span class="js"><span class="js-bracket">{</span><span class="js-string">&quot;userId&quot;</span><span class="js-operator">:</span><span class="js-number">1</span><span class="js-number">0</span>,<span class="js-string">&quot;firstName&quot;</span><span class="js-operator">:</span><span class="js-string">&quot;test&quot;</span>,<span class="js-string">&quot;lastName&quot;</span><span class="js-operator">:</span><span class="js-string">&quot;user&quot;</span>,<span class="js-string">&quot;email&quot;</span><span class="js-operator">:</span><span class="js-string">&quot;test@test.com&quot;</span>,<span class="js-string">&quot;password&quot;</span><span class="js-operator">:</span><span class="js-reserved-keyword">null</span>,<span class="js-string">&quot;active&quot;</span><span class="js-operator">:</span><span class="js-reserved-keyword">false</span>,<span class="js-string">&quot;roles&quot;</span><span class="js-operator">:</span><span class="js-bracket">[</span><span class="js-bracket">]</span>,<span class="js-string">&quot;phone&quot;</span><span class="js-operator">:</span><span class="js-reserved-keyword">null</span>,<span class="js-string">&quot;interests&quot;</span><span class="js-operator">:</span><span class="js-bracket">[</span><span class="js-bracket">]</span><span class="js-bracket">}</span></span></pre>
</div>
<p>For your reference a code snippet from : User.java code</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
</pre>
<pre><span class="js"><span class="js-reserved-keyword">package</span> com.trainingram.code.domain;
<span class="js-comment">// Generated Mar 1, 2012 8:17:04 PM by Hibernate Tools 3.4.0.CR1
</span>

<span class="js-reserved-keyword">import</span> java.util.HashSet;
<span class="js-reserved-keyword">import</span> java.util.Set;
<span class="js-reserved-keyword">import</span> javax.persistence.Column;
<span class="js-reserved-keyword">import</span> javax.persistence.Entity;
<span class="js-reserved-keyword">import</span> javax.persistence.FetchType;
<span class="js-reserved-keyword">import</span> javax.persistence.GeneratedValue;
<span class="js-reserved-keyword">import</span> <span class="js-reserved-keyword">static</span> javax.persistence.GenerationType.IDENTITY;

<span class="js-reserved-keyword">import</span> javax.persistence.CascadeType;
<span class="js-reserved-keyword">import</span> javax.persistence.Id;
<span class="js-reserved-keyword">import</span> javax.persistence.ManyToMany;
<span class="js-reserved-keyword">import</span> javax.persistence.OneToMany;
<span class="js-reserved-keyword">import</span> javax.persistence.OneToOne;
<span class="js-reserved-keyword">import</span> javax.persistence.Table;
<span class="js-reserved-keyword">import</span> javax.persistence.UniqueConstraint;

<span class="js-comment">/**
 * User generated by hbm2java
 */</span>
@Entity
@Table<span class="js-bracket">(</span>name<span class="js-operator">=</span><span class="js-string">&quot;user&quot;</span>
    , uniqueConstraints <span class="js-operator">=</span> @UniqueConstraint<span class="js-bracket">(</span>columnNames<span class="js-operator">=</span><span class="js-string">&quot;email&quot;</span><span class="js-bracket">)</span>
<span class="js-bracket">)</span>
<span class="js-reserved-keyword">public</span> <span class="js-reserved-keyword">class</span> User  <span class="js-reserved-keyword">implements</span> java.io.Serializable <span class="js-bracket">{</span>

     <span class="js-reserved-keyword">private</span> Integer userId;
     <span class="js-reserved-keyword">private</span> <span class="js-native-keyword">String</span> firstName;
     <span class="js-reserved-keyword">private</span> <span class="js-native-keyword">String</span> lastName;
     <span class="js-reserved-keyword">private</span> <span class="js-native-keyword">String</span> email;
     <span class="js-reserved-keyword">private</span> <span class="js-native-keyword">String</span> password;
     <span class="js-reserved-keyword">private</span> <span class="js-reserved-keyword">boolean</span> active;
     <span class="js-reserved-keyword">private</span> Set<span class="js-operator">&lt;</span>Role<span class="js-operator">&gt;</span> roles <span class="js-operator">=</span> <span class="js-reserved-keyword">new</span> HashSet<span class="js-operator">&lt;</span>Role<span class="js-operator">&gt;</span><span class="js-bracket">(</span><span class="js-number">0</span><span class="js-bracket">)</span>;
     <span class="js-reserved-keyword">private</span> Phone phone;
     <span class="js-reserved-keyword">private</span> Set<span class="js-operator">&lt;</span>Interest<span class="js-operator">&gt;</span> interests <span class="js-operator">=</span> <span class="js-reserved-keyword">new</span> HashSet<span class="js-operator">&lt;</span>Interest<span class="js-operator">&gt;</span><span class="js-bracket">(</span><span class="js-number">0</span><span class="js-bracket">)</span>;

    <span class="js-reserved-keyword">public</span> User<span class="js-bracket">(</span><span class="js-bracket">)</span> <span class="js-bracket">{</span>
    <span class="js-bracket">}</span>

    <span class="js-reserved-keyword">public</span> User<span class="js-bracket">(</span><span class="js-native-keyword">String</span> firstName, <span class="js-native-keyword">String</span> lastName, <span class="js-native-keyword">String</span> email, <span class="js-native-keyword">String</span> password, <span class="js-reserved-keyword">boolean</span> active<span class="js-bracket">)</span> <span class="js-bracket">{</span>
        <span class="js-reserved-keyword">this</span>.firstName <span class="js-operator">=</span> firstName;
        <span class="js-reserved-keyword">this</span>.lastName <span class="js-operator">=</span> lastName;
        <span class="js-reserved-keyword">this</span>.email <span class="js-operator">=</span> email;
        <span class="js-reserved-keyword">this</span>.password <span class="js-operator">=</span> password;
        <span class="js-reserved-keyword">this</span>.active <span class="js-operator">=</span> active;
    <span class="js-bracket">}</span>
    <span class="js-reserved-keyword">public</span> User<span class="js-bracket">(</span><span class="js-native-keyword">String</span> firstName, <span class="js-native-keyword">String</span> lastName, <span class="js-native-keyword">String</span> email, <span class="js-native-keyword">String</span> password, <span class="js-reserved-keyword">boolean</span> active, Set<span class="js-operator">&lt;</span>Role<span class="js-operator">&gt;</span> roles, Phone phone, Set<span class="js-operator">&lt;</span>Interest<span class="js-operator">&gt;</span> interests<span class="js-bracket">)</span> <span class="js-bracket">{</span>
       <span class="js-reserved-keyword">this</span>.firstName <span class="js-operator">=</span> firstName;
       <span class="js-reserved-keyword">this</span>.lastName <span class="js-operator">=</span> lastName;
       <span class="js-reserved-keyword">this</span>.email <span class="js-operator">=</span> email;
       <span class="js-reserved-keyword">this</span>.password <span class="js-operator">=</span> password;
       <span class="js-reserved-keyword">this</span>.active <span class="js-operator">=</span> active;
       <span class="js-reserved-keyword">this</span>.roles <span class="js-operator">=</span> roles;
       <span class="js-reserved-keyword">this</span>.phone <span class="js-operator">=</span> phone;
       <span class="js-reserved-keyword">this</span>.interests <span class="js-operator">=</span> interests;
    <span class="js-bracket">}</span></span></pre>
</div>
<p>Enjoy your code. Vulab provides handson training in spring framework and other technologies.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/05/12/spring-mvc-3-returning-json-to-web-user-interface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>About Spring Data Projects</title>
		<link>http://blog.vulab.com/2012/04/11/spring-data-projects/</link>
		<comments>http://blog.vulab.com/2012/04/11/spring-data-projects/#comments</comments>
		<pubDate>Wed, 11 Apr 2012 04:20:25 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[mongodb]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[spring data]]></category>
		<category><![CDATA[spring data hadoop]]></category>
		<category><![CDATA[Spring Data JPA]]></category>
		<category><![CDATA[spring data neo4j]]></category>
		<category><![CDATA[spring data redis]]></category>
		<category><![CDATA[spring data riak]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=387</guid>
		<description><![CDATA[Spring data projects helps with the following aspects: Building spring applications with noSQL databases like MongoDB, Redis, Riak, Redis, neo4j Building spring applications using Map-reduce frameworks like Hadoop Using Cloud based services and relational databases with spring projects. Spring Data Jpa is a wonderful solution for any project connecting to relational databases. It will reduce [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.vulab.com/wp-content/uploads/2012/04/Logo_Spring_258x151.png" alt="Spring Logo" title="Logo_Spring_258x151" width="258" height="151" class="aligncenter size-full wp-image-322" /></p>
<p><a href="http://www.springsource.org/spring-data" title="Spring Data" target="_blank">Spring data projects</a> helps with the following aspects:<br />
Building spring applications with noSQL databases like MongoDB, Redis, Riak, Redis, neo4j<br />
Building spring applications using Map-reduce frameworks like Hadoop<br />
Using Cloud based services and relational databases with spring projects.</p>
<p><a href="http://www.springsource.org/spring-data/jpa" title="Spring Data JPA" target="_blank">Spring Data Jpa</a> is a wonderful solution for any project connecting to relational databases. It will reduce the code written as the JPA repositories will provide Query DSL support as well as CRUD functionality for all domain objects mapped to the DB.<br />
These are the full list of advantages:</p>
<ul>
<li>Sophisticated support to build repositories based on Spring and JPA</li>
<li>Support for QueryDSL predicates and thus type-safe JPA queries</li>
<li>Transparent auditing of domain class</li>
<li>Pagination support, dynamic query execution, ability to integrate custom data access code</li>
<li>Validation of @Query annotated queries at bootstrap time</li>
<li>Support for XML based entity mapping</li>
</ul>
<p>The same advantages of Spring Data can be utilized for MongoDB, Redis, Riak, Neo4J.<br />
Apache Hadoop is another important project to watch as it will make the Map-Reduce technology much easier to use by removing any framework complexities.</p>
<p>If you are using any relational database, mongoDB, Redis , Riak or Neo4J, consider integrating Spring Data libraries to your project. Spring Data will reduce the amount of code you write as well as bring in a number of good features.</p>
<p>If you are interested in map reduce with Hadoop, please read this <a href="http://blog.springsource.org/2012/02/29/introducing-spring-hadoop/" title="Spring Hadoop" target="_blank">excellent post from Costin Leau</a> from Spring Source.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/04/11/spring-data-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using new Tomcat JDBC Connection Pool</title>
		<link>http://blog.vulab.com/2012/04/10/using-new-tomcat-jdbc-connection-poo/</link>
		<comments>http://blog.vulab.com/2012/04/10/using-new-tomcat-jdbc-connection-poo/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 05:05:26 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apacht tomcat 7]]></category>
		<category><![CDATA[connection pooling]]></category>
		<category><![CDATA[tomcat]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=380</guid>
		<description><![CDATA[org.apache.tomcat.jdbc.pool is the new JDBC connection pool class available in tomcat 7. If you have been using commons dbcp you can try the new JDBC Connection Pool in tomcat and see if you can benefit from its functionality. There are plenty of advantages of using the tomcat 7 jdbc connection pool as described in the [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_381" class="wp-caption aligncenter" style="width: 140px"><img src="http://blog.vulab.com/wp-content/uploads/2012/04/tomcat.gif" alt="tomcat" title="tomcat" width="130" height="92" class="size-full wp-image-381" /><p class="wp-caption-text">tomcat</p></div>
<p>org.apache.tomcat.jdbc.pool is the new JDBC connection pool class available in tomcat 7. If you have been using  commons dbcp you can try the new JDBC Connection Pool in tomcat and see if you can benefit from its functionality.</p>
<p>There are plenty of advantages of using the <a href="http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.htmlhttp://" title="Tomcat 7 JDBC Connection Pool" target="_blank">tomcat 7 jdbc connection pool</a> as described in the linked document.</p>
<p>As most of the projects use JNDI lookups to get the data source. Let us look at a code snippet of how to configure this in tomcat.</p>
<div class="fvch-code">
<pre class="fvch-line-numbers">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
</pre>
<pre><span class="js"><span class="js-operator">&lt;</span>Resource name<span class="js-operator">=</span><span class="js-string">&quot;jdbc/TestDB&quot;</span>
              auth<span class="js-operator">=</span><span class="js-string">&quot;Container&quot;</span>
              type<span class="js-operator">=</span><span class="js-string">&quot;javax.sql.DataSource&quot;</span>
              factory<span class="js-operator">=</span><span class="js-string">&quot;org.apache.tomcat.jdbc.pool.DataSourceFactory&quot;</span>
              testWhileIdle<span class="js-operator">=</span><span class="js-string">&quot;true&quot;</span>
              testOnBorrow<span class="js-operator">=</span><span class="js-string">&quot;true&quot;</span>
              testOnReturn<span class="js-operator">=</span><span class="js-string">&quot;false&quot;</span>
              validationQuery<span class="js-operator">=</span><span class="js-string">&quot;SELECT 1&quot;</span>
              validationInterval<span class="js-operator">=</span><span class="js-string">&quot;30000&quot;</span>
              timeBetweenEvictionRunsMillis<span class="js-operator">=</span><span class="js-string">&quot;30000&quot;</span>
              maxActive<span class="js-operator">=</span><span class="js-string">&quot;100&quot;</span>
              minIdle<span class="js-operator">=</span><span class="js-string">&quot;10&quot;</span>
              maxWait<span class="js-operator">=</span><span class="js-string">&quot;10000&quot;</span>
              initialSize<span class="js-operator">=</span><span class="js-string">&quot;10&quot;</span>
              removeAbandonedTimeout<span class="js-operator">=</span><span class="js-string">&quot;60&quot;</span>
              removeAbandoned<span class="js-operator">=</span><span class="js-string">&quot;true&quot;</span>
              logAbandoned<span class="js-operator">=</span><span class="js-string">&quot;true&quot;</span>
              minEvictableIdleTimeMillis<span class="js-operator">=</span><span class="js-string">&quot;30000&quot;</span>
              jmxEnabled<span class="js-operator">=</span><span class="js-string">&quot;true&quot;</span>
              jdbcInterceptors<span class="js-operator">=</span>
<span class="js-string">&quot;org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer&quot;</span>
              username<span class="js-operator">=</span><span class="js-string">&quot;root&quot;</span>
              password<span class="js-operator">=</span><span class="js-string">&quot;password&quot;</span>
              driverClassName<span class="js-operator">=</span><span class="js-string">&quot;com.mysql.jdbc.Driver&quot;</span>
              url<span class="js-operator">=</span><span class="js-string">&quot;jdbc:mysql://localhost:3306/mysql&quot;</span><span class="js-operator">/</span><span class="js-operator">&gt;</span></span></pre>
</div>
<p>If you are creating a stand alone application, you can still use the tomcat connection pool. The connection pool creation only has another dependency, and that is on tomcat-juli.jar. To configure a connection pool in a stand alone project using bean instantiation, the bean to instantiate is <strong>org.apache.tomcat.jdbc.pool.DataSource</strong>. The same attributes (documented above) as you use to configure a connection pool as a JNDI resource, are used to configure a data source as a bean. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/04/10/using-new-tomcat-jdbc-connection-poo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web application development in the browser (Eclipse Orion) released.</title>
		<link>http://blog.vulab.com/2012/04/09/web-development-on-webr/</link>
		<comments>http://blog.vulab.com/2012/04/09/web-development-on-webr/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 05:03:28 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[Eclipse Orion]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=371</guid>
		<description><![CDATA[Eclipse foundation has made available Orion tools for the web, on the web. You can develop future web applications on the web, test them and deploy them on the web to the cloud. Orion uses HTML5 and javascript. Orion is a very active open source project under the Eclipse top-level project. Orion&#8217;s objective is to [...]]]></description>
			<content:encoded><![CDATA[<p>Eclipse foundation has made available <a href="http://www.eclipse.org/orion/index.php" title="Eclipse Orion tools" target="_blank">Orion tools for the web, on the web</a>.<br />
You can develop future web applications on the web, test them and deploy them on the web to the cloud. Orion uses HTML5 and javascript.</p>
<p><img src="http://blog.vulab.com/wp-content/uploads/2012/04/orion.png" alt="orion" title="orion" width="610" height="122" class="aligncenter size-full wp-image-372" /></p>
<p>Orion is a very active open source project under the Eclipse top-level project.<br />
Orion&#8217;s objective is to create a browser-based open tool integration platform which is entirely focused on developing for the web, in the web. Tools are written in JavaScript and run in the browser. Unlike other attempts at creating browser-based development tools, this is not an IDE running in a single tab. Links work and can be shared. You can open a file in a new tab. Great care has been taken to provide a web experience for development.<br />
<div id="attachment_373" class="wp-caption aligncenter" style="width: 620px"><img src="http://blog.vulab.com/wp-content/uploads/2012/04/orion_ide.png" alt="orion ide" title="orion ide" width="610" height="290" class="size-full wp-image-373" /><p class="wp-caption-text">orion_ide</p></div><br />
Try it now and experience the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/04/09/web-development-on-webr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Object pooling in Java and Performance</title>
		<link>http://blog.vulab.com/2012/04/09/object-pooling-in-java/</link>
		<comments>http://blog.vulab.com/2012/04/09/object-pooling-in-java/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 04:09:22 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[Core Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[core java]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[object pool]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=361</guid>
		<description><![CDATA[Object pooing in java? should we use it.]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.vulab.com/wp-content/uploads/2012/04/java-logo.jpg" alt="java-logo" title="java-logo" width="256" height="256" class="aligncenter size-full wp-image-349" /><br />
I was recently working on a project in which we came across creating millions of expensive objects in a resource intensive environment. We immediately knew we need to decide on whether to use object pooling or not. So let me first define what is object pooling before we talk about what are the options of object pooling in java.</p>
<blockquote><p><strong>what is object pooling:</strong> An object pool is a collection of objects that an application will create and keep on hand for those situations where creating each instance is expensive. A good example would be a database connection or a worker thread. The pool can be used to check in and checkout resources as required.</p></blockquote>
<p>In any of your project if you want to use object pooling, please do not try to write your own pooling mechanism and use the tried and tested <a href="http://commons.apache.org/pool/" title="Apache Commons Pool" target="_blank"><strong>Apache Commons Pool</strong></a><br />
Also take a look at <a href="http://best-practice-software-engineering.ifs.tuwien.ac.at/patterns/objectpool.html" title="Object Pool Pattern" target="_blank">object pool pattern</a>.</p>
<p>Coming back to our problem, we could not just start using object pooling. we did create a test harness and used a profiling tool and proved that object pooling was actually giving us a slight performance benefit. </p>
<p>Even after all the effort, we did rule out this slight performance benefit and implemented the solution with out object pooling to follow the  <strong>&#8220;keep it simple&#8221;</strong> mantra.</p>
<p>Looking at the history of java object pooling used to be very good prior to JDK 1.4 but from JDK 1.5 that advantage is no longer great and try to avoid object pooling for any thing other than for database connection pooling or any similar scenario. Actually object pooling will have negative impacts with the latest JDK.</p>
<p>measure measure measure as measuring and analyzing is the only way you can decide whether object pooling is enhancing or degrading the performance of your process. Try not to rely on speculation or written guidelines as they might have been written for an older version of JDK and no longer hold&#8217;s good for the version of JDK that you might be using.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/04/09/object-pooling-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hibernate Annotations Module no longer required</title>
		<link>http://blog.vulab.com/2012/04/07/hibernate-annotations-module-no-longer-required/</link>
		<comments>http://blog.vulab.com/2012/04/07/hibernate-annotations-module-no-longer-required/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 19:42:05 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[hibernate]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=352</guid>
		<description><![CDATA[Since hibernate core 3.6 the Hibernate Annotations module has been merged with hibernate core. You no longer need Hibernate annotations dependency in your maven pom. Some background from Hibernate guys is as follows: before hibernate-core 3.5, it was JDK 1.4 compatible, so, to use Annotation, the new feature of JDK 1.5, we had to create [...]]]></description>
			<content:encoded><![CDATA[<p>Since hibernate core 3.6 the Hibernate Annotations module has been merged with hibernate core. You no longer need Hibernate annotations dependency in your maven pom.</p>
<p>Some background from Hibernate guys is as follows:<br />
before hibernate-core 3.5, it was JDK 1.4 compatible, so, to use Annotation, the new feature of JDK 1.5, we had to create a new module, aka, hibernate-annotations. but since we had moved to JDK 1.5 since hibernate-core 3.5, there is no reason to keep hibernate-annotations as a separated module, so, we merged back into hibernate-core. </p>
<p>Also read this blog from Spring source regarding <a href="http://blog.springsource.org/2012/04/06/migrating-to-spring-3-1-and-hibernate-4-1/" title="upgrade to spring 3.1 and hibernate 4.1" target="_blank"><br />
<h3>upgrading to Spring 3.1 and Hibernate 4.1</h3>
<p></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/04/07/hibernate-annotations-module-no-longer-required/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java 8 Java 9 Java 10 What?</title>
		<link>http://blog.vulab.com/2012/04/07/java-8-java-9-java-10-what/</link>
		<comments>http://blog.vulab.com/2012/04/07/java-8-java-9-java-10-what/#comments</comments>
		<pubDate>Sat, 07 Apr 2012 19:21:56 +0000</pubDate>
		<dc:creator>Sri Nivas</dc:creator>
				<category><![CDATA[Core Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hibernate]]></category>
		<category><![CDATA[spring]]></category>

		<guid isPermaLink="false">http://blog.vulab.com/?p=348</guid>
		<description><![CDATA[Quoting for the original article Java won&#8217;t curl up and die like Cobol, insists Oracle These details are provided by Simon Ritter from Oracle former employee of Sun Micro Systems. Java 8 will be released in middle of 2013. Java 9 and Java 10 will tackle Big Data, Multi language interoperability, cloud computing, mobile Simon [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.vulab.com/wp-content/uploads/2012/04/java-logo.jpg" alt="java-logo" title="java-logo" width="256" height="256" class="aligncenter size-full wp-image-349" /><br />
Quoting for the original article <a href="http://www.theregister.co.uk/2012/03/07/oracle_java_9_10_roadmap/" title="Java will never die" target="_blank">Java won&#8217;t curl up and die like Cobol, insists Oracle</a></p>
<p>These details are provided by Simon Ritter from Oracle former employee of Sun Micro Systems.</p>
<p>Java 8 will be released in middle of 2013.<br />
Java 9 and Java 10  will tackle<br />
<h2>Big Data, Multi language interoperability, cloud computing, mobile</h2>
<p>Simon was stressing that Oracle is going to keep Java fresh and powerful with lots of features, He said Oracle is working to make sure Java is relevant to building the kinds of mobile- and server-based, web-connected and massively parallel apps that are currently being built.</p>
<h2> Will JDK 10 be 100% Object Oriented? </h2>
<p>There is a proposal out there to remove primitives support from java from JDK 10. Once this proposal is implemented java will only support creation of objects from classes.</p>
<p>Java SE8 will be designed to run on all mobile devices. There will be significant opportunities for java developers. JDK will also be supporting Java Script using project Nashorn.</p>
<p>Java has been here for 15 years and started with 200 files and now has 4000 files. JDK 8 is heavily moving towards modularity. This will help applications to choose the modules they need from JDK and leave the unwanted features. Oracle is closely working with OSGI to implement modularity in JDK 8.</p>
<p>Good job oracle, keep going.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.vulab.com/2012/04/07/java-8-java-9-java-10-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 1.049 seconds -->
<!-- Cached page served by WP-Cache -->

