<?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-5265194643022445353</id><updated>2012-01-23T22:46:48.443-08:00</updated><category term='flash'/><category term='sailfin'/><category term='intel hda'/><category term='sip registrar server'/><category term='glassfish'/><category term='maven'/><category term='pidgin'/><category term='aspire'/><category term='sip'/><category term='wine'/><category term='general'/><category term='hardy'/><category term='gnome'/><category term='sip redirect server'/><category term='5580'/><category term='database script generation'/><category term='git'/><category term='sound'/><category term='acer aspirce'/><category term='python'/><category term='web service'/><category term='restful architecture'/><category term='project development'/><category term='resiprocate'/><category term='video streaming'/><category term='firewall'/><category term='netbeans rcp'/><category term='rar'/><category term='code generation'/><category term='database'/><category term='linux'/><category term='openoffice3'/><category term='5585'/><category term='ddlutils'/><category term='shell script'/><category term='java'/><category term='jain sip'/><category term='vga'/><category term='restful'/><category term='communication'/><category term='ufw'/><category term='rar archive'/><category term='Intel 82801G'/><category term='netbeans'/><category term='stickies'/><category term='rest'/><category term='winrar'/><category term='sip servlet'/><category term='sip proxy server'/><category term='ubuntu'/><category term='architecture'/><category term='acer'/><category term='Red5'/><title type='text'>Imran's Tech Blog</title><subtitle type='html'>Writeups on all interested technologies</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>28</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-530883840899826233</id><published>2011-02-07T20:18:00.000-08:00</published><updated>2011-02-07T20:22:30.654-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='restful'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><title type='text'>RESTful Web Services</title><content type='html'>I have come a long way in learning, understanding and imlpementing RESTful (at least RESTlike) systems in real life. From that experience of mine recently I made a technical presentation at BASIS SoftExpo 2011. The response seems to be good. The slides are as follows. Criticisms, suggestions are most welcome.&lt;br /&gt;&lt;div style="width:425px" id="__ss_6821331"&gt;&lt;strong style="display:block;margin:12px 0 4px"&gt;&lt;a href="http://www.slideshare.net/imyousuf/restful-web-services-6821331" title="RESTful Web Services"&gt;RESTful Web Services&lt;/a&gt;&lt;/strong&gt;&lt;object id="__sse6821331" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=restful-ws-main-110205055133-phpapp01&amp;amp;stripped_title=restful-web-services-6821331&amp;amp;userName=imyousuf"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;embed name="__sse6821331" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=restful-ws-main-110205055133-phpapp01&amp;amp;stripped_title=restful-web-services-6821331&amp;amp;userName=imyousuf" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="padding:5px 0 12px"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/imyousuf"&gt;imyousuf&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;amp;c2=7400849&amp;amp;c3=1&amp;amp;c4=&amp;amp;c5=&amp;amp;c6="&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-530883840899826233?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/530883840899826233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2011/02/restful-web-services.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/530883840899826233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/530883840899826233'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2011/02/restful-web-services.html' title='RESTful Web Services'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-950576833710816095</id><published>2010-06-08T08:13:00.000-07:00</published><updated>2010-06-08T08:21:52.688-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='gnome'/><title type='text'>Using GNOME Blog</title><content type='html'>&lt;p&gt;I was looking for a client to work offline and post my entry, rather than writing it from a browser. I did a simple apt-cache search and found &lt;em&gt;&lt;a href="http://projects.gnome.org/gnome-blog/"&gt;GNOME Blog&lt;/a&gt;&lt;/em&gt; (&lt;em&gt;&lt;strong&gt;gnome-blog&lt;/strong&gt;&lt;/em&gt;). So now &lt;strong&gt;testing&lt;/strong&gt; it out. Lets see how it turns out; first impression is rich text edit capabilities is very limited!&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-950576833710816095?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/950576833710816095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2010/06/using-gnome-blog-i-was-looking-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/950576833710816095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/950576833710816095'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2010/06/using-gnome-blog-i-was-looking-for.html' title='Using GNOME Blog'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-3504500429252670555</id><published>2009-07-07T21:49:00.000-07:00</published><updated>2009-07-09T01:26:57.589-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='restful'/><category scheme='http://www.blogger.com/atom/ns#' term='rest'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='restful architecture'/><title type='text'>RESTful Architecture</title><content type='html'>&lt;p&gt;The title is definitely making some readers think why is someone again writing on this topic. What inspired me to write again after a long time is the confusion between &lt;strong&gt;"RESTful Web Services"&lt;/strong&gt; and &lt;strong&gt;"XML over HTTP"&lt;/strong&gt;. I came accross this confusion while working on &lt;a href="http://code.google.com/p/smart-dao/"&gt;a framework of mine&lt;/a&gt; and later I will mention how it interested me. So I would like to clear the confusion, as per my understanding, on &lt;em&gt;RESTful Architecture&lt;/em&gt;.&lt;/p&gt;&lt;p&gt;First lets see how Dr. Roy Thomas Fielding in his PhD &lt;a href="http://www.ics.uci.edu/%7Efielding/pubs/dissertation/top.htm"&gt;dissertation&lt;/a&gt; defines &lt;a href="http://www.ics.uci.edu/%7Efielding/pubs/dissertation/rest_arch_style.htm#sec_5_1_5"&gt;REST&lt;/a&gt;,&lt;/p&gt;&lt;p style="font-style: italic; font-weight: bold;"&gt;&lt;/p&gt;&lt;blockquote style="font-style: italic;"&gt;REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state.&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;In this writeup I would like illustrate how Dr. Fielding illustrates this and my (as a scholar of REST) understanding on the matter.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;As the &lt;a href="http://en.wikipedia.org/wiki/REST"&gt;REST wikipedia&lt;/a&gt; page mentions at the center of the RESTful architecture is &lt;em&gt;"Resource"&lt;/em&gt; and I fully agree with it. So I would like start by defining what is a resource. Dr. Fielding defines &lt;a href="http://www.ics.uci.edu/%7Efielding/pubs/dissertation/rest_arch_style.htm#sec_5_2_1_1"&gt;it as&lt;/a&gt;,&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote style="font-style: italic;"&gt;...any concept that might be the target of an author's hypertext reference must fit within the definition of a resource. A resource is a conceptual mapping to a set of entities, not the entity that corresponds to the mapping at any particular point in time.&lt;/blockquote&gt;Now lets  pick a common concept to build the idea of resources. Lets take a book sales aggregator service (similar to &lt;a href="http://checkout.google.com/"&gt;Google Checkout&lt;/a&gt;); it sells books written by one or many authors and published by one or more publishing house and sold at different prices by stores and are in different state (new or old) and different descriptions to go with them.&lt;br /&gt;The obvious resources here are &lt;span style="font-style: italic;"&gt;Book&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Store&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;Author&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Publisher&lt;/span&gt; and I would have &lt;span style="font-style: italic;"&gt;BookState&lt;/span&gt; be a resource as well, it is comprised of price and description. Cardinality would be Book has many Stores, Authors and Publishers; Store has many BookStates. I would also like to make &lt;span style="font-style: italic;"&gt;BookExcerpt&lt;/span&gt; a weak entity of Book. So according to Dr. Fielding's definition and my understanding of resource all the objects in &lt;a href="http://en.wikipedia.org/wiki/Object-oriented_programming"&gt;OOP&lt;/a&gt; (in &lt;span style="font-style: italic;"&gt;italic&lt;/span&gt;) are resources.&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;Before going into the nature of representation lets see what Dr. Fielding has to say about constituents of a resource -&lt;/p&gt;&lt;p style="font-style: italic;"&gt;&lt;/p&gt;&lt;blockquote style="font-style: italic;"&gt;The values in the set may be resource representations and/or resource identifiers. A resource can map to the empty set, which allows references to be made to a concept before any realization of that concept exists. ....... The only thing that is required to be static for a resource is the semantics of the mapping, since the semantics is what distinguishes one resource from another.&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The first part of the statement actually signifies an advantage of RESTful architecture and that one may develop individual resource components independently. The second part represents a constraint on availability of definition of how resources are inter-related . So in our example the cardinal semantics between the resources/objects should be static. Now that we know about resources next thing to visit is the representation of resources and Dr. Fielding's take on this is,&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;blockquote style="font-style: italic;"&gt;A representation consists of data, metadata describing the data, and, on occasion, metadata to describe the metadata (usually for the purpose of verifying message integrity). Metadata is in the form of name-value pairs, where the name corresponds to a standard that defines the value's structure and semantics. Response messages may include both representation metadata and resource metadata: information about the resource that is not specific to the supplied representation.&lt;/blockquote&gt;&lt;blockquote style="font-style: italic;"&gt;Control data defines the purpose of a message between components, such as the action being requested or the meaning of a response. It is also used to parameterize requests and override the default behavior of some connecting elements. For example, cache behavior can be modified by control data included in the request or response message.&lt;/blockquote&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;The representation of a resource in different media type format (referred to as data, while the media type itself is a metadata) is just part of the architecture and not architecture itself. The messages should be self-descriptive, the representation format for the resource should respect other resources as they are and the manipulation of all resources and their relations to other resources should be done through transition of states. So if I want to change the cover image of a Book resource I should be able to do it using a PUT command of HTTP.&lt;/p&gt;&lt;p&gt;Now here is where the confusion lies - lets say I am using Java on the server to respond to the requests. If I am using &lt;a href="https://jersey.dev.java.net/"&gt;Jersey&lt;/a&gt;+&lt;a href="http://jcp.org/aboutJava/communityprocess/final/jsr311/index.html"&gt;JAX-RS&lt;/a&gt; stack and application/xml as media type, there is a good chance that I am also using &lt;a href="https://jaxb.dev.java.net/"&gt;JAXB&lt;/a&gt; (not that its mandatory, one can use their on converters, known Producer and Consumer) for converting your resource object to XML; I will see that Book is converted to a XML which contains the representations of authors and other related resources and sub-resources within them. This creates multiple problems, e.g.,&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Why do I need to get all entity sets of a resource and its sub or related resources, while I do not need them? Which will cause an additional and not-required payload to be submitted over network.&lt;/li&gt;&lt;li&gt;How do I manipulate any related resources of book without actually transmitting the whole book, e.g. author(s)?&lt;/li&gt;&lt;li&gt;How do I sent different set of control bytes for different resources linked within the Book?&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;IMHO, here is where the principal of REST is violated, unless the answers to the above like questions are positive. So if we are to design a RESTful API we should consider not only the representation part but also the manipulation and saying so, IMHO, using different HTTP commands (or equivalent for other protocols) is not sufficient but actually designing the resource semantics such that it can be manipulated partly and totally (depending on requirements and other factors) is a must as well.&lt;/p&gt;&lt;p&gt;Another important component of the architecture, which is not mentioned in the definition of REST (probably because it was reason of REST coming to existence) is &lt;a href="http://www.ics.uci.edu/%7Efielding/pubs/dissertation/rest_arch_style.htm#sec_5_1_5"&gt;&lt;span style="font-style: italic;"&gt;Uniform Interface&lt;/span&gt;&lt;/a&gt;. The only thing it does not mention explicitly mentioned as a constraint is that the representation format also should be uniform or conform to established standards, so that its readable in a uniform manner by the clients, e.g. how resources are linked - in HTML it should be &lt;a href="http://www.w3schools.com/TAGS/tag_link.asp"&gt;&amp;lt;link&amp;gt;&lt;/a&gt;, in XML it should be &lt;a href="http://www.w3schools.com/xlink/default.asp"&gt;XLink&lt;/a&gt; etc.&lt;/p&gt;&lt;p&gt;So here is my checklist for building a RESTful system:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Identify resources and their identifier. Deduce the problem domain well to divide them to as many independent component as possible.&lt;/li&gt;&lt;li&gt;Choose the states well for transiting between resource states for the specific protocol. E.g. if protocol is &lt;a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol"&gt;HTTP&lt;/a&gt; you might map the methods as mentioned &lt;a href="http://en.wikipedia.org/wiki/REST#RESTful_example:_the_World_Wide_Web"&gt;here&lt;/a&gt;; that is not enough, HTTP headers and response codes should  be &lt;a href="http://www.networksorcery.com/enp/protocol/http.htm"&gt;choosen&lt;/a&gt; appropriately; for example cache control, compression.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Resources should refer to individual resources by their &lt;a href="http://en.wikipedia.org/wiki/URI"&gt;URI&lt;/a&gt;; state transition for relation between resources might (not sure but IMHO must) be implemented as well.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The representation format should follow established norms. E.g. &lt;a href="http://www.w3schools.com/xml/default.asp"&gt;XML&lt;/a&gt; representation format should have a &lt;a href="http://www.w3schools.com/dtd/"&gt;DTD&lt;/a&gt; or  &lt;a href="http://www.w3schools.com/Schema/default.asp"&gt;XSD&lt;/a&gt; as a metadata to the representation.&lt;a href="http://www.w3schools.com/Schema/default.asp"&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;In context of our book sales aggregator example I want to elaborate my understanding of some of the above mentioned checkpoints. Firstly we have  (tentatively) identified our resources; next I would want to create useful identifier for them. For Book it would be , for Author it would be email address, for Publisher it would be their name in same formatting as a blog or wiki page title and so on. In my XML representation of book, I would have a element encapsulating all authors, it would in fact be &lt;span style="font-style: italic;"&gt;&amp;lt;authors&amp;gt;&lt;/span&gt;; and every &lt;span style="font-style: italic;"&gt;&amp;lt;author&amp;gt;&lt;/span&gt; in would refer to the author resource using XLink. I would have the following for updating the author relation with book - &lt;span style="font-style: italic;"&gt;/books/{ISBN}/authors/[slot/{index}]?&lt;/span&gt;. Now lets say I want to get the 1st Author for Book A, then my URI would be &lt;span style="font-style: italic;"&gt;/books/A/authors/slot/0;&lt;/span&gt; the response message could be either a XML pointing to the Author's URI or (my choice) use &lt;a href="http://en.wikipedia.org/wiki/List_of_HTTP_status_codes"&gt;HTTP response status code&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/HTTP_302"&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;302&lt;/span&gt;&lt;/a&gt;; also I would make use &lt;a href="http://en.wikipedia.org/wiki/HTTP_compression"&gt;HTTP compression&lt;/a&gt; using the headers. IMHO rest of the checkpoints are trivial.&lt;/p&gt;&lt;p&gt;I would like to end this writeup by stating why I came up with this post . I am working on the framework stated at the beginning to make infrastructure code for common tasks, such as versioning, full text search, DAOs and representations of domain objects in various media type available out of the box. For versioning and representing domain objects I could not find a better way than REST. I am also working on another project which needs Web Services to interface with clients; my past experience with SOAP was sour enough for me to look into alternatives and I chose RESTful WS, but later realized it was nothing but RESTlike WS or XML/JSON over HTTP. Furthermore this writeup just expresses my understanding and in some case thoughts of RESTful architecture, so if you feel I have misunderstood or made any mistake, feel free to correct me :). If you are interested in more details of implement REST over HTTP please &lt;a href="http://www.infoq.com/articles/rest-introduction"&gt;check this out&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-3504500429252670555?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/3504500429252670555/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2009/07/restful-architecture.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3504500429252670555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3504500429252670555'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2009/07/restful-architecture.html' title='RESTful Architecture'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-4679000249347714502</id><published>2009-01-18T20:01:00.000-08:00</published><updated>2009-01-19T19:22:25.137-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openoffice3'/><category scheme='http://www.blogger.com/atom/ns#' term='vga'/><category scheme='http://www.blogger.com/atom/ns#' term='sound'/><category scheme='http://www.blogger.com/atom/ns#' term='pidgin'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='hardy'/><title type='text'>Upgrading from Ubuntu Fiesty Fawn (7.04) to Hardy Heron (8.04)</title><content type='html'>Since I have procured my laptop I have been using Ubuntu Fiesty Fawn (7.04) on it and I was more than satisfied until its support period expired on Jan 2009; I was compelled to upgrade and I did not want to take the hassle of upgrading again in the lifetime of this laptop so I decided to upgrade to Hardy Heron (8.04 LTS) (via Gutsy Gibbon). This writeup is my experience on this upgrade procedure.&lt;br /&gt;&lt;br /&gt;My laptop is a Acer  5585WXMi, with GeForce Go 7300 VGA card, 802.11a/b/g WLAN, 5-in-1 Card Reader and Bluetooth built-in. In Fiesty all devices were recognized perfectly other than the Card Reader, did not spent much time on it since it was not much used by me.&lt;br /&gt;&lt;br /&gt;The first hitch I faced was I found that Fiesty repository aren't there anymore so I disabled them from APT source list (/etc/apt/source.list or package manager). Then I started upgrading to Gutsy. During package installation it was trying to modify some configurations that I had earlier edited for my usage and also some which I had never touched :), so I looked at the difference (both upgrade from console and UI has it - 'd' from console) and took appropriate action. Most cases I let it override, the exception was MySQL and some other packages. The first problem I faced after upgrading to Gutsy was the display as it was stuck with 640x480 resolution and it was quite frustrating, but before spending more time on it I moved on to upgrading to Hardy.&lt;br /&gt;&lt;br /&gt;During upgrading to Hardy all went smooth except for Slapd upgradation failed because the slapd database had data from unconfigured domain which was okey @ Fiesty and Gutsy. So after installation I manually restored the data from the backedup LDIF file and Slapd configuration was successful. But VGA was a pain as usual :(. Cutting the long story short to &lt;span style="font-style: italic; font-weight: bold;"&gt;get the VGA to work&lt;/span&gt; all I had to do was enable the restricted NVidia driver and &lt;span style="font-style: italic;"&gt;delete the /etc/X11/xorg.conf&lt;/span&gt; (obviously after backing up), followed by OS reboot and guess what now I can enjoy 1280x800 resolution :). Now a side note - I got the 'vesa' driver to work with 1024x768 but the problem was everything was vertically squeezed and it was depressing especially to view the photographs I took myself. Plus I also ran into &lt;span style="font-weight: bold; font-style: italic;"&gt;problem using MSN &amp;amp; GTalk&lt;/span&gt; with Pidgin because of SSL lib issue (I am not certain why, but it could be related to my attempt to install pidgin on fiesty from source without SSL). So I uninstalled pidgin related packages and installed it from source by the help of &lt;a href="http://yisheng.wordpress.com/2008/08/20/compile-pidgin-250-for-ubuntu/"&gt;this post&lt;/a&gt;; please add '--with-system-ssl-certs=/etc/ssl/certs' option during build else you will face unwanted hazards with certificate chain. Another problem faced was the &lt;span style="font-weight: bold; font-style: italic;"&gt;Flash plugin of Firefox was not producing sound&lt;/span&gt;. For that I simply set all devices @ System -&gt; Preferences -&gt; Sound to use ALSA (by default it is PulseAudio). Plus I needed &lt;span style="font-weight: bold; font-style: italic;"&gt;support for 'docx'&lt;/span&gt; and for that I needed OpenOffice 3. So I uninstalled all OpenOffice packages from my installation and downloaded DEB packages from &lt;a href="http://download.openoffice.org/other.html#en-US"&gt;OpenOffice.org&lt;/a&gt; and installed them using 'dpkg'. After main DEBs are installed check the DEB folder for another DEB @ 'desktop-integration/', that will create the menu shortcuts for you.&lt;br /&gt;&lt;br /&gt;For photographers and users interested in graphics package you will find 'ubuntustudio-graphics' package useful, one might also find other ubuntustudio packages (&lt;span style="font-style: italic;"&gt;apt-cache search ubuntustudio&lt;/span&gt;) useful - it has audio, video, desktop etc. packages for enthusiasts and professionals.&lt;br /&gt;&lt;br /&gt;In a nutshell, now my Hardy is totally under control and I am enjoying using it :), so if anyone has not upgraded to Hardy yet please do so :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-4679000249347714502?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/4679000249347714502/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2009/01/upgrading-from-ubuntu-fiesty-fawn-704.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/4679000249347714502'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/4679000249347714502'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2009/01/upgrading-from-ubuntu-fiesty-fawn-704.html' title='Upgrading from Ubuntu Fiesty Fawn (7.04) to Hardy Heron (8.04)'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-4519668478342123309</id><published>2008-09-10T01:09:00.000-07:00</published><updated>2008-09-10T23:40:50.967-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><title type='text'>Why Python?</title><content type='html'>For long I have been wondering "Why Python?" - why is python gaining popularity? Why do many prefer python for all sorts of work? Myself being a Java fan (some of my friends say fan-atic) it makes it more interesting to me to understand the reason behind its uprising.&lt;br /&gt;&lt;br /&gt;I am a software engineer mainly working on enterprise systems with Java. One of my hobby is to write scripts for anything that I (might) have to repeat in near future. I usually prefer shell scripting for writing scripts. But for some particular tasks, like converting seconds to ISO8601 formatted date string, multi-threaded http request and response handling with file i/o; I needed something extra for these as shell script was becoming overly complicated.&lt;br /&gt;&lt;br /&gt;From all the buzz about Python I said myself let me give it a shot and check it out. I have to admit that I was astounded, stupefied , awed at how simple and powerful it was to achieve all that I needed for my use case. It took me just about to 3 hours to get Python 2.5, IDLE installed and write my first 2 programs which the do the following tasks-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Take seconds as input from command line argument and print its ISO8601 equivalent.&lt;/li&gt;&lt;li&gt;Take URLs as input and take 'n' samples for their response-time and total duration while all URLs should perform these tasks in parallel.&lt;/li&gt;&lt;/ol&gt;Not only have I learnt new languages earlier, I was also a Lab Instructor and Teaching Assistant for programming courses, from my experience to say that I will get these things done within 2 hours without having even read ANY article on Python or knowing nothing about it in the past, I have to say that its awesome (Please let me know if you feel I was slow). It was down to simplicity of the language compounded with fluent syntax and excellent documentation. Within the time mentioned I learnt and used Objects, Collections, Classes, Control flows (if, for), Exception handling, File I/O and Threads. If you are interested to checkout what I achieved you can checkout them out &lt;a href="http://repo.or.cz/w/git-modules-bs.git?a=tree;f=python;hb=HEAD"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;From what I read later, I learnt that its equally simple to build UIs with Python and with some Googling I learnt of Google App Engine, which just makes developers life easy (at least thats what its there for).&lt;br /&gt;&lt;br /&gt;I plan to do more work Python in near future and learn it and master it. If you have not yet tried Python, then I recommend to do ASAP and enjoy it.....&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-4519668478342123309?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/4519668478342123309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/09/why-python.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/4519668478342123309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/4519668478342123309'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/09/why-python.html' title='Why Python?'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-5262235275480568263</id><published>2008-05-03T21:04:00.000-07:00</published><updated>2008-05-03T21:09:16.546-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firewall'/><category scheme='http://www.blogger.com/atom/ns#' term='linux'/><category scheme='http://www.blogger.com/atom/ns#' term='ufw'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Setting up firewall in Ubuntu</title><content type='html'>Though I am not a server or network administrator I have always been interested in learning how to secure a network. From some initial reading I learned that firewall is the starting point and trust me when I say that with Ubuntu 8.04 Server (code-named 'Hardy Heron') its seriously easy to setup a firewall. This article of mine will attempt to show beginners like myself how easy it is.&lt;br /&gt;&lt;br /&gt;I am assuming that readers will have Hardy Heron installed before embarking on testing out the firewall. Once its installed once install the firewall front end 'ufw' using the following command -&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;font-family:courier new;" &gt;sudo apt-get install ufw&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;For details reading on it one may try the &lt;a href="https://wiki.ubuntu.com/UbuntuFirewall"&gt;Ubuntu wiki&lt;/a&gt; or 'man ufw'. So now I can get started in doing what I wanted to.&lt;br /&gt;&lt;br /&gt;We have a network at my place and I want to restrict SSH from IPs other than mine and not only that I also want to ensure that pinging my servers return nothing. Being a newcomer to network firewalling to me it would be quite nice to achieve it. In general what I have seen for SSH is, there is only one gateway for the outside world to SSH into a network and from there one can SSH to the servers one is permitted to. Now SSH'ng the Gateway could be made further challening by specifying a IP to achieve which one has to be connected to the network VPN. Does it sound complicated to achieve? After using UFW I am pretty confident its not that difficult to set something up like this and hopefully you will feel the same.&lt;br /&gt;&lt;br /&gt;I will skip the VPN part as that is a topic of it self and hopefully will have a writeup on how-to set it up sometime soon; setting a VPN server is not that difficult either thanks to &lt;a href="http://openvpn.net/"&gt;OpenVPN&lt;/a&gt;, so interested readers if required can jump into it. My target is to block ping and block SSH from any IP other than my designated range.&lt;br /&gt;&lt;br /&gt;Once one has UFW installed, first step would be to enable it and to that use the following command -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;sudo ufw enable&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Once it is enabled and one wants to check the status, one can use the following to see it -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;sudo ufw status&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;If one wants to enable logging one can do -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;sudo ufw logging on&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;I suppose one can easily guess how to turn logging 'off'.&lt;br /&gt;The next step would be to instruct firewall to allow SSH from a particular IP or IP range. One can use the following command respectively to allow if for the 2 cases mentioned above -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;sudo ufw allow from 192.168.0.104 to 192.168.0.113 port 22&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;sudo ufw allow from 192.168.0.0/24 to 192.168.0.113 port 22&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;Now the obvious question could be why mention to IP address, its because a server may have more than 1 IP address and to mention which IP address this rule would apply to the to IP address is required. If you wondering how to calculate IP range you might want to have a look at the &lt;a href="http://en.wikipedia.org/wiki/IP_address"&gt;wikipedia page&lt;/a&gt; and &lt;a href="http://www.csgnetwork.com/ipinfocalc.html"&gt;IP Address range calculator&lt;/a&gt;.&lt;br /&gt;Now one will need to ensure that default policy is deny and to achieve that issue the following command -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt;sudo ufw default deny&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;At this point I feel that I should also mention how delete a rule; its simply just add 'delete' before the start of rule definition. For example, for the rules of SSH one can issue the following commands to delete them -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-style: italic;"&gt;sudo ufw delete allow from 192.168.0.104 to 192.168.0.113 port 22&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt; sudo ufw delete allow from 192.168.0.0/24 to 192.168.0.113 port 22&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;At this point I was thinking since default is deny and I have specified only port 22 to be open for a particular IP range then ping should not work and thinking that I pinged the server but to my astonishment I got reply. Then I started to Google and I found &lt;a href="https://answers.launchpad.net/ufw/+question/26585"&gt;this&lt;/a&gt;. Following it I commented out the following line from /etc/ufw/before.rules -&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;span style="font-style: italic;"&gt; -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left;"&gt;And pinging again returned nothing to my liking.&lt;br /&gt;&lt;br /&gt;Now with combination off OpenVPN and UFW one can easily achieve a somewhat securer environment; saying so I actually loved the statement of Linus Trovalds when he said security is build on network of trust in his talk at &lt;a href="http://imyousuf-tech.blogs.smartitengineering.com/2007/12/git-starting-using-git-as-your-scm.html"&gt;Google regarding GIT&lt;/a&gt;. I am also a newbie to secure networking domain so please feel free to drop by your comments on the issue. If you are wondering why would I use UFW you can have a look at the small discussion in the comments section of &lt;a href="http://www.ubuntugeek.com/ufw-uncomplicated-firewall-for-ubuntu-hardy.html"&gt;this posting&lt;/a&gt;.&lt;br /&gt;&lt;/div&gt;&lt;/div&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/5265194643022445353-5262235275480568263?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/5262235275480568263/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/05/setting-up-firewall-in-ubuntu.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5262235275480568263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5262235275480568263'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/05/setting-up-firewall-in-ubuntu.html' title='Setting up firewall in Ubuntu'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-3188114130220137312</id><published>2008-04-18T05:44:00.000-07:00</published><updated>2008-04-19T04:43:33.256-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='code generation'/><title type='text'>Code generation made easy using patterns</title><content type='html'>Since starting developing some code generation plugins (&lt;a href="http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-tostring-for-java.html"&gt;toString() generator&lt;/a&gt; and &lt;a href="http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-java-util-logger.html"&gt;Java Util Logger Generator&lt;/a&gt;) using/for the &lt;a href="http://www.netbeans.org/community/releases/61/"&gt;NetBeans 6.1Beta&lt;/a&gt; I have learnt a lot and the more I worked on it I kept asking myself how could I make it easier. Once both the plugins took rudimentary form I learnt and discovered that patterns could make this task whole lot easier for me. So I started re-implementing the Logger generator (if you are interested in getting the resources please check the logger blog) plugin.&lt;br /&gt;&lt;br /&gt;Now I wanted to implement that the plugin will search for System.out.print(ln) and out.print(ln) if static import exists. In doing so I had to walk the PARSED tree of a Java Source file. Just to give me a flavour that I am implementing something cool I called it JavaSourceTreeParser. Basically what it does is breaks down each every Java Statement to a form which can not be further decomposed. In the initial version the conversion was done in the parser it self (&lt;a href="http://code.google.com/p/smart-codegen/source/detail?r=21"&gt;Revision 21&lt;/a&gt;). Then it felt that I could easily use &lt;a href="http://en.wikipedia.org/wiki/Observer_pattern"&gt;Observer pattern&lt;/a&gt; for it and after implementing it (&lt;a href="http://code.google.com/p/smart-codegen/source/detail?r=31"&gt;Revision 31&lt;/a&gt;) I saw that I am right and I achieved something which every code generator can use. (As I use &lt;a href="http://imyousuf-tech.blogs.smartitengineering.com/2007/12/git-starting-using-git-as-your-scm.html"&gt;GIT SCM&lt;/a&gt; I usually work offline and make bunch of commits together so dont worry how I make multiple commits at a go :)).&lt;br /&gt;&lt;br /&gt;Once implementing it I found that for performance improvement and communication between various listeners I felt the need of session for state information sharing and then I decided to use &lt;a href="http://en.wikipedia.org/wiki/Composite_pattern"&gt;Composite pattern&lt;/a&gt; for the purpose. and it also worked like a charm and as a result improving the overall performance of the plugins. The following diagram might give an idea how to use it using the API I designed.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kWF3--nlqu8/SAnZMBhzgVI/AAAAAAAAAn8/PB3tce9-UqE/s1600-h/CondeInjection.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_kWF3--nlqu8/SAnZMBhzgVI/AAAAAAAAAn8/PB3tce9-UqE/s320/CondeInjection.png" alt="" id="BLOGGER_PHOTO_ID_5190918846113087826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What I implemented in the listener simply that the listener will get notified whenever the parser come across a particular type of tree, for System.out.println it would be MethodInvocationTree (Kind.METHOD_INVOCATION), and the listener according to its implementation will handle the Tree; in my case I replaced the method invocation with a logger invocation. In case where I inserted a Log method at the beginning of every method body I listened to Kind.METHOD. Now I am implementing Log insertion for Throw, Return and End of Method block. In process I will also add parsing life cycle listener to the API so that modification to the class is done only once when the parsing is completed. I hope this API helps users interested in code generation. I am very interested to learn what users think about it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-3188114130220137312?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/3188114130220137312/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/04/code-generation-made-easy-using.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3188114130220137312'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3188114130220137312'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/04/code-generation-made-easy-using.html' title='Code generation made easy using patterns'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kWF3--nlqu8/SAnZMBhzgVI/AAAAAAAAAn8/PB3tce9-UqE/s72-c/CondeInjection.png' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-594644786086753691</id><published>2008-04-15T00:47:00.000-07:00</published><updated>2008-04-15T01:38:39.079-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='code generation'/><title type='text'>NetBeans: Generating Java Util Logger</title><content type='html'>Java Util Logger has enabled us to ship application without having dependency on any external JARs or APIs for logging purpose. After starting to use it I felt the necessity of a Logger creation tool which will create and initialize a logger for me instead of me either writing it or Copy-Pasting it for every file or worse every class. Also using a tool will enable me to maintain a coherence of naming and initialization of loggers across a project.&lt;br /&gt;&lt;br /&gt;With the release of Java Source API with &lt;a href="http://www.netbeans.org/community/releases/61/"&gt;NetBeans 6.1Beta&lt;/a&gt; I finally got the chance to write such a tool for myself :). In sequence with my &lt;a href="http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-tostring-for-java.html"&gt;toString() generator&lt;/a&gt; module I started this module as well. You can &lt;a href="http://code.google.com/p/smart-codegen/downloads/list"&gt;download the NBM file&lt;/a&gt; and &lt;a href="http://wiki.netbeans.org/InstallingAPlugin"&gt;install it&lt;/a&gt; as it is free and open source. How-to of this tool is as follows.&lt;br /&gt;&lt;br /&gt;Basically what I needed for it can be stated in 3 steps -&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Parse/read the Java File&lt;/li&gt;&lt;li&gt;Find declared classes&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Check if Logger exists if not create it and add utility methods.&lt;/li&gt;&lt;/ol&gt;With the new &lt;a href="http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-java-source/"&gt;Java Source API&lt;/a&gt; and &lt;a href="http://java.sun.com/javase/6/docs/jdk/api/javac/tree/"&gt;Java Compiler Tree API&lt;/a&gt; it is nothing more than simple tree traversing for the purpose. You can have a peek at the implementation in the &lt;span class="pln"&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: arial;"&gt;addLogger&lt;/span&gt;&lt;/span&gt; method in &lt;a href="http://code.google.com/p/smart-codegen/source/browse/trunk/development/nbmodule-projects/LoggerGenerator/src/com/smartitengineering/loggergenerator/LoggerGenerationFactory.java"&gt;the source file&lt;/a&gt; (after opening the file 'Find' might be useful). One will find &lt;a href="http://wiki.netbeans.org/Search.jsp?query=TreeMaker"&gt;these NetBeans Wiki pages&lt;/a&gt; being helpful.&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/5265194643022445353-594644786086753691?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/594644786086753691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-java-util-logger.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/594644786086753691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/594644786086753691'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-java-util-logger.html' title='NetBeans: Generating Java Util Logger'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-1548012474186248621</id><published>2008-04-02T22:29:00.000-07:00</published><updated>2008-04-02T23:44:21.184-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><category scheme='http://www.blogger.com/atom/ns#' term='code generation'/><title type='text'>NetBeans - Generating toString for Java classes</title><content type='html'>My friend and colleague &lt;a href="http://shamsmi.blogspot.com/"&gt;Shams&lt;/a&gt; developed a maven plugin to generate toString and equals method using Eclipse source code manipulation API and since then, being a NetBeans fan, I wanted to develop a similar component using NetBeans API. Though the Java Source API of NetBeans was available in the developer version, but it is finally going to be released with &lt;a href="http://www.netbeans.org/community/releases/61/"&gt;NetBeans 6.1&lt;/a&gt; and one can have a look at it in 6.1Beta release.&lt;br /&gt;&lt;br /&gt;So I started doing what I have been wanting to do for a long time :) - develop a NetBeans module to generate toString() for my Java classes. In this endeavour I came up with this &lt;a href="http://code.google.com/p/smart-codegen/"&gt;open source project&lt;/a&gt;. In the generation of toString() I added iteration over array and collection over what Shams did. Users can simply &lt;a href="http://code.google.com/p/smart-codegen/downloads/list"&gt;download the NBM&lt;/a&gt; file from here and &lt;a href="http://wiki.netbeans.org/InstallingAPlugin"&gt;install it&lt;/a&gt; into your NetBeans 6.1 installation. To confirm that the installation is successful check the "Source" menu and you should see "Generate toString()" at the top of the list. To see the module in action simply open a Java Source file and choose the menu action and you will see that it will add/replace toString() methods of the classes in the file.&lt;br /&gt;&lt;br /&gt;As future works to this plugin I have plans to add it to the context menu in project explorer for Java projects, provide a UI for user to choose what properties should be in toString and whether to replace toString or not. Additionally generate the current toString content in a separate method and invoke it from toString().&lt;br /&gt;&lt;br /&gt;I also have plans for further plugins ; lets hope I have enough time for it :). Please create issues  in the project to report issues or enhancements. Participation in development is most welcomed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-1548012474186248621?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/1548012474186248621/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-tostring-for-java.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/1548012474186248621'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/1548012474186248621'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/04/netbeans-generating-tostring-for-java.html' title='NetBeans - Generating toString for Java classes'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-5466139114520027702</id><published>2008-03-02T20:41:00.000-08:00</published><updated>2008-03-02T21:18:31.068-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Picasa on Ubuntu</title><content type='html'>I like Picasa to share photographs with my friends and relatives. I find it quiet annoying to use Picasaweb to upload pictures, Picasa (the desktop application) is just so cool. Thus I decided to install it on my Ubuntu; before starting the installation I did not except it to be a walk in the park, believe it or not it was.&lt;br /&gt;&lt;br /&gt;Install Wine as specified &lt;a href="http://imyousuf-tech.blogs.smartitengineering.com/2007/07/stickies-on-ubuntu.html"&gt;in this blog&lt;/a&gt;; Then type winecfg in your console and you will see a GUI popping up. Ensure that your &lt;span style="font-style: italic;"&gt;Windows Version&lt;/span&gt; in the &lt;span style="font-style: italic;"&gt;Applications&lt;/span&gt; tab is Windows XP. Download &lt;a href="http://picasa.google.com/"&gt;Picasa&lt;/a&gt; and double click the exe it should start the installer in the Wine emulator; if not use the following command -&lt;br /&gt; wine (Path-to-exe)/picasaweb-current-setup.exe&lt;br /&gt;Now proceed with the installation as you would in Windows. If you choose to have a desktop shortcut you will see one in your desktop double clicking it would start picasa in your wine emulator. You can also start Picasa from your Applications -&gt; Wine -&gt; Programs -&gt; Picasa2 -&gt; Picasa2; you will also find the uninstall action there (which I did not use).&lt;br /&gt;Now you can enjoy using Picasa on your Ubuntu; Happy Image Sharing!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-5466139114520027702?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/5466139114520027702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/03/picasa-on-ubuntu.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5466139114520027702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5466139114520027702'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/03/picasa-on-ubuntu.html' title='Picasa on Ubuntu'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-6788497794363425408</id><published>2008-02-27T18:59:00.000-08:00</published><updated>2008-02-27T19:54:18.038-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>Finding files in jars by their content</title><content type='html'>While doing a bug hunting we needed to find a file containing a certain string and we did not know where to look for it. At one stage of "file hunting" we needed to be able to search for the file in jars (Java Archives). Thus in searching for it we came up with &lt;a href="http://repo.or.cz/w/smart-shell-script.git?a=blob;f=search-jar.sh;h=40b8df6c9e30bd12cf61864d5bf5db406cb0e02f;hb=HEAD"&gt;this shell script&lt;/a&gt;; using this script not only can we find jars containing certain filename but also search file content to get results. Lets take three use cases - &lt;span style="font-style: italic;"&gt;"I want to find jars that contain .properties file"&lt;/span&gt;, &lt;span style="font-style: italic;"&gt;"I want to find jars containing .properties file containing the word com.smartitengineering"&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;"I want to find jars, whose name has smart, containing .properties file containing the word com.smartitengineering"&lt;/span&gt;. Using the script all these use cases can be achieved by using the following commands respectively:&lt;br /&gt;&lt;br /&gt;./search-jar.sh - /home/user/ .properties -&lt;br /&gt;./search-jar.sh - /home/user/ .properties com.smartitengineering&lt;br /&gt;./search-jar.sh *smart*.jar /home/user/ .properties com.smartitengineering&lt;br /&gt;&lt;br /&gt;The command takes exactly 4 arguments - jar_filename_pattern, search_dir_path, search_file_name and content_to_search. If jar_filename is "-" than it will search within all jars within search_dir_path. If content_to_search is "-" it will not search for content, but rather jars with certain filename.&lt;br /&gt;&lt;br /&gt;As the script is in open domain I would appreciate if users would make their own edit and submit or request for features through this post's comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-6788497794363425408?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/6788497794363425408/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/02/finding-files-in-jars-by-their-content.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/6788497794363425408'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/6788497794363425408'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/02/finding-files-in-jars-by-their-content.html' title='Finding files in jars by their content'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-2230404783378655748</id><published>2008-01-11T02:15:00.000-08:00</published><updated>2008-01-11T02:29:23.113-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Ubuntu: Getting Java Applets to work with Firefox</title><content type='html'>I was having problem to get Applet working in Firefox, primarily because I work with manually installed JDKs (that is not downloaded using apt-get). I did the following to get Applets working going through the following procedure.&lt;br /&gt;&lt;br /&gt;locate libjavaplugin_oji.so&lt;br /&gt;&lt;br /&gt;After I do this I will get the list of this file present in my machine. In my case one of the paths was -&lt;br /&gt;&lt;br /&gt;/opt/jdk1.6.0_01/jre/plugin/i386/ns7/libjavaplugin_oji.so&lt;br /&gt;&lt;br /&gt;Now I did the following and restarted my machine -&lt;br /&gt;&lt;br /&gt;sudo ln -s /opt/jdk1.6.0_01/jre/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/libjavaplugin_oji.so&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;After this I got applets to work in Mozilla Firefox. Just for fun delete the symlink and without restarting the browser check whether you can see the applet or not :).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-2230404783378655748?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/2230404783378655748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/01/ubuntu-getting-java-applets-to-work.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/2230404783378655748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/2230404783378655748'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/01/ubuntu-getting-java-applets-to-work.html' title='Ubuntu: Getting Java Applets to work with Firefox'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-6825080021444673905</id><published>2008-01-02T23:01:00.000-08:00</published><updated>2008-01-02T23:26:14.737-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><title type='text'>Propagating GIT commands to its submodules</title><content type='html'>GIT submodules is an idea (of many) that actually played an extremely important role in me moving to GIT. As a new user I started playing around with GIT and I noticed that GIT commands executed on the parent module is not propagated to the child modules. In some use cases it would be extremely useful (at least for me) to be able to be propagate a command from the master module to all its child at all depth. I wrote &lt;a style="font-weight: bold;" href="http://imyousuf.100webspace.net/blog-demo/shell-script/git-modules.txt"&gt;this bash shell script&lt;/a&gt; to simply propagate commands from parent to its child. To use this script you can simply do the following (I am assuming that the TXT will have the name git-modules and will be an executable in $PATH):&lt;br /&gt;&lt;blockquote&gt;for: git-pull&lt;br /&gt;do: &lt;span style="font-style: italic;"&gt;git-modules pull&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for: git-status&lt;br /&gt;do: &lt;span style="font-style: italic;"&gt;git-modules status&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for: git-commit -a -m "This is a test commit"&lt;br /&gt;do: &lt;span style="font-style: italic;"&gt;git-modules commit -a -m "This is a test commit"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;for: git-checkout master&lt;br /&gt;do: &lt;span style="font-style: italic;"&gt;git-modules checkout master&lt;/span&gt;&lt;/blockquote&gt;Basically any git-X command can be simply be done as &lt;span style="font-weight: bold; font-style: italic;"&gt;"git-modules X args-as-usual"&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;I would really appreciate/welcome criticism, feedback and addition to the script. I will be publishing it to the repo.or.cz tomorrow after a little bit more testing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-6825080021444673905?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/6825080021444673905/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/01/propagating-git-commands-to-its.html#comment-form' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/6825080021444673905'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/6825080021444673905'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2008/01/propagating-git-commands-to-its.html' title='Propagating GIT commands to its submodules'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-8186345647447195242</id><published>2007-12-31T20:37:00.000-08:00</published><updated>2008-01-06T18:55:14.382-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='git'/><title type='text'>GIT: Starting using GIT as your SCM</title><content type='html'>I am a user of SVN and was a fan of it as well. But the following video demonstrated some requirements of SCM which I liked a lot Especially as I want to work distributed, offline, modular and essentially fast GIT came to me as a gift and I want to share it with everyone. This Tech talk from Linus actually convinced me to take a deep look at &lt;a href="http://git.or.cz/"&gt;GIT&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;object height="355" width="425"&gt;&lt;param name="movie" value="http://www.youtube.com/v/4XpnKHJAok8&amp;amp;rel=1"&gt;&lt;param name="wmode" value="transparent"&gt;&lt;embed src="http://www.youtube.com/v/4XpnKHJAok8&amp;amp;rel=1" type="application/x-shockwave-flash" wmode="transparent" height="355" width="425"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Then &lt;a style="font-weight: bold;" href="http://www.youtube.com/watch?v=8dhZ9BXQgc4"&gt;this video&lt;/a&gt; (which for some reason YouTube does not allow to embed) actually helped me understand more about how GIT works and some tips to work better with GIT.&lt;br /&gt;&lt;embed style="width: 400px; height: 326px;" id="VideoPlayback" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-3999952944619245780&amp;amp;hl=en" flashvars=""&gt;&lt;/embed&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://ktown.kde.org/%7Ezrusin/git/git-cheat-sheet-medium.png"&gt;This image&lt;/a&gt; could be helpful enough to have it beside your desk and it also has a &lt;a href="http://ktown.kde.org/%7Ezrusin/git/git-cheat-sheet-large.png"&gt;larger resolution&lt;/a&gt; one if you want it. These images and other documentation are available at the &lt;a href="http://git.or.cz/gitwiki"&gt;GIT Wiki&lt;/a&gt; site. If you are looking for a extended cheat sheet you can &lt;a href="http://jan-krueger.net/development/git-cheat-sheet-extended-edition"&gt;find it here&lt;/a&gt;. If you are looking for the manual &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html"&gt;its here&lt;/a&gt; and you might also find the &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html"&gt;"Everyday GIT ..."&lt;/a&gt; page helpful. Some useful How-To s can be &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/howto/"&gt;found here&lt;/a&gt;. If you are looking for how to setup a hook, have a look &lt;a href="http://www.kernel.org/pub/software/scm/git/docs/hooks.html"&gt;here&lt;/a&gt;; you can also simply find those scripts doing &lt;span style="font-style: italic;"&gt;locate hooks&lt;/span&gt; in your linux box.&lt;br /&gt;&lt;br /&gt;I have developed such likings towards GIT to the extend that I have started writing a &lt;a href="http://maven.apache.org/scm/scms-overview.html"&gt;Maven2 SCM Provider&lt;/a&gt; for GIT (using the Mercurial provider as example). Once I am done with it I will also be writing a NetBeans VCS Plugin again in light of the Mercurial plugin (if no VCS plugin for GIT is available in NetBeans prior to that).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-8186345647447195242?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/8186345647447195242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/git-starting-using-git-as-your-scm.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/8186345647447195242'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/8186345647447195242'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/git-starting-using-git-as-your-scm.html' title='GIT: Starting using GIT as your SCM'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-7452695607443558240</id><published>2007-12-27T19:44:00.000-08:00</published><updated>2007-12-27T20:13:22.253-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><title type='text'>Retreiving all classes in a package</title><content type='html'>Straight to the point - I had to list all ReadOnly attributes for my domain objects as I had to list them in the office Wiki. I had several of them and doing that manually would be tiring (not to mention that I actually do not like documentation that much), I had to find a shortcut and only way is to use reflection; the next question was - how can I just simply mention the package and it will do the rest for me, so after Googling I could not find a solution to my liking so I thought of writing one myself and it took 10~15 minutes to come up with this &lt;a href="http://imyousuf.100webspace.net/blog-demo/package-browser/GenerateProperties.java"&gt;piece of code&lt;/a&gt;.&lt;br /&gt;I did the following with it and it worked nicely for me -&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;&lt;/span&gt;&lt;blockquote&gt;&lt;span style="font-family:courier new;"&gt;javac GenerateProperties.java&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;java -cp /opt/jdk1.6.0_01/jre/lib/rt.jar:./ GenerateProperties&lt;/span&gt; &lt;/blockquote&gt;If you are running your program from IDE, if you have several modules in your classpath (i.e. their target/classes/) and/or zip/jar(s) it will also search through them to list the methods. I am thinking of making a small framework, or API, out of it. I would like some enhancements on this code, please feel free to send them to &lt;a href="mailto:imran.yousuf@smartitengineering.com"&gt;me&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-7452695607443558240?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/7452695607443558240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/retreiving-all-classes-in-package.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7452695607443558240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7452695607443558240'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/retreiving-all-classes-in-package.html' title='Retreiving all classes in a package'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-3401037474509589625</id><published>2007-12-27T19:05:00.000-08:00</published><updated>2007-12-27T19:44:46.228-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='general'/><title type='text'>SMTP setting for GMail in Evolution</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_kWF3--nlqu8/R3RxBJ2cRRI/AAAAAAAAAXg/eZ9bzYpVP4k/s1600-h/Evolution-AccountEditor-GMailSMTP.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_kWF3--nlqu8/R3RxBJ2cRRI/AAAAAAAAAXg/eZ9bzYpVP4k/s320/Evolution-AccountEditor-GMailSMTP.png" alt="" id="BLOGGER_PHOTO_ID_5148864538629391634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;This post of mine involves the least technical depth probably :), it is mainly about configuring SMTP for GMail with Evolution mail client (not that it could not be figured from the image). As GMail users know GMail does not use the default SMTP port (25), the custom port number has to be mentioned in the configuration and though there is no field labelled as &lt;span style="font-style: italic;"&gt;Port&lt;/span&gt;, but users can easily set the port number as I did. Please see the red border region for it in the image - &lt;span style="font-weight: bold;"&gt;server-address:port&lt;/span&gt;. If required port number can also be provided in similar fashion for incoming mail server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-3401037474509589625?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/3401037474509589625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/smtp-setting-for-gmail-in-evolution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3401037474509589625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3401037474509589625'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/smtp-setting-for-gmail-in-evolution.html' title='SMTP setting for GMail in Evolution'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_kWF3--nlqu8/R3RxBJ2cRRI/AAAAAAAAAXg/eZ9bzYpVP4k/s72-c/Evolution-AccountEditor-GMailSMTP.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-5386921191943349861</id><published>2007-12-23T19:34:00.001-08:00</published><updated>2007-12-25T22:14:09.429-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project development'/><category scheme='http://www.blogger.com/atom/ns#' term='git'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><title type='text'>Modular project development - with Maven and GIT</title><content type='html'>For sometime I have been searching for a combination for Multi-Module project development with SCM and Project Build tool. After using and testing some tools I have settled &lt;a href="http://git.or.cz/"&gt;GIT&lt;/a&gt; and Maven; actually honestly speaking I have quite &lt;a href="http://www.youtube.com/watch?v=4XpnKHJAok8"&gt;impressed&lt;/a&gt; by GIT. Though the main repository for my projects will be either CVS and SVN because dev.java.net provides those only but the developers will be requested/encouraged to use GIT (&lt;a href="http://repo.or.cz/"&gt;through online collab&lt;/a&gt;) as their local/team SCM/VCS. As result of my conviction I have decided to start a plugin for GIT-NetBeans integration as well; Almighty willing. At first I will use it for the &lt;a href="https://databasereport.dev.java.net/"&gt;DatabaseReport&lt;/a&gt; and &lt;a href="https://jain-sip-api-adapter.dev.java.net/"&gt;JAIN SIP adapter&lt;/a&gt; projects. Everyone interested can join in any of the 3 projects (including the GIT-NetBeans Plugin).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-5386921191943349861?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/5386921191943349861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/modular-project-development-with-maven.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5386921191943349861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5386921191943349861'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/modular-project-development-with-maven.html' title='Modular project development - with Maven and GIT'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-8102999075464010232</id><published>2007-12-17T18:34:00.000-08:00</published><updated>2007-12-18T01:25:07.314-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netbeans rcp'/><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>NetBeans RCP development with Maven</title><content type='html'>I have been wanting to work with &lt;a href="http://www.netbeans.org/"&gt;NetBeans&lt;/a&gt; RCP for quite some time now, but I felt that resources were lacking; then came along API changes for NetBeans 6.0 Platform and I felt there is a lot of improvement in it, along with its &lt;a href="http://platform.netbeans.org/"&gt;platform home&lt;/a&gt;, the &lt;a href="http://www.netbeans.org/books/rcp.html"&gt;excellent RCP book&lt;/a&gt; and &lt;a href="http://www.netbeans.org/community/magazine/html/04/maven.html"&gt;Maven integration&lt;/a&gt; for plugin/suite/Rich Client Application development (I personally tested it whether it works or not and it does smoothly except that when I was reading it Figure 4 and Figure 6 were in opposite places), now I reckon NetBeans RCP as a force. The biggest advantage of NetBeans RCP that actually initially dragged me to NetBeans was the JavaHelp integration.&lt;br /&gt;I just wish NetBeans also support(s)/ed &lt;a href="http://git.or.cz/"&gt;GIT&lt;/a&gt;. Actually I am planning to add support for it in NetBeans.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-8102999075464010232?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/8102999075464010232/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/netbeans-rcp-development-with-maven.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/8102999075464010232'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/8102999075464010232'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/netbeans-rcp-development-with-maven.html' title='NetBeans RCP development with Maven'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-7096905390279834894</id><published>2007-12-12T18:39:00.000-08:00</published><updated>2007-12-12T20:14:01.050-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Killing a process in Linux</title><content type='html'>As a software developer one thing I have several times is killing a process, some people will term is as ugly or bad, but general software developers often come across situation where killing a process is handy or necessary. I will mention some use cases later in the blog.&lt;br /&gt;&lt;br /&gt;Killing a process usually involves 2 steps. Finding the process ID that is intended to be terminated and terminating it with a kill statement. Step one for general users (like myself) again involves a ps command with some grepping and then manual lookup. I have to these almost every time I kill a process. I have simply put this steps into &lt;a href="http://imyousuf.100webspace.net/blog-demo/shell-script/generic_process_kill.txt"&gt;this script&lt;/a&gt; so that I can do them in a single command. If someone has any improvements please inform me about it.&lt;br /&gt;&lt;br /&gt;The shell script expects 3 arguments, of which 2 are mandatory and 1 is optional. The first 2 are &lt;span style="font-style: italic;"&gt;grep&lt;/span&gt; params to identify the process. For example, to identify a Tomcat running &lt;a href="http://www.escenic.com"&gt;Escenic Content Engine&lt;/a&gt; I use &lt;span style="font-weight: bold;"&gt;java&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;escenic.root&lt;/span&gt; to identify the process. The third param is the user to search it with. If it is not provided then &lt;span style="font-style: italic;"&gt;whoami&lt;/span&gt; will be used to determine the user executing the shell.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This shell script has enabled me to sync, build, deploy my projects all with a single command and this helps me save some sustainable amount of time. Now without a build server I can still achieve what a build server like &lt;a href="http://hudson.dev.java.net/"&gt;Hudson&lt;/a&gt; can do. Actually I use this script from within Hudson and thus I almost "never" have to be concerned about deploying applications to my demo server. I hope this is useful to all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-7096905390279834894?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/7096905390279834894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/killing-process-in-linux.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7096905390279834894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7096905390279834894'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/killing-process-in-linux.html' title='Killing a process in Linux'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-3443020009417363235</id><published>2007-12-12T01:26:00.000-08:00</published><updated>2007-12-12T20:15:19.284-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='shell script'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Guarding against softwares with memory leak</title><content type='html'>I have been using IntelliJ IDEA as the IDE for my project development. It has been satisfying but sometimes it annoys me a lot. For example, when I am typing in the code editor and all of a sudden I cant hear the music playing (which I always play while coding), the IDE stopped responding and the mouse pointer hardly moves. The only way to start working normally again is to restart my laptop and on a laptop it is not a happy scenario to force reboot and moreover I do not like force reboot as a solution. So first I had to detect what caused the catastrophe and I find that the Java VM running IDEA keeps taking up memory linearly at 45 Degrees angle in the resource monitor. Furthermore this is not a infrequent event it usually occurs 2-3 times a day.&lt;br /&gt;&lt;br /&gt;As I could not live with the reboot I had too make sure it did not occur and for that I thought of the a solution - I will have a cron job that will monitor the used memory by IDEA and will kill it if it crosses a certain amount. So I wrote a &lt;a href="http://imyousuf.100webspace.net/blog-demo/shell-script/checkMem.txt"&gt;shell script&lt;/a&gt; and created a cron job following the the &lt;a href="https://help.ubuntu.com/community/CronHowto"&gt;Ubuntu help&lt;/a&gt;. That solved my problem. The shell script can actually be used to kill any Java process that leaks memory and might disrupt the normal flow of PC usage experience.&lt;br /&gt;&lt;br /&gt;If anyone has any alternate solution please feel free to share it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-3443020009417363235?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/3443020009417363235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/guarding-against-softwares-with-memory.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3443020009417363235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/3443020009417363235'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/12/guarding-against-softwares-with-memory.html' title='Guarding against softwares with memory leak'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-2015508231088198444</id><published>2007-11-12T03:57:00.000-08:00</published><updated>2007-11-12T04:07:21.092-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rar'/><category scheme='http://www.blogger.com/atom/ns#' term='winrar'/><category scheme='http://www.blogger.com/atom/ns#' term='rar archive'/><category scheme='http://www.blogger.com/atom/ns#' term='wine'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>WinRAR on Ubuntu</title><content type='html'>As a novice Linux and Ubuntu Fiesty Fawn user I have faced some issues related to RAR Archives. WinRAR is the Windows tool widely used for this purpose and it is also a powerful archiver. If one has &lt;a href="http://imyousuf-tech.blogspot.com/2007/07/stickies-on-ubuntu.html"&gt;wine installed&lt;/a&gt; as mentioned in one of my &lt;a href="http://imyousuf-tech.blogspot.com/2007/07/stickies-on-ubuntu.html"&gt;earlier blogs&lt;/a&gt; they  can install WinRAR in no time following &lt;a href="http://wine-review.blogspot.com/2007/10/winrar-371-on-linux-with-wine.html"&gt;this&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I am just mentioning the steps in short.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Download WinRAR 3.7&lt;/li&gt;&lt;li&gt;&lt;code&gt;wine {&lt;span style="font-family: courier new;"&gt;PATH_TO_EXE&lt;/span&gt;}. &lt;span style="font-family: arial;"&gt;E.g.&lt;/span&gt; wine wrar371.exe.&lt;/code&gt; Having Desktop emulation configured using Wine is necessary. winecfg -&gt; Graphics -&gt; Emulate.... checkbox&lt;code&gt;&lt;span style="font-family: arial;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Run WinRAR with the following command: &lt;code&gt;wine {PATH_TO_INSTALLATION}/WinRAR.exe&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt;I hope all enjoys WinRAR on Ubuntu.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-2015508231088198444?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/2015508231088198444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/11/winrar-on-ubuntu.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/2015508231088198444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/2015508231088198444'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/11/winrar-on-ubuntu.html' title='WinRAR on Ubuntu'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-7303809264343009416</id><published>2007-11-05T01:10:00.000-08:00</published><updated>2007-11-07T01:47:52.532-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='project development'/><category scheme='http://www.blogger.com/atom/ns#' term='database script generation'/><category scheme='http://www.blogger.com/atom/ns#' term='ddlutils'/><category scheme='http://www.blogger.com/atom/ns#' term='maven'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Developing projects that support multiple Databases</title><content type='html'>It is a common scenario in product/project development that there is a requirement to support multiple databases. This actually leads to 3 challenges - generating DDLs for the DBMS, keeping the queries in Data Access Layer portable across the DBMS platforms and optimizing the read SQLs for the specific DBMS platform. This blog entry will cover only introduce the probable solution to the first of the three challenges.&lt;br /&gt;&lt;br /&gt;DDL usually differs from one DBMS to the other. When it comes to generating DDLs there is a issue of creating or altering a table. i.e. when the DDLs are being executed for the first time it should create the database, whereas on consecutive execution it should only execute the alter table table columns to ensure that only the changes are taking effect. There is also the issue of being able to generate the DDLs when required - both the whole DB script and the alter table script. We would also like the script to be generated and executed only on specific cycles of build process.&lt;br /&gt;&lt;br /&gt;After searching the internet the tool that caught my eye is the &lt;a href="http://db.apache.org/ddlutils/"&gt;DDL Utils&lt;/a&gt; project of the Apache DB Project. This tool fulfils the requirements described above when used in conjunction with &lt;a href="http://maven.apache.org/"&gt;Maven&lt;/a&gt;. Have a look at the following sample project to see how it can be achieved.&lt;br /&gt;&lt;a href="http://www.smartitengineering.com/ddlutils-demo.tar.bz2"&gt;Sample Project&lt;/a&gt;&lt;br /&gt;After decompressing the sample project please go to the maven-plugin folder and execute the shell script. Windows users can simply use the same command in it :). As the example uses MySQL please check the connection parameters in the /src/main/resources/com/smartitengineering/.../schema/&lt;br /&gt;db-connection-params.properties.&lt;br /&gt;&lt;br /&gt;The project is build around maven and thus the DB operations are also attached with the Maven commands compile, install and deploy. Their outcomes are as follows:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;mvn compile - Generates the DDL for the whole schema regardless of the current DB state&lt;/li&gt;&lt;li&gt;mvn install - Generates the DDL required to sync the current schema to the DB; that is generates the minimum possible alter table statements&lt;/li&gt;&lt;li&gt;mvn deploy - Execute the alter table ddls on the DB to sync with the latest state&lt;/li&gt;&lt;/ul&gt; The first 2 only generates the DDLs but does not execute them. You can find the DDLs in the target folder. Another thing to note is that the POM file takes the DB parameters as properties so they can lie anywhere. Currently I am reading it from a properties file in the classpath and the additional plugin is required for this purpose. Important links of the tool are -&lt;br /&gt;&lt;a href="http://db.apache.org/ddlutils/ant/"&gt;DDL-Utils Ant Tasks&lt;/a&gt;&lt;br /&gt;&lt;a href="http://db.apache.org/ddlutils/schema/"&gt;Schema Documentation&lt;/a&gt;&lt;br /&gt;In order to get the deploy working you will need a valid repository to deploy. So that is the only thing that needs to be edited in the POM file.&lt;br /&gt;&lt;br /&gt;All in all the tools is very useful handy when it comes to DDL generation and history maintenance. The only thing I found missing in the tool's release is support of ON UPDATE/DELETE CASCADE/RESTRICT/.. support. Though the schema supports it, the implementation does not support it; but considering the whole this is quite a useful tool. The good news is that the source code in the SVN has support for it during creation only and not in altering, so we can hope to see it soon as well&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-7303809264343009416?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/7303809264343009416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/11/developing-projects-that-support.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7303809264343009416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7303809264343009416'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/11/developing-projects-that-support.html' title='Developing projects that support multiple Databases'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-8600152529199493059</id><published>2007-10-25T00:33:00.000-07:00</published><updated>2007-10-25T01:23:44.150-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='acer aspirce'/><category scheme='http://www.blogger.com/atom/ns#' term='Intel 82801G'/><category scheme='http://www.blogger.com/atom/ns#' term='5580'/><category scheme='http://www.blogger.com/atom/ns#' term='5585'/><category scheme='http://www.blogger.com/atom/ns#' term='acer'/><category scheme='http://www.blogger.com/atom/ns#' term='intel hda'/><category scheme='http://www.blogger.com/atom/ns#' term='aspire'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Getting Intel 82801G to work in Fiesty Fawn</title><content type='html'>My new laptop is a Acer Aspire 5585WXMi. It ships with ALC883 Intel HDA chipset. I could get everything to work with Ubuntu Fiesty Fawn except for my sound card and it was so sad that I could basically work with everything excepting for sound.&lt;br /&gt;After trying a lot of things all of a sudden it started to work. So I started looking into why and how. I noticed that I have ALSA 1.0.15rc1 installed from the source code; I did that basically as instruction provided from the &lt;a href="https://help.ubuntu.com/community/HdaIntelSoundHowto"&gt;Ubuntu help&lt;/a&gt; but the wiki alone did not solve the problem then. Later I have installed alsaplayer-alsa, alsaplayer-gtk, alsa-tools and alsa-tools-gui packages and ran alsaconf again. Used the ALSA mixer to turn the PCM channel on and set full volume and then all of a sudden hurrah! there is sound in my laptop. But I do not think that upgrading to ALSA 1.0.15 is required it could be achieved in 1.0.13 as well if the additional packages are installed but that is my hypothesis, I am not absolutely certain. I hope this works for others as well. If it does let me know.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-8600152529199493059?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/8600152529199493059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/10/getting-intel-82801g-to-work-in-fiesty.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/8600152529199493059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/8600152529199493059'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/10/getting-intel-82801g-to-work-in-fiesty.html' title='Getting Intel 82801G to work in Fiesty Fawn'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-7947564569701616035</id><published>2007-07-26T19:47:00.000-07:00</published><updated>2007-07-27T23:13:05.423-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sip'/><category scheme='http://www.blogger.com/atom/ns#' term='sip servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='sailfin'/><category scheme='http://www.blogger.com/atom/ns#' term='jain sip'/><title type='text'>Bridging SIP Servlets and JAIN SIP</title><content type='html'>As discussed in &lt;a href="http://imyousuf-tech.blogspot.com/2007/06/sip-application-structure.html"&gt;one of my earlier blogs&lt;/a&gt;, there are 2 SIP stacks that can be used to build SIP applications - SIP Servlet API and JAIN SIP API. Both have their advantages and disadvantages. For example, JAIN SIP API provides more structured way of building SIP Applications and could be used for any of the SIP entities. But SIP Servlet is more suitable for server side SIP entities; saying this SIP Servlet has the advantage of leveraging enterprise services more directly as it is integrated with Java EE containers.&lt;br /&gt;As I am planning to develop a VVoIP framework I would like to leverage strength of both. So I have decided to develop a bridge (or more appropriately adapter) between the APIs and that initiative have resulted &lt;a href="https://jain-sip-api-adapter.dev.java.net/"&gt;JAIN SIP API Adapter project&lt;/a&gt;. The project's aim is to let JAIN SIP API based Server side applications benefit from JAVA EE Services by using SIP Servlet API. I hope to complete this project in 3 months to come and release a beta version. Initially the system will be tested on SailFin with a IM server I developed based on JAIN SIP API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-7947564569701616035?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/7947564569701616035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/07/bridging-sip-servlets-and-jain-sip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7947564569701616035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7947564569701616035'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/07/bridging-sip-servlets-and-jain-sip.html' title='Bridging SIP Servlets and JAIN SIP'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-7737459025319419221</id><published>2007-07-05T02:53:00.000-07:00</published><updated>2007-12-27T18:36:00.209-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Red5'/><category scheme='http://www.blogger.com/atom/ns#' term='video streaming'/><category scheme='http://www.blogger.com/atom/ns#' term='flash'/><title type='text'>Video Recording using Flash</title><content type='html'>Recording Video using Flash is a trend on the high. YouTube Quick Capture is one that has caught our eyes on this. So I was trying to get something done in the same way. I am basically Java developer and have experience of developing Video Recorder using Java Media Framework. Though I am a Java fanatic I feel that at present Flash is the way to Video on Internet. Its adaptation in video technology is very wide spread and well acclaimed.  This blog is about is about  video recording.&lt;br /&gt;&lt;br /&gt;The first thing that is required for Flash video recording is a media server for streaming; because Flash unlike signed applet can store on local disk, it in fact streams the captured video to media server. There is Adobe Media Server or Flash Communication Server that we can use after procuring or there is &lt;a href="http://osflash.org/red5"&gt;Red5&lt;/a&gt;; thanks to the open source community. Now with Red5 comes a sample simple video recorder, using which you can simply stream video to the server. If we look at a customized &lt;a href="http://imyousuf.100webspace.net/blog-demo/video-recorder/SimpleRecorder.html"&gt;Simple Recorder&lt;/a&gt; (it is only the recorder and there is no attached streaming server :) if anyone can help please let me know) we will find that for sole recording purpose there is a video container that shows the video. Initially it shows the currently being captured video and once the recording is stopped it shows the streamed video of the just recorded stream. This events are triggered by the buttons on SWF video. It uses the oflaDemo Red5 Application provided as demo with the server. All streamed videos are stored in {RED5_HOME}/webapps/oflaDemo/streams/.&lt;br /&gt;&lt;br /&gt;Now lets look at the code used for this purpose. The first task is to open an stream when we intend to record something.&lt;br /&gt;&lt;blockquote&gt;var nc:NetConnection = new NetConnection();&lt;br /&gt;&lt;br /&gt;// connect to the local media server&lt;br /&gt;// rtmp://{host}:{port}/{Red5_application_context}&lt;br /&gt;// default port is 1935&lt;br /&gt;nc.connect("rtmp://localhost/oflaDemo");&lt;br /&gt;&lt;br /&gt;// create the netStream object and pass the netConnection object in the&lt;br /&gt;// constructor&lt;br /&gt;var ns:NetStream = new NetStream(nc);&lt;/blockquote&gt;The second thing that we can do is detect and select the capture devices.&lt;br /&gt;&lt;blockquote&gt;// get references to the camera and mic&lt;br /&gt;var cam:Camera = Camera.get();&lt;br /&gt;var mic:Microphone = Microphone.get();&lt;/blockquote&gt;Now above we selected the default devices but we could &lt;span class="mmbody"&gt;Camera.names to get the names of the capture devices and select the one that we want; this is something that YouTube does :).  Next we need to configure the video capture stream.&lt;br /&gt;&lt;/span&gt;&lt;blockquote&gt;// setting dimensions and framerate&lt;br /&gt;cam.setMode(320, 240, 30);&lt;br /&gt;// set to minimum of 70% quality&lt;br /&gt;cam.setQuality(0,70);&lt;br /&gt;//Setting sampling rate to 8kHz&lt;br /&gt;mic.setRate(8);&lt;/blockquote&gt;Next we need to add the device streams to the capture stream.&lt;br /&gt;&lt;blockquote&gt;// This FLV is recorded to webapps/oflaDemo/streams/ directory&lt;br /&gt;// attach cam and mic to the NetStream Object&lt;br /&gt;ns.attachVideo(cam);&lt;br /&gt;ns.attachAudio(mic);&lt;/blockquote&gt;After that we need to add the camera to the container and publish the video.&lt;br /&gt;&lt;blockquote&gt;// attach the cam to the videoContainer on stage so we can see ourselves&lt;br /&gt;videoContainer.attachVideo(cam);&lt;br /&gt;// Publish the video and mention record&lt;br /&gt;// lastVideoName is the name of the video and it will be saved as ]&lt;br /&gt;// lastVideoName.flv&lt;br /&gt;ns.publish(lastVideoName, "record");&lt;br /&gt;&lt;/blockquote&gt;Now once the recording is just clear the video container and the captured stream to the container and specify the stream to play the just recorded video&lt;br /&gt;&lt;blockquote&gt;// attach the netStream object to the video object&lt;br /&gt;videoContainer.attachVideo(ns);&lt;br /&gt;// play back the recorded stream&lt;br /&gt;ns.play(lastVideoName);&lt;/blockquote&gt;Hopefully with these steps a video recording and stream playback should be possible.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-7737459025319419221?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/7737459025319419221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/07/video-recording-using-flash.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7737459025319419221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/7737459025319419221'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/07/video-recording-using-flash.html' title='Video Recording using Flash'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-6279995780078273620</id><published>2007-07-03T20:21:00.000-07:00</published><updated>2007-07-04T03:56:52.108-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='stickies'/><category scheme='http://www.blogger.com/atom/ns#' term='wine'/><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><title type='text'>Stickies on Ubuntu</title><content type='html'>It seems that Wine is an excellent tool to run Windows application on Ubuntu. Recently I had to use Stickies and tried it on Ubuntu. So first I had to install Ubuntu. I executed the following commands to install Wine on Ubuntu 7.04 Fiesty.&lt;br /&gt;&lt;blockquote&gt;sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/feisty.list -O /etc/apt/sources.list.d/winehq.list&lt;br /&gt;&lt;br /&gt;sudo apt-get update&lt;br /&gt;&lt;br /&gt;sudo apt-get install wine&lt;br /&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;For other platforms you can have a look at http://www.winehq.org/site/download. Then you have to simply download the stickies.exe and then execute&lt;br /&gt;&lt;blockquote&gt;wine &lt;path&gt;{PATH-TO-STICKIES}/stickies.exe&lt;/path&gt;&lt;/blockquote&gt;But hold on the installation is not done, you need get the following the installation steps mentioned in&lt;br /&gt;&lt;blockquote&gt;http://appdb.winehq.org/appview.php?iVersionId=5169&amp;iTestingId=4356&lt;/blockquote&gt;&lt;br /&gt;scroll down to Install Note and follow that. The only change will be installing the MSI file, instead of the one mentioned there use the following to install the MSI file &lt;blockquote&gt;wine msiexec /i&lt;path&gt;&lt;path-to-msi&gt;/{PATH-TO-MSI}MSISetup.MSI&lt;/path-to-msi&gt;&lt;/path&gt;&lt;/blockquote&gt;&lt;br /&gt;Now try to execute&lt;br /&gt;&lt;blockquote&gt;wine &lt;home_dir&gt;/.wine/&lt;/home_dir&gt;{PATH-TO-STICKIES-INSTALLATION}&lt;home_dir&gt;&lt;path_installed&gt;/stickies.exe&lt;/path_installed&gt;&lt;/home_dir&gt;&lt;/blockquote&gt;&lt;br /&gt;It might say that MFC42.dll is missing, if it says so please get it from a Windows installation and copy it to &lt;home_dir&gt;/.wine/drive_c/windows/system32/ and try to execute it again.&lt;br /&gt;&lt;br /&gt;Hopefully that will be enough for Stickies Installation :).&lt;br /&gt;Now to get the Stickies running you can execute the following command:&lt;br /&gt;&lt;/home_dir&gt;&lt;blockquote&gt;sudo wine ~/.wine/drive_c/Program\ Files/stickies/stickies.exe &gt; {PATH-TO-LOG}&lt;br /&gt;&lt;absolute-path-to-log-file&gt; 2&gt;&amp;amp;1 &amp;amp;&lt;br /&gt;&lt;/absolute-path-to-log-file&gt;&lt;/blockquote&gt;Though this is for Ubuntu but I guess excepting the installation procedure rest should be same across Linux platform. Let me know if any further changes were required.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-6279995780078273620?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/6279995780078273620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/07/stickies-on-ubuntu.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/6279995780078273620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/6279995780078273620'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/07/stickies-on-ubuntu.html' title='Stickies on Ubuntu'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-5188901639515912147</id><published>2007-06-10T19:58:00.000-07:00</published><updated>2007-11-09T04:55:52.760-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sip'/><category scheme='http://www.blogger.com/atom/ns#' term='resiprocate'/><category scheme='http://www.blogger.com/atom/ns#' term='sip servlet'/><category scheme='http://www.blogger.com/atom/ns#' term='sip proxy server'/><category scheme='http://www.blogger.com/atom/ns#' term='sip registrar server'/><category scheme='http://www.blogger.com/atom/ns#' term='sailfin'/><category scheme='http://www.blogger.com/atom/ns#' term='sip redirect server'/><title type='text'>SIP application structure</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_kWF3--nlqu8/Rmy7QEQm43I/AAAAAAAAAAY/ahXUgsaR4T0/s1600-h/SIP+Application+Structure.png"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_kWF3--nlqu8/Rmy7QEQm43I/AAAAAAAAAAY/ahXUgsaR4T0/s320/SIP+Application+Structure.png" alt="" id="BLOGGER_PHOTO_ID_5074636764835406706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;As mentioned in my previous blog I feel that SIP applications are the next generation of applications for Desktop, Web and Mobile. By the will of Almighty, today I will be discussing the structure of SIP applications.&lt;br /&gt;&lt;br /&gt;We will see the main layers of the application and discuss them in bottom up approach. Any SIP application will contain 3 layers. Topmost is the Application Layer - where all the logics of the application resides and which takes care of the SIP packets. Then comes SIP Stack it self, which is responsible for abstracting the SIP packets from the application developer by providing an API to do the low level SIP stuffs. Lastly comes the Transport layer that is responsible for carrying the SIP packets and sending them to the intended destination; the SIP stack is very closely binded with this layer as it will provide transport for common protocols and developers has to extends the transport API to add more transport layer protocols.&lt;br /&gt;&lt;br /&gt;Almost any transport layer protocol can be used with SIP as long as the SIP stack recognizes it. The most commonly used transport layer protocol is UDP; on some occasions TCP and TLS are also used. We all know that all networks are converging towards IP backbone and as those protocols are IP based it should be more convenient for developers in future as they will not have to write SIP transport layers for different protocols. One challenge would be from Cell Phone to BTS; so SIP stack providers for Cell phone will have to implement transport layer for GSM and CDMA phones.&lt;br /&gt;&lt;br /&gt;IMHO the most important layer of the application structure is SIP stack. This will abstract the SIP packets and Transport layer hassles from the developers and will provide them API's to call and use them to make an SIP application. There are quite a few SIP stacks available such as &lt;a href="http://www.resiprocate.org/"&gt;reSIProcate&lt;/a&gt;, &lt;a href="https://jain-sip.dev.java.net/"&gt;Jain SIP&lt;/a&gt; (JSR-32) and SIP Servlet (JSR-000116). Among them SIP Servlet Application (archives with sar extensions) is usually deployed in Java EE Container (BEA Weblogic, IBM Websphere, GlassFish-SailFin) or SIP Container implementing SIP Servlet. Personally I have used Jain SIP and its simplicity in usage and good API structure has created liking in me for it. In my blogs related to SIP I will be using this stack to develop examples. I will also discuss about SailFin.&lt;br /&gt;&lt;br /&gt;Application layer is where everybody gets to exercise their innovations. Now is the time to generates SIP centric ideas and implementing them. All SIP application can be categorized in four categories -&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Registrar Server - A server responsible to register a SIP user and its location&lt;/li&gt;&lt;li&gt;Proxy Server - A server responsible to act as the main server where as it is nothing but a proxy and knows which is the real server&lt;/li&gt;&lt;li&gt;Redirect Server - A server that redirects request to another server; an example of this functionality would be load balancing of requests&lt;/li&gt;&lt;li&gt;User Agent -  This is a client side entity responsible for communicating with the server and server the Client's request. Anything could be user agent such as PC Software, Cell Phone, Refrigerator, Television, Microwave Owen etc.&lt;/li&gt;&lt;/ul&gt;Developers can develop applications that serve any of these purposes.&lt;br /&gt;&lt;br /&gt;By the will of Almighty, I will soon make some postings about what could be SIP applications.&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/5265194643022445353-5188901639515912147?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/5188901639515912147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/06/sip-application-structure.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5188901639515912147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/5188901639515912147'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/06/sip-application-structure.html' title='SIP application structure'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_kWF3--nlqu8/Rmy7QEQm43I/AAAAAAAAAAY/ahXUgsaR4T0/s72-c/SIP+Application+Structure.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5265194643022445353.post-4511075609835803841</id><published>2007-06-10T00:03:00.000-07:00</published><updated>2007-06-10T00:28:30.224-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sip'/><category scheme='http://www.blogger.com/atom/ns#' term='glassfish'/><category scheme='http://www.blogger.com/atom/ns#' term='sailfin'/><category scheme='http://www.blogger.com/atom/ns#' term='communication'/><title type='text'>SIP - For next generation communication</title><content type='html'>I have been introduced to SIP (Session Initiation Protocol) from my college courses. From then it appealed a lot to me. As timed passed by I came to realize that with the rate in which everything is getting globalized it is a matter of time when VoIP will rule the world of communication. As internet is already accepted as the global information highway, communication is also bound to be built on that. SIP is IETF engineered protocol and open for everybody's suggestion.&lt;br /&gt;&lt;br /&gt;Recently SIP related activities are very visible; especially, with reSIProcate, Jain-SIP protocol stacks popularity and major Java EE Container vendors supporting SIP Servlets it is easily comprehensable that industry is expecting a increase in use of SIP in business applications, as more and more applications want to include web based voice/video chat.&lt;br /&gt;&lt;br /&gt;Recently, &lt;a href="http://glassfish.dev.java.net"&gt;GlassFish&lt;/a&gt; project has introduced the &lt;a href="https://sailfin.dev.java.net/"&gt;SailFin&lt;/a&gt; project, which is a SIP Servlet container. Hopefully, by the will of Almighty, it will also include support for easy portability for Jain-SIP based server applications into its container as well.&lt;br /&gt;&lt;br /&gt;If I were to bet on a technology of next generation I would place my bet on SIP based applications. Hopefully, by the will of Almighty, I hope to bring more writeups about SIP applications - mostly server side.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5265194643022445353-4511075609835803841?l=imyousuf-tech.blogs.smartitengineering.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://imyousuf-tech.blogs.smartitengineering.com/feeds/4511075609835803841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/06/sip-for-next-generation-communication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/4511075609835803841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5265194643022445353/posts/default/4511075609835803841'/><link rel='alternate' type='text/html' href='http://imyousuf-tech.blogs.smartitengineering.com/2007/06/sip-for-next-generation-communication.html' title='SIP - For next generation communication'/><author><name>imyousuf</name><uri>http://www.blogger.com/profile/05717111835467977502</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://bp0.blogger.com/_kWF3--nlqu8/SG9lGaS-b6I/AAAAAAAAAtA/KEL2G6YkcKo/S220/ProfilePic1.jpg'/></author><thr:total>0</thr:total></entry></feed>
