<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-646266935504215225</id><updated>2012-02-16T23:56:59.565+05:30</updated><category term='Artificial Intelligence'/><category term='Netbeans'/><category term='Domain Specific Language'/><category term='XML'/><category term='VMWare'/><category term='Virtualization'/><category term='Architecture'/><category term='Cloud Foundry'/><category term='Hacks'/><category term='TOGAF'/><category term='Music APIs'/><category term='Web Services'/><title type='text'>Roy's Technology Diary</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-788550912214862609</id><published>2011-09-28T15:16:00.000+05:30</published><updated>2011-09-28T15:16:04.737+05:30</updated><title type='text'>Java 7, brings a simple yet a long awaited feature...</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Would you be surprised to know that the API of &lt;code&gt;&lt;span style="background-color: #eeeeee; font-family: Consolas;"&gt;java.io.File&lt;/span&gt;&lt;/code&gt; only supported getting the last &lt;em&gt;modified&lt;/em&gt; time, and&amp;nbsp;NOT the file's &lt;em&gt;creation&lt;/em&gt; time,&amp;nbsp;until Java 7...? Well, not many people seem to be aware of this and surprisingly even&amp;nbsp;the Internet was very quiet on this topic all the while.&lt;br /&gt;&lt;br /&gt;So if you are using anything below Java 7 and are desperate to fetch a file's creation time then, one solution would be to write some native code to call system routines and then call&amp;nbsp;the&amp;nbsp;native code&amp;nbsp;using JNI. Most of this work seems to be already done for you in a library called &lt;a href="https://jna.dev.java.net/" rel="nofollow"&gt;&lt;span style="color: #0077cc;"&gt;JNA&lt;/span&gt;&lt;/a&gt;, though. Nevertheless, you&amp;nbsp;will still need to do a little OS specific coding in Java for this, though, as you'll probably not find the same system calls available in Windows and Unix/Linux/BSD/OS X.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-788550912214862609?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/788550912214862609/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=788550912214862609' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/788550912214862609'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/788550912214862609'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2011/09/java-7-brings-simple-yet-long-awaited.html' title='Java 7, brings a simple yet a long awaited feature...'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-3769142090966788610</id><published>2011-07-25T17:59:00.000+05:30</published><updated>2011-07-26T15:33:07.434+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='VMWare'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Foundry'/><title type='text'>VMWare Cloud Foundry - Developing "cloud-ready" web applications has never been so easy</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-size: 11pt;"&gt;A lot has been said and done about services on the cloud lately and "Platform as a Service" (PaaS) is probably one of the most popular buzz-word that's been around for quite sometime now. However, I sincerely feel that the common man (read as "developer") is yet to get a taste of what it really means. Now, this very paradigm seems to be soon changing, with VMWare Cloud Foundry. Cloud Foundry is the world’s very first open Platform as a Service (PaaS). It is designed to help developers easily create web applications, using multiple programming frameworks including Spring for Java, Ruby on Rails and Sinatra for Ruby; that can run upon public and private cloud environments, with just about no additional learning curve. So, by now if you are dreaming of a possibility to port your existing web-applications to the cloud with minimal efforts, then let me give you the good news - "it's all possible here..."&lt;br /&gt;&lt;br /&gt;Well, looks like i've done a lot of sales talks in favour of VMWare Cloud Foundry. Now lets get under the hood and get hands-on with developing an extreamly simple web application that demonstrates the following -&lt;br /&gt;&lt;br /&gt;1. Setting up VMWare Cloud Foundry&lt;br /&gt;2. Consuming Cloud Foundry's MySQL service in a JSP, using the standard JDBC way&lt;br /&gt;3. Deploying a web archive and running the JSP on Cloud Foundry&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 14pt;"&gt;&lt;b&gt;Setting up VMWare Cloud Foundry&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Windows Setup&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size: 11pt;"&gt;Apply for a Cloud Foundry account at www.cloudfoundry.com; you will be notified by email when your account is activated&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size: 11pt;"&gt;&lt;li&gt;Install Ruby from www.rubyinstaller.org; The Cloud Foundry cloud-controller command line is built in Ruby so this is required. As the installer runs, make sure to check the boxes to add the ruby directory to your command path&lt;/li&gt;&lt;li&gt;Start the Windows command line client (Start Menu -&amp;gt; Run -&amp;gt; "cmd")&lt;/li&gt;&lt;li&gt;To install the cloud-controller tool type : gem install vmc (If you are behind a firewall then : gem install --http-proxy http://proxy.vmware.com:3128 vmc)&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt;&lt;span style="font-size: 11pt;"&gt;Congratulations! The Cloud Foundry Cloud Controller is now installed. From here on, you may type Cloud Foundry commands into the Windows command window.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size: 11pt;"&gt;Inform Cloud-Foundry which cloud you want to connect to : vmc target api.cloudfoundry.com&lt;/span&gt;&lt;/li&gt;&lt;span style="font-size: 11pt;"&gt;&lt;li&gt;To login to Cloud Foundry type : vmc login (enter your account credentials when prompted)&lt;/li&gt;&lt;/span&gt;&lt;/ol&gt;&lt;span style="font-size: 11pt;"&gt;&lt;br /&gt;&lt;b&gt;Linux Setup&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The document &lt;a href="http://support.cloudfoundry.com/attachments/token/dyizykvkgocs7yb/?name=Getting_Started_With_VMware_Cloud_Foundry_using_vmc-u3.pdf"&gt;here&lt;/a&gt; is the best source of information for setting up the cloud-controller upon various Linux flavours.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 14pt;"&gt;&lt;b&gt;Consuming Cloud Foundry's MySQL service&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;There are plenty of elaborate tutorials available on the web, that illustrate accessing the MySQL service at Cloud foundry using Spring. However, &lt;a href="http://rahulr.cloudfoundry.com/"&gt;this&lt;/a&gt; one is a bit different, because it does not use Spring at all and demonstrates the same functionality with plain and simple Java and standard JDBC API.&lt;br /&gt;&lt;br /&gt;The following code snippet demonstrates the approach -&lt;br /&gt;&lt;div style="background-color: #c6deff; font-size: 10pt;"&gt;&lt;br /&gt;&amp;lt;%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;%@page import="java.sql.*,javax.sql.*"%&amp;gt;&lt;br /&gt;&amp;lt;%@page import="org.cloudfoundry.services.*"%&amp;gt;&lt;br /&gt;&amp;lt;%&lt;br /&gt;String query = "Select * FROM users";&lt;br /&gt;%&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&amp;gt;&lt;br /&gt;&amp;lt;title&amp;gt;Cloud Foundry with Simple Java&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;Welcome to the simple web application on cloud-foundry...&lt;br /&gt;&amp;lt;%&lt;br /&gt;Connection connection = null;&lt;br /&gt;&lt;br /&gt;try {&lt;br /&gt;// establish connection to MySQL Service&lt;br /&gt;ServiceManager services = ServiceManager.INSTANCE;&lt;br /&gt;connection = (Connection) services.getInstance(CloudFoundryServices.MYSQL);&lt;br /&gt;&lt;br /&gt;if (connection != null &amp;amp;&amp;amp; !connection.isClosed()) {&lt;br /&gt;out.println("&amp;lt;p&amp;gt;Successfully connected to MySQL service&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;// creating a database table and populating some values&lt;br /&gt;Statement s = connection.createStatement();&lt;br /&gt;int count;&lt;br /&gt;s.executeUpdate("DROP TABLE IF EXISTS animal");&lt;br /&gt;s.executeUpdate("CREATE TABLE animal ("&lt;br /&gt;+ "id INT UNSIGNED NOT NULL AUTO_INCREMENT,"&lt;br /&gt;+ "PRIMARY KEY (id),"&lt;br /&gt;+ "name CHAR(40), category CHAR(40))");&lt;br /&gt;&lt;br /&gt;out.println("&amp;lt;p&amp;gt;[1] Table successfully created.&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;count = s.executeUpdate("INSERT INTO animal (name, category)"&lt;br /&gt;+ " VALUES"&lt;br /&gt;+ "('snake', 'reptile'),"&lt;br /&gt;+ "('frog', 'amphibian'),"&lt;br /&gt;+ "('tuna', 'fish'),"&lt;br /&gt;+ "('racoon', 'mammal')");&lt;br /&gt;&lt;br /&gt;out.println("&amp;lt;p&amp;gt;[2] " + count + " rows were inserted.&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;count = 0;&lt;br /&gt;ResultSet rs = s.executeQuery("select * from animal");&lt;br /&gt;while (rs.next()) {&lt;br /&gt;count++;&lt;br /&gt;}&lt;br /&gt;out.println("&amp;lt;p&amp;gt;[3] " + count + " rows were fetched.&amp;lt;/p&amp;gt;");&lt;br /&gt;&lt;br /&gt;s.close();&lt;br /&gt;}&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;out.println(e.getMessage());&lt;br /&gt;} finally {&lt;br /&gt;if (connection != null &amp;amp;&amp;amp; !connection.isClosed()) {&lt;br /&gt;connection.close();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;connection = null;&lt;br /&gt;}&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/div&gt;&lt;br /&gt;In the above code, org.cloudfoundry.services is a custom package which primarily contains a Singleton implementation, namely "ServiceManager"; and an interface to hold the constants, namely "CloudFoundryServices". Following are the sources for the same -&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;CloudFoundryServices.java&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #c6deff; font-size: 10pt;"&gt;&lt;br /&gt;package org.cloudfoundry.services;&lt;br /&gt;&lt;br /&gt;public interface CloudFoundryServices {&lt;br /&gt;public static final int MYSQL = 1;&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;ServiceManager.java&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="background-color: #c6deff; font-size: 10pt;"&gt;&lt;br /&gt;package org.cloudfoundry.services;&lt;br /&gt;&lt;br /&gt;import java.sql.Connection;&lt;br /&gt;import java.sql.DriverManager;&lt;br /&gt;import java.sql.SQLException;&lt;br /&gt;&lt;br /&gt;import argo.jdom.JdomParser;&lt;br /&gt;import argo.jdom.JsonNode;&lt;br /&gt;import argo.jdom.JsonRootNode;&lt;br /&gt;&lt;br /&gt;public enum ServiceManager implements CloudFoundryServices {&lt;br /&gt;&lt;br /&gt;INSTANCE;&lt;br /&gt;&lt;br /&gt;private static final String NULL_STRING = "";&lt;br /&gt;&lt;br /&gt;public Object getInstance(int service_type) throws Exception {&lt;br /&gt;if (service_type == MYSQL) {&lt;br /&gt;return getMySQLConnection();&lt;br /&gt;} else {&lt;br /&gt;throw new IllegalArgumentException("Service for id " + service_type + " not found...");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*&lt;br /&gt;* This method is responsible for establishing a valid connection to the MySQL service,&lt;br /&gt;* using the credentials available in the environment variable, namely "VCAP_SERVICES".&lt;br /&gt;*&lt;br /&gt;* The content of VCAP_SERVICES environment variable is a JSON string, thus this method&lt;br /&gt;* uses standard interfaces from the Argo JSON parsing API to extract the credentials.&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;private Object getMySQLConnection() throws SQLException {&lt;br /&gt;String vcap_services = System.getenv("VCAP_SERVICES");&lt;br /&gt;&lt;br /&gt;String hostname = NULL_STRING;&lt;br /&gt;String dbname = NULL_STRING;&lt;br /&gt;String user = NULL_STRING;&lt;br /&gt;String password = NULL_STRING;&lt;br /&gt;String port = NULL_STRING;&lt;br /&gt;&lt;br /&gt;if (vcap_services != null &amp;amp;&amp;amp; vcap_services.length() &amp;gt; 0) {&lt;br /&gt;try {&lt;br /&gt;JsonRootNode root = new JdomParser().parse(vcap_services);&lt;br /&gt;&lt;br /&gt;JsonNode mysqlNode = root.getNode("mysql-5.1");&lt;br /&gt;JsonNode credentials = mysqlNode.getNode(0).getNode("credentials");&lt;br /&gt;&lt;br /&gt;dbname = credentials.getStringValue("name");&lt;br /&gt;hostname = credentials.getStringValue("hostname");&lt;br /&gt;user = credentials.getStringValue("user");&lt;br /&gt;password = credentials.getStringValue("password");&lt;br /&gt;port = credentials.getNumberValue("port");&lt;br /&gt;&lt;br /&gt;String dbUrl = "jdbc:mysql://" + hostname + ":" + port + "/" + dbname;&lt;br /&gt;&lt;br /&gt;Class.forName("com.mysql.jdbc.Driver");&lt;br /&gt;Connection connection = DriverManager.getConnection(dbUrl, user, password);&lt;br /&gt;return connection;&lt;br /&gt;} catch (Exception e) {&lt;br /&gt;throw new SQLException(e);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;return null;&lt;br /&gt;}&lt;br /&gt;}&lt;/div&gt;&lt;br /&gt;Now all you need to do now is, bundle everything together and get yourself a standard WAR (web archive) file.&lt;br /&gt;&lt;br /&gt;Deploying a web archive and running the JSP on Cloud Foundry&lt;br /&gt;&lt;br /&gt;Once you have the WAR file in place, browse to the location where the file is placed, using your command-line console; and execute the following cloud-controller commands -&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In case you are not yet logged in to the cloud, type : vmc login (and, provide the required credentials when prompted)&lt;/li&gt;&lt;li&gt;vmc push&lt;/li&gt;&lt;li&gt;Enter a unique application name when prompted, could be anything like in my case its my name "rahulr"&lt;/li&gt;&lt;li&gt;Select 'Y' when prompted to bind a service and select the MySQL service from the offered list of services&lt;/li&gt;&lt;/ul&gt;Finally the status "Starting Application : OK", at the end of the command execution, indicates a successful deployment. So, now you are all set to start-up a browser and fire-up your first "cloud-enabled" web application, at the url &amp;lt;app-name&amp;gt;.cloudfoundry.com. Optionally, you might want to check the one that I've hosted at &lt;a href="http://rahulr.cloudfoundry.com/"&gt;http://rahulr.cloudfoundry.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Thats all for now, I hope you liked the post and should you have any issues getting this up and running feel free to reach out to me.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 14pt;"&gt;&lt;b&gt;Additional Resources&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div&gt;&lt;span style="font-size: 11pt;"&gt;Following are some links which I found useful -&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="https://github.com/cloudfoundry-collaboration/vcap-services/wiki/How-to-add-a-system-service-to-Cloud-Foundry---step-by-step-guide"&gt;A Guide to creating your own services&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blog.cloudfoundry.com/post/5223861703/how-cloud-foundry-works-when-a-new-application-is"&gt;The "vmc" command internals&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-3769142090966788610?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/3769142090966788610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=3769142090966788610' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/3769142090966788610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/3769142090966788610'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2011/07/vmware-cloud-foundry-developing-cloud.html' title='VMWare Cloud Foundry - Developing &quot;cloud-ready&quot; web applications has never been so easy'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total><georss:featurename>Bengaluru, Karnataka, India</georss:featurename><georss:point>12.9715987 77.59456269999998</georss:point><georss:box>12.7518902 77.34282119999999 13.191307199999999 77.84630419999998</georss:box></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-7771492288364014958</id><published>2011-07-21T16:19:00.000+05:30</published><updated>2011-07-21T17:07:19.446+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='TOGAF'/><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><title type='text'>Demystifying Enterprise Architecture with TOGAF - Understanding the Architecture Development Methodology (ADM)</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: 10pt; "&gt;&lt;br /&gt;In the previous article, we glanced through Enterprise Architecture as a whole and also discussed the need for an Enterprise Architecture Framework, like TOGAF.&lt;br /&gt;&lt;br /&gt;With this article we shall continue exploring TOGAF further, and discusses TOGAF's Architecture Development Methodology (ADM).&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;&lt;b&gt;The Architecture Development Methodology (ADM)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Architecture Development Methodology (ADM) provides a proven and repeatable process for developing architectures.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;The Scope&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The scope of ADM includes or encompasses the below listed activities, which are generally carried out in iterative cycles of continuous architecture definition and realization; thus aiding a controlled transformation of an enterprises in response to business goals and opportunities - &lt;ul&gt;&lt;li&gt;Establishing an architecture framework&lt;/li&gt;&lt;li&gt;Developing architecture content&lt;/li&gt;&lt;li&gt;Transitioning&lt;/li&gt;&lt;li&gt;Governing the realization of architectures&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;Implementation Phases&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The implementation of ADM could be envisioned across the following phases -&lt;br /&gt;&lt;p align="center"&gt;&lt;img src="http://pubs.opengroup.org/architecture/togaf8-doc/arch/Figures/adm.gif" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;b&gt;Preliminary Initiation&lt;/b&gt;&lt;br /&gt;The Preliminary Initiation phase describes the preparation and initiation activities, required for meeting the business directive for a new enterprise architecture, including the definition of an Organization-Specific Architecture framework and the definition of core principles.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Architecture Vision Setup&lt;/b&gt;&lt;br /&gt;The Architecture Vision Setup phase describes the initial phase of an architecture development cycle. It includes information about the following activities - &lt;ul&gt;&lt;li&gt;Defining the scope&lt;/li&gt;&lt;li&gt;Identifying the stakeholders&lt;/li&gt;&lt;li&gt;Creating the architectural vision statement&lt;/li&gt;&lt;li&gt;Obtaining the initial approval&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Business Architecture Evolution&lt;/b&gt;&lt;br /&gt;The Business Architecture Evolution phase describes the development of a Business Architecture and its alignment to support an agreed Architecture Vision.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Information Systems Architecture Definition&lt;/b&gt;&lt;br /&gt;The Information Systems Architecture Definition phase describes the development of Information Systems Architectures required to support the Architecture Vision. This phase typically involves - &lt;ul&gt;&lt;li&gt;Identification and development of Data Architectures&lt;/li&gt;&lt;li&gt;Development of various Application Architectures&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Technology Architecture Evolution&lt;/b&gt;&lt;br /&gt;The Technology Architecture Evolution phase describes identification and development of the requisite Technology Architecture, with respect to supporting the Information Systems Architecture.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Opportunities &amp;amp; Solutions Identification&lt;/b&gt;&lt;br /&gt;The Opportunities &amp;amp; Solutions Identification phase typically involves the following activities - &lt;ul&gt;&lt;li&gt;Conducting initial implementation planning&lt;/li&gt;&lt;li&gt;Identifying single or multiple delivery channels for the requisite architectures&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Migration Planning&lt;/b&gt;&lt;br /&gt;The Migration Planning phase addresses the formulation of a set of detailed sequence of transition architectures with a supporting Implementation and Migration Plan.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Implementation Governance&lt;/b&gt;&lt;br /&gt;The Implementation Governance phase involves providing an architectural oversight of the implementation.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-7771492288364014958?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/7771492288364014958/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=7771492288364014958' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/7771492288364014958'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/7771492288364014958'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2011/07/demystifying-enterprise-architecture_21.html' title='Demystifying Enterprise Architecture with TOGAF - Understanding the Architecture Development Methodology (ADM)'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-9029276474022838086</id><published>2011-07-19T15:27:00.000+05:30</published><updated>2011-07-19T16:37:35.548+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='TOGAF'/><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><title type='text'>Demystifying Enterprise Architecture with TOGAF</title><content type='html'>&lt;span class="Apple-style-span" style="font-size: 10pt; "&gt;Lately I've been studying/reading The Open Group Architecture Framework (TOGAF), and I simply could not resist from appreciating the structural approach that it introduces towards envisioning and capturing Enterprise Architecture. I therefore thought of initiating a series of articles herein, with the sole purpose of sharing, simplifying and promoting the framework especially amongst the architecture aspirants out there who follow and read my blog.&lt;br /&gt;&lt;br /&gt;This write-up, which is the first one in the series, intends to provide a brief overview on Enterprise Architecture and then further goes on to illustrate the need for an Enterprise Architecture Framework.&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;&lt;b&gt;Preface&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ISO/IEC 42010: 2007 defines "architecture" as:&lt;br /&gt;&lt;br /&gt;"The fundamental organization of a system, embodied in its components, their relationships to each other and the environment, and the principles governing its design and evolution."&lt;br /&gt;&lt;br /&gt;TOGAF embraces but does not strictly adhere to ISO/IEC 42010: 2007 terminology. In TOGAF, "architecture" has two meanings depending upon the context:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size:10pt;"&gt;A formal description of a system, or a detailed plan of the system at component level to guide its implementation&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size:10pt;"&gt;The structure of components, their inter-relationships, and the principles and guidelines governing their design and evolution over time&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;&lt;b&gt;Understanding Enterprise Architecture&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;The Definition of Enterprise&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 10pt;"&gt;The term "enterprise" refers to any collection of organizations that has a common set of goals. For example, an enterprise could be a government agency, a whole corporation, a division of a corporation, a single department, or a chain of geographically distant organizations linked together by common ownership.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 10pt;"&gt;It is important to here note that the term "enterprise" in the context of "enterprise architecture" can be used to denote both [1] an entire enterprise as a collection encompassing all of its information and technology services, processes, and infrastructure — and [2] a specific domain within the enterprise. Nevertheless in both cases, the architecture crosses multiple systems and multiple functional groups within the enterprise.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;Defining Enterprise Architecture&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 10pt;"&gt;Enterprise architecture is a structural approach that optimizes the often fragmented organization wide processes (both manual and automated) into an integrated environment that is responsive to change and enables delivering the enterprise's business strategy.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;Domains of Enterprise Architecture&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 10pt;"&gt;There are four architecture domains that are commonly accepted as subsets of an overall enterprise architecture, all of which TOGAF is designed to support.&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;&lt;b&gt;Business Architecture&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;The Business Architecture defines the business strategy, governance, organization, and key business processes.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;&lt;b&gt;Data Architecture&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;The Data Architecture describes the structure of an organization’s logical and physical data assets and data management resources.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;&lt;b&gt;Application/Solution Architecture&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;The Application or Solution Architecture provides a blueprint for the individual application systems to be deployed, their interactions, and their relationships to the core business processes of the organization.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;&lt;b&gt;Technology/Deployment Architecture&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-size: 10px; "&gt;The Technology or Deployment Architecture describes the logical software and hardware capabilities that are required to support the deployment of business, data, and application services. This includes IT infrastructure, middleware, networks, communications, processing, standards, etc.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;&lt;b&gt;Understanding TOGAF&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 10pt;"&gt;The Open Group Architecture Framework (TOGAF) provides the core methods and tools for assisting in the acceptance, production, use, and maintenance of an enterprise architecture. It is based on an iterative process model supported by best practices and a re-usable set of existing architecture assets.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size:14pt;"&gt;Illustrating the need for TOGAF&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-size: 10pt;"&gt;Architecture design is a technically complex process, and the design of heterogeneous, multi-vendor architectures is particularly complex. TOGAF plays an important role in helping to de-mystify and de-risk the architecture development process. TOGAF provides a platform for adding value, and enables users to build genuinely open systems-based solutions to address their business issues and needs.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-9029276474022838086?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/9029276474022838086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=9029276474022838086' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/9029276474022838086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/9029276474022838086'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2011/07/demystifying-enterprise-architecture.html' title='Demystifying Enterprise Architecture with TOGAF'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-1409071290382909729</id><published>2011-05-21T15:40:00.000+05:30</published><updated>2011-05-21T16:40:25.928+05:30</updated><title type='text'>Easy 3D with WebGL and Three.js</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;Lately a lot has been happening in 3D around the world. From movies to electronic gadgets like televisions, projectors and gaming consoles, everything seems to be heading toward rendering that additional 3rd dimension. A 3D experience in itself so very enticing that one would just falling it love with it; and thus the creative ones amongst us are constantly thinking about various areas wherein it could be applied. Some of the obvious areas of application would be bio-technology, clinical research, engineering drawings and entertainment media; but meanwhile some creative minds amongst us have gone ahead thinking differently and even made simple software applications that we use in our everyday lives, to render a user interface with 3D. For instance, a few months ago I came across a program called&lt;/span&gt;&lt;span style="font-size:10.0pt; mso-bidi-font-size:11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;a href="http://3dna.net/products/desktop.htm"&gt;&lt;span style="mso-bidi-font-size: 11.0pt;color:blue"&gt;3DNA Desktop&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10.0pt; mso-bidi-font-size:11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;which improves the way we work with Windows and the Web. With &lt;a href="http://3dna.net/products/desktop.htm"&gt;&lt;span style="mso-bidi-font-size: 11.0pt;color:blue"&gt;3DNA Desktop&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10.0pt; mso-bidi-font-size:11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;one can choose from different 3D worlds to explore and customize the same, to create an immersive and entertaining 3D desktop usage experience.&lt;/span&gt;&lt;/div&gt;  &lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: Georgia, serif; font-size: 16px; -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3dna.net/products/images/About3DNA_v1.jpg" border="0" alt="" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 420px; height: 305px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: center;line-height: normal; "&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;i&gt;Screenshot of 3DNA Desktop&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;As a developer, I've always thought about how these awesome experiences are created. For a while I did try to play around with Adobe Flash, but to by candor found it too exhaustive to understand in a short time; therefore all the time continued to wonder, if there is something simpler, and above all free of cost, which could yield the same results or even better. Until recently, that I came across WebGL.&lt;/span&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;WebGL is a cross-platform, royalty-free web standard for a low-level 3D graphics API based on OpenGL ES 2.0, exposed through the HTML-5's Canvas element in a Document Object Model (DOM). So, what it essentially means is - now you can have Adobe Flash like experiences created within standard HTML using the Canvas element. You must have seen so many fancy user experiences built atop Adobe Flash, so obviously are wondering how exactly does WebGL compare against Adobe Flash? Therefore, to augment your curiosity&lt;/span&gt;&lt;span style="font-size:10.0pt;mso-bidi-font-size: 11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;a href="https://sites.google.com/site/atechnodiary/Home/earth-view.zip?attredirects=0&amp;amp;d=1"&gt;&lt;span style="mso-bidi-font-size:11.0pt;color:blue"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10.0pt;mso-bidi-font-size:11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;; color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;; color:black"&gt;is an example that I built to demonstrate the capabilities WebGL, which shows a real-time day light view of our planet. Just try interacting with the globe using your mouse or touch-pad to get the real feel of the thing. Meanwhile, a quick note about the support – you need to make sure that your browser supports WebGL content rendering for running this example. Ideally one would need Google Chrome, Firefox 4+ or IE 9+ to run this one at its best.&lt;/span&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); font-family: Georgia, serif; font-size: 16px; -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://3.bp.blogspot.com/-AmtWLQJ-XGk/TdedAxZmt9I/AAAAAAAAAFM/oDq5YQ8rOTM/s400/earth-view-screenshot.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5609124497499535314" style="display: block; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; text-align: center; cursor: pointer; width: 400px; height: 242px; " /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: center;line-height: normal; "&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;i&gt;Screenshot of the WebGL and three.js example&lt;/i&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;A software programming enthusiast would furthermore be amazed to know that this is entirely done using standard Javascript and Mr.Doob's awesome script library called three.js, in just over 80 lines of code (LoC); you might want to right-click and choose to view the source on the example page to have a look at the code for yourselves. Three.js is a framework library developed by Mr. Doob that skillfully abstracts away the complex mathematics involved in implementing 3D, and provides simple APIs with which you can create cameras, objects, lights, materials and more; with a choice of renderers, which means you can decide if you want your scene to be drawn using HTML-5's canvas, WebGL or SVG within a standard browser.&lt;/span&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;Now, should this little article and the example inspire you to get your hands dirty with some code. The best place to start would be the three.js sources and bundled examples. You may download the latest release of three.js from&lt;/span&gt;&lt;span style="font-size:10.0pt; mso-bidi-font-size:11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;a href="https://github.com/mrdoob/three.js"&gt;&lt;span style="mso-bidi-font-size:11.0pt; color:blue"&gt;GitHub&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:10.0pt;mso-bidi-font-size: 11.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt; &lt;/span&gt;&lt;span style="font-size:10.0pt;font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;(&lt;a href="https://github.com/mrdoob/three.js"&gt;&lt;span style="mso-bidi-font-size:11.0pt; color:blue"&gt;https://github.com/mrdoob/three.js&lt;/span&gt;&lt;/a&gt;) and get started with simple examples in absolutely no time. :)&lt;/span&gt;&lt;span style="font-size:12.0pt; font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; color:black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;Wishing you happy exploration of WebGL and three.js...&lt;/span&gt;&lt;span style="font-size:12.0pt; font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; color:black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto; text-align:justify;line-height:normal"&gt;&lt;span style="font-size:10.0pt; font-family:&amp;quot;Verdana&amp;quot;,&amp;quot;sans-serif&amp;quot;;mso-fareast-font-family:&amp;quot;Times New Roman&amp;quot;; mso-bidi-font-family:&amp;quot;Times New Roman&amp;quot;;color:black"&gt;Have fun!!!&lt;/span&gt;&lt;span style="font-size:12.0pt;font-family:&amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;;mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;;color:black"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align:justify"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-1409071290382909729?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/1409071290382909729/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=1409071290382909729' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1409071290382909729'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1409071290382909729'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2011/05/easy-3d-with-webgl-and-threejs.html' title='Easy 3D with WebGL and Three.js'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-AmtWLQJ-XGk/TdedAxZmt9I/AAAAAAAAAFM/oDq5YQ8rOTM/s72-c/earth-view-screenshot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-5214377557808190959</id><published>2010-07-19T17:51:00.000+05:30</published><updated>2010-07-19T18:06:02.120+05:30</updated><title type='text'>Table2Visualization : Rendering Google Visualization Charts with HTML Tables</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;With the advent of the analytics age, one would find applications spring-up every month that lets you track, monitor, and analyze just about anything, from human habits to system behaviors. Such applications generally have a standard implementation pattern wherein they primarily collect, upload, process, and display data. Now, somebody trying to develop one such application would obviously face challenges, of different kinds, at each of these points depending upon the domain of applicability. However, the challenges in displaying the data, in a way that it is understandable to non-professionals, are the same for all of them.&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;Oftentimes, we rely upon statistical charts and graphs to render such data. These days one would find a plenty of charting libraries that make this possible easily (and some of them without any cost), for example Visualize, MooCharts, ProtoChart etc. One such player in the world of data visualization is Google itself.&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;Google Visualization is a set of JavaScript libraries that offer a wide range of data representation options with an easily pluggable API. It enables a developer to render statistical charts and graphs from a wide range of data-sources. However, as a developer, I always felt that a very simple and basic data source was always missing in that exhaustive list of data sources; and that is HTML tables. My searched across the web for an answer, either resulted in vein or a complex process with involved importing the data in a Google Docs spreadsheet and then rendering a chart from there. In simple words, there was nothing “Simple and Sweet”.&lt;/span&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;So, here I had a problem in-hand and decided to solve it for myself and all my fellow developers around the world. The implementation is now available on Google Code at the following location, with a sample to help you jump-start&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;a style="font-family: arial;" href="http://code.google.com/p/table2visualization/"&gt;http://code.google.com/p/table2visualization&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-5214377557808190959?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/5214377557808190959/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=5214377557808190959' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/5214377557808190959'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/5214377557808190959'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2010/07/table2visualization-rendering-google.html' title='Table2Visualization : Rendering Google Visualization Charts with HTML Tables'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-1373675943439645158</id><published>2009-09-15T16:55:00.000+05:30</published><updated>2009-09-15T17:04:56.667+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Hacks'/><title type='text'>GMail does not understand dots...</title><content type='html'>&lt;span style="font-family:Arial;font-size:85%;"&gt;I recently discovered some little-known ways to use a GMail address that can give you greater control over your inbox and save you some time. Actually, when you choose a Gmail address, you actually get more than just "yourusername@gmail.com"; here are two different ways you can modify your Gmail address and still continue getting your mails:&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Append a plus ("+") sign and any combination of words or numbers after your email address. For example, if your name was &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;yourusername&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;@gmail.com, you could send mail to &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;yourusername&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;+friends@gmail.com or &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;yourusername&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;+mailinglists@gmail.com.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;Insert one or several dots (".") anywhere in your email address. Gmail doesn't recognize periods as characters in addresses -- Google mail just ignores them. For example, you could tell people your address was hikingfan@gmail.com, hiking.fan@gmail.com or hi.kin.g.fan@gmail.com.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;For me, the real value in being able to manipulate your email address is that it makes it really easy to filter on those variants. For example you could use &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;yourusername&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;+bank@gmail.com when you sign up for online banking and then set up a filter&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt; to automatically star, archive or label emails addressed to &lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;yourusername&lt;/span&gt;&lt;span style="font-family:Arial;font-size:85%;"&gt;+bank. You can also use this when you register for a service and think they might share your information. For example, I added "+yahoogrp" when I subscribed to some yahoo groups once, and now when I see emails from other groups to that address, I know how they got it and can apply a filter to auto-delete the mails.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-1373675943439645158?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/1373675943439645158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=1373675943439645158' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1373675943439645158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1373675943439645158'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2009/09/gmail-does-not-understand-dots.html' title='GMail does not understand dots...'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-3169386526334232801</id><published>2009-07-31T15:52:00.000+05:30</published><updated>2009-07-31T16:11:51.458+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Simple Serialization</title><content type='html'>&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;The Simple XML serialization framework has released version 1.2. Simple is a serialization framework for Java that intends to provide an XML serialization framework that requires no configuration or mappings to serialize objects bi-directionally; i.e. to and from standard XML. Below is a list of some of the capabilities of the framework.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:85%;"  &gt;Simple framework with powerful capabilities&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;The framework used to provide XML serialization is simple to use and revolves around several annotations an a single persister object used to read and write objects to and from XML. Both serialization and deserialization are fully supported.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;font-size:85%;"  &gt;&lt;br /&gt;&lt;br /&gt;It requires absolutely no configuration&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Unlike many of the XML frameworks for Java there are no mappings or configuration required to serialize objects regardless of its complexity, not even code to establish mappings. Everything is done at runtime, only annotations are required to perform the object to XML structure. The XML schema is represented using field and method annotations.&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;&lt;br /&gt;&lt;br /&gt;Converts to and from human editable XML&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;A primary goal for the framework is that the XML data used to deserialize and serialize objects is human readable. All XML elements and attributes take a simple structure that can be easily created with a text editor. Also the serialization format is compatible with the C# XML serialization format.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Contains an XML templating system&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:arial;"&gt;As part of the deserialization process template markers within the XML elements and attributes can be replaced with variables. This allows the system to be easily adapted for use as a configuration system with dynamic value substitution. Stock template filers include OS environment variable substitution, system properties, as well as an API that enables custom filters to be introduced.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;&lt;br /&gt;Provides persister callback methods&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;During serialization and deserialization an object can recieve persister callbacks, to validate and prepare data during the process. Each callback allows the object to manipulate the persistance session, which allows values to be passed in to and out of the templating engine, and allows arbitrary attributes to be passed between the persisable objects.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Allows XML to drive composition&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The serialization and deserialization process is controlled by an exensible strategy API, which allows objects to be created based on custom XML attributes. This allows interception of the object creation in order to delegate instantiation to object factories.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Fully self contained&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;For Java 6 the framework has no external dependancies and is completely self contained. For Java 5 two external JAR files are required, the StAX API and the StAX implementation, both are provided with the download.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Open source&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Released under the LGPL and so can be fully integrated or adapted for both commercial and open source projects.&lt;br /&gt;&lt;br /&gt;The Simple Home : &lt;a href="http://simple.sourceforge.net/"&gt;http://simple.sourceforge.net&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-3169386526334232801?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/3169386526334232801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=3169386526334232801' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/3169386526334232801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/3169386526334232801'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2009/07/simple-serializations.html' title='Simple Serialization'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-8679064771707354918</id><published>2009-04-24T17:46:00.000+05:30</published><updated>2009-04-24T18:52:09.767+05:30</updated><title type='text'>Is Java String really immutable...?</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;In many texts String is cited as the ultimate benchmark of Java's various immutable classes. Well, I'm sure you'd have to think the other way once you have read this article.&lt;br /&gt;&lt;br /&gt;To start with, let's get back to the books and read the definition of immutability. The &lt;a href="http://en.wikipedia.org/wiki/Immutable_object"&gt;Wikipedia&lt;/a&gt; defines it as follows -&lt;br /&gt;&lt;br /&gt;&lt;i&gt;'In object-oriented and functional programming, an immutable object is an object whose state cannot be modified after it is created.'&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I personally find this definition good as it mentions that an immutable instance's state should not be allowed to be modified after it's construction.&lt;br /&gt;&lt;br /&gt;Now keeping this in the back of our minds, let's decompile Java's standard String implementation and peep into the hashCode() method -&lt;br /&gt;&lt;code language="java"&gt;&lt;br /&gt;public int hashCode() {&lt;br /&gt; int h = hash; &lt;br /&gt; if (h == 0) {&lt;br /&gt;     int off = offset;&lt;br /&gt;     char val[] = value;&lt;br /&gt;     int len = count;&lt;br /&gt;       for (int i = 0; i &lt; len; i++) {&lt;br /&gt;           h = 31*h + val[off++];&lt;br /&gt;       }&lt;br /&gt;       hash = h;&lt;br /&gt;    }&lt;br /&gt;    return h;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;A detailed look at the above code reveals this to be a classic implementation of the 'lazy evaluation' pattern; i.e. the String class instead of computing the hash value [1] during an instance's construction or [2] computing it each time the hashCode() method is called; computes it once, i.e. on the first call to hashCode(), and saves the computed value in the hash attribute.&lt;br /&gt;&lt;br /&gt;Now, here is a test to prove the above quoted statement -&lt;br /&gt;&lt;code&gt;&lt;br /&gt;String string = "MyDearString";&lt;br /&gt;&lt;br /&gt;Field field = String.class.getDeclaredField("hash");&lt;br /&gt;field.setAccessible(true);&lt;br /&gt;&lt;br /&gt;System.out.println("Before: " + field.getInt(string));&lt;br /&gt;&lt;br /&gt;string.hashCode();&lt;br /&gt;&lt;br /&gt;System.out.println("After: " + field.getInt(string )); &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Anxious to know what the output would looks like? Here it is...&lt;br /&gt;&lt;code&gt;&lt;br /&gt;Before: 0&lt;br /&gt;After: -1554135584&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;So this infers that for a given String instance which we create, but for which we never call hashCode(), the private hash field will remain to be zero. It is only changed when we call hashCode().&lt;br /&gt;&lt;br /&gt;Well, don't you find this in contrast with the basic definition of an object's immutability?&lt;br /&gt;&lt;br /&gt;One might argue that we can not observe a String instance in a different state without a reflective read of String's hash field and because the call to retrieve the state actually modifies it; if we can't observe it changing.&lt;br /&gt;&lt;br /&gt;Well, if one doesn't observe a change does that mean it never happened...?&lt;br /&gt;&lt;br /&gt;This reminds me about the other day when i scratched my new car, from below, against an irregular speed-breaker and my friend Manish said that I should not be worried about that because if a scratch is not visible its never been there. Well, is it really never there...? &lt;br /&gt;&lt;br /&gt;However it seems like String is not immutable. Although it seems safe, ignoring reflective access, it definitely looks incorrect.&lt;br /&gt;&lt;br /&gt;Post me your views around this... &lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-8679064771707354918?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/8679064771707354918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=8679064771707354918' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/8679064771707354918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/8679064771707354918'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2009/04/is-java-string-really-immutable.html' title='Is Java String really immutable...?'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-7731209306742773780</id><published>2008-12-04T16:12:00.000+05:30</published><updated>2008-12-30T14:41:47.485+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Schematron - validating web-forms and java objects</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Whilst developing web applications, more than often we are confronted with the need to validate user inputs. On the client-side (browsers) we generally do that with scripting languages; and for those users who have perhaps deliberately disabled their browser script support; we perform the same set validation on the server side, and this time we write some lines-of-code to extract the user input from the HTTP request and validate the same. Well, although ironic; yet it seems to be a de-facto that - we have to specify the validation rules separately on the client and server side, for eventually validating something that is semantically same.&lt;br /&gt;&lt;br /&gt;A technical analysis into the core reason reveals that – although the semantics of the herein discussed "thing" (i.e. the user input) are the same, yet the representations of the semantic on the client and server side are different; which enforces us to implement the extraction and validation logic differently. So going by that theory - if we can represent the semantics of the user input in a single unified format, we can potentially have a single definition and implementation of the validation rules too.&lt;br /&gt;&lt;br /&gt;So, what should our choice of a single unified data representation format? Well, there are a plethora of data representation formats out there; and you may be attracted to choose one that best suits your industry. However, as this article intends to project Schematron as a common validation solution across the client and server; I limited my choice to XML with intent to convey the concept with simplicity. &lt;p&gt;&lt;table style="MARGIN-LEFT: 0px; MARGIN-RIGHT: 0px" cellspacing="0" cellpadding="0" width="100%" border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="BORDER-RIGHT: windowtext 1pt solid; PADDING-RIGHT: 5.4pt; BORDER-TOP: windowtext 1pt solid; PADDING-LEFT: 5.4pt; PADDING-BOTTOM: 0in; BORDER-LEFT: windowtext 1pt solid; WIDTH: 6in; PADDING-TOP: 0in; BORDER-BOTTOM: windowtext 1pt solid" valign="top" width="576"&gt;&lt;span style="font-family:arial;font-size:80%;"&gt;Dear JSON lovers, &lt;a href="http://www.blogger.com/”"&gt;here&lt;/a&gt; is an excellent library by Stefan Goessner, which provides helper function for converting JSON to XML and visa-versa; So, that means - Schematron can be potentially used to validate JSON representations too.&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/p&gt;So, let’s apply the concept to practice -&lt;br /&gt;&lt;br /&gt;Before we apply Schematron to validate the user inputs on the client side; one must first convert the web form input to XML. The following archive illustrates an approach for converting a web form to XML and validating the same against a standard Schematron based schema –&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://sites.google.com/site/atechnodiary/Home/schematron-sample.rar?attredirects=0"&gt;&lt;span style="font-family:arial;font-size:80%;"&gt;schematron-sample.rar&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Once we have validated the user input on the client, we forward the same to the server; wherein we should re-use our validation rules and this time execute the same on the server side. For many of you out there this is perhaps a no-brainer. Nevertheless, we will discuss this aspect in similar details with the next post in this series.&lt;br /&gt;&lt;br /&gt;Until then wish you a merry Christmas and a safe holiday season.&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-7731209306742773780?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/7731209306742773780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=7731209306742773780' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/7731209306742773780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/7731209306742773780'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/12/validating-web-forms-and-java-objects.html' title='Schematron - validating web-forms and java objects'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-6457642686278500896</id><published>2008-11-21T16:15:00.000+05:30</published><updated>2008-11-25T17:56:25.974+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><title type='text'>Introducing Schematron</title><content type='html'>&lt;div align="justify"&gt;&lt;span style="font-family:arial;font-size:85%;"&gt;Schematron is a rule-based validation language for making assertions about patterns found in XML documents. It is a simple language which is based very much on XML itself and uses standard XPath to specify the assertion statements. The Schematron definations (a.k.a Schema) can be processed with standard XSL templates; which makes Schematron applicable is a variety of scenarios.&lt;br /&gt;&lt;br /&gt;Although a Schematron defination is referred as a Schema, but one must understand that Schematron differs in the basic concept from other schema languages; i.e. it is not based on grammars but on finding tree patterns in the parsed document. This approach allows many kinds of structures to be represented which could be difficult with grammar-based schema languages. For instance - imagine how would a typical schema be, for the following XML document -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;instance&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;person&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;fname/&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;lname/&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;/person&amp;gt;&lt;br /&gt;&amp;lt;/instance&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Guess its a no-brainer! It would be something like this -&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;xs:element name="instance"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;xs:complexType&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;xs:sequence&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;################&lt;/span&gt;&amp;lt;xs:element name="person"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####################&lt;/span&gt;&amp;lt;xs:complexType&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########################&lt;/span&gt;&amp;lt;xs:sequence&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############################&lt;/span&gt;&amp;lt;xs:element name="fname" type="xs:string"/&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############################&lt;/span&gt;&amp;lt;xs:element name="lname" type="xs:string"/&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########################&lt;/span&gt;&amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####################&lt;/span&gt;&amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;################&lt;/span&gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;/xs:sequence&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/xs:complexType&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;/xs:element&amp;gt;&lt;br /&gt;&amp;lt;/xs:schema&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;You must be already wondering about how different would the same schema look like in the "Schematron" world, right? Well, here is the answer -&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;schema xmlns="http://www.ascc.net/xml/schematron" &amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;pattern name="assert validity"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;rule context="instance"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;assert test="person"&amp;gt;person element is missing.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/rule&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;rule context="person"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;assert test="fname"&amp;gt;fname element is missing.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;assert test="lname"&amp;gt;lname element is missing.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/rule&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;/pattern&amp;gt;&lt;br /&gt;&amp;lt;/schema&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now, isn't that a much better and understandable version of a schema?&lt;br /&gt;&lt;br /&gt;A closer look at the above document would reveal how Schematron differs in the fundamentals of validating a document; the crux herein is not to define the structure of the document (that is what the traditional schema types do), but is to assert the structure. Imagine it to be something like JUnit or NUnit for the XML world; wherein one puts assert statements to check the validity of an object's state. And just like it happens in the JUnit or NUnit world; herein with Schematron also, one can have custom messages for assert conditions.&lt;br /&gt;&lt;br /&gt;The Schematron can render custom messages in two cases, v.i.z. -&lt;br /&gt;&lt;br /&gt;1. "Report" the presence of a pattern&lt;br /&gt;2. and "Assert" the absence of a pattern&lt;br /&gt;&lt;br /&gt;The following Schematron document illustrates the usage of the above discussed features -&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;schema xmlns="http://www.ascc.net/xml/schematron" &amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;!-- Render messages in case the elements are found. --&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;pattern name="report validity"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;rule context="instance"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;report test="person"&amp;gt;person element is present.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/rule&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;rule context="person"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;report test="fname"&amp;gt;fname element is present.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;report test="lname"&amp;gt;lname element is present.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/rule&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;/pattern&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;!-- Render messages in case the elements are not found. --&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;pattern name="assert validity"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;rule context="instance"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;assert test="person"&amp;gt;person element is missing.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/rule&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;rule context="person"&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;assert test="fname"&amp;gt;fname element is missing.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;############&lt;/span&gt;&amp;lt;assert test="lname"&amp;gt;lname element is missing.&amp;lt;/assert&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;########&lt;/span&gt;&amp;lt;/rule&amp;gt;&lt;br /&gt;&lt;span style="color:white;"&gt;####&lt;/span&gt;&amp;lt;/pattern&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/schema&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Now that we know how Schematron based schemas look like; the next obvious question is - "How to validate a document against a Schematron schema...?" Well, I already addressed that question in the first paragraph itself, with the following statement -&lt;br /&gt;&lt;br /&gt;&lt;i&gt;"The Schematron definations (a.k.a Schema) can be processed with standard XSL templates."&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Following statements illustrate the basic processing involved in validating a document with Schematron -&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;xslt -stylesheet schematron-message.xsl  SchematronRules.xml &gt; compiled-SchematronRules.xsl&lt;br /&gt;xslt -stylesheet compiled-SchematronRules.xsl TestData.xml&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now if that looks a little complex; here is a simple Schematron document validator (implemented in Java) which I developed to ease this complexity -&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;- &lt;a href="http://sites.google.com/site/atechnodiary/Home/Schematronize.java?attredirects=0"&gt;Schematronize.java&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The above listed validator requires the following XSL templates to be locally available -&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;- &lt;a href="http://xml.ascc.net/schematron/1.5/skeleton1-5.xsl"&gt;skeleton1-5.xsl&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://xml.ascc.net/schematron/1.5/message1-5/schematron-message.xsl"&gt;schematron-message.xsl&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Thats all for now... I’d leave it here for you to play. Hope you enjoyed reading this article. I will look forward to reading your feedbacks and implementation details around Schematron, so please do take a moment and drop in a note.&lt;br /&gt;&lt;br /&gt;Adieu.&lt;br /&gt;&lt;br /&gt;Some References -&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;br /&gt;- &lt;a href="http://www.schematron.com"&gt;The Schematron Website&lt;/a&gt;&lt;br /&gt;- &lt;a href="http://xml.ascc.net/resource/schematron"&gt;The Academia Sinica Computing Centre's Schematron Home Page&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-6457642686278500896?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/6457642686278500896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=6457642686278500896' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/6457642686278500896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/6457642686278500896'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/11/introducing-schematron.html' title='Introducing Schematron'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-1828858754102019599</id><published>2008-10-30T16:51:00.000+05:30</published><updated>2008-10-30T18:21:39.222+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Domain Specific Language'/><title type='text'>Scarlet – A Scala DSL for web applications</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 102);"&gt;Work in Progress&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(255, 102, 102);"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;The Scarlet project is currently under development. Please keep an eye on the sourceforge project site (sourceforge.net/projects/scarlets) or contact personally for updates.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 102, 102);"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Introduction to Domain Specific Language (DSL)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;Domain-specific languages have lately become a hot topic and a lot is being spoken and written about them all over the internet; much of the buzz around functional languages is their applicability to (once again) put the power and control of an application in exactly the right place where it belongs, i.e. in the hands of its users.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;By defining a simple language that the application users can understand, feel comfortable to communicate and use, programmers can effectively reduce their involvement in the never-ending cycle of UI requests and enhancements and can let users create scripts and other tools that allow them to create newer behavior in the applications they use. A perfect example of a wildly successful DSL is the Microsoft® Office Excel "language" used to express the various calculations and contents of the cells in the spreadsheets.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;Well, some might even go far and suggest that SQL itself is a DSL, this time a language aimed specifically at interacting with the relational database (Imagine if programmers had to fetch data out of Oracle via traditional API read()/write() calls — Eshhhh! Now that’s a nightmare)&lt;/span&gt;&lt;/span&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;What is Scarlet…?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;To be quick to the point:  Scarlets is an attempt to create “platform-independent”, “compilable” and “executable” pseudo-codes.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;Pseudo-codes are a kind of structured english for describing algorithms; which enables the designer to focus on the logic of the algorithm without being distracted by details of language syntax. The intent is to describe the entire logic of the algorithm with finer details so that implementation becomes a rote mechanical task of translating line by line into source code.&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;We have known pseudo-codes probably since the beginning of times at software engineering. And although we understand that pseudo-codes are capable of describing the entire logic of an algorithm to such an extent that implementation remains to be a simple mechanical task of translating lines of plain english into source code; yet, this so-called simple mechanical task is till date performed with human efforts.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;The Scarlets project intends minimize this human intervention by defining a Scala based domain-specific language which is very much like structured english and is a narrative for someone who knows the requirements (problem domain); so that he/she can write a pseudo code and see it run with zero or minimal involvement of a programmer who knows the programming language (implementation domain).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;A Sample Scarlet&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;The following is a sample implementation of Scarlet –&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;AccountApp.scala :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153); font-family: verdana;"&gt;val&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; userName = &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153); font-family: verdana;"&gt;theParameter named&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; "user" &lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="font-family: verdana;"&gt;in request&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;if&lt;/span&gt; (userName &lt;span style="color: rgb(0, 0, 153);"&gt;equals&lt;/span&gt; "nothing") {&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;   &lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;this renders&lt;/span&gt; &lt;span style="color: rgb(0, 0, 0);"&gt;"AccountUserForm.jsp"&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;} &lt;span style="color: rgb(0, 0, 153);"&gt;else&lt;/span&gt; {&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;theAttribute named&lt;/span&gt; "LoggedInUser" &lt;span style="color: rgb(0, 0, 153);"&gt;in session is&lt;/span&gt; userName&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;val &lt;/span&gt;accountHolder = &lt;span style="color: rgb(0, 0, 153);"&gt;new &lt;/span&gt;AccountHolder("B123456", "Rahul", "Roy")&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;val &lt;/span&gt;account = &lt;span style="color: rgb(0, 0, 153);"&gt;new &lt;/span&gt;Account("SA-001", accountHolder, 100.00)&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;theAttribute named &lt;/span&gt;"AccountObject" &lt;span style="color: rgb(0, 0, 153);"&gt;in session is account&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;this renders&lt;/span&gt; "AccountDisplay.jsp"&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:verdana;font-size:85%;"  &gt;}&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;Do we need a description for the above implementation…? Well, I’d rather leave it for you to understand. Meanwhile here is how the AccountUserForm and AccountDisplay Java server-pages (JSP) look like.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;AccountUserForm.jsp :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;span style="color: rgb(0, 0, 153);font-family:courier new;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;title&amp;gt;Scarlet Sample&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;form action="AccountApp" method="GET"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;Username : &amp;lt;input type="text" name="user" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;input type=submit value="Login" /&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;AccountDisplay.jsp :&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;%&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~~~~&lt;/span&gt;account = session.getAttribute("AccountObject");&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~~~~&lt;/span&gt;LoggedInUser = session.getAttribute("LoggedInUser").toString();&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;head&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;title&amp;gt;Scarlet Sample&amp;lt;/title&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;body&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;%=LoggedInUser%&amp;gt;'s Account : &amp;lt;%=account%&amp;gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:arial;font-size:85%;"  &gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&lt;span style="color: rgb(255, 255, 255);"&gt;~~~&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 153);font-family:verdana;font-size:85%;"  &gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;I hope you found Scarlets to be interesting; anyways please do feel free to share your thoughts and comments here so that I can better it with your cooperation.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-1828858754102019599?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/1828858754102019599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=1828858754102019599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1828858754102019599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1828858754102019599'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/10/scarlet-scala-dsl-for-web-applications.html' title='Scarlet – A Scala DSL for web applications'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-3214774007594148913</id><published>2008-10-16T13:27:00.000+05:30</published><updated>2008-10-16T13:39:58.553+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><title type='text'>Web4J : An Interesting framework</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;Its been quite a while since my last post here. I understand that my sudden disappearing act must have annoyed a many of my regular visitors; especially the ones who are expecting the second part of the XRX tutorial.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;Whilst you wait for the concluding part of the XRX article, I thought of sharing somethings that i found to be interesting -&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: arial;"&gt;As Java Web application frameworks have become more powerful and flexible, they've also become more complex. John O'Hanley's WEB4J framework in many ways flies in the face of this trend: it offers few customization options, but is easy to learn and work with. Read on to learn about the unusual (and somewhat contrarian) development principles behind WEB4J. You'll also have the opportunity to test out the framework by building a feature for a sample Web application... [&lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.javaworld.com/javaworld/jw-10-2008/jw-10-web4j.html"&gt;more&lt;/a&gt;&lt;span style="font-family: arial;"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-3214774007594148913?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/3214774007594148913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=3214774007594148913' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/3214774007594148913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/3214774007594148913'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/10/web4j-interesting-framework.html' title='Web4J : An Interesting framework'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-5732364346732629422</id><published>2008-08-20T16:46:00.000+05:30</published><updated>2008-08-20T17:05:43.354+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><title type='text'>Part I : XRX Architecture - Unleashed</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;During my tenure at Software AG, I was introduced to the power of XML. To my candor, i was very impressed to see the wide range of problems that XML promised to solve. Especially, to mention the performance power-punch that XML databases unleash when combined with XQuery and REST.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;A couple of years later, I moved into the consultancy world. Being back in the consultancy world and seeing business systems with my renewed XML-ized eyes (all credits to Software AG Tamino API and tools laboratory), I was highly dismayed to find that business oriented systems seldom use the real power of XML. The usage of XML herein has been more-so confined to defining application configurations and bare minimum transformation to either render interface elements or reports. I agree, there have been a few exceptions to this statement too.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;After spending quite some years revolting the general underutilization of XML; apparently I found my preferred architecture – i.e. XRX (XForms/REST/XQuery).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;p style="margin: 6pt 0in; text-align: justify; font-weight: bold;"&gt;&lt;span style="font-size:85%;"&gt;What is so unique about XRX architecture...?&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 6pt 0in; text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;Generally, web application architectures accept inputs from HTML forms, which provide the user inputs in flat key-value pairs, thereafter these data structures are converted to middle tier objects such as Java or .Net and then transformed into tabular data streams so they can be stored in relational databases. Once in the relational database, the data must then be re-serialized by doing SELECT statements, converted into objects and the objects then converted back into HTML forms. This is four-step translation architecture.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 6pt 0in; text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;In contrast to the above discussed conventional approach, XRX uses the zero-translation architecture. Zero translation implies that XML is stored in the web client, transmitted to a middle tier validation rules engine in XML and then stored in its entirety in an XML database. The storage in a single XML object is also known as a zero-shredding process since the data files are not separated into Third Normal Form (3NF) data structures. The key here is to break the myth and realize that 3NF shredding does not add any business value to the system.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Over the years, I have preached XForms as a very solid architectural composite; as it offers an order-of-magnitude improvement over other web front-end development architectures. Now, XForms when combined with the traditional XML performance power-punch i.e. REST and XQuery, defines a radical architecture that works wonders.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;I'm sure you must be already wondering: how to build this magical combination of XForms - REST - XQuery (XRX)? The following architecture view depicts the approach at an abstract, to facilitate and initiate your quest -&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_lEWwoxi4K-M/SKwAtC3UjvI/AAAAAAAAABU/cqOPAgD7DrQ/s1600-h/xrx_1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_lEWwoxi4K-M/SKwAtC3UjvI/AAAAAAAAABU/cqOPAgD7DrQ/s400/xrx_1.jpg" alt="" id="BLOGGER_PHOTO_ID_5236561240588062450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Following are some of the distinct advantages rendered by XRX architecture -&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;A web development architecture with a 10x productivity improvement over traditional Javascript/Object Oriented/RDBMS methods&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;A development architecture based on international standards that is designed to minimize the probability of vendor-locking&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;An architecture that gives a rich user experience without creating mountains of spaghetti procedural code on either the client or the server&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;A system that leverages the REST architecture to take advantage of high-performance and simple interfaces using web standards&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Portability on both the client and the server using a variety of forms players and XQuery databases&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;The option of avoiding costly shredding (and reconstitution) of complex XML documents into RDBMS tables&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;A community of standards/tools and a "complete solution" ecosystem that can give you a proven ROI on IT investment&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;The forthcoming post in this series, i.e. "Part II : XRX Architecture - Illustrated", will walk you through an elaborate tutorial on building a sample application that implements the XRX architecture.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Adieu for now...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-5732364346732629422?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/5732364346732629422/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=5732364346732629422' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/5732364346732629422'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/5732364346732629422'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/08/xrx-architecture-unleashed-and.html' title='Part I : XRX Architecture - Unleashed'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_lEWwoxi4K-M/SKwAtC3UjvI/AAAAAAAAABU/cqOPAgD7DrQ/s72-c/xrx_1.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-7621516860178733113</id><published>2008-08-04T17:58:00.000+05:30</published><updated>2008-08-04T18:08:40.786+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Artificial Intelligence'/><title type='text'>NLBean - Make your database understand English</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Natural language processing (a.k.a. NLP) is a stream of artificial intelligence and computational linguistics. In theory, it is the most attractive method of human-computer interaction; but as natural language recognition seems to require extensive knowledge about the outside world and the ability to manipulate it, implementing Natural Language Processing has infact been one of the most sought after conundrums in the computing world.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;This article presents an abstract introduction to natural language processing and further discusses implementing the same to query databases.&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;What is a Natural Language Processing (NLP)…?&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Natural language processing is the collection of techniques employed to enable the computers to understand the languages spoken by humans. The concept linguistic analysis and processing originated with efforts in the United States in the 1950s, wherein the intent was to use computers to automatically translate texts from foreign languages into English. Since computers had proven their ability to do arithmetic much faster and more accurately than humans, it was thought to be only a short matter of time before computers demonstrated the remarkable capacity to process human spoken languages.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;When computer based translation failed to yield accurate translations even after recurring efforts, automated processing of human languages was concluded to be far more complex than originally assumed. Hereafter natural language processing was recognized as a new field of study, devoted to developing algorithms and software for intelligently processing language data. &lt;/span&gt;  &lt;span style="font-family:arial;"&gt;Over the past 50 years, the field of natural language processing has advanced considerably and several algorithms have been developed, which process language grammar and syntax.&lt;/span&gt;  &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;What is Natural Language Database Query (NLDQ)…?&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Thinking a little innovative around the implementations of natural language processing, one can imagine a plethora of its applications, including a natural language processor to query databases.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;Natural language database query (NLDQ) is a subset of natural language processing (NLP) that deals with natural language inquiries against structured databases. The quintessence of natural language database querying (NLDQ) is to transform natural language requests into SQL or some other database query language, which could be further used to perform extractions from standard databases.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;As of today, there are quite some implementations which transform regular English sentences into well-formed queries. Following are some of the viable options in this segment –&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;Commercial&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Semantra&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;ELF English Query&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Educational&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Nchiql - a Chinese natural language database querying system&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;TELL-ME - a VAX/VMS based prototype natural language database querying system&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Another workable option and one of my favorite open source projects in the arena of natural language database querying (NLDQ) is NLBean. Although the code is very much crude and experimental, yet it does work fairly well. The implementation could be extended, customized to identify varied organizational domain terms and used to render an easy to use interface for our business users who struggle to understand standard database query languages.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;The following screenshot depicts the standard interface rendered by NLBean v5.0 –&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_lEWwoxi4K-M/SJb3TjmlhgI/AAAAAAAAABE/Ze_B9F2kxiU/s1600-h/nlbean.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_lEWwoxi4K-M/SJb3TjmlhgI/AAAAAAAAABE/Ze_B9F2kxiU/s400/nlbean.jpg" alt="" id="BLOGGER_PHOTO_ID_5230639932584068610" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;(Click on the image to zoom)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;References&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;ul style="text-align: justify;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Download the latest version of NLBeans &lt;a href="http://www.markwatson.com/opensource/nlbean.zip"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Further details on NLBeans can be found &lt;a href="http://www.markwatson.com/opensource/nlbeandoc.htm"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-7621516860178733113?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/7621516860178733113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=7621516860178733113' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/7621516860178733113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/7621516860178733113'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/08/nlbean-make-your-database-understand.html' title='NLBean - Make your database understand English'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_lEWwoxi4K-M/SJb3TjmlhgI/AAAAAAAAABE/Ze_B9F2kxiU/s72-c/nlbean.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-8617317425553009638</id><published>2008-07-30T16:43:00.000+05:30</published><updated>2008-07-30T17:43:23.642+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Virtualization'/><title type='text'>VirtualBox – Simple and Sweet Virtualization</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;I have been experimenting with virtualization since quite sometime now. My interest towards hypervisors or virtualization was sourced from the need to enhance the productivity my development and testing staff, by enabling them to switch between multiple operating systems on the very same box, without having to reboot the entire system.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Although virtualization has been around since many years now, but my search for better and cost-effective hypervisors recently seems to have been complimented with a plethora of them available at zero cost.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;p style="margin: 6pt 0in; text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;VMware is finally giving away its Update 2 for VMware Infrastructure 3.5 along with a lightweight edition of its market leading hypervisor, ESX 3i, for free.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin: 6pt 0in; text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;Read more about this new &lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.virtualization.info/2008/07/vmware-to-release-esx-3i-for-free-next.html"&gt;here&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Another competitive product is this segment is &lt;/span&gt;&lt;a style="font-family: arial;" href="http://www.virtualbox.org/"&gt;VirtualBox&lt;/a&gt;&lt;span style="font-family:arial;"&gt;; which is a powerful x86 virtualization products for enterprise as well as home use. Not only is VirtualBox an extremely feature rich, high performance product for enterprise customers, it is also the only professional solution that is freely available as Open Source Software under the terms of the GNU General Public License (GPL).&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;My personal experience with VirtualBox so far has been good. VirtualBox is simple to configure and use. The best part of VirtualBox is that the images are very portable. Additionally, the VirtualBox snapshot technology provides the same basic functionality as the VMware, that is, they can be taken while the virtual machine (VM) is running or offline.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Here is a screenshot of what we achieved with VirtualBox; it depicts three operating systems instances (v.i.z. Windows Vista, Windows 95 and Ubuntu) running in parallel, right on the same box; wherein each of those instances could be distinctly accessed over the network.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div  style="text-align: justify;font-family:arial;"&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_lEWwoxi4K-M/SJBOokFqgpI/AAAAAAAAAA8/z3ezzVNF9CE/s1600-h/dual_os_vista.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_lEWwoxi4K-M/SJBOokFqgpI/AAAAAAAAAA8/z3ezzVNF9CE/s400/dual_os_vista.jpg" alt="" id="BLOGGER_PHOTO_ID_5228765626166313618" border="0" /&gt;&lt;/a&gt;(Click on the image to zoom)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;&lt;br /&gt;The term "cost-effective" &lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;doesn't &lt;/span&gt;&lt;span style=";font-family:arial;font-size:100%;"  &gt;necessarily always mean  "free". &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Yesterday whilst chatting with Prashant, a friend and technology evangelist, I got introduced to &lt;/span&gt;&lt;span class="small"  style="font-family:arial;"&gt;Amazon Elastic Compute Cloud (&lt;a href="http://www.amazon.com/gp/browse.html?node=201590011"&gt;Amazon EC2&lt;/a&gt;), which is an &lt;/span&gt;&lt;span style="font-family:arial;"&gt;amazing virtual computing solution that costs nominal. Further research on this topic lead me to an open source Google-code project, namely &lt;a href="http://code.google.com/p/scalr/"&gt;Scalr&lt;/a&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=""&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;I’ve not yet had an opportunity to play with Scalr, but with the first look at it, i must say that i am impressed. I am looking forward have my hands on it soon and i would definitely share the experience here. So keep an eye on this blog, for more on virtualization in future.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Thats all for now... Hope you enjoyed reading this article. I’d love to read your feedbacks and details about your virtualization experiences, so please do take a moment and drop in a note.&lt;br /&gt;&lt;br /&gt;Adieu.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-8617317425553009638?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/8617317425553009638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=8617317425553009638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/8617317425553009638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/8617317425553009638'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/07/virtualbox-simple-and-sweet.html' title='VirtualBox – Simple and Sweet Virtualization'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp2.blogger.com/_lEWwoxi4K-M/SJBOokFqgpI/AAAAAAAAAA8/z3ezzVNF9CE/s72-c/dual_os_vista.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-1836027776958744081</id><published>2008-07-28T14:14:00.000+05:30</published><updated>2008-07-28T15:03:04.799+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><title type='text'>Shard – A Database Design</title><content type='html'>&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;Scaling Database is one of the most common and important issue that every business confronts in order to accommodate the growing business and thus caused exponential data storage and availability demand. There two principle approaches to accomplish database scaling; v.i.z. vertical and horizontal.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;Regardless of which ever scaling strategy one decides to follow, we usual land-up buying ever bigger, faster, and more expensive machines; to either move the database on them for vertical scale-up or cluster them together to scale horizontally.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;While this arrangement is great if one has ample financial support, it doesn't work so well for the bank accounts of some of our heroic system builders who need to scale well past what they can afford.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;In this write-up, I intend to explain a revolutionary and fairly new database architecture; termed as Sharding, that some websites like Friendster and Flickr have been using since quite sometime now. The concept defines an affordable approach to horizontal scaling with no compromise at all.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;table  style="text-align: left; margin-left: 0px; margin-right: 0px;font-family:arial;" border="1" cellpadding="0" cellspacing="0" width="100%"&gt;&lt;tbody&gt;&lt;tr style=""&gt;   &lt;td style="border: 1pt solid windowtext; padding: 0in 5.4pt; width: 6in;" valign="top" width="576"&gt;&lt;p style="margin: 6pt 0in; text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;For instance   Flickr handles more than 1 billion transactions per day, responding in less   then a few seconds and can scale linearly at a low cost.&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-weight: bold;"&gt;What is sharding...? &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Arial;"&gt;While working for an auction website, somebody got the idea to solve the site’s scaling problems by creating a database server for a group of users and running those servers on cheap Linux boxes. In this scheme the data for User A is stored on one server and the data for User B is stored on another server. It's a federated model. Groups of 500K users are stored together in what are called &lt;span style=""&gt;shards&lt;/span&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:Arial;"&gt;The advantages are:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;ul style="margin-top: 0in; text-align: justify;" type="disc"&gt;&lt;li class="MsoNormal" style="margin-top: 6pt; margin-bottom: 6pt;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;High      availability&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Arial;"&gt;.      If one box goes down the others still operate. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin-top: 6pt; margin-bottom: 6pt;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Faster      queries&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Arial;"&gt;.      Smaller amounts of data in each user group mean faster querying. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin-top: 6pt; margin-bottom: 6pt;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;More      write bandwidth&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family:Arial;"&gt;.      With no master database serializing writes you can write in parallel which      increases your write throughput. Writing is major bottleneck for many      websites. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin-top: 6pt; margin-bottom: 6pt;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;You      can do more work&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;.      A parallel backend means you can do more work simultaneously. You can      handle higher user loads, especially when writing data, because there are      parallel paths through your system. You can load balance web servers,      which access shards over different network paths, which are processed by      separate CPUs, which use separate caches of RAM and separate disk IO paths      to process work. Very few bottlenecks limit your work.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-weight: bold;"&gt;How is Sharding different from traditional architectures...?&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;Sharding is different than traditional database architecture in several important ways; following are the key factors -&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Data is denormalized&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;. Traditionally we normalize      data. Data are splayed out into anomaly-less tables and then joined back      together again when they need to be used. In sharding the data are      denormalized. You store together data that are used together.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt; &lt;o:p&gt;&lt;/o:p&gt;This doesn't mean you don't also segregate data by type. You can keep a user's profile data separate from their comments, blogs, email, media, etc, but the user profile data would be stored and retrieved as a whole. This is a very fast approach. You just get a blob and store a blob. No joins are needed and it can be written with one disk write.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Data is across      many physical instances&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;. Historically database servers are scaled up. You buy      bigger machines to get more power. With sharding the data are parallelized      and you scale by scaling out. Using this approach you can get massively      more work done because it can be done in parallel. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Data is small&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;. The larger a set of data a      server handles the harder it is to cash intelligently because you have      such a wide diversity of data being accessed. You need huge gobs of RAM      that may not even be enough to cache the data when you need it. By      isolating data into smaller shards the data you are accessing is more      likely to stay in cache. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;Smaller sets of data are also easier to backup, restore, and manage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;Data are more highly available&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;. Since the shards are      independent a failure in one doesn't cause a failure in another. And if      you make each shard operate at 50% capacity it's much easier to upgrade a      shard in place. Keeping multiple data copies within a shard also helps      with redundancy and making the data more parallelized so more work can be      done on the data. You can also setup a shard to have a master-slave or      dual master relationship within the shard to avoid a single point of      failure within the shard. If one server goes down the other can take over.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;span style="font-family:Arial;"&gt;It doesn't use replication&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;. Replicating data from a      master server to slave servers is a traditional approach to scaling. Data      is written to a master server and then replicated to one or more slave      servers. At that point read operations can be handled by the slaves, but      all writes happen on the master.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;Obviously the master becomes the write bottleneck and a single point of failure; and as the load increases the cost of replication increases. Replication costs in CPU, network bandwidth, and disk IO. The slaves fall behind and have stale data. The folks at YouTube had a big problem with replication overhead as they scaled.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="margin-left: 0.5in; text-align: justify;"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;Sharding cleanly and elegantly solves the problems with replication.&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p  style="text-align: justify;font-family:arial;" class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;The most recommended approach to implement database shards is using the Hibernate Shards framework. The said framework offers critical data clustering and support for horizontal partitioning along with standard Hibernate services. Which enable the businesses to keep data in more than one relational database without any add-on complexity whilst building the applications.&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p  style="text-align: justify;font-family:arial;" class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p class="MsoNormal"  style="margin: 6pt 0in; text-align: justify;font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;Other than Hibernate; shards can also be implemented with any of the following toolkits –&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;ul  style="margin-top: 0in; text-align: justify;font-family:arial;" type="disc"&gt;&lt;li class="MsoNormal" style="margin-top: 6pt; margin-bottom: 6pt;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://people.apache.org/%7Eppoddar/slice/site/index.html"&gt;Apache      Slice&lt;/a&gt; (supports distributed XA transactions)&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="margin-top: 6pt; margin-bottom: 6pt;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.ibm.com/developerworks/wikis/display/objectgridprog/Replication+architecture"&gt;Websphere      ObjectGrid&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Well, thats all for the starters folks. Hope this was an useful read and has provided enough thoughts for your brains to work quite sometime now...&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;    &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-1836027776958744081?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/1836027776958744081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=1836027776958744081' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1836027776958744081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/1836027776958744081'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/07/shard-database-design.html' title='Shard – A Database Design'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-8405712064955816086</id><published>2008-07-08T09:42:00.000+05:30</published><updated>2008-07-22T18:12:42.074+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Architecture'/><title type='text'>Symptoms of an aging software</title><content type='html'>&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;Most product development starts with a good design in mind. The initial architecture is clear and elegant. But then something begins to happen. What really happens is that the programs, like people, get old. However, unlike (in most cases) people there is no guarantee that software will mature as it grows old. Even worse, if we aren’t taking care of standard Software Quality Assurance (SQA), our system is not only ageing, but infact it is rotting. A Software undesirably grows old for two major reasons –&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div&gt;    &lt;/div&gt;&lt;ol style="margin-top: 0in; text-align: justify;" start="1" type="1"&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;The product owners      have failed to modify the software to meet changing needs.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;The changes are made      that yield poor results.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;It is SQA that determines the way we can check and improve our software quality. SQA is a planned and systematic approach to evaluation of the quality and adherence to software product standards, processes, and procedures. It includes the process of assuring that standards and procedures are established and followed throughout the software acquisition life cycle.&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;  &lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;So, who is responsible for SQA...? Well, everyone has an influence on quality - independent of his or her status and position in the project. What developers can do is focus their eyes on the excellence of defect detection, and removal as well as on design improvements wherever feasible. Now, in case of a horrendous design wherein every component seems to be dependent on every other, it could be a nightmare to even think of changing any of them. In such a case it’s all together a different war game. But in the case of a typical day-to-day scenarios, before we look closer at defect detection and analysis, we must first look for the standard symptoms of "ageing software".&lt;/span&gt;&lt;/p&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;  &lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;You should keep an eye out for these characteristics, especially when your software is getting older.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;ol style="text-align: justify;"&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Architecture and design can't keep up - &lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;As software ages, it grows bigger and bigger, but architecture and design will get flushed down and one would clearly see some kind of design erosion.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Unused or dead code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt; - Another phenomenon that occurs in growing software is, incorporation of features that are not explicitly requested, but are mainly incorporated by enthusiastic software engineering staff members (especially agile techniques try to avoid these "eloping features"). This surely leads to unused (dead) code. This &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;phenomenon can also &lt;/span&gt;&lt;span style="font-family:Arial;"&gt;be result of inadequately performed reuse.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Poor modularization - &lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;Programs are not divided into meaningful subsystems.&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Confusing workflow - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;The program's dynamic work flow cannot be derived by a static code inspection.&lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Hidden redundancy&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt; - Duplicated code is infact the worst enemy of quality software.&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Inaccurate scope&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-style: italic;"&gt; - &lt;/span&gt;The scope, or visibility, of data and methods is inaccurate and more extended than necessary (e.g., "public" instead of "protected").&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Semantic issues - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;Class names, variables and methods of non-framework class names are semantically worthless or irrelevant to the context of what it does (for example, the most famous "int i;”, by its mere name wonder who would tell you what it does; similarly “void doProcessing()” or “class DataHandler").&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;span style="font-family:Arial;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Poorly documented code and design - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;Documentation might even be ignored because it is considered inaccurate. It's hard to maintain and modify code that follows the maxim "If it was hard to write, it should be hard to read." Unfortunately, there are no incentives for programmers (at least not a practice that I’ve come across) to document their code or write clear and understandable programs. In fact, it's usually the opposite; developers are urged to quickly turn out code, mainly because of unrealistic schedules (thanks, to the project managers who fail to anticipate and setup the right expectation for their team deliverables); this can even happen in agile projects.&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Exponentially increasing code changes - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;There is more and more code to change to incorporate new features or to fix detected errors. It is difficult to find the modules and components that must be changed and to preserve the original design when doing these changes.&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Reliability decreases - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;As the software is maintained by the so called workarounds or hacks, more than often the complexity of keeping track of changes may result in new bugs. Even with minor changes, known and unknown dependencies among parts of the software are likely to impact and cause problems.&lt;br /&gt;&lt;br /&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Lack of scalability - &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:Arial;"&gt;There is a lack of scalability, mainly revealed as reduced performance, as poor design (or often direct implementation) cause performance bottlenecks.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style="text-align: justify;"&gt;&lt;i style=""&gt;&lt;span style="font-family:Arial;"&gt;Lack of reusability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=";font-family:Arial;font-size:12;"  &gt;&lt;span style="font-size:100%;"&gt; - &lt;/span&gt;&lt;span style="font-size:100%;"&gt;This may concern the reuse of modules from the product itself or even from other products or platforms developed by the organization.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style="font-family:Arial;"&gt;&lt;span style="font-size:100%;"&gt;Now, being familiar with the symptoms of rotting software, and having seen what can turn good software into a bad one, we will look at possible corrective actions which will be hosted here sometimes soon in future…&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-8405712064955816086?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/8405712064955816086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=8405712064955816086' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/8405712064955816086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/8405712064955816086'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/07/symptoms-of-aging-software.html' title='Symptoms of an aging software'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-4875020960961804150</id><published>2008-06-25T18:08:00.000+05:30</published><updated>2008-07-22T18:14:03.591+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Music APIs'/><title type='text'>The musical world of Java</title><content type='html'>&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-family:Arial;"&gt;Recently whilst browsing through &lt;a href="http://blogs.sun.com/geertjan"&gt;Geertjan’s&lt;/a&gt; blog, to keep myself abreast with the technological happenings of Netbeans; I stumbled upon an interesting write-up which discussed about a Java API for music, namely JFugue. Being inclined to music since my early days, the short write-up immediately caught-up my attention. I didn’t have enough time in hand to investigate it in detail; however, least I had a look at the API’s “programming” guide and was really astonished to find that now one can define musical scores, notes etc. and program an entire virtual orchestra to play and record the same in standard &lt;st1:place st="on"&gt;MIDI&lt;/st1:place&gt; format.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-family:Arial;"&gt;Following are some more musical Java APIs - &lt;a href="http://www.jfugue.org/"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;ul style="margin-top: 0in; text-align: justify;" type="disc"&gt;&lt;li class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-family:Arial;"&gt;&lt;a href="http://www.jfugue.org/"&gt;JFugue&lt;/a&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;a href="http://dpp.mikekohn.net/"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-family:Arial;"&gt;&lt;a href="http://dpp.mikekohn.net/"&gt;Drum++&lt;/a&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-family:Arial;"&gt;&lt;a href="http://jmusic.ci.qut.edu.au/"&gt;JMusic&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: justify;"&gt;    &lt;/div&gt;&lt;p style="text-align: justify;" class="MsoNormal"&gt;&lt;span style=";font-family:Arial;font-size:100%;"  &gt;&lt;span style="font-family:Arial;"&gt;Now that’s definitely music to ears for all the programmers out there who have a musical predilection.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-4875020960961804150?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/4875020960961804150/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=4875020960961804150' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/4875020960961804150'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/4875020960961804150'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/06/musical-world-of-java.html' title='The musical world of Java'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-4793183826915584474</id><published>2008-06-19T15:30:00.000+05:30</published><updated>2008-07-22T18:11:42.154+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Web Services'/><category scheme='http://www.blogger.com/atom/ns#' term='Netbeans'/><title type='text'>Rest aside your web services</title><content type='html'>&lt;div style="text-align: justify;"&gt;If you've been thinking of web services and feeling scared of that XML mess in the web service description (wsdl) files. Well, rest aside that scare now. And, by rest I mean, &lt;span style="font-weight: bold;"&gt;Re&lt;/span&gt;presentational &lt;span style="font-weight: bold;"&gt;S&lt;/span&gt;tate &lt;span style="font-weight: bold;"&gt;T&lt;/span&gt;ransfer (REST).&lt;br /&gt;&lt;br /&gt;Representational state transfer (REST) is a style of software architecture for distributed hypermedia systems such as the World Wide Web. And thus invariably it could be also implemented in the world of web services as another revolutionary way of communication with web services. In REST, resources have URIs and are manipulated simply through HTTP header operations. Therefore, now one can imagine having a web service without all that WSDL clutter.&lt;br /&gt;&lt;br /&gt;REST works around a very simple principle, i.e. HTTP methods POST, GET, PUT and DELETE can be compared with the CREATE, READ, UPDATE, DELETE (CRUD) operations associated with database technologies or any application model objects.&lt;br /&gt;&lt;/div&gt;&lt;p style="text-align: justify;"&gt;The following table associates several common HTTP verbs with similar database operations, however the meaning of the HTTP verbs do not correspond directly with a single database operation. For example, an HTTP PUT is used to set the value of a resource and may result in either a creation or update as needed.&lt;/p&gt;&lt;div style="text-align: justify;"&gt;  &lt;/div&gt;&lt;table style="text-align: left; margin-left: 0px; margin-right: 0px;" border="1"&gt;&lt;tbody&gt;&lt;tr&gt; &lt;th style="text-align: left;"&gt;HTTP&lt;/th&gt; &lt;th style="text-align: left;"&gt;CRUD&lt;/th&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;POST&lt;/td&gt; &lt;td&gt;Create, Update, Delete&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;GET&lt;/td&gt; &lt;td&gt;Read&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;PUT&lt;/td&gt; &lt;td&gt;Create, Update&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;DELETE&lt;/td&gt; &lt;td&gt;Delete&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;div style="text-align: justify;"&gt;&lt;br /&gt;I hope thats enough for a theoretical introduction.  Now for those who are eager to try cooking some code, here is the recipe.&lt;br /&gt;&lt;br /&gt;The Netbeans Tutorial - &lt;a href="http://www.netbeans.org/kb/61/websvc/rest.html"&gt;Getting Started with RESTful Web Services&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-4793183826915584474?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/4793183826915584474/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=4793183826915584474' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/4793183826915584474'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/4793183826915584474'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/06/rest-aside-your-web-services.html' title='Rest aside your web services'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-646266935504215225.post-4204355145021472278</id><published>2008-06-17T17:09:00.000+05:30</published><updated>2008-07-22T18:10:53.786+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Artificial Intelligence'/><title type='text'>FAINT - Search for faces</title><content type='html'>&lt;div  style="text-align: justify;font-family:arial;"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;Lately, I've been playing around a bit with facial pattern recognition algorithms and their open source implementations. I came across many reference implementation but a very few were implemented in Java, and the Eigenfaces algorithm by far happens to be the best amongst them all. During my research around the said topic i happened to stumble-upon an implementation called FAINT (The Face Annotation Interface - &lt;/span&gt;&lt;span class="a"&gt;&lt;span style="font-family:arial;"&gt;http://faint.sourceforge.net). Faint by far the best facial pattern recognition API and as you must have already guessed, it implements the Eigenfaces algorithm.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Now enough of theory talks, how about implementing an example with faint...? Here is one for all you face-recognition enthusiasts. The following example simply searches for faces in a given photograph and thumbnails them. Now, I know thats not face recognition; but be a little creative here. Once you have the facial thumbnails extracted, its never a big deal to look further in the Faint API and find methods which can help you do the real recognition. :) Now, i was a little lazy to set up a pattern recognition database to left the example to the point of facial extraction only.&lt;br /&gt;&lt;br /&gt;The Simple Class which extracts thumbnails -&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="a"&gt;&lt;span style="font-family:arial;"&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;import de.offis.faint.controller.MainController;&lt;br /&gt;import de.offis.faint.model.ImageModel;&lt;br /&gt;import de.offis.faint.model.Region;&lt;br /&gt;import java.io.File;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.util.Random;&lt;br /&gt;&lt;br /&gt;public class Main {&lt;br /&gt;&lt;br /&gt;private static final String Imagedir = "C:\\images\\fr";&lt;br /&gt;private static final String faintDir = "C:\\Documents and Settings\\roy\\.faint";&lt;br /&gt;private static final String saperator = "\\";&lt;br /&gt;private static final Random randomGenerator = new Random();&lt;br /&gt;private static final boolean moveThumbnails = true;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* @param args the command line arguments&lt;br /&gt;*/&lt;br /&gt;public static void main(String[] args) throws IOException {&lt;br /&gt;   MainController controller = MainController.getInstance();&lt;br /&gt;   if (controller != null) {&lt;br /&gt;       controller.setScanWindowSize(1);&lt;br /&gt;       ImageModel imageModel = new ImageModel(Imagedir + saperator + "mgrp.jpg");&lt;br /&gt;       Region[] regions = controller.detectFaces(imageModel, false);&lt;br /&gt;       if (regions != null) {&lt;br /&gt;           System.out.println(regions.length + " people in the image...");&lt;br /&gt;           for (int i = 0; i &amp;lt; regions.length; i++) {&lt;br /&gt;               Region region = regions[i];&lt;br /&gt;               region.cacheToDisk();&lt;br /&gt;&lt;br /&gt;               if (moveThumbnails) {&lt;br /&gt;                   String cacheFilename = region.getCachedFile();&lt;br /&gt;&lt;br /&gt;                   File file = new File(faintDir + saperator + cacheFilename);&lt;br /&gt;                   File dir = new File(Imagedir + saperator + "faces");&lt;br /&gt;                   boolean success = file.renameTo(new File(dir, "face_" + randomGenerator.nextInt() + ".png"));&lt;br /&gt;                   if (!success) {&lt;br /&gt;                       System.out.println("Error occured whilst moving " + cacheFilename);&lt;br /&gt;                   }&lt;br /&gt;               }&lt;br /&gt;           }&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="a"&gt;&lt;span style="font-family:arial;"&gt;Hope somebody out there takes the example further and does something interesting with the learning.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span class="a"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/646266935504215225-4204355145021472278?l=technoroy.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://technoroy.blogspot.com/feeds/4204355145021472278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=646266935504215225&amp;postID=4204355145021472278' title='32 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/4204355145021472278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/646266935504215225/posts/default/4204355145021472278'/><link rel='alternate' type='text/html' href='http://technoroy.blogspot.com/2008/06/faint-search-for-faces.html' title='FAINT - Search for faces'/><author><name>Rahul Roy</name><uri>http://www.blogger.com/profile/11252266738435830339</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>32</thr:total></entry></feed>
