<?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>Rochak Chauhan::Unpredictably Exciting &#187; Java</title>
	<atom:link href="http://rochakchauhan.com/blog/category/programming/java/feed/" rel="self" type="application/rss+xml" />
	<link>http://rochakchauhan.com/blog</link>
	<description>Know your limits, but never stop trying to exceed them.</description>
	<lastBuildDate>Thu, 03 May 2012 11:48:53 +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>PHP vs JSP</title>
		<link>http://rochakchauhan.com/blog/2008/09/25/php-vs-jsp/</link>
		<comments>http://rochakchauhan.com/blog/2008/09/25/php-vs-jsp/#comments</comments>
		<pubDate>Thu, 25 Sep 2008 14:17:48 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[JSP]]></category>
		<category><![CDATA[PHP vs JSP]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/?p=428</guid>
		<description><![CDATA[In my opinion, developing a Web based application in JSP (Java) is more or less like killing a housefly with a bazooka. Of course you will hit your target, no one is denying that, but you will also have collateral damage along with it. This damage ranges from Cost of hardware, hosting, servers and development. &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/09/25/php-vs-jsp/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="MsoNormal">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">In my opinion, developing a Web based application in JSP (Java) is more or less like killing a housefly with a bazooka. Of course you will hit your target, no one is denying that, but you will also have collateral damage along with it. This damage ranges from Cost of hardware, hosting, servers and development. Not to mention the time taken to develop, edit or modify the application.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">But, that’s just me, I’ll let you to decide and let me know after going through these factors. </span></p>
<table class="MsoNormalTable" style="border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="55" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 10pt; font-family: Tahoma;">SNO</span></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 10pt; font-family: Tahoma;">Function / Feature</span></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 10pt; font-family: Tahoma;">JSP</span></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 10pt; font-family: Tahoma;">PHP</span></strong></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">1.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Programming Approach</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Tahoma;"><span>1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Completely Object Oriented</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;"><span> </span>Advantage:</span></strong><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Clean code</span></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;"> </span></strong></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;"><span> </span>Disadvantage: </span></strong></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Way too descriptive<strong></strong></span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Tahoma;"><span>1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Mainly a Scripting Language</span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Tahoma;"><span>2.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">It can also be used in OOPS from   PHP 5 and above.</span></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;"><span> </span>Advantage:</span></strong><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Functional and quick coding, you can use OOP practices at your   convenience</span></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;">Disadvantage:</span></strong><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">May get clumsy</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">2.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">String and data manipulation</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Rich library, too much   descriptive and object oriented code</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Rich functionality. Functional   and easy coding.</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Has inbuilt support to use third   party libraries from other programming languages like Java, C and Dot.net</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">3.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Web Oriented features</span></p>
<ol type="1">
<li class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Includes </span></li>
<li class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Mails </span></li>
<li class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">File Uploads </span></li>
<li class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Form Handling </span></li>
<li class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Sessions </span></li>
</ol>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;">Advantage:</span></strong><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Almost everything is built in or supported by libraries. </span></p>
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;">Disadvantage:</span></strong></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Complicated and way too much of code.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><strong><span style="font-size: 10pt; font-family: Tahoma;">Advantages:</span></strong><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Inbuilt functionality and easy to use functions, written for the   specific tasks</span></p>
<p class="MsoNormal" style="margin-left: 18pt; text-indent: -18pt;"><!--[if !supportLists]--><span style="font-size: 10pt; font-family: Symbol;"><span>·<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span><!--[endif]--><span style="font-size: 10pt; font-family: Tahoma;">Reduces the lines of code and time taken to write an application.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">4.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Database Access features</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Standard JDBC structure/ Use EJB/   Struts framework built over JDBC. Descriptive and too much overhead or boiler   plate code involved. Uses the same API for all databases using JDBC drivers</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Dedicated inbuilt libraries for   most of the commonly used databases. Very tight integration with Oracle, MySQL   and PostGRE SQL. Very minimal boiler plate code required. The libraries and   results are straight forward, robust and easy to use.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">5. </span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">XML/XSL/XPATH</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Use standard SAX/DOM parsers. Too   much boiler plate code involved. Well defined APIs and stable implementations   are available for XSL and XPATH</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">SAX and DOM parsers available are   easy to use and to the point. Another library, Simple XML provides very easy   OO approach to handling XML data. XSL and XPATH functionality is also built   in.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">6.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Extensibility</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Java Classes and Libraries. <span class="grame">Run’s</span> in sandbox and hard JNI approach needed to integrate   with server programs.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">PHP/C/Any thing executable by the   underlying OS platform. Can very easily interact with programs on the server.   Very good support for native code.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">7.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Dynamic Graphics/PDF and bells   and whistles</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Almost everything has a readymade   library</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Supported internally or though   libraries.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">8.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Web Services/SOAP</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Addon Libraries like Axis,   JAX-WS, etc.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">In Built</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">9. </span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Portals</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Spec <strong><span style="font-family: Tahoma;">JSR-168 and 286</span></strong></span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Many different Portal frameworks</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">10.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Learning curve</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">It helps if you have an decent   understanding of JAVA and its architecture. </span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">If you know C/C++, then you are   halfway through to learn PHP.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">11.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Support</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">It has support and backing of   Industry giants like Sun and IBM.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">It enjoys the backing of Oracle,   Sun, IBM, Microsoft and Zend.</span></p>
</td>
</tr>
<tr>
<td style="padding: 0cm 5.4pt; width: 41.4pt;" width="55" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">12.</span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 108pt;" width="144" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Hardware cost and requirement. </span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 159.25pt;" width="212" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Well this is one factor which   makes PHP a favourite. The cost of procuring a server is exponentially higher   than that of getting PHP server up and running.<span> </span></span></p>
</td>
<td style="padding: 0cm 5.4pt; width: 117.45pt;" width="157" valign="top">
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">Cost of hosting a small and   medium scale PHP application start from as low as $9 per month.<span> </span></span></p>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;">For a decent enterprise level   application server with an enterprise PHP framework, the cost would come out   to be around $50 per month.</span></p>
</td>
</tr>
</tbody>
</table>
<h1 style="text-align: center;" align="center"><strong><em>Sample Codes for comparison</em></strong></h1>
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 12pt; font-family: Tahoma;"> </span></strong></p>
<p class="MsoNormal" style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">Hello World</span></sub></strong></p>
<table class="MsoNormalTable" style=" width: 441.9pt; margin-left: 11.4pt; border-collapse: collapse;" cellspacing="0" cellpadding="0" width="589">
<tbody>
<tr style="height: 13.75pt;">
<td width="279" height="29" valign="top" style="padding: 0cm 5.4pt; width: 209.15pt; height: 13.75pt;">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">JSP</span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 13.75pt;" width="310" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">PHP</span></sub></strong></p>
</td>
</tr>
<tr style="height: 103.3pt;">
<td style="padding: 0cm 5.4pt; width: 209.15pt; height: 103.3pt;" width="279" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;JSP &#8212;   Hello World!&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;%   out.println(&#8221; Hello World&#8221;); %&gt; !</span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 103.3pt;" width="310" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;PHP &#8212;   Hello World!&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;?php echo   ”Hello World”; ?&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal" style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>2.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">Print Date as DD/MM/YYYY</span></sub></strong></p>
<table class="MsoNormalTable" style="border: medium none; width: 441.9pt; margin-left: 11.4pt; border-collapse: collapse;" cellspacing="0" cellpadding="0" width="589">
<tbody>
<tr style="height: 13.75pt;">
<td style="padding: 0cm 5.4pt; width: 240pt; height: 13.75pt;" width="320" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">JSP</span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 201.9pt; height: 13.75pt;" width="269" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">PHP</span></sub></strong></p>
</td>
</tr>
<tr style="height: 103.3pt;">
<td style="padding: 0cm 5.4pt; width: 240pt; height: 103.3pt;" width="320" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;JSP – Print   date&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;%</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">java.util.Calendar   cal =java.util.Calendar.getInstance();</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">out.println(</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">new   SimpleDateFormat(“dd/MM/yyyy).format(cal.getTime()?)</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">); </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">%&gt;</span></sub></em></strong><sub><span style="font-family: Tahoma;"><br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 201.9pt; height: 103.3pt;" width="269" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;PHP – Print   Date&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;?php echo   date(“d/m/Y”); ?&gt;<span> </span></span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="margin-left: 18pt;"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal" style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>3.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">Read / Write session variable </span></sub></strong></p>
<table class="MsoNormalTable" style="width: 441.9pt; margin-left: 11.4pt; border-collapse: collapse;" cellspacing="0" cellpadding="0" width="589">
<tbody>
<tr style="height: 13.75pt;">
<td style="padding: 0cm 5.4pt; width: 209.15pt; height: 13.75pt;" width="279" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">JSP</span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 13.75pt;" width="310" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">PHP</span></sub></strong></p>
</td>
</tr>
<tr style="height: 103.3pt;">
<td style="padding: 0cm 5.4pt; width: 209.15pt; height: 103.3pt;" width="279" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;JSP – Session   Read/Write&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;%</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">//Get current   session or create a new session</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">HtppSession   session = request.getSession(true); </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"> </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">//Add   information to the session</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">session.setAttribute(“name”,   “Pramati”);</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"> </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">//Print the   information</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">out.println(session.getAttribute(“name”);</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">%&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 103.3pt;" width="310" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;PHP – Session   Read/Write&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;?php</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">//Get current session   or create a new session</span></sub></em></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">session_start(); </span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">//Add information   to the session</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">$_SESSION['name']=   “Pramati”;</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">//Print the   information</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">echo   $_SESSION['name'];</span></sub></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">?&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal" style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>4.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal" style="margin-left: 72pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>a.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">File Uploading &#8211; Form</span></sub></strong></p>
<table class="MsoNormalTable" style=" width: 441.9pt; margin-left: 11.4pt; border-collapse: collapse;" cellspacing="0" cellpadding="0" width="589">
<tbody>
<tr style="height: 13.75pt;">
<td style=" padding: 0cm 5.4pt; width: 209.15pt; height: 13.75pt;" width="279" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">JSP</span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 13.75pt;" width="310" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">PHP</span></sub></strong></p>
</td>
</tr>
<tr style="height: 103.3pt;">
<td style="padding: 0cm 5.4pt; width: 209.15pt; height: 103.3pt;" width="279" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;JSP – File   upload form&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;form<span> </span>action=&#8221;ProcessFileUpload.jsp&#8221; method=&#8221;post&#8221;   enctype=&#8221;multipart/form-data&#8221;&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span></span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">File   1:&lt;input type=&#8221;file&#8221; name=&#8221;file1&#8243;/&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;br/&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;input   type=&#8221;submit&#8221; name=&#8221;Submit&#8221; value=&#8221;Upload   File&#8221;/&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;/form&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub>
</p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"> </span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">Please Note: No in-built support for file uploading   in JSP. You have to rely on external libraries. This example uses Apache&#8217;s   commons-upload lib.</span></sub></p>
<p class="MsoNormal"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"> </span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 103.3pt;" width="310" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;html&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;head&gt;<br />
<span> </span>&lt;title&gt;PHP – File   upload form&lt;/title&gt;</span></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"><span> </span>&lt;/head&gt;<br />
&lt;body&gt;</span></sub>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;form<span> </span>action=&#8221;ProcessFileUpload.php&#8221; method=&#8221;post&#8221;   enctype=&#8221;multipart/form-data&#8221;&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span></span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">File   1:&lt;input type=&#8221;file&#8221; name=&#8221;file1&#8243;/&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;br/&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;input   type=&#8221;submit&#8221; name=&#8221;Submit&#8221; value=&#8221;Upload   File&#8221;/&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;/form&gt;</span></sub></em></strong></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">&lt;/body&gt;<br />
&lt;/html&gt;</span></sub><strong><sub></sub></strong></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="margin-left: 18pt;"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">4.</span></sub></strong></p>
<p class="MsoNormal" style="margin-left: 72pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>b.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">File Uploading – Backend Code</span></sub></strong></p>
<table class="MsoNormalTable" style="border: medium none; width: 441.9pt; margin-left: 11.4pt; border-collapse: collapse;" cellspacing="0" cellpadding="0" width="589">
<tbody>
<tr style="height: 13.75pt;">
<td style=" padding: 0cm 5.4pt; width: 210.15pt; height: 13.75pt;" width="280" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">JSP</span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 231.75pt; height: 13.75pt;" width="309" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">PHP</span></sub></strong></p>
</td>
</tr>
<tr style="height: 103.3pt;">
<td style="padding: 0cm 5.4pt; width: 210.15pt; height: 103.3pt;" width="280" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">Code for <strong><em>ProcessFileUpload.jsp</em></strong></span></sub></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;%</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">if(ServletFileUpload.isMultipartContent(request))</span></sub></em></strong><strong><sub><span style="font-family: Tahoma;">?</span></sub></strong><strong><em><sub></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">{</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">FileItemFactory   f = new DiskFileItemFactory();</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">ServletFileUpload   upload = new ServletFileUpload(f);</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">List items =   upload.parseRequest(request);</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">Iterator   itemsIter = items.getIterator();</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>if(iter.hasNext())</span></sub></em></strong><strong><sub><span style="font-family: Tahoma;">?</span></sub></strong><strong><em><sub></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>{</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>File uploadedFile = new   File(item.getName()); </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>item.write(uploadedFile); </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span><span> </span>}</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">}</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">%&gt;</span></sub></em></strong><sub></sub></p>
<p class="MsoNormal"><sub><span style="font-family: Tahoma;"> </span></sub></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">Please Note: No in-built support for file uploading   in JSP. You have to rely on external libraries. This example uses Apache&#8217;s   commons-upload lib.</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"> </span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 231.75pt; height: 103.3pt;" width="309" valign="top">
<p class="MsoNormal"><sub><span style="font-family: Tahoma;">Code for <strong><em>ProcessFileUpload.php</em></strong> </span></sub></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;?php </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">if   ($_FILES["file"]["error"] &gt; 0)</span></sub></em></strong><strong><sub><span style="font-family: Tahoma;">?</span></sub></strong><strong><em><sub><span style="font-family: Tahoma;"> </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">{</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>echo &#8220;Error: &#8221; .   $_FILES["file"]["error"];</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">}</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">else</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">{</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>move_uploaded_file( </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>$_FILES["file"]["tmp_name"], </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"><span> </span>&#8220;upload/&#8221; .   $_FILES["file"]["name"]);</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">}</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">?&gt;</span></sub></em></strong><strong><sub></sub></strong></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 12pt; font-family: Tahoma;"> </span></strong></p>
<p class="MsoNormal" style="text-align: center;" align="center"><strong><span style="font-size: 12pt; font-family: Tahoma;"> </span></strong></p>
<p class="MsoNormal" style="margin-left: 36pt; text-indent: -18pt;"><!--[if !supportLists]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;"><span>5.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-size: 7pt; line-height: normal; font-size-adjust: none; font-stretch: normal; font-family: &quot;Times New Roman&quot;;"> </span></span></span></sub></strong><!--[endif]--><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">Connect to the Database (MySql)</span></sub></strong></p>
<table class="MsoNormalTable" style="width: 441.9pt; margin-left: 11.4pt;" cellspacing="0" cellpadding="0" width="589">
<tbody>
<tr style="height: 13.75pt;">
<td style="padding: 0cm 5.4pt; width: 209.15pt; height: 13.75pt;" width="279" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">JSP</span></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 13.75pt;" width="310" valign="top">
<p class="MsoNormal" style="text-align: center;" align="center"><strong><sub><span style="font-size: 12pt; font-family: Tahoma;">PHP</span></sub></strong></p>
</td>
</tr>
<tr style="height: 103.3pt;">
<td style="padding: 0cm 5.4pt; width: 209.15pt; height: 103.3pt;" width="279" valign="top">
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">&lt;%@ page import=&#8221;java.sql.*&#8221; %&gt;</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">&lt;% </span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">Connetion conn = null;</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">java.sql.Connection conn= null;</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">Statement st = null;</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">ResultSet rs = null;</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"> </span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">try {</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"><span> </span>Class.forName(&#8220;com.mysql.jdbc.Driver&#8221;).newInstance();</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"><span> </span>Class.forName(&#8220;org.gjt.mm.mysql.Driver&#8221;).newInstance();</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"><span> </span>conn   = DriverManager.getConnection(<span> </span>&#8220;jdbc:mysql://localhost/jsp?user=xxx&amp;password=xxx&#8221;);</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"><span> </span>st   = conn.createStatement();</span></sub></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;"><span> </span>//   connection made&#8230;.<br />
}</span></sub></strong><strong><sub></sub></strong></p>
</td>
<td style="padding: 0cm 5.4pt; width: 232.75pt; height: 103.3pt;" width="310" valign="top">
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">&lt;?php</span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">$dbserver=”locations”; </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">$username=&#8221;username&#8221;;<br />
$password=&#8221;password&#8221;;<br />
$database=&#8221;your_database&#8221;;</span></sub></em></strong></p>
<p><strong><em><sub>mysql_connect($dbserver,$username,$password);<br />
@mysql_select_db($database) or die( &#8220;Unable to select database&#8221;);</sub></em></strong>
</p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;"> </span></sub></em></strong></p>
<p class="MsoNormal"><strong><em><sub><span style="font-family: Tahoma;">//connection </span></sub></em></strong><strong><em><sub><span style="font-family: Tahoma;">made…</span></sub></em></strong></p>
<p class="MsoNormal"><strong><sub><span style="font-family: Tahoma;">?&gt;</span></sub></strong><strong><sub></sub></strong></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="font-size: 10pt; font-family: Tahoma;"> </span></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/09/25/php-vs-jsp/feed/</wfw:commentRss>
		<slash:comments>510</slash:comments>
		</item>
		<item>
		<title>Sun’s Web Stack Offers Choice of Operating Systems</title>
		<link>http://rochakchauhan.com/blog/2008/07/24/sun%e2%80%99s-web-stack-offers-choice-of-operating-systems/</link>
		<comments>http://rochakchauhan.com/blog/2008/07/24/sun%e2%80%99s-web-stack-offers-choice-of-operating-systems/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 04:09:40 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/07/24/sun%e2%80%99s-web-stack-offers-choice-of-operating-systems/</guid>
		<description><![CDATA[Sun showed off its Web Stack on Tuesday, as its name indicates, the stack includes technology used to run Web sites and Web applications. It is based on the AMP portion of the LAMP stack (Linux, Apache, MySQL, Perl/Python/PHP), but users will have a choice of operating systems: Sun’s Solaris, Linux, Windows or other operating &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/07/24/sun%e2%80%99s-web-stack-offers-choice-of-operating-systems/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.infoworld.com/article/08/07/22/Sun-readies-Web-stack-featuring-choice-of-OSes_1.html">Sun showed off its Web Stack on Tuesday</a>, as its name indicates, the stack includes technology used to run Web sites and Web applications. It is based on the AMP portion of the LAMP stack (Linux, Apache, MySQL, Perl/Python/PHP), but users will have a choice of operating systems: Sun’s Solaris, Linux, Windows or other operating systems. The story says Sun will provide support for Solaris starting this quarter, for Linux starting next quarter, and for Windows and others starting later in the year.Let’s be honest — we knew this was coming as soon as Sun acquired MySQL, right? Except at that point, I thought it would be strictly a MAPS stack (MySQL, Apache, Perl/Python/PHP, Solaris). Maybe the Linux Foundation’s reaction to that idea wasn’t the only one that was adverse.</p>
<p>Whatever the motivation to offer multiple operating systems, it looks like Sun is focusing on working with rather than excluding other platforms, just like Canonical’s Mark Shuttleworth encouraged Linux developers to do when working on Linux desktop.</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/07/24/sun%e2%80%99s-web-stack-offers-choice-of-operating-systems/feed/</wfw:commentRss>
		<slash:comments>261</slash:comments>
		</item>
		<item>
		<title>Sun plans JavaFX for the desktop</title>
		<link>http://rochakchauhan.com/blog/2008/05/09/sun-plans-javafx-for-the-desktop/</link>
		<comments>http://rochakchauhan.com/blog/2008/05/09/sun-plans-javafx-for-the-desktop/#comments</comments>
		<pubDate>Fri, 09 May 2008 03:29:21 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[sun]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/05/09/sun-plans-javafx-for-the-desktop/</guid>
		<description><![CDATA[Sun Microsystems (NSDQ: JAVA) has a long ways to go before it steps up to compete with Adobe Systems (NSDQ: ADBE) Flash or AJAX or even Microsoft (NSDQ: MSFT) Silverlight in building Web 2.0 applications. But it clearly has that goal in mind as it works on producing a version of JavaFX for the desktop, &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/05/09/sun-plans-javafx-for-the-desktop/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span id="articleBody">Sun Microsystems (NSDQ: <a href="http://www.techweb.com/financialCenter/index.jhtml?Account=techweb&amp;Page=QUOTE&amp;Ticker=JAVA" target="_blank" class="stockLink">JAVA</a>) has a long ways to go before it steps up to compete with Adobe Systems (NSDQ: <a href="http://www.techweb.com/financialCenter/index.jhtml?Account=techweb&amp;Page=QUOTE&amp;Ticker=ADBE" target="_blank" class="stockLink">ADBE</a>) Flash or AJAX or even Microsoft (NSDQ: <a href="http://www.techweb.com/financialCenter/index.jhtml?Account=techweb&amp;Page=QUOTE&amp;Ticker=MSFT" target="_blank" class="stockLink">MSFT</a>) Silverlight in building Web 2.0 applications. But it clearly has that goal in mind as it works on producing a version of JavaFX for the desktop, which it seeks to launch this fall.Sun&#8217;s Param Singh, senior director of Java marketing and veteran executive of Apple&#8217;s Multimedia Group, filled in some of the gaps in the information available on JavaFX in an interview Wednesday, the second day of Sun&#8217;s 13th annual user group, JavaOne, in San Francisco.</span></p>
<p>JavaFX first and foremost will be a scripting language like Adobe&#8217;s ActionScript, which allows programming to be run in the Flash Player. Likewise, JavaFX will serve the same function as JavaScript, used to power the interactive user applications in the browser window built with Ajax.</p>
<p>JavaFX also will have a timeline sequence engine, something like the one pioneered by Adobe&#8217;s Flash, that will allow animations and coordination of a multimedia sound and video roll out.</p>
<p>But even more important, perhaps, JavaFX is a bid by Sun to coordinate powerful back-end programming on a multiprocessor server with an engaging and rich presentation for the end user. All three &#8212; Sun, Adobe, and Microsoft &#8212; still have issues in pulling together the power of the Internet server and the presentation to the user. Think of the difference between bumping your way through Web pages versus the enveloping action of a computer game. Sun thinks it&#8217;s going to win the arms race to coordinate the two.</p>
<p>Sun expects to give developers the option of producing user interfaces for Web applications that run inside the browser window, or outside on the user&#8217;s normal computer desktop work space. It can do this because it will have a plug-in for the browser that updates the Java Virtual Machine, resident on many PCs. That JavaFX runtime exists in Java Standard Edition 6, update 10, and will gradually be added to existing Java Virtual Machines through an automated update process, Singh said.</p>
<p>At the same time, JavaFX applications will have the ability to migrate out of the browser window. The icon for a JavaFX application, once it&#8217;s been downloaded, can be moved onto the user&#8217;s desktop and run there through the usual drag-and-drop method. The application, unlike most that are streamed down to the browser, can be either run while connected to the Internet or stored and saved as a permanent addition, available to run when the user is disconnected. Online application suppliers have been struggling with that issue &#8212; what to do when the user is no long plugged into the Net.</p>
<p>But there&#8217;s still the issue of simplicity of application building. &#8220;Designers for end-user interfaces want to assemble content, not program it. We start from a strength among programmers, but we will produce incremental tools that allow designers to make the front end more enticing. We need to bring both of these communities together,&#8221; Singh said.</p>
<p>Exactly how that &#8220;bringing together&#8221; will proceed will await the first software development kit Sun can produce for FX this fall. Will it also be able to produce &#8220;assembly oriented&#8221; content tools, the way Adobe has?</p>
<p>In a demonstration Tuesday that needed to be restarted twice, Sun illustrated a mashup JavaFX application. A user&#8217;s collection of Facebook and Flickr pictures were loaded into the application, then a sophisticated flocking algorithm applied. If the user entered a person&#8217;s name, all the pictures with that person in them began to flock together out of a slowly moving mass on the screen. Pictures with similar colors could be enticed to flock together, etc. It was a combination of programming and presentation that many in the audience hadn&#8217;t seen before.</p>
<p>Whether they will see it on their own computers will depend on how fast Sun can deliver the goods and whether they will be able to perform as expected.</p>
<p>&#8220;We are focused on strengthening the designer/developer integration,&#8221; claimed Singh. The flocking demo illustrated Sun&#8217;s programming skills. The scripting code behind it had been compiled and could run fast enough in the Java Virtual Machine to keep everything in motion. Most scripting or &#8220;dynamic&#8221; languages wouldn&#8217;t have been equal to the feat; they must go through an interpreter, and interpreted code is slower than compiled code.</p>
<p>As Sun produces JavaFX for the desktop, it hopes to capitalize on its capabilities by following up with JavaFX for mobile devices in the spring of 2009. Java already has a strong presence in the cell phone and mobile device market.Nokia (NYSE:  <a href="http://www.techweb.com/financialCenter/index.jhtml?Account=techweb&amp;Page=QUOTE&amp;Ticker=NOK" target="_blank" class="stockLink">NOK</a>) representatives say more than half of all their phones &#8212; not just their smartphones but all their mobile device inventory &#8212; run Java now. If JavaFX gets a toehold on the desktop, Sun may outsprint the competition in offering capabilities for rich Internet applications on mobile devices.</p>
<p>If advertising, for example, could be inserted into an Internet server&#8217;s response to a user, based on what that user wanted to do with a running application, such coordination might yield competitive advantage. It already can be done in various clunky Internet applications, but that&#8217;s not the point. The point, said Singh, is &#8220;how seamlessly all the pieces can be overlaid with each other.&#8221;</p>
<p><span id="articleBody"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/05/09/sun-plans-javafx-for-the-desktop/feed/</wfw:commentRss>
		<slash:comments>319</slash:comments>
		</item>
		<item>
		<title>Zend PHP Framework is now powered by Google and Microsoft</title>
		<link>http://rochakchauhan.com/blog/2008/03/17/zend-php-framework-is-now-powered-by-google-and-microsoft/</link>
		<comments>http://rochakchauhan.com/blog/2008/03/17/zend-php-framework-is-now-powered-by-google-and-microsoft/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 04:23:55 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/03/17/zend-php-framework-is-now-powered-by-google-and-microsoft/</guid>
		<description><![CDATA[It&#8217;s no longer just a .NET or Java world when it comes to production-quality development frameworks &#8212; PHP is edging its way into developers&#8217; affections. Now, the technology&#8217;s backers are planning further efforts to expand on its successes. Zend, PHP&#8217;s lead commercial sponsor, plans Monday to release its eponymous Framework 1.5, the first major release &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/03/17/zend-php-framework-is-now-powered-by-google-and-microsoft/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s no longer just a .NET or Java world when it comes to production-quality development frameworks &#8212; PHP is edging its way into developers&#8217; affections. Now, the technology&#8217;s backers are planning further efforts to expand on its successes.</p>
<p>Zend, PHP&#8217;s lead commercial sponsor, plans Monday to release its eponymous Framework 1.5, the first major release since <a href="http://www.internetnews.com/dev-news/article.php/3686581">1.0 debuted last year</a>.</p>
<p>The launch will build on the framework&#8217;s significant momentum to date. According to Zend, the framework has had over four million downloads.</p>
<p>Additionally, the Zend Framework has received votes of confidence in the form of contributions from and joint development with major vendors like Microsoft, IBM, Fox Interactive Media and Google.</p>
<p>Building on those relationships, a marquee feature in the 1.5 release will be full support for <a href="http://www.internetnews.com/webcontent/article.php/3733661/YouTube+APIs+Coming+to+a+Site+Near+You.htm">Google&#8217;s newly announced YouTube APIs</a>.</p>
<p>&#8220;Google has people that are actively contributing to Zend Framework,&#8221; Andi Gutmans, Zend&#8217;s CTO, told <em>InternetNews.com</em>. &#8220;As part of their rollout plans for the YouTube APIs, Zend Framework was a very important part because of the broad reach of the PHP community.&#8221;</p>
<p>&#8220;There was work going on behind the scenes before their announcement to make sure it all worked together,&#8221; Gutmans added.</p>
<p>The new release will also give a boost to Ajax support (<a href="http://inews.webopedia.com/SHARED/search_action.asp?Term=AJAX&amp;Template_Name=inews.webopedia.com">define</a>), with infrastructure improvements to handle Ajax requests as well as coding autocomplete, shortcut and form support features.</p>
<p>Gutmans said he expects the next version of Zend Framework will provide even better Ajax support with tighter integration for Ajax toolkits like Dojo.</p>
<p>The launch will build on burgeoning interest and support for the Zend Framework, which <a href="http://www.internetnews.com/dev-news/article.php/3557711">began in earnest in October 2005</a>. The framework&#8217;s <a href="http://www.internetnews.com/dev-news/article.php/3589886">first public development release</a> appeared in March 2006.</p>
<p>Since then, the effort has been attracting attention from many of the big names in software development.</p>
<p>Google, for instance, has been contributing to the project since at least December 2006, when it <a href="http://www.internetnews.com/dev-news/article.php/3650066">first included the GData module</a>. The module is used in most of Google&#8217;s APIs, including those for Google Calendar, Blogger Data, Google Base, Spreadsheets and Google Code Search.</p>
<p>Google archrival Microsoft has also lent a hand to the PHP effort so that the company&#8217;s InfoCard identity technology will work with the framework.</p>
<p>Most recently, Zend&#8217;s active partnership with Microsoft led to PHP being <a href="http://www.internetnews.com/dev-news/article.php/3731981/PHP+Cozy+With+Windows+Server+2008.htm">certified for use on Windows Server 2008</a>.</p>
<p>While Zend has teamed with the software giant for core PHP support in Windows, other potential areas of collaboration remain untapped, however. For example, the two are not currently working integrating Microsoft .NET into the framework.</p>
<p>Gutmans said that some customers have asked about such integration, but the two companies remain in a &#8220;discovery phase&#8221; for the moment.</p>
<p>With support from large players like Google and Microsoft, it&#8217;s not surprising that PHP&#8217;s backers have high hopes for the near future &#8212; including potentially taking share from Java and .NET.</p>
<p>&#8220;Obviously, PHP is growing and over time, we are displacing other languages,&#8221; Gutmans said.</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/03/17/zend-php-framework-is-now-powered-by-google-and-microsoft/feed/</wfw:commentRss>
		<slash:comments>272</slash:comments>
		</item>
		<item>
		<title>C# set to take Java&#8217;s crown as Java drops 50 percent</title>
		<link>http://rochakchauhan.com/blog/2008/03/11/c-set-to-take-javas-crown-as-java-drops-50-percent/</link>
		<comments>http://rochakchauhan.com/blog/2008/03/11/c-set-to-take-javas-crown-as-java-drops-50-percent/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 07:04:37 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[C#]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/03/11/c-set-to-take-javas-crown-as-java-drops-50-percent/</guid>
		<description><![CDATA[Using book sales as surrogate tea leaves, Mike Hendrickson of the O&#8217;Reilly Radar finds life bleak for pretty much every major programming language except C#, Javascript, and Ruby. Java? It has plunged by 50 percent since 2003. Sun Microsystems is hedging its bets on web scripting languages, recently adding Python experts to its fold. So &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/03/11/c-set-to-take-javas-crown-as-java-drops-50-percent/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="postBody">Using book sales as surrogate tea leaves, <a href="http://radar.oreilly.com/archives/2008/03/state-of-the-computer-book-mar-22.html" class="external-link">Mike Hendrickson of the O&#8217;Reilly Radar finds life bleak</a> for pretty much every major programming language except C#, Javascript, and Ruby. Java? It has plunged by 50 percent since 2003.</p>
<p>Sun Microsystems is hedging its bets on web scripting languages, <a href="http://www.news.com/8301-10784_3-9884267-7.html" title="Sun hires Python pros in dynamic languages push -- Monday, Mar 3, 2008">recently adding Python experts to its fold</a>. So perhaps Sun will weather the storm. Regardless, even despite its five-year slide, Java still holds the biggest share of the book-buying market, as this chart shows:</p>
<p><!--pagebreak--></p>
<p class="cnet-image-div float-none" style="width: 350px"><span class="image-credit">(Credit: O&#8217;Reilly Media)</span></p>
<p>Are Java&#8217;s days numbered?  O&#8217;Reilly&#8217;s data seems to suggest this:</p>
<blockquote><p>Ruby was a small box last year and is now 8 largest language passing Perl and Python and is now knocking on the door for Visual Basic&#8217;s spot. Ruby has the second largest unit growth after C# and went from 4% overall market share to 5% and is 4k units off of displacing VB for #7 overall. C# was equally impressive with a 36,811 unit growth or 18.85% growth and went from 11% market share in 2006 to 13% market share in 2007. At the rate it is going, it should surpass Java as the number one language this year as it is only (9,526) units short and is on a positive 18.85% growth rate while Java continues its slide at a (14.16%) clip.</p></blockquote>
<p>What is the cause of Java&#8217;s decline?  I certainly see plenty of it within enterprises.  Still, it&#8217;s undeniable that <a href="http://developers.slashdot.org/article.pl?sid=06/12/17/0237234" class="external-link">the Web and its dynamic programming languages is upstaging Java</a>.  Arguably, too, Java has all the benefits <a href="http://weblogs.java.net/blog/robogeek/archive/2007/08/java_is_doomed.html" class="external-link">and downsides</a> to being a community product (though <a href="http://blogs.cnet.com/8301-13505_1-9879303-16.html" title="15 minutes with Jonathan Schwartz: Java and Linux -- Tuesday, Feb 26, 2008">not enough of one for some people&#8217;s tastes</a>).</p>
<p>Is there a <a href="http://www.javalobby.org/java/forums/t78276.html" class="external-link">future for standalone Java applications</a>?  Of course.  But is it a future that will drown in irrelevance in the wake of dynamic web languages?</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/03/11/c-set-to-take-javas-crown-as-java-drops-50-percent/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java increasingly threatened by new app dev frameworks</title>
		<link>http://rochakchauhan.com/blog/2008/03/01/java-increasingly-threatened-by-new-app-dev-frameworks/</link>
		<comments>http://rochakchauhan.com/blog/2008/03/01/java-increasingly-threatened-by-new-app-dev-frameworks/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 06:05:00 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[development frameworks]]></category>
		<category><![CDATA[Java increasingly threatened by php]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/03/01/java-increasingly-threatened-by-new-app-dev-frameworks/</guid>
		<description><![CDATA[Is Java slipping into second-tier status in the application development space? All the attention being given to its rivals these days might give off that impression. Nearly 13 years old, the Java language and platform created at Sun Microsystems now shares the software development limelight with scripting languages such as PHP (Hypertext Preprocessor) and Ruby, &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/03/01/java-increasingly-threatened-by-new-app-dev-frameworks/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span class="artText">Is Java slipping into second-tier status in the application development space? All the attention being given to its rivals these days might give off that impression.</span></p>
<p><span class="artText"><span class="artText"></p>
<p page="1" class="ArticleBody">Nearly 13 years old, the Java language and platform created at Sun Microsystems now shares the software development limelight with scripting languages such as PHP (Hypertext Preprocessor) and Ruby, as well as with Microsoft&#8217;s .Net technologies.</p>
<p page="1" class="ArticleBody">Much touted for its ability to run on multiple platforms via the JVM (Java Virtual Machine), Java grabbed headlines for years before being seriously challenged by .Net and open source scripting variants. Today, these alternatives to Java have gained plenty of adherents. Open source CRM vendor SugarCRM, for example, <a href="http://www.infoworld.com/article/08/02/08/sugar-qa_1.html" class="regularArticleU">chose to write</a> its application in PHP instead of Java. &#8220;When we set out, we thought we were going to build a Java application on top of Oracle,&#8221; said Clint Oram, SugarCRM co-founder. The company, however, saw PHP maturing and found it &#8220;just more accessible than Java, for the average person,&#8221; Oram said.</p>
<p page="1" class="ArticleBody">Microsoft, meanwhile, has made its .Net platform a serious player in the enterprise space. A <a href="http://weblog.infoworld.com/techwatch/archives/014981.html" class="regularArticleU">November 2007 report</a> by Info-Tech Research Group stated the case for .Net becoming more popular than the Java platform in enterprises.</p>
<p page="1" class="ArticleBody">But don’t count Java out just yet.</p>
<p page="1" class="ArticleBody">&#8220;Everywhere you turn, Java touches something. It&#8217;s used in databases, it&#8217;s used to drive the Web [systems] of big companies like eBay,&#8221; said Rick Ross, president of the <a target="_blank" href="http://www.dzone.com/links/index.html" class="regularArticleU">DZone developer community</a> and founder of <a target="_blank" href="http://java.dzone.com/" class="regularArticleU">Javalobby</a>, a Web community for Java developers. He also is a Java developer.</p>
<p page="1" class="ArticleBody">The Java industry remains very, very large, Ross said. &#8220;All of it put together is literally billions and billions of dollars,&#8221; said Ross, noting the use of Java by everyone from IBM to Oracle and its latest major acquisition, BEA Systems.</p>
<p page="1" class="ArticleBody"><strong>Microsoft .Net is attracting a lot of smaller developers<br />
</strong>The <a target="_blank" href="http://www.tiobe.com/tpci.htm" class="regularArticleU">Tiobe Programming Community Index</a>, which ranks the popularity of programming languages, has Java at No. 1 for February, the same place it held a year ago. Following it are C, Visual Basic, PHP, C++, Perl, Python, and C#. Further down the list are Delphi, JavaScript, and Ruby. (Tiobe ratings are based on the worldwide availability of skilled engineers, courses, and vendors, with popular search engines used to calculate the ratings.)</p>
<p page="1" class="ArticleBody">Info-Tech, however, found Microsoft has a strength in its ability to offer a single soup-to-nuts stack featuring .Net, the Exchange e-mail system, and SQL Server database. &#8220;[Companies] want one throat to choke,&#8221; said George Goodall, an Info-Tech senior research analyst and author of the firm&#8217;s November report.</p>
<p page="1" class="ArticleBody">&#8220;We&#8217;re not particularly bullish on .Net technology over Java technology, but the difference here is that .Net for most applications is good enough,&#8221; he said.</p>
<p page="1" class="ArticleBody">Info-Tech sampled 1,900 companies, most of which are midmarket companies with less than $1 billion in annual revenues. The study found that 12 percent of enterprises focus exclusively on .Net as compared to 3 percent focused just on Java. Also, 49 percent center primarily on .Net, compared to 20 percent for Java.</p>
<p page="1" class="ArticleBody">Despite the survey&#8217;s midmarket focus, Goodall noted that even respondent companies with annual revenues exceeding $1 billion had a similar .Net preference as the midmarket respondents. Still, the survey did find that the popularity of .Net decreases very gradually as the size of enterprises increases. But Goodall cautioned that in such companies, .Net&#8217;s popularity decline did not come from an increase in Java usage, but instead from a preference for other development platforms in heterogeneous environments.</p>
<p page="1" class="ArticleBody"><span class="artText">Even faced with increased competition from the likes of .Net, Java is nowhere near the end of its life, Info-Tech&#8217;s report concluded. The platform has incredibly strong allies and an immense code base. Just as user sites must tend to legacy Cobol code, so will they have to tend to a lot of Java code in the future. &#8220;[Java is] not going to disappear,&#8221; Goodall said.</span></p>
<p><span class="artText"><span class="artText"></p>
<p page="2" class="ArticleBody">Rails framework founder David Heinemeier Hansson also <a href="http://www.infoworld.com/article/07/12/28/52FE-underreported-java_1.html" class="regularArticleU">likened Java to Cobol</a>. &#8220;I think Java is still relevant in the sense that languages never die. There will be systems running in Java 20 years from now,&#8221; he said, &#8220;just like there are still lots of Cobol systems around from way back when.&#8221;</p>
<p page="2" class="ArticleBody"><strong>New frameworks are gaining traction among developers<br />
</strong>&#8220;Ruby, PHP, Python, and similar platforms have definitely taken a big chunk out of the Java brain trust,&#8221; said Hansson. &#8220;We have a large constituency of Rails users who are Java refugees.&#8221;</p>
<p page="2" class="ArticleBody">New frameworks such as PHP and Ruby on Rails indeed &#8220;have taken a huge bite out of the territory that used to belong to Java <em>and</em> .Net,&#8221; said Tim Bray, Sun&#8217;s director of Web technologies &#8212; emphasizing that .Net has the same issue. &#8220;I totally don&#8217;t believe, based on what I see, that .Net still has the kind of growth that it had for a few years there starting in the late 1990s.The evidence seems to show that while Java isn&#8217;t the hottest growth spot, it&#8217;s still the largest single ecosystem out there,&#8221; he added.</p>
<p page="2" class="ArticleBody">Hansson agrees that .Net is also threatened by new frameworks, but he noted that .Net nevertheless seems to be taking away mindshare from Java in shops predisposed to use Microsoft technology.</p>
<p page="2" class="ArticleBody">A program manager at a government agency, who wished to remain anonymous, said solutions such as <a href="http://www.infoworld.com/slideshow/2007/01/25-2007_technology-8.html" class="regularArticleU">Adobe Flex</a> and Microsoft products are offering alternatives to Java. &#8220;On the server side, Java will always have a place in stitching things together and customizing, but to turn out nice applications quickly that are maintainable, I see the other tools starting to take over that space,&#8221; the program manager said.</p>
<p page="2" class="ArticleBody"><strong>Sun looks ahead to a world where Java may not be king<br />
</strong>At Sun, CEO Jonathan Schwartz remains a staunch Java advocate but acknowledges Java is not the only contestant in the show these days. At the <a href="http://www.infoworld.com/article/08/02/06/schwartz-sugarcrm_1.html" class="regularArticleU">SugarCon 2008</a> conference for SugarCRM users earlier this month, Schwartz noted Sun&#8217;s <a href="http://www.infoworld.com/article/08/01/31/davinci-machine_1.html" class="regularArticleU">Da Vinci Machine</a> project to extend the JVM to accommodate other languages. &#8220;The intent is to say, &#8216;Look, Java is one language, but it is not a hammer for all nails. It happens to be a really, really good hammer,&#8217;&#8221; Schwartz said.</p>
<p page="2" class="ArticleBody">Bray admits that the Java language &#8220;is starting to look a little boring to the young rabble-rousers in the community,&#8221; and says the Java language is &#8220;replaceable.&#8221; However, Bray argues that the Java platform &#8212; the JVM, APIs, and libraries &#8212; is here to stay. The JVM is &#8220;insanely popular,&#8221; and the consensus is the libraries are about the best, he said.</p>
<p page="2" class="ArticleBody">In anticipation of a less Java-centric world, Sun is working to embrace the new technologies. Case in point is the JRuby effort to enable Ruby to run Rails applications on the Java platform, Bray said. Meanwhile, work is being done to spruce up the Java language with closures and other capabilities, he said. (Closures lets pieces of code be passed around and used elsewhere without the need to declare a subroutine.)</p>
<p page="2" class="ArticleBody">Rails founder Hansson agrees with Sun&#8217;s direction. &#8220;I do think the mentality of  &#8216;Java is the answer, what was the question again?&#8217; is gone. Even Sun realizes that now, which I think is healthy. There are lots of domains where Java is just too heavy and cumbersome an environment to dance with.&#8221;</p>
<p></span></span></span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/03/01/java-increasingly-threatened-by-new-app-dev-frameworks/feed/</wfw:commentRss>
		<slash:comments>378</slash:comments>
		</item>
		<item>
		<title>Is PHP ready for enterprise?</title>
		<link>http://rochakchauhan.com/blog/2008/03/01/is-php-ready-for-enterprise/</link>
		<comments>http://rochakchauhan.com/blog/2008/03/01/is-php-ready-for-enterprise/#comments</comments>
		<pubDate>Sat, 01 Mar 2008 06:02:17 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[enterprise?]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/03/01/is-php-ready-for-enterprise/</guid>
		<description><![CDATA[It&#8217;s been an interesting few months for Zend, the commercial company behind the open source programming language PHP. In the past few weeks, Zend has teamed up with Rackspace, a leading web hosting provider. It&#8217;s also signed an agreement with Ibuildings, an Anglo-Dutch software consultancy company, to provide training and support services in the UK. &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/03/01/is-php-ready-for-enterprise/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span name="intelliTxt" id="intelliTXT">It&#8217;s been an interesting few months for <a href="http://www.zend.com/en/" target="_blank">Zend</a>, the commercial company behind the open source programming language PHP.</span></p>
<p>In the past few weeks, Zend has <a href="http://www.rackspace.co.uk/zend" target="_blank">teamed up with Rackspace</a>, a leading web hosting provider. It&#8217;s also signed an agreement with Ibuildings, an Anglo-Dutch software consultancy company, to provide training and support services in the UK. And last year, Zend partnered with Microsoft, despite the software giant offering a competing platform.</p>
<p>A closer look at these partnerships suggests the company &#8211; and <a href="http://www.php.net/" target="_blank">PHP</a> itself &#8211; may be ready for the big time.</p>
<p><strong>Overcoming its roots</strong></p>
<p>Partners such as Rackspace and Microsoft can help overcome one of the largest hurdles in moving into the enterprise arena: the record of PHP development and the strength of Java as the principle software language in enterprise consultancy &#8211; both of which stem back to the history of how PHP has evolved culturally within the software community.</p>
<p>With Java as the de facto academic choice, PHP has grown out of the &#8220;hobbyist&#8221; programmer, generally self-taught and with all of the issues that entails. Until only a few years ago, the concepts of best practice development, coding frameworks and even having a methodology were alien to the hackers of the PHP community, invariably spinning off from the Perl programmers of old.</p>
<p>While these developers were fine for creating the odd microsite, their lack of discipline and structure was akin to an unguided nuke on enterprise projects, while the maturity of the Java community was more like a tomahawk. And IT directors quite rightly didn&#8217;t want huge fiery ends to their projects by geniuses who had no interest in collaborating when they could enjoy all the benefits from the cool, precise child of Sun.</p>
<p>But now that <a href="http://framework.zend.com/" target="_blank">Zend Framework</a>, the open source scaffold for PHP development, has passed through a troublesome puberty (version one was released last year to some acclaim), and that more and more companies with web sites in PHP are adopting the procedures and practices of a &#8220;grown-up&#8221; language, does this mean that PHP is going to be seen as a realistic alternative to Java in the enterprise?</p>
<p><strong>Taking on Java</strong></p>
<p>With Zend&#8217;s star rising, is it enough to overcome the bias in large e-commerce firms? Zend have an uphill struggle on a cultural level: many blue-chip companies have a policy of only hiring developers with a 2:1 Computer Science degree, and the majority of UK universities are still teaching Java.</p>
<p>Even though both languages are object-oriented and have more then cursory similarities, does this mean that Java will continue to be the forerunner?</p>
<p>Vic Wyatt, business development manager for <a href="http://www.lmu.ac.uk/" target="_blank">Leeds Metropolitan University</a>, doesn&#8217;t think so. &#8220;We&#8217;ve recently signed with Zend to provide our students a worthwhile group of modules in PHP,&#8221; said Wyatt, speaking about the university&#8217;s PHP academy, which helps students learn the language as well as get commercial accreditation via the Zend Certified Engineer exam.</p>
<p>&#8220;Java is perceived, rightly or wrongly, as having had its day. We&#8217;re simply responding to the market, and the market is clearly picking up on PHP,&#8221; he said.</p>
<p>In addition, the university is working to place its students at companies using PHP. According to Wyatt, several large companies are involved, including network provider Orange. &#8220;We need to give our students opportunities that are real and meaningful,&#8221; Wyatt said.</p>
<p><span name="intelliTxt" id="intelliTXT"><strong>Rackspace turns to Zend</strong></span></p>
<p>With more partnerships, PHP-trained students will have more opportunities to take their skills to the enterprise market.</p>
<p>The Rackspace offering &#8211; the hosting firm is keen to stress that it isn&#8217;t a product &#8211; is a Red Hat environment running Zend Platform. This proprietary server technology provides a whole host of features for increasing performance, testing and debugging PHP applications &#8211; all key to making PHP friendlier for a business audience.</p>
<p>David Goulden, enterprise additions product manager for Zend, detailed the improvements the new partnership would offer for businesses. &#8220;When we initially worked together, it wasn&#8217;t synchronized,&#8221; he admitted. &#8220;We were working on a case-by-case basis [with Rackspace], with no official agreements in place. That&#8217;s all changed, and for the better of our customers.&#8221;</p>
<p>Doug Loewe, managing director for Rackspace in Europe, the Middle East and Asia, agreed. &#8220;We&#8217;ve been looking to expand our loose federation of partners, all of them fast-moving and able to stand shoulder to shoulder with us to provide our customers the support they want. Zend fit that criteria for us,&#8221; he said.</p>
<p>Zend are now training key Rackspace tech personnel in Zend Platform, and a clear vendor escalation path has been drawn up between the companies. &#8220;It&#8217;s a natural progression for us,&#8221; said Loewe. &#8220;There is a massive overlap between our customer bases.&#8221;</p>
<p>While Zend Platform is hardly new to the market, the acceptance of the architecture by Rackspace is an important step for Zend in moving into the enterprise market.</p>
<p><strong>A bit of Microsoft maturity</strong></p>
<p>There&#8217;s no stronger mark of a technology&#8217;s maturity than when Microsoft takes it seriously. Last year, Microsoft and Zend became partners to provide a better PHP offering on Windows 2003 Server &#8211; a much needed move to overcome the Unix bias of PHP&#8217;s functionality.</p>
<p>&#8220;We want to make it so as many developers can run on Windows as possible,&#8221; said Mark Quirk, Microsoft UK&#8217;s head of technology for development and platform. &#8220;So it made perfect sense.&#8221;</p>
<p>But does that mean Microsoft&#8217;s .Net and PHP can co-exist within the enterprise market? &#8220;I don&#8217;t think it changes the position of Zend in the enterprise,&#8221; said Quirk. &#8220;We&#8217;re not trying to make it work well in the enterprise or anything. ASP .Net works well in the enterprise.&#8221;</p>
<p>Despite the defence of Microsoft&#8217;s own programming framework, Quirk is far from belittling PHP&#8217;s inclusion on Windows Server. &#8220;Which platform would I recommend: .Net,&#8221; he said. &#8220;But as a platform provider, we want our platform to work for everyone.&#8221;</p>
<p>He said that making the platform better means more applications will be running on windows. &#8220;Having people run it on Windows will benefit us,&#8221; he said.</p>
<p><strong>The verdict</strong></p>
<p>This bodes well for the future of PHP in the enterprise, said Ivo Jansch, chief technology officer for the other recent Zend partner, Ibuildings. Jansch is currently writing a book for the well known <a href="http://www.phparch.com/" target="_blank">PHP|Architect</a> series, called Enterprise PHP Development &#8211; clearly a strong indicator of where he feels PHP will progress in the future.</p>
<p>Speaking before coming to the UK for the <a href="http://www.phpconference.co.uk/" target="_blank">PHPLondon&#8217;08</a> conference, he said: &#8220;We&#8217;re seeing more and more uptake in PHP for business applications. It&#8217;s being taken more seriously.&#8221;</p>
<p>Referring to a <a href="http://www.nexen.net/chiffres_cles/phpversion/17875-php_stats_evolution_for_november_2007.php" target="_blank">recent survey by Nexen</a> that puts PHP adoption on the Web at 33 per cent, Jansch compared the uptake of PHP in commercial applications to the rise of Linux. &#8220;We&#8217;re seeing the same pattern. There was a time when Linux was thought of as a hobby for enthusiasts only. Now look at the market. It&#8217;s the same for PHP too.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/03/01/is-php-ready-for-enterprise/feed/</wfw:commentRss>
		<slash:comments>373</slash:comments>
		</item>
		<item>
		<title>Microsoft launches student Java and LAMP challenge</title>
		<link>http://rochakchauhan.com/blog/2008/02/24/microsoft-launches-student-java-and-lamp-challenge/</link>
		<comments>http://rochakchauhan.com/blog/2008/02/24/microsoft-launches-student-java-and-lamp-challenge/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 12:43:47 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[LAMP challenge]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/02/24/microsoft-launches-student-java-and-lamp-challenge/</guid>
		<description><![CDATA[University computer science departments are rapidly becoming Microsoft-free zones, as Linux, Apache, MySQL and PHP (LAMP) combine with Java to become the de-facto standard environment for students of programming. Microsoft knows from history that this will be fatal in the long term, hence its decision to extend free availability of core development tools to students. &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/02/24/microsoft-launches-student-java-and-lamp-challenge/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>University computer science departments are rapidly becoming Microsoft-free zones, as Linux, Apache, MySQL and PHP (LAMP) combine with Java to become the de-facto standard environment for students of programming.</p>
<p>Microsoft knows from history that this will be fatal in the long term, hence its decision to extend free availability of core development tools to students. Most of my generation of computer science students quite literally never touched any IBM kit, even though &#8211; back then &#8211; it had a bigger share of the IT market than today is enjoyed by Microsoft, Dell and Hewlett-Packard put together.</p>
<p id="MidArticleAd"><script type="text/javascript">     document.write(\'\x3Cscript src="http://ad.uk.doubleclick.net/adj/reg.developer.4159/information;\'+RegExCats+GetVCs()+\'chl=knowledge;pid=\'+RegId+\';\'+RegKW+\'maid=\'+maid+\';test=\'+test+\';pf=\'+RegPF+\';dcove=d;sz=336x280;tile=3;ord=\' + rand + \'?" type="text/javascript">\x3C\/script>\');</script><script src="http://ad.uk.doubleclick.net/adj/reg.developer.4159/information;chl=knowledge;pid=75194;maid=;test=;pf=0;dcove=d;sz=336x280;tile=3;ord=79874024071084?" type="text/javascript"></script><noscript></noscript></p>
<p>We did C and Unix, and as we spread like plague rats out into employers, infecting them with the new wave, we regarded IBM mainframes with amused contempt &#8211; even when IBM was paying me good money.</p>
<p>We changed the trend line through 90 degrees in a decade, to the extent that IBM is now a top Unix vendor that avoids talking about its legacy mainframes in polite company.</p>
<p>We knew that Fortran and Cobol were most of the game, but by changing the rules we outflanked the older generation. In a superb irony, the upgrade of choice for Cobol programmers was to learn Microsoft Visual Basic.</p>
<p>The same game theory is understood by modern computer science students. They want to balance learning commercially valuable tools, whilst avoiding dead-end maintenance jobs looking after 15-year-old Visual Basic applications &#8211; yes, Visual Basic really is that old.</p>
<p>Microsoft almost completely owns the paid-for development tools market, but students have always been wary of spending money on software, and so as a headhunter when I review student CVs for high-end banking jobs, I can see the Microsoft toolset is in a declining minority.</p>
<p>Although Visual Studio Express has been free for a while, its status as an intentionally cut-down tool made students reluctant to commit to it. Microsoft even went through a phase of getting legalistic with people who improved Visual Studio Express, for fear it hurt sales of the real product. They&#8217;ve wised up, and are giving students full Visual Studio 2008 Professional (with C++, C#, Visual Basic.Net and Visual Tools for Office) , SQL Server, and Expression Studio for those students who kid themselves they can make their work look pretty.</p>
<p>It&#8217;s going to be a tough fight. Java seems to have cornered the market in those universities where the students are deemed to be not smart enough to learn C++. C# in academia is pretty rare, and Visual Basic.NET almost unknown, so Microsoft will first get its claws in the smarter end of computer science departments who haven&#8217;t dumbed down to teaching operating system internals in Java. Yes, really, it happens, my firm knows who you are, and no, we don&#8217;t regard you as having a degree of any kind.</p>
<p>Part of the carrot is the ability to write stuff for the Xbox, and I suspect we will see that getting a serious push now, because this is not a battle Microsoft can afford to lose. It is already fighting up hill as, when I teach C++ to bankers, I regularly get comments like: &#8220;Why aren&#8217;t we doing GCC?&#8221;, because I force the poor dears to use Visual Studio. Why? They at least need to learn how to get C++ to talk to Excel.</p>
<p>That said, the second tier languages like IronPython, IronRuby and F#, may help Microsoft a lot on this front, since they are growing in importance, and interest, in the world of academia. Even though Microsoft seems to be half hearted about C++ these days, its compiler is respectably conformant with standards and fits nicely into a computer science curriculum.</p>
<p>An objective measure of how critical Microsoft sees this &#8211; aside from BillG <a href="http://channel8.msdn.com/Posts/2047/" target="_blank">saying</a> it&#8217;s great &#8211; is that unusually for Microsoft, the initiative is not a US-only thing. The fact the offer will be rolled out globally, tells us more than anything that Microsoft realizes that it needs to fight this properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/02/24/microsoft-launches-student-java-and-lamp-challenge/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Java and PHP moves towards interoperability!</title>
		<link>http://rochakchauhan.com/blog/2008/02/16/java-and-php-moves-towards-interoperability/</link>
		<comments>http://rochakchauhan.com/blog/2008/02/16/java-and-php-moves-towards-interoperability/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 12:30:41 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[interoperability]]></category>
		<category><![CDATA[Java and PHP]]></category>
		<category><![CDATA[SugarCMS]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/02/16/java-and-php-moves-towards-interoperability/</guid>
		<description><![CDATA[SugarCRM, one of the open source community&#8217;s darlings, is taking steps towards improve interoperability between its PHP architecture and Java. The next version of SugarCRM&#8217;s customer relationship management (CRM) suite, version 6.0 due in the fourth quarter of 2008 or first quarter of 2009, will feature a &#8220;Java layer&#8221; to enable PHP to talk to &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/02/16/java-and-php-moves-towards-interoperability/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.sugarcrm.com" target="_blank" title="Sugar CRM">SugarCRM</a>, one of the open source community&#8217;s darlings, is taking steps towards improve interoperability between its PHP architecture and Java.</p>
<p>The next version of SugarCRM&#8217;s customer relationship management (CRM) suite, version 6.0 due in the fourth quarter of 2008 or first quarter of 2009, will feature a &#8220;Java layer&#8221; to enable PHP to talk to Java &#8211; hopefully without the tricky engineering work.</p>
<p>SugarCRM is not rewriting its PHP application in Java, but it says interoperability will help it add features in version 6.0 that make its CRM better suited to enterprise users running complex and different queries.</p>
<p>Improved text search is one goal for SugarCRM, but getting Java-based software, notably powerful search engines written in Java such as Apache Software Foundations (ASFs) <a href="http://lucene.apache.org/java/docs/" target="_blank">Lucene</a> high-performance text search engine, is difficult. Without this in the case of search, for example, the user is taken outside the security model and potentially gets to access search results they shouldn&#8217;t see.</p>
<p>SugarCRM&#8217;s Java layer will, the company says, plug into &#8220;compatible&#8221; software such as Tomcat, helping to ensure that security is maintained as users&#8217; sign-in and permission levels are communicated between PHP and Java.</p>
<p>In other changes, SugarCRM 6.0 is going all Web 2.0. That&#8217;ll mean support for Google&#8217;s OpenSocial API to integrate its CRM modules with social networks, and a brand-new calendar written using AJAX with plug ins for Google and Yahoo! calendars.</p>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/02/16/java-and-php-moves-towards-interoperability/feed/</wfw:commentRss>
		<slash:comments>140</slash:comments>
		</item>
		<item>
		<title>Switch on SAML for PHP With Lightbulb</title>
		<link>http://rochakchauhan.com/blog/2008/02/06/switch-on-saml-for-php-with-project-lightbulb/</link>
		<comments>http://rochakchauhan.com/blog/2008/02/06/switch-on-saml-for-php-with-project-lightbulb/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 16:06:23 +0000</pubDate>
		<dc:creator>rochakchauhan</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tech News]]></category>
		<category><![CDATA[Lightbulb]]></category>
		<category><![CDATA[SAML]]></category>

		<guid isPermaLink="false">http://rochakchauhan.com/blog/2008/02/06/switch-on-saml-for-php-with-project-lightbulb/</guid>
		<description><![CDATA[Lightbulb, an Open Web Single Sign-On (OpenSSO) subproject, aims to achieve federated identity for LAMP (Linux, Apache, MySQL, PHP, Python, and Perl) and MARS (MySQL, Apache, Ruby, and the Solaris Operating System). Currently, Lightbulb offers a service provider (SP) written in PHP with Security Assertion Markup Language (SAML) 2.0. This article elaborates on the SP &#8230; <a class="read-excerpt" href="http://rochakchauhan.com/blog/2008/02/06/switch-on-saml-for-php-with-project-lightbulb/">Continue reading <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="https://lightbulb.dev.java.net/" target="_blank">Lightbulb</a>, an <a href="https://opensso.dev.java.net/" target="_blank">Open Web Single Sign-On (OpenSSO)</a> subproject, aims to achieve federated identity for LAMP (Linux, Apache, MySQL, PHP, Python, and Perl) and MARS (MySQL, Apache, Ruby, and the Solaris Operating System). Currently, Lightbulb offers a service provider (SP) written in PHP with Security Assertion Markup Language (SAML) 2.0. This article elaborates on the SP code and describes how to enable Web applications that are also written in PHP with SAML 2.0.</p>
<p><strong>Contents<br />
</strong></p>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr class="dkgrey2">
<td><strong><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="2" width="1" /></strong></td>
</tr>
</table>
<table class="vatop" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><span class="sp2"> </span></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a href="http://developers.sun.com/identity/reference/techart/lightbulb.html#0" class="named">SAML 2.0</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a href="http://developers.sun.com/identity/reference/techart/lightbulb.html#1" class="named">Lightbulb&#8217;s Service Provider</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a href="http://developers.sun.com/identity/reference/techart/lightbulb.html#2" class="named">Conclusion</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a href="http://developers.sun.com/identity/reference/techart/lightbulb.html#3" class="named">Acknowledgment</a></td>
</tr>
<tr>
<td class="hyphen">-</td>
<td><a href="http://developers.sun.com/identity/reference/techart/lightbulb.html#4" class="named">References</a></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr class="dkgrey2">
<td><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="2" width="1" /></td>
</tr>
</table>
<p><span class="sp20"></span><br />
<!-- BEGIN VNV13 MULTI PAGE CONTENT  --><a name="0" title="0"></a></p>
<p><strong>SAML 2.0</strong></p>
<p class="contentdivider">
<table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="4" width="1" /></td>
</tr>
</table>
<p>SAML 2.0 consists of a set of specifications for communicating information on user authentication, entitlement, and attributes. With SAML, you can configure SPs to permit access to resources only when an identity provider (IdP) has authenticated a user, thus enabling SSO between the IdP and the SPs. SAML 2.0 was approved by the Organization for the Advancement of Structured Information Standards (OASIS) in March 2005.</p>
<p>Presently, Lightbulb implements the SP role in SAML 2.0&#8242;s Web browser SSO profile through the SAML redirect and <code>POST</code> bindings. Figure 1 illustrates an example of the exchange of messages in that configuration.</p>
<table align="center" border="0" cellpadding="2" cellspacing="0" width="200">
<tr>
<td class="grey3"><img src="http://developers.sun.com/identity/reference/techart/images/lightbulb_figure1.gif" alt=" " style="width: 463px; height: 259px" border="0" height="278" width="524" /></p>
<p class="pad3"><span class="dkcaption1">Figure 1: Overview of Message Exchanges in SSO Configuration With Lightbulb </span></p>
</td>
</tr>
</table>
<p><span class="sp10"></span></p>
<p>The solid lines with arrows represent SAML 2.0 protocol messages. The dotted lines with arrows are messages that are outside the scope of the protocol. Following is the process:</p>
<ol>
<li>The user, with an account at the IdP, attempts to access a resource at the SP from a browser.</li>
<li>The SP, which trusts the IdP to authenticate the user, redirects the browser to the IdP with a 302 HTTP response.</li>
<li>The browser follows the redirect and sends an HTTP <code>GET</code> request to the IdP with a SAML authentication request encoded in an HTTP parameter.</li>
<li>The IdP authenticates the user.The user might be required to supply credentials in the form of a user name and password, a smart card, a biometric, or other mechanism.</li>
<li>The IdP returns to the browser an HTML page to be posted to the SP. The page contains a form with a SAML authentication response as a hidden element. A JavaScript <code>onLoad()</code> event handler automatically sends the form to the SP.</li>
<li>The browser posts the form to the SP, which then evaluates the SAML authentication response and allows or denies access to the resource.</li>
<li>The user then can or cannot access the resource, depending on the SP&#8217;s decision.</li>
</ol>
<p>To protect user privacy, SAML 2.0 can specify a pseudonym in the SAML Assertion&#8217;s <code>NameID</code> element rather than the user&#8217;s actual identifier (for example, the user name) at the IdP. That pseudonym, a string of characters typically randomly generated by the IdP, is known as a persistent (opaque) identifier—the user&#8217;s identifier in the context of the IdP-SP relationship. That way, neither provider knows the user&#8217;s identifier at the other end. Furthermore, because the user has a different persistent identifier for each IdP-SP pair, SPs cannot correlate user accounts among themselves.</p>
<p><strong>Note:</strong> Even though other <code>NameID</code> formats are available with different privacy properties, persistent identifiers are most commonly used and are the only format currently supported by Lightbulb.</p>
<p>The preceding is a high-level view of SAML SSO. For more details on federated SSO, see the following:</p>
<ul>
<li><a href="http://developers.sun.com/identity/reference/techart/federated.html"><em>Federated Identity: Single Sign-On Among Enterprises</em></a>, an October 2004 article that predates SAML 2.0</li>
<li><a href="http://www.oasis-open.org/committees/download.php/20645/sstcsaml-tech-overview-2%200-draft-10.pdf" target="_blank"><em>SAML 2.0 Technical Overview</em> (PDF)</a>, currently at draft 10</li>
</ul>
<p><a name="1" title="1"></a><strong>Lightbulb&#8217;s Service Provider</strong></p>
<p class="contentdivider">
<table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="4" width="1" /></td>
</tr>
</table>
<p>The current, initial Lightbulb SP is structured as a simple sample PHP application, integrated with SAML&#8217;s SP library code. This section follows the SAML SSO protocol described in the previous section through the Lightbulb code and highlights the two SSO integration points between Lightbulb and the application. You can download the Lightbulb source code from <a href="https://opensso.dev.java.net/source/browse/opensso/lightbulb/php/direct/" target="_blank">the Web interface</a> or CVS (see the <a href="https://opensso.dev.java.net/servlets/ProjectSource#cmdlinecvs" target="_blank">instructions</a> after logging in to <code>java.net</code>).</p>
<p><strong class="dkgrey">Initiating SAML SSO</strong></p>
<p>The following excerpt from the <code>prompt.php</code> file contains a link to the <code>spSSOInit.php</code> script:</p>
<p><!-- BEGIN VCD7 CODE SAMPLE COMPONENT  --><!--</p>
<div><b>Code Sample Component (VCD7)</b></p>
<div class="contentdivider">
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="grey4">
<tr>
<td></td>
</tr>
</table>
</div>
<p>&#8211;></p>
<table class="grey4" border="0" cellpadding="10" cellspacing="0" width="100%">
<tr>
<td>
<pre>&lt;a href="http://patlinux.red.iplanet.com/lightbulb/spSSOInit.php?metaAlias=/ sp&amp;idpEntityID=http:// amfmdemo.example.com&amp;binding=urn:oasis:names:tc:SAML:2.0:bindings:HTTPPOST&amp; RelayState=&lt;?php echo htmlspecialchars($_GET["goto"])?&gt;"&gt;     Login via IDP &lt;/a&gt;</pre>
</td>
</tr>
</table>
<p><span class="sp20"></span><br />
<!-- END VCD7 CODE SAMPLE COMPONENT  --></p>
<p>This is the first integration point between the Lightbulb SAML 2.0 code and the PHP application. Table 1 describes the script&#8217;s parameters, which, closely modeled on OpenSSO&#8217;s SAML 2.0, direct <code>spSSOInit.php</code> to initiate SAML 2.0 SSO.</p>
<p><!-- BEGIN VCD8 DATA TABLE COMPONENT  --><strong class="dkgrey">Table 1: Parameters of <code>spSSOInit.php</code> Script</strong></p>
<table class="vatop" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<th scope="col" class="headerbar6" align="left" width="30%">
<p class="headerpadding2"><strong>Parameter</strong></p>
</th>
<th scope="col" class="headerbar6" align="left" width="70%">
<p class="headerpadding2"><strong>Description</strong></p>
</th>
</tr>
<tr>
<td colspan="2"><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="2" width="1" /></td>
</tr>
<tr>
<td>
<p class="datacell"><code>metaAlias</code></p>
</td>
<td>
<p class="datacell">The SP identifier. Multiple SPs are each denoted by <code>metaAlias</code>.</p>
</td>
</tr>
<tr>
<td>
<p class="datacell"><code>binding</code></p>
</td>
<td>
<p class="datacell">The SAML binding in the protocol.</p>
</td>
</tr>
<tr>
<td colspan="2" class="headerbar6"><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="1" width="1" /></td>
</tr>
</table>
<p><span class="sp10"></span><br />
<!-- END VCD8 DATA TABLE COMPONENT  --></p>
<p>Currently, all four parameters are mandatory. Future versions of the script will likely streamline simple deployments by making <code>metaAlias</code>, <code>idpEntityID</code>, and <code>binding</code> optional.</p>
<p>The <code>spSSOInit.php</code> script performs the following tasks:</p>
<ol>
<li>Uses <code>metaAlias</code> and <code>idpEntityID</code> as indexes into tables of metadata: configuration information such as the endpoint URLs in the protocol.</li>
<li>Assembles and prepares a SAML <code>AuthnRequest</code> element for transmission as an HTTP parameter according to the SAML 2.0 specification.</li>
<li>Compresses (deflates) the prepared <code>AuthnRequest</code> element, encodes it for Base64, and encodes the URL.</li>
<li>Constructs a URL with the encoded <code>AuthnRequest</code> and <code>RelayState</code> elements as parameters to the IdP&#8217;s SSO service endpoint.</li>
<li>Redirects the browser to that URL.</li>
</ol>
<p>Take a look at this typical <a href="http://developers.sun.com/identity/reference/techart/AuthnRequest.txt"><code>AuthnRequest</code> element</a>.</p>
<p><strong class="dkgrey">Processing the SAML Response</strong></p>
<p>On receiving the authentication request, the IdP authenticates the user and directs the browser to post a <a href="http://developers.sun.com/identity/reference/techart/SAMLResponse.txt">SAML response</a> to the <code>sp.php</code> script.</p>
<p>Next, the following process takes place:</p>
<ol>
<li>The <code>sp.php</code> script decodes the Base64 SAML response and parses the response and its component SAML Assertion with the <code>processResponse()</code> function from <code>saml-lib.php</code>.</li>
<li><code>processResponse()</code> verifies that the Assertion&#8217;s signature is correct and that the signing certificate&#8217;s thumbprint (SHA-1 hash) matches the one on record in the metadata for the IdP.</li>
<li>The script maps the Assertion&#8217;s <code>NameID</code> to a local user name and sets the latter with the <code>setUserID()</code> function from the <code>localUserManagement.php</code> script.This is the second point of integration. You would replace <code>setUserID()</code> with the function that sets the user name in your application.If <code>NameID</code> does not correspond to a user account, the script redirects the browser to the login page (<code>prompt.php</code>) and then to <code>mapName.php</code> to authenticate the user locally and to map <code>NameID</code> to the resulting local user name.</li>
</ol>
<p><a name="2" title="2"></a><strong>Conclusion</strong></p>
<p class="contentdivider">
<table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="4" width="1" /></td>
</tr>
</table>
<p>You&#8217;ve now examined a profile of the SAML SSO protocol, followed its execution through the Lightbulb PHP code, and noted the integration points between Lightbulb and a typical PHP application. A future article on Lightbulb will explain SAML&#8217;s circle-of-trust concept and will describe how Lightbulb&#8217;s single logout process terminates user sessions with all the members of a circle of trust.</p>
<p><a name="3" title="3"></a><strong>Acknowledgment</strong></p>
<p class="contentdivider">
<table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="4" width="1" /></td>
</tr>
</table>
<p>Special thanks to <a href="http://www.cdatazone.org/" target="_blank">Rob Richards</a>, author of the PHP library for XML security, for his gracious permission to adapt the library code into OpenSSO for use in Lightbulb.</p>
<p><a name="4" title="4"></a><strong>References</strong></p>
<p class="contentdivider">
<table class="grey4" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><img src="http://developers.sun.com/im/a.gif" alt=" " border="0" height="4" width="1" /></td>
</tr>
</table>
<ul>
<li>Sun Java System Access Manager
<ul>
<li><a href="http://wwws.sun.com/software/products/access_mgr/">Main page</a></li>
<li><a href="http://developers.sun.com/identity/">Developer home</a></li>
<li>Software Forum</li>
</ul>
</li>
<li><a href="http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=security#samlv20" target="_blank">SAML 2.0 Specification</a></li>
<li><a href="https://lightbulb.dev.java.net/" target="_blank">Project Lightbulb</a></li>
<li><a href="https://opensso.dev.java.net/" target="_blank">Project OpenSSO</a></li>
<li>Related articles
<ul>
<li><a href="http://developers.sun.com/identity/reference/techart/federated.html"><em>Federated Identity: Single Sign-On Among Enterprises</em> (October 14, 2004)</a></li>
<li><a href="http://developers.sun.com/identity/reference/techart/identity.html"><em>What&#8217;s Happening in Identity at Sun</em> (September 1, 2006)</a></li>
</ul>
</li>
<li>Sun developer services
<ul>
<li><a href="http://developers.sun.com/services/">Support</a></li>
<li><a href="http://www.sun.com/training/catalog/developer.xml">Training and certification</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://rochakchauhan.com/blog/2008/02/06/switch-on-saml-for-php-with-project-lightbulb/feed/</wfw:commentRss>
		<slash:comments>78</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
