Monday, December 02, 2013

String Immutable

         An immutable object is an object which state is guaranteed to stay identical over its entire lifetime. This is really a good definition. Isn’t it? It means that the state of object once initialized, can never be changed anyhow.
Normally immutability in java is achieved through following steps :
  1. Don’t provide mutator methods for any field
  2. Make all fields final and private
  3. Don’t allow subclasses by declaring the class final itself
  4. Return deep cloned objects with copied content for all mutable fields in class
Please note that while it is possible to implement immutability without "final" keyword, its use makes that purpose explicit, to the human (the software developer) and the machine (the compiler).
           Java also has its share of immutable classes which are primarily String class and wrapper classes. In this post, we will understand the need of immutability for String class.

My First Android Program

Android Hello World


In this tutorial, we show you how to create a simple “hello world” Android project in Eclipse IDE + ADT plugin, and run it with Android Virtual Device (AVD). The Eclipse ADT plugin provided easy Android project creation.

Steps to develop an Android application :
  1. Install Android SDK
  2. Install ADT Eclipse plugin
  3. Create an Android Virtual Device (AVD)
  4. Create Android Project with Eclipse (IDE)
  5. Code it…
  6. Start it in Android Virtual Device (AVD)

Basic setup and installation

Android - Basic setup and installation

Let’s talk about Android development environment. Android development environment is made up of several parts that work together for you to build Android apps.
Let’s take a closer look at each one.

  1. Eclipse Integrated Development Environment
  2. Software Development Kit(SDK)
  3. Android development tool kit
  4. Android packages

Android Version History

Android :
Android is a Linux-based operating system designed primarily for touch screen mobile devices.

It is currently developed by Google in conjunction with the Open Handset Alliance. Initially developed by Android Inc, whom Google financially backed and later purchased in 2005.

Android mobile operating system began with the release of the Android beta in November 2007.

Versions :
Android beta
The Android beta was released on 5 November 2007.

Android 1.0
Android 1.0, the first commercial version of the software, was released on 23 September 2008.

Getting started with Jenkins


          Jenkins is an Open Source leading build server. It is used by many companies and organizations world-wide to build software in several different programming languages.
          It is written in Java, and the only requirements for getting it running are Java and the Jenkins archive, that you can get from jenkins-ci.org.
           Once you've download jenkins.war, you can execute Jenkins by simply type the below command

java -jar jenkins.war 

This should start Jenkins for you at http://localhost:8080.

Sunday, December 01, 2013

Uninstall liferay base portlets

  
     To uninstall(Remove) the liferay base portlets we need to add <include>false</include> to the portlet definition in liferay-portlet.xml file and remove respective display in liferay-display.xml.


    By doing the above we may have some issues with portlets which are using the resources of the removed one.So careful  at the time of removing .


  The best idle approach is : 

         Just clear out the ROOT/WEB-INF/liferay-display.xml file. Taking the portlets out of here will keep them all in Liferay but remove them from a user's ability to place them on a page. It's probably the least impacting way to do this.

Hooks

        Hooks are the most powerful plugin provided by liferay which can be used for customizing Liferay’s core features.
        We can definitely use EXT plugin which can be achieved by Hook plugin but for best practices, we should use hook plugin as it is hot-deployable and also easy for upgradation/migration process.


 Before you start actual development, you should know whether to use Hook or EXT.

Tha 𝗔𝗣𝗜 Design 𝗛𝗮𝗻𝗱𝗯𝗼𝗼𝗸

 Here is the 𝟮𝟬𝟮𝟲 𝗔𝗣𝗜 𝗛𝗮𝗻𝗱𝗯𝗼𝗼𝗸 broken down by architecture: 𝟭. 𝗧𝗵𝗲 "𝗥𝗲𝗾𝘂𝗲𝘀𝘁-𝗥𝗲𝘀𝗽𝗼𝗻𝘀𝗲" 𝗧𝗿𝗶𝗼: ...