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

<channel>
	<title>Experiences Unlimited</title>
	<atom:link href="http://blog.sanaulla.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sanaulla.info</link>
	<description>Ramblings of a developer</description>
	<lastBuildDate>Wed, 14 Dec 2011 16:03:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Book Review: Apprenticeship Patterns</title>
		<link>http://blog.sanaulla.info/2011/12/14/book-review-apprenticeship-patterns/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/12/14/book-review-apprenticeship-patterns/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 16:03:57 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[apprenticeship patterns]]></category>
		<category><![CDATA[book review]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1218</guid>
		<description><![CDATA[Here is a book which sounds different from its title: &#8220;Apprenticeship Patterns&#8221; but considering the complete title: &#8220;Guidance for the Aspiring Software Craftsman&#8221; would make some sense of what the book would be about. And then once you read the &#8230; <a href="http://blog.sanaulla.info/2011/12/14/book-review-apprenticeship-patterns/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F12%2F14%2Fbook-review-apprenticeship-patterns%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F12%2F14%2Fbook-review-apprenticeship-patterns%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=apprenticeship+patterns,book+review,software+development&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify;">Here is a book which sounds different from its title: &#8220;<a href="http://shop.oreilly.com/product/9780596518387.do">Apprenticeship Patterns</a>&#8221; but <img class="alignright" src="http://akamaicovers.oreilly.com/images/9780596518387/cat.gif" alt="" width="180" height="236" />considering the complete title: &#8220;Guidance for the Aspiring Software Craftsman&#8221; would make some sense of what the book would be about. And then once you read the back cover of the book then I think its becomes much clearer of what you can expect in the book. So this is how I went about buying the book &#8211; I had never heard of this book before, found it in the bookstore and purchased it in no time. I did search for almost all the Computer related books on Flipkart, but didn&#8217;t find this. So someone who would want to purchase this book can go <a href="http://www.flipkart.com/books/8184048459?affid=INMohamblo">here</a>. Ok, but I need to convince you to buy the book, so here is my attempt to do so:</p>
<p style="text-align: justify;"><span id="more-1218"></span>I would say this book very closely resembles to <a href="http://blog.sanaulla.info/2011/10/30/book-review-the-passionate-programmer-written-by-chad-fowler/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Passionate Programmer by Chad Fowler</a> &#8211; resembles to some extent the content covered, <a href="http://www.flipkart.com/books/8184048459?affid=INMohamblo">Apprenticeship Patterns</a> is to some extent can be said as a subset of the information. It also resembles in the way each chapter is structured, but Apprenticeship Patterns is a bit more structured in the sense it starts with the context, then explains the problem, then the solution and finally action items on the reader&#8217;s part, and also lists the related patterns which can be referred. So those were few of the similarities.</p>
<p style="text-align: justify;">Clearly <a href="http://www.flipkart.com/books/8184048459?affid=INMohamblo">Apprenticeship Patterns</a> is for people starting out their software software development careers or for people who have been in the field for some time say 1-2 years. But as authors- Dave H. Hoover and Adewale Oshineye claim this is book is not really useful for more experienced developers. <a href="http://blog.sanaulla.info/2011/10/30/book-review-the-passionate-programmer-written-by-chad-fowler/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Passionate Programmer</a> is aimed at general programmers and not really focused on entry-level programmers, but I found it useful as well. And in the former the chapters are presented as <a href="http://en.wikipedia.org/wiki/Software_design_pattern">patterns</a>.</p>
<p style="text-align: justify;">Some of the good points of the book:</p>
<ul style="text-align: justify;">
<li>the title clearly states that it aims at beginners to adopt and expertise the craft of software development from masters.</li>
<li>lists the actions/activities one has to undertake to learn the art of software development</li>
<li>quotes from different books and real life examples.</li>
<li>more of a collective opinion in addition to authors opinion.</li>
<li>the chapters/content has evolved as a cumulative effort by the authors and other readers (this justifies the point above).</li>
<li>provides links to additional reading material related to each topic being discussed.</li>
<li>the most important- 130 odd pages of content only. So its not a huge book to read and understand hundreds of pages.</li>
</ul>
<p style="text-align: justify;">I dont know if this is a valid con of the book: The font is a bit smaller, so might be a bit stressful for the reader. But this isn&#8217;t much of a concern.</p>
<p style="text-align: justify;">I would say a must read* for all the beginners in software development. So you got to head out to <a href="http://www.amazon.com/gp/product/0596518382/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&amp;tag=experieunlimi-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596518382">Amazon</a> or <a href="http://www.flipkart.com/books/8184048459?affid=INMohamblo">Flipkart</a> to buy this immediately.</p>
<p style="text-align: justify;"><em>*must read: provided you have the dedication and interest to follow the patterns in the book</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/12/14/book-review-apprenticeship-patterns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moodle &#8211; Web based Virtual Learning environment</title>
		<link>http://blog.sanaulla.info/2011/12/13/moodle-web-based-virtual-learning-environment/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/12/13/moodle-web-based-virtual-learning-environment/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 17:44:30 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Promo]]></category>
		<category><![CDATA[moodle]]></category>
		<category><![CDATA[packt]]></category>
		<category><![CDATA[promotion]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1211</guid>
		<description><![CDATA[Moodle is an Open Source Course Management System (CMS), also known as a Learning Management System (LMS) or a Virtual Learning Environment (VLE). Moodle is a free, open-source PHP web application for producing modular internet-based courses that support a modern &#8230; <a href="http://blog.sanaulla.info/2011/12/13/moodle-web-based-virtual-learning-environment/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F12%2F13%2Fmoodle-web-based-virtual-learning-environment%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F12%2F13%2Fmoodle-web-based-virtual-learning-environment%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=moodle,packt,promotion&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify;">Moodle is an Open Source Course Management System (CMS), also known as a Learning Management System (LMS) or a Virtual Learning Environment (VLE). Moodle is a free, open-source PHP web application for producing modular internet-based courses that support a modern social constructionist pedagogy. To work, it needs to be installed on a web server somewhere, either on one of your own computers or one at a web hosting company. Lot more information can be obtained from <a href="http://moodle.org/about/">here</a>.</p>
<p style="text-align: justify;">There&#8217;s a better chance to grab the books available to learn about this platform from Packt publications, they are providing discounts on both their eBooks as well as printed copies. So you might be interested to know more about this <a href="http://www.packtpub.com/news/moodle-festive-month">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/12/13/moodle-web-based-virtual-learning-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOLID- Liskov Substitution Principle</title>
		<link>http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/#comments</comments>
		<pubDate>Mon, 28 Nov 2011 17:58:48 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[liskov substitution principle]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[OOD]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1185</guid>
		<description><![CDATA[Liskov Substitution principle (LSP) states that, Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it This principle was written by Barbara Liskov in 1988. The idea here &#8230; <a href="http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F28%2Fsolid-liskov-substitution-principle%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F28%2Fsolid-liskov-substitution-principle%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=design,liskov+substitution+principle,object+oriented+programming,OOD,SOLID&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Liskov Substitution principle (LSP) states that,</p>
<blockquote><p>Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it</p></blockquote>
<p>This principle was written by <a href="http://en.wikipedia.org/wiki/Barbara_Jane_Liskov">Barbara Liskov</a> in 1988.</p>
<p>The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.</p>
<p>This principle is very closely related to <a href="http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">Open Closed Principle</a>(OCP), violation of LSP in turn violates the OCP. Let me explain:</p>
<p><span id="more-1185"></span>If the subtype is not replaceable for the supertype reference, then in order to support the subtype instances as well we go ahead and make changes to the existing code and add the support. This is a clear violation of OCP.</p>
<p>This is mostly seen in places where we do run time type identification and then cast it to appropriate reference type. And if we add a new subtype implementation then we would have to edit the code to test for instance of for the new subtype.</p>
<p>Let me give a subtle example:</p>
<pre class="brush: java; title: ; notranslate">

class Bird {
  public void fly(){}
  public void eat(){}
}
class Crow extends Bird {}
class Ostrich extends Bird{
  fly(){
    throw new UnsupportedOperationException();
  }
}

public BirdTest{
  public static void main(String[] args){
    List&lt;Bird&gt; birdList = new ArrayList&lt;Bird&gt;();
    birdList.add(new Bird());
    birdList.add(new Crow());
    birdList.add(new Ostrich());
    letTheBirdsFly ( birdList );
  }
  static void letTheBirdsFly ( List&lt;Bird&gt; birdList ){
    for ( Bird b : birdList ) {
      b.fly();
    }
  }
}
</pre>
<p>What do you think would happen when this code is executed? As soon as an Ostrich instance is passed, it blows up!!! Here the sub type is not replaceable for the super type.</p>
<p><strong>How do we fix such issues?</strong></p>
<p>By using factoring. Sometimes factoring out the common features into a separate class can help in creating a hierarchy that confirms to LSP.</p>
<p>In the above scenario we can factor out the fly feature into- Flight and NonFlight birds.</p>
<pre class="brush: java; title: ; notranslate">
class Bird{
  public void eat(){}
}
class FlightBird extends Bird{
  public void fly()()
}
class NonFlight extends Bird{}
</pre>
<p>So instead of dealing with Bird, we can deal with 2 categories of birds- Flight and NonFlight.</p>
<p><strong>How can we identify LSP violation?</strong></p>
<ul>
<li>Derived class may require less functionalities than the Base class, so some methods would be redundant.</li>
<li>We might be using IS-A to check for Super-Sub relationships, but LSP doesn&#8217;t use only IS-A, but it also requires that the Sub types must be substitutable for the Super class. And one cannot decide the substitutability of sub class in isolation. One has to consider how the clients of the class hierarchy are going to use it.</li>
</ul>
<p>A detailed <a href="http://www.objectmentor.com/resources/articles/lsp.pdf">paper</a> by Robert Martin on LSP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SOLID- Open Closed Principle</title>
		<link>http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/#comments</comments>
		<pubDate>Sat, 19 Nov 2011 14:17:24 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[ocp]]></category>
		<category><![CDATA[OOD]]></category>
		<category><![CDATA[open closed principle]]></category>
		<category><![CDATA[SOLID]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1156</guid>
		<description><![CDATA[Open Closed Principle (OCP) states that, Software entities (Classes, modules, functions) should be OPEN for EXTENSION, CLOSED for MODIFICATION. Lets try to reflect on the above statement- software entities once written shouldn&#8217;t be modified to add new functionality, instead one &#8230; <a href="http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F19%2Fsolid-open-closed-principle%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F19%2Fsolid-open-closed-principle%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=design,object+oriented+programming,ocp,OOD,open+closed+principle,SOLID&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Open Closed Principle (OCP) states that,</p>
<blockquote><p><strong>Software entities (Classes, modules, functions) should be OPEN for EXTENSION, CLOSED for MODIFICATION.</strong></p></blockquote>
<p style="text-align: justify;">Lets try to reflect on the above statement- software entities once written shouldn&#8217;t be modified to add new functionality, instead one has to extend the same to add new functionality. In otherwords you don&#8217;t touch the existing modules thereby not disturbing the existing functionality, instead you extend the modules to implement the new requirement. So your code is less rigid and fragile and also extensible.</p>
<p style="text-align: justify;">OCP term was coined by <a href="http://en.wikipedia.org/wiki/Bertrand_Meyer">Bertnard Meyer</a>.</p>
<p style="text-align: justify;"><strong>How can we confirm to OCP principle?</strong></p>
<p style="text-align: justify;">Its simple- Allow the modules (classes) to depend on the abstractions, there by new features can be added by creating new extensions of these abstractions.</p>
<p style="text-align: justify;"><strong><span id="more-1156"></span>Let me try to explain with an example:</strong></p>
<p style="text-align: justify;">Suppose you are writing a module to approve personal loans and before doing that you want to validate the personal information, code wise we can depict the situation as:</p>
<pre class="brush: java; title: ; notranslate">
public class LoanApprovalHandler
{
  public void approveLoan(PersonalValidator validator)&lt;br /&gt;
  {
    if ( validator.isValid())
    {
      //Process the loan.
    }
  }
}
public class PersonalLoanValidator
{
  public boolean isValid()
  {
    //Validation logic
  }
}
</pre>
<p style="text-align: justify;">So far so good. As you all know the requirements are never the same and now its required to approve vehicle loans, consumer goods loans and what not. So one approach to solve this requirement is to:</p>
<pre class="brush: java; title: ; notranslate">
public class LoanApprovalHandler
{
  public void approvePersonalLoan (PersonalLoanValidator validator)
  {
    if ( validator.isValid())
    {
      //Process the loan.
    }
  }
  public void approveVehicleLoan (VehicleLoanValidator validator )
  {
    if ( validator.isValid())
    {
      //Process the loan.
    }
  }
  // Method for approving other loans.
}
public class PersonalLoanValidator
{
  public boolean isValid()
  {
    //Validation logic
  }
}
public class VehicleLoanValidator
{
  public boolean isValid()
  {
    //Validation logic
  }
}
</pre>
<p style="text-align: justify;">We have edited the existing class to accomodate the new requirements- in the process we ended up changing the name of the existing method and also adding new methods for different types of loan approval. This clearly violates the OCP. Lets try to implement the requirement in a different way</p>
<pre class="brush: java; title: ; notranslate">
/**
 * Abstract Validator class
 * Extended to add different
 * validators for different loan type
 */
public abstract class Validator
{
  public boolean isValid();
}
/**
 * Personal loan validator
 */
public class PersonalLoanValidator
  extends Validator
{
  public boolean isValid()
  {
    //Validation logic.
  }
}
/*
 * Similarly any new type of validation can
 * be accommodated by creating a new subclass
 * of Validator
 */
</pre>
<p style="text-align: justify;">Now using the above validators we can write a LoanApprovalHandler to use the Validator abstraction.</p>
<pre class="brush: java; title: ; notranslate">
public class LoanApprovalHandler
{
  public void approveLoan(Validator validator)
  {
    if ( validator.isValid())
    {
      //Process the loan.
    }
  }
}
</pre>
<p style="text-align: justify;">So to accommodate any type of loan validators we would just have create a subclass of Validator and then pass it to the approveLoan method. That way the class is CLOSED for modification but OPEN for extension.</p>
<p><strong>Another example:</strong></p>
<p style="text-align: justify;">I was thinking of another hypothetical situation where the use of OCP principle can be of use. The situation is some thing like: &#8220;We maintain a list of students with their marks, unique identification(uid) and also name. Then we provide an option to get the percentage in the form of uid-percentage name value pairs.&#8221;</p>
<pre class="brush: java; title: ; notranslate">
class Student
{
  String name;
  double percentage;
  int uid;
  public Student(String name, double percentage, int uid)
  {
    this.name = name;
    this.percentage = percentage;
    this.uid = uid;
  }
}
</pre>
<p>We collect the student list into a generic class-</p>
<pre class="brush: java; title: ; notranslate">
class StudentBatch {
  private List&lt;Student&gt; studentList;
  public StudentBatch() {
    studentList = new ArrayList&lt;Student&gt;();
  }
  public void getSutdentMarkMap(Hashtable&lt;Integer, Double&gt; studentMarkMap) {
    if (studentMarkMap == null) {
      //Error
    } else {
      for (Student student : studentList) {
        studentMarkMap.put(student.uid, student.percentage);
      }
    }
  }
  /**
   * @param studentList the studentList to set
   */
  public void setStudentList(List&lt;Student&gt; studentList) {
    this.studentList = studentList;
  }
}
</pre>
<p style="text-align: justify;">Suppose we need to maintain the order of elements in the Map by their insertion order, so we would have to write a new method to get the map in the insertion order and for that we would be using LinkedHashMap. Instead if the method- getStudentMarkMap() was dependent on the Map interface and not the Hashtable concrete implementation, we could have avoided changing the StudentBatch class and instead pass in an instance of LinkedHashMap.</p>
<pre class="brush: java; title: ; notranslate">
public void getSutdentMarkMap(Map&amp;lt;Integer, Double&amp;gt; studentMarkMap) {
    if (studentMarkMap == null) {
      //Error
    } else {
      for (Student student : studentList) {
        studentMarkMap.put(student.uid, student.percentage);
      }
    }
  }
</pre>
<p style="text-align: justify;"><em>PS: I know that Hashtable is an obsolete collection and not encouraged to be use. But I thought this would make another useful example for OCP principle.</em></p>
<p>Some ways to keep your code closer to confirming OCP:</p>
<ul>
<li style="text-align: justify;">Making all member variables private so that the other parts of the code access them via the methods (getters) and not directly.</li>
<li style="text-align: justify;">Avoiding typecasts at runtime- This makes the code fragile and dependent on the classes under consideration, which means any new class might require editing the method to accommodate the cast for the new class.</li>
</ul>
<p>Really good <a href="http://www.objectmentor.com/resources/articles/ocp.pdf">article</a> written by Robert Martin on OCP.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SOLID- Single Responsibility Principle</title>
		<link>http://blog.sanaulla.info/2011/11/16/solid-single-responsibility-principle/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/11/16/solid-single-responsibility-principle/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 16:38:52 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[object oriented programming]]></category>
		<category><![CDATA[OOD]]></category>
		<category><![CDATA[single responsibility]]></category>
		<category><![CDATA[SOLID]]></category>
		<category><![CDATA[srp]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1134</guid>
		<description><![CDATA[The Single Responsibility principle (SRP) states that: There should never be more than one reason for a class to change. We can relate the &#8220;reason to change&#8221; to &#8220;the responsibility of the class&#8221;. So each responsibility would be an axis &#8230; <a href="http://blog.sanaulla.info/2011/11/16/solid-single-responsibility-principle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F16%2Fsolid-single-responsibility-principle%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F16%2Fsolid-single-responsibility-principle%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=design,object+oriented+programming,OOD,single+responsibility,SOLID,srp&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The Single Responsibility principle (SRP) states that:</p>
<blockquote><p><strong>There should never be more than one reason for a class to change.</strong></p></blockquote>
<p style="text-align: justify;">We can relate the &#8220;reason to change&#8221; to &#8220;the responsibility of the class&#8221;. So each responsibility would be an axis for change. This principle is similar to designing classes which are highly cohesive. So the idea is to design a class which has one responsibility or in otherwords caters to implementing a functionality . I would like to clarify here that one responsibility doesnt mean that the class has only ONE method. A responsibility can be implemented by means of different methods in the class.</p>
<p><strong><span id="more-1134"></span>Why is that this principle is required?</strong></p>
<p style="text-align: justify;">Imagine designing classes with more than one responsibility/implementing more than one functionality. There&#8217;s no one stopping you to do this. But imagine the amount of dependency your class can create within itself in the due course of the development time. So when you are asked to change a certain functionality, you are not really sure how it would impact the other functionalities implemented in the class. The change might or might not impact other features, but you really can&#8217;t take risk, especially in production applications. So you end up testing all the dependent features.</p>
<p style="text-align: justify;">You might say, we have automated tests, and the number of tests to be checked are low, but imagine the impact over time. These kind of changes get accumulate owing to the viscosity of the code making it really fragile and rigid.</p>
<p style="text-align: justify;">One way to correct the violation of SRP is to decompose the class functionalities into different classes, each of which confirms to SRP.</p>
<p style="text-align: justify;">An example to clarify this principle:</p>
<p style="text-align: justify;">Suppose you are asked to implement a UserSetting service where in the user can change the settings but before that the user has to be authenticated. One way to implement this would be:</p>
<pre class="brush: java; title: ; notranslate">
public class UserSettingService
{
  public void changeEmail(User user)
  {
    if(checkAccess(user))
    {
       //Grant option to change
    }
  }
  public boolean checkAccess(User user)
  {
    //Verify if the user is valid.
  }
}
</pre>
<p>All looks good, until you would want to reuse the checkAccess code at some other place OR you want to make changes to the way checkAccess is being done OR you want to make change to the way email changes are being approved. In all the later 2 cases you would end up changing the same class and in the first case you would have to use UserSettingService to check for access as well, which is unnecessary.<br />
One way to correct this is to decompose the UserSettingService into UserSettingService and SecurityService. And move the checkAccess code into SecurityService.</p>
<pre class="brush: java; title: ; notranslate">
public class UserSettingService
{
  public void changeEmail(User user)
  {
    if(SecurityService.checkAccess(user))
    {
       //Grant option to change
    }
  }
}
public class SecurityService
{
  public static boolean checkAccess(User user)
  {
    //check the access.
  }
}
</pre>
<p>Another example would be:</p>
<p style="text-align: justify;">Suppose there is a requirement to download the file- may be in csv/json/xml format, parse the file and then update the contents into a database or file system. One approach would be to-</p>
<pre class="brush: java; title: ; notranslate">
public class Task
{
  public void downloadFile(location)
  {
    //Download the file
  }
  public void parseTheFile(file)
  {
    //Parse the contents of the file- XML/JSON/CSV
  }
  public void persistTheData(data)
  {
    //Persist the data to Database or file system.
  }
}
</pre>
<p style="text-align: justify;">Looks good, all in one place easy to understand. But what about the number of times this class has to be updated? What about the reusability of parser code? or download code? Its not good design in terms of reusabiltiy of different parts of the code, in terms of cohesiveness.<br />
One way to decompose the Task class is to create different classes for downloading the file- Downloader, for parsing the file- Parser and for persisting to the database or file system.</p>
<p style="text-align: justify;">Even in JDK you must have seen that Rectangle2D or other Shape classes in java.awt package dont really have information regarding how it has to be drawn on the UI. The drawing information has been embedded in the Graphics/Graphics2D package.</p>
<p style="text-align: justify;">A detailed description can be found <a href="http://www.objectmentor.com/resources/articles/srp.pdf">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/11/16/solid-single-responsibility-principle/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SOLID &#8211; Object Oriented Design principles</title>
		<link>http://blog.sanaulla.info/2011/11/14/solid-object-oriented-design-principles/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/11/14/solid-object-oriented-design-principles/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 12:13:37 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1103</guid>
		<description><![CDATA[We usually write code that is- Rigid &#8211; Difficult to add new features Fragile &#8211; Unable to identify the impact of the change Immobile &#8211; No reusability Viscous &#8211; Going with the flow of bad practices already being present in &#8230; <a href="http://blog.sanaulla.info/2011/11/14/solid-object-oriented-design-principles/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F14%2Fsolid-object-oriented-design-principles%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F11%2F14%2Fsolid-object-oriented-design-principles%2F&amp;style=compact&amp;service=is.gd&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>We usually write code that is-</p>
<ul>
<li>Rigid &#8211; Difficult to add new features</li>
<li>Fragile &#8211; Unable to identify the impact of the change</li>
<li>Immobile &#8211; No reusability</li>
<li>Viscous &#8211; Going with the flow of bad practices already being present in the code.</li>
</ul>
<p>There have been lot of principles for writing good code and all these principles define how the code manages the dependency. Most of them are aware of the principles:</p>
<ul>
<li>Loosely coupled code &#8211; There shouldn&#8217;t be too much of dependency between the modules, even if there is a dependency it should be via the interfaces and should be minimal.</li>
<li>Highly cohesive code- The code has to be very specific in its operations.</li>
<li>Context independent code- So that it can be reused.</li>
<li>DRY &#8211; Dont repeat yourself &#8211; Avoid copy-paste of code. Change in the code would have to be made in all the places where its been copied.</li>
</ul>
<p><a href="http://en.wikipedia.org/wiki/Robert_c_martin">Robert C Martin</a> took the initiative and gathered different design principles into a common acronym- <a href="http://en.wikipedia.org/wiki/Solid_(object-oriented_design)">SOLID</a> Design principles (<a href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod">The Principles of OOD</a>).</p>
<p>SOLID stands for:</p>
<p><a href="http://blog.sanaulla.info/2011/11/16/solid-single-responsibility-principle/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><strong>S</strong>ingle Responsibility principle (SRP)</a><br />
<a href="http://blog.sanaulla.info/2011/11/19/solid-open-closed-principle/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed"><strong>O</strong>pen Closed principle (OCP)</a><br />
<strong>L</strong>iskov Substitution Principle (LSP)<br />
<strong>I</strong>nterface Segregation principle (ISP)<br />
<strong>D</strong>ependency Inversion principle (DIP)</p>
<p>In subsequent posts I would be writing about the individual principles. The following presentation was prepared by me for a talk on SOLID principles:</p>
<div id="__ss_9976681" style="width: 425px;"><strong style="display: block; margin: 12px 0 4px;"><a title="SOLID Design principles" href="http://www.slideshare.net/sanaulla123/solid-design-principles-9976681" target="_blank">SOLID Design principles</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/9976681" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" width="425" height="355"></iframe></p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/sanaulla123" target="_blank">Mohamed Sanaulla</a></div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/11/14/solid-object-oriented-design-principles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Review: The Passionate Programmer written by Chad Fowler</title>
		<link>http://blog.sanaulla.info/2011/10/30/book-review-the-passionate-programmer-written-by-chad-fowler/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/10/30/book-review-the-passionate-programmer-written-by-chad-fowler/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 18:15:45 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[chad fowler]]></category>
		<category><![CDATA[passionate programmer]]></category>
		<category><![CDATA[pragmatic bookshelf]]></category>
		<category><![CDATA[software development]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1072</guid>
		<description><![CDATA[I just happened to get to know about this book while browsing through the books on Flipkart and the book immediately caught my attention. So here&#8217;s my review of the book: First things first: Really cool cover page of the &#8230; <a href="http://blog.sanaulla.info/2011/10/30/book-review-the-passionate-programmer-written-by-chad-fowler/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F10%2F30%2Fbook-review-the-passionate-programmer-written-by-chad-fowler%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F10%2F30%2Fbook-review-the-passionate-programmer-written-by-chad-fowler%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=career,chad+fowler,passionate+programmer,pragmatic+bookshelf,software+development&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I just happened to get to know about this book while browsing through the books on <a href="http://www.flipkart.com/books/9350234310?affid=INMohamblo">Flipkart</a> and the<img class="alignright" title="The Passionate Programmer" src="http://imagery.pragprog.com/products/137/cfcar2_xlargecover.jpg?1298589825" alt="" width="152" height="228" /> book immediately caught my attention. So here&#8217;s my review of the book:</p>
<p><strong>First things first:</strong></p>
<ul>
<li>Really cool cover page of the book &#8211; [I know Chad Fowler's musical interest has some role to play in the designing of the cover page]</li>
<li>200 odd pages book- So you don&#8217;t feel its overdose of information</li>
<li>Short chapters, lighter book. Each chapter followed by Act it! which guides you on how to implement the ideas explained.</li>
<li>Nice and legible font used for the content.</li>
</ul>
<p><strong><span id="more-1072"></span>Introduction:</strong></p>
<ul>
<li>Author speaks about Why the book was written- Really inspiring stuff there.</li>
<li>Few aspects are highlighted just to give the reader an idea of what to expect in the next 200 odd pages. This will boost your urge to complete the book in one sitting. Just for the curious readers: The author tells about fighting the fear of failure and also owning one&#8217;s career growth just as a company owns its products and inspiring from this the book has been divided into 5 parts:</li>
<ul>
<li>Choosing market</li>
<li>Investing in your product</li>
<li>Executing</li>
<li>Marketing yourself</li>
<li>And Keeping the edge</li>
</ul>
<li>This sets the tone for the rest of the book</li>
</ul>
<div><strong>Choosing the market: </strong></div>
<div>Author tries to address about:</div>
<div>
<ul>
<li>You were fascinated by that technology but didn&#8217;t try to read about it because it wasnt used at work?</li>
<li>Influenced by your parents urge to play safe with the job even if you didn&#8217;t like it.</li>
<li>You are not so excited to go to work and look for reasons to stay back home</li>
<li>Still stuck with old technologies and not sure what to decide to learn</li>
<li>Worried of losing your job to someone else</li>
<li>Why should you care about the business domain you are working on.</li>
</ul>
</div>
<div>In short, this section is all about preparing your self for the change by identifying your current situation, assessing your interests, choosing or short listing the technologies you are planning to learn. Also there are 2 beautiful and inspiring case studies to help you get upbeat.</div>
<div><strong>Investing in Your Product:</strong></div>
<div>Various lessons learnt in this section:</div>
<ul>
<li>Importance of learning to do things rather than getting it done from someone else</li>
<li>Understanding the business working</li>
<li>Importance of getting mentored by more experienced people- I really support this, i have seen how things change when you are mentored or interact with someone more experienced than you.</li>
<li>Sharing improves one&#8217;s knowledge and so its useful to find someone whom you can mentor- The author has given few suggestions on how one can become a mentor.</li>
<li>Importance of practice. Coming out of the comfort zone and trying out new technologies, different paradigms.</li>
<li>Not depending on proprietary technologies and instead adopt open source community driven technologies.</li>
</ul>
<div>At times participating in Forum discussions can help you a lot in Finding a mentor and being a mentor.  Also I would encourage participating in the open source communities and try reading the code and writing patches (This is something I didnt do and I would encourage people to practice this right from their under-graduate studies)</div>
<div><strong>Executing:</strong></div>
<div>Important section and explains how one can start executing the ideas and plans formulated in the previous 2 sections. Various strategies highlighted for executing ideas and plans are:</div>
<ul>
<li>Not procrastinating the work, doing it right now</li>
<li>Monitoring the daily tasks performed</li>
<li>Trying to predict the requirements or tasks &#8211; this is a tough activity but with practice one should become fairly good.</li>
<li>Not trying to day dream about your promotions, hike or trying to target next levels without justifying the current position.</li>
<li>Identifying the value added to the company</li>
<li>Not fearing failure, taking risks and learning from failures. Keeping calm during tough situations.</li>
<li>Judging one&#8217;s ability before taking up tasks- taking up all the tasks is not good and denying all the tasks is also not good.</li>
</ul>
<div><strong>Marketing</strong>:</div>
<div>Its not enough to just analyze, invest and execute the plans, gain more expertise in different technical areas, but what&#8217;s more important is how you present/market yourself. The author tries to-</div>
<div>
<ul>
<li>Explain the need for presenting your skills.</li>
<li>Throw light on how you can get under the focus of your teammates and manager- &#8220;Out of sight is out of mind&#8221; so one has to avoid that.</li>
<li>Explain the importance of writing articles, speaking at conferences and also going to the extent of authoring books on your favorite technologies.</li>
<li>Suggests to participate in open source technologies- write code, try to gain visibility in the community</li>
<li>Setup a blog- and start writing, sharing your ideas, learning. But don&#8217;t try to make a fool of yourself in the process.</li>
</ul>
<div><strong>Maintaining the Edge</strong></div>
<div>&#8220;Its easier to get to the top, but its difficult to stay there&#8221;- this section is written keeping this in mind.</div>
<div>
<ul>
<li>Keeping updated about the technologies &#8211; what&#8217;s promising, what&#8217;s going to be stale.</li>
<li>Trying to incrementally change &#8211; keep getting better each day</li>
<li>Planning the career &#8211; Being agile, welcome changes and adapt.</li>
</ul>
<div><strong>Final thoughts:</strong></div>
<div>
<ul>
<li>Must read book for any software developer</li>
<li>Explained the ideas through sensible analogy</li>
<li>Provides tips to actually implement the discussed idea.</li>
<li>Simple language, short chapters</li>
</ul>
</div>
<div>So what are you waiting for: Buy from <a href="http://www.flipkart.com/books/9350234310?affid=INMohamblo">Flipkart</a> or <a href="http://www.amazon.com/gp/product/1934356344/ref=as_li_tf_tl?ie=UTF8&amp;tag=experieunlimi-20&amp;linkCode=as2&amp;camp=217145&amp;creative=399369&amp;creativeASIN=1934356344">Amazon</a>.</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/10/30/book-review-the-passionate-programmer-written-by-chad-fowler/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Play Framework Cookbook review</title>
		<link>http://blog.sanaulla.info/2011/10/01/play-framework-cookbook-review/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/10/01/play-framework-cookbook-review/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 14:08:22 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[play framework]]></category>
		<category><![CDATA[play framework cookbook]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1006</guid>
		<description><![CDATA[In a previous post I had mentioned that I would be soon reviewing the Play Framework Cookbook. So here it is- Chapter-1 Basics of Play Framework- Concise coverage of basic features of the Play Framework. Though you must be using &#8230; <a href="http://blog.sanaulla.info/2011/10/01/play-framework-cookbook-review/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F10%2F01%2Fplay-framework-cookbook-review%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F10%2F01%2Fplay-framework-cookbook-review%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=Java,play+framework,play+framework+cookbook,review&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In a <a href="http://blog.sanaulla.info/2011/08/26/play-framework-cookbook-preview/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">previous post</a> I had mentioned that I would be soon reviewing the <a href="http://link.packtpub.com/WCM13y">Play Framework Cookbook</a>. So here it is-<img class="alignright" title="Play Framework Cookbook" src="https://www.packtpub.com/sites/default/files/imagecache/productview/5528OS_Play%20Framework%20Cookbook_Frontcover.jpg" alt="" width="124" height="152" /></p>
<p><strong>Chapter-1 Basics of Play Framework</strong>-</p>
<ul>
<li>Concise coverage of basic features of the Play Framework. Though you must be using the Play Framework <a href="http://www.playframework.org/documentation/1.2.3/home">documentation </a>for a more detailed information. The last few sections which explain- Extensions, Suspendable requests need a bit more explanation.</li>
<li>Good to have, as one can refresh the basic concepts.</li>
</ul>
<div><strong><span id="more-1006"></span>Chapter-2 Using Controllers</strong></div>
<div>
<ul>
<li>Few advanced concepts on using controllers- like Authentication, caching, rendering pdfs, rendering json, RSS readers, custom validation annotations.</li>
<li>This is a kind of advanced stuff. Caching is explained in terms of the HTTP caching headers as well as one section on authentication using HTTP Digest authentication.</li>
<li>Examples shown use a Test Driven development approach (TDD) which is a good way to develop and test.</li>
<li>This was a heavy content for me to understand. I dont think the HTTP Digest authentication and the http caching details were required? The caching api provided by the Play framework is good enough for caching (and it even supports memcache).</li>
<li>I liked the section on authentication and authorization of users as well as the PDF generation.</li>
</ul>
<div><strong>Chapter-3 Making use of modules</strong></div>
<div>
<ul>
<li>Nice and concise overview of few plugins for play framework.</li>
<li>Covers dependency injection using Spring/Guice &#8211; I haven&#8217;t used dependency injection much, so just glanced over this section.</li>
<li>Security module- this is a better plugin than using Http Digest authentication and avoids the task of creating the whole authorization/authentication model. Author briefly covers the authentication as well as the authorization concepts.</li>
<li>Using CRUD with security &#8211; this uses both CRUD and Security modules. This is like an extension to the previously covered module.</li>
<li>Nice to see the author covering the MongoDB module &#8211; converting the existing sample application (provided with the book) to use mongodb. There is another section on storing the files in mongodb and avoiding the use of filesystem for this.</li>
<li>All of the sections requires one to go through the sample code given, because the code mentioned in the book are only the snippets and not fully working code. (this makes sense, as it helps to trim down the size of the book). Also one can refer to any of these sections as and when its required to use the listed modules.</li>
<li>I would have liked to see the Google App Engine module being discussed as well (may be it would have been good to explain any one dependency injection modules.</li>
</ul>
<div><strong>Chapter-4: Writing Mashups (Creating and using APIs)</strong></div>
<div>
<ul>
<li>One of my favorite areas in web development &#8211; Mashups. I really liked the twitter search example- explains a lot of concepts there. Got to know about Gson for converting between Java and JSON (finally something simpler to parse the json data in Java).</li>
<li>Another good usecase- managing different output formats.</li>
<li>The Google Map API integration example explains the client side only approach to fetch the data unlike twitter example which uses server to make requests to twitter api. Its good that both the approaches are depicted. I think using server to make such requests would be better.</li>
<li>Interesting chapter and one can think of infinitely many ideas for mashups.</li>
</ul>
<div><strong>Chapter-5 and Chapter-6: Building and using Modules</strong></div>
<div>
<ul>
<li>These chapters dealt in detail about the creating of modules (chapter-5) and also  using some of the existing modules (chapter-6)</li>
<li>This is a kind of in-depth explanation and may be its important as it will help to modularize and reuse certain components of the framework.</li>
<li>Though I havent gone in detail for these chapters as I am not so well versed/advanced user of Play Framework but this would be a good reference for anyone interested in writing modules.</li>
</ul>
<div><strong>Chapter-7- Running the Play application in Production</strong></div>
<div>
<ul>
<li>This is the point where most of us dont reach and even though we have something in production we really don&#8217;t automate lot of things. May be the situation doesnt require so much automation or we think its difficult. None the less this chapter explains the two Continuous integration tools which can be used with the Play! applications and explains how one can automate the tests using them.</li>
<li>Shows how one can monitor the application internally and identify the pain points or integrating with external monitoring tools</li>
<li>Also explains about the SSL implementations, Log4J configuration, setting up distributed environment, using different webservers.</li>
<li>This chapter covers few advanced stuff and may be useful when one has a production ready application.</li>
</ul>
</div>
<div>Final thoughts about the book:</div>
<div>
<ul>
<li>This book requires a solid knowledge about the play framework as it tackles the advanced application development related aspects</li>
<li>If you are looking for understanding Play framework then this book is a not for you.</li>
<li>This book can be used as a reference and may not be required to be read end-to-end.</li>
<li>One can pick up any topic and start reading and implementing the solution and there&#8217;s not much dependency between the chapters.</li>
<li>This is a really good example of how a cookbook can be written- Problem, Solution and why it works</li>
</ul>
</div>
<div> A cookbook is good, but I would like to see a book which one can use to learn the framework that way any beginner can take it up and start learning. May be a book exclusively on modules. A book on using Scala with Play!, lot of them are moving to alternate JVM languages so it can be a good book. Nonetheless <a href="http://link.packtpub.com/WCM13y">Play Cookbook</a> is a good reference for all developers using Play Framework.</div>
</div>
<div>Few formatting issues I would like to point:</div>
<div>
<ul>
<li>It would be better if the new topic in each chapter would begin in a new page. A topic starting after the 3/4th of page doesnt look good.</li>
<li>The code formatting at few places is not good, places where the code lines wrap to the next line.</li>
<li>The alignment of the content could have been justified.</li>
</ul>
</div>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/10/01/play-framework-cookbook-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6th Annual Open Source Awards (2011) &#8211; Packt Publishing</title>
		<link>http://blog.sanaulla.info/2011/09/08/6th-annual-open-source-awards-2011-packt-publishing/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/09/08/6th-annual-open-source-awards-2011-packt-publishing/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 16:57:22 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[awards]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[packt]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=1015</guid>
		<description><![CDATA[Open Source has gained a lot of momentum over the past few years. I have seen it grown in popularity and the number of applications available and the growth of communities around it. Being a Sun Campus Ambassador which played &#8230; <a href="http://blog.sanaulla.info/2011/09/08/6th-annual-open-source-awards-2011-packt-publishing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F09%2F08%2F6th-annual-open-source-awards-2011-packt-publishing%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F09%2F08%2F6th-annual-open-source-awards-2011-packt-publishing%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=awards,cms,Open+Source,packt&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p style="text-align: justify;">
<img class="alignright" src="https://www.packtpub.com/sites/default/files/Packt_OS-AWARDS-2011_0.png" alt="" width="200" height="200" />Open Source has gained a lot of momentum over the past few years. I have seen it grown in popularity and the number of applications available and the growth of communities around it. Being a Sun Campus Ambassador which played a pivotal role in contributing to Open Source community, I was exposed to the Open source early on. And these days we have seen companies like Facebook, Twitter, SpringSource among others contributing to the open source community. Also there are lot of conferences (foss.in, 2011.osidays.com) being organized around these technologies. There are languages (Groovy, Scala, Ruby, JRuby), frameworks (Rails, Grails,Lift) which are growing in their feature set and popularity.</p>
<p style="text-align: justify;">Another such initiative towards helping the open source communities grow and thrive is the <a href="https://www.packtpub.com/open-source-awards-home">Open Source Awards</a> organized annually by Packt Publishing. The <a href="http://www.packtpub.com/open-source-awards-home">2011 Open Source Awards</a> was launched on the 1st week of August by Packt, inviting people to visit <a href="http://www.packtpub.com/">www.PacktPub.com</a> and submit nominations for their favorite Open Source project.</p>
<p style="text-align: justify;">The 2011 Awards will feature a prize fund of $24,000 with several new categories introduced and the vote of the public becoming more influential. This year all CMS projects will compete in an even tighter contest in the Open Source CMS Award category with the now defunct Hall of Fame CMS finalists re-entered into the CMS category. Projects such as Drupal and Joomla! will face off with CMS Made Simple and MODx for the first time since 2008.</p>
<p style="text-align: justify;">While the Most Promising Open Source Project and the Open Source JavaScript Libraries categories will be back for a second year, Packt is introducing new categories for Open Source Business Applications, Open Source Multimedia Software and Open Source Mobile Toolkit and Libraries. These new categories will ensure that the Open Source Awards remain committed to providing the platform to recognise excellence within the community while supporting Open Source projects both new and old.</p>
<p style="text-align: justify;">Packt has opened up nominations for people to submit their favorite Open Source projects for each category at <a href="http://www.packtpub.com/open-source-awards-home">www.PacktPub.com/open-source-awards-home</a> . The top five in each category will go through to the final, which begins mid-September. For more information on the categories, read Packt’s recent announcement: <a href="http://www.packtpub.com/blog/2011-open-source-awards-announcement">www.packtpub.com/blog/2011-open-source-awards-announcement</a>.</p>
<p style="text-align: justify;">Voting beings from September 19th and goes on till October 31st 2011. So vote to see your favorite open source project winning. And what more you can get lucky to win a Kindle!</p>
<p style="text-align: justify;">
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/09/08/6th-annual-open-source-awards-2011-packt-publishing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Play Framework Cookbook- Using Play! in a better way- A preview</title>
		<link>http://blog.sanaulla.info/2011/08/26/play-framework-cookbook-preview/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
		<comments>http://blog.sanaulla.info/2011/08/26/play-framework-cookbook-preview/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 10:31:51 +0000</pubDate>
		<dc:creator>Mohamed Sanaulla</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Web Frameworks]]></category>
		<category><![CDATA[mvc]]></category>
		<category><![CDATA[play framework]]></category>
		<category><![CDATA[web framework]]></category>

		<guid isPermaLink="false">http://blog.sanaulla.info/?p=990</guid>
		<description><![CDATA[I had written a brief introductory post about Play! Framework and since then I havent written much about it. Not before I got an opportunity to review the Play Framework Cookbook. Before coming back to Play! I used Gaelyk for &#8230; <a href="http://blog.sanaulla.info/2011/08/26/play-framework-cookbook-preview/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F08%2F26%2Fplay-framework-cookbook-preview%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.sanaulla.info%2F2011%2F08%2F26%2Fplay-framework-cookbook-preview%2F&amp;style=compact&amp;service=is.gd&amp;hashtags=Java,mvc,play+framework,web+framework&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I had written a brief <a href="http://blog.sanaulla.info/2011/02/20/play-framework-first-thoughts/#utm_source=feed&amp;utm_medium=feed&amp;utm_campaign=feed">introductory post</a> about <a href="http://www.playframework.org">Play! Framework</a> and since then I havent <img class="alignright" title="Play Framework Cookbook" src="https://www.packtpub.com/sites/default/files/imagecache/productview/5528OS_Play%20Framework%20Cookbook_Frontcover.jpg" alt="" width="125" height="152" />written much about it. Not before I got an opportunity to review the <a href="http://link.packtpub.com/WCM13y">Play Framework Cookbook</a>. Before coming back to Play! I used <a href="http://gaelyk.appspot.com/">Gaelyk</a> for a long time and found it really useful to get started quickly on any project. But there I had to setup up lot of things myself (though its coming up with its own <a href="http://gaelyk.appspot.com/plugins">Plugins</a>) and this is both Good and Bad- Good because I can configure things myself and thereby have a hold over the features configured and Bad because I had to spend a lot of time on configuring things rather than solving the problem for which the application is being developed. Moreover I had to learn <a href="http://groovy.codehaus.org/">Groovy</a> for that but I could learn a lot of it while using the framework itself. To overcome the Bad things listed a few lines before I was thinking of moving to Grails- the fact that I knew workable amount of Groovy made me think of taking up Grails, but I have a account with an hosting provider which supports Rails/Php and not JVM based applications. This made me think of taking up Rails but I had to learn Ruby for that. So amidst all these confusions I got another opportunity to look back at Play and see if I can make use of the framework now ( and now that I have lot of ideas for the applications to develop).</p>
<p>Meanwhile over a few days (few weeks? hopefully not that much time) I will be reviewing <a href="http://link.packtpub.com/WCM13y">Play Framework Cookbook</a> and alongside see how I can leverage Play for my application development. A quick look at the contents of the book and reading through the Foreword the first 2 chapters would be helpful to understand the basics of Play Framework- it would be a quick overview as the book is not meant to teach the basics of the framework instead to give quick solutions to common use cases of the framework. The per-requisite for the book is to have read through the tutorials and worked through the sample applications using the framework.</p>
<p>As far as I am aware <a href="http://link.packtpub.com/WCM13y">Play Framework Cookbook</a> is one of the two books available for Play Framework. The other being http://www.the-play-book.co.uk/index.php (not sure if this is released/is in print)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sanaulla.info/2011/08/26/play-framework-cookbook-preview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  blog.sanaulla.info/feed/ ) in 0.53153 seconds, on Jan 28th, 2012 at 3:19 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Jan 28th, 2012 at 4:19 pm UTC -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- Quick Cache Is Fully Functional :-) ... A Quick Cache file was just served for (  blog.sanaulla.info/feed/ ) in 0.00074 seconds, on Jan 28th, 2012 at 3:33 pm UTC. -->
