Jun 23, 2011

Exploring Art with Chrome Store

Chrome Web Store came a long way from its initial conception. Now it hosts thousands of webapps which covers different areas like education, entertainment, family, games etc. It’s very easy to discover and install apps which can sync to all chrome instances running in different machines.

Being an artist in heart, I started to explore different drawing apps in the store.  In this post I would like to introduce you to three different apps and my experience with them.

Well, deviantART muro is really a cool App. There are just 4 modes.Draw, Eraser, Flood Fill and Eye Dropper. In these 4 basic modes, we can use some good number of tools, like weblink,basic,nightmare
smoke,drippy,sketch etc.Good gradient of colors are available and one can make good strokes like curves, free hand, using the “smoke” option. I really enjoyed it. I have few sample works of the same.

Filters are also great like blur, sharpen, glowing edges etc. these are amazing. You can submit your art work to deviantART muro and for that you have to be a registered user. You can’t save your work either unless you are registered with them.  Well, you can take a screenshot! ;) 


2. Aviary
Aviary is a nice App. The liquify tool is really awesome. It’s a nice way to portray abstract art. Shape brush tool is also notable feature with varied shapes like flowers, spray, hair line, leaf etc. The art work can be submitted as your creation by signing up with the aviary, where you get a lot more privilege to work with your art by sharing it with world wide artists. You can even take the derivative of other artists work on it and publish too. For a young, budding talent, this is a nice place to be at!


Sketchpad is yet another awesome App. Not tried much as I have done with deviantART muro. But, one must agree that the user interface is really awesome




For those who really can’t go with Adobe CS5 or any other drawing Applications which is unsatisfactory can try these Apps and enjoy to the core in their imaginary world! So, Happy drawing! :)



Jun 22, 2011

Apache Tuscany : Part 2 -Hello World using Eclipse and Maven

This is the second article in series “ Apache Tuscany” which introduces you to the open source SCA framework Apache tuscany. This post talks about hello world with Apache Tuscany.

Prerequisites
1. Eclipse 3.4 or above
4. Java 1.6

Installing Tuscany distribution
1.Download Apache tuscany 2.0-M5 from the following link
2. Untar(zip) the downloaded tuscany distribution to a directory location. We will refer this location as TUSCANY_HOME

Creating a Maven Project in Eclipse
Step 1 : Goto File->New->Other
Select Maven project and press Next
Step2 : Just keep default setttings and press Next
Step 3: tuscany-contribution-jar as Artifact and press Next

Enter following details
Group id : com.demo
Artifact Id : sca
Package : com.demo.sca

Press Finish . Now you can see a maven project in your eclipse workspace
Source Code
1. Interface
The project creates a interface called as HelloWorldService . This interface is just a java interface having @Remotable annotation. This annotation is used to make interface a remotable interface .
2. Implementation Class
HelloWorldImpl class implements the remotable interface . It uses @Scope(“COMPOSITE”) which says this class (or component) will act as the composite service provider.
3. Composite File
In resource folder , a HelloWorld.composite file will be created. This file will define the configuration for the compositions. Replace the code in HelloWorld.composite by below code.
<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1"
targetNamespace="http://com.demo.sca"
name="hello-sca2">

<component name="HelloworldComponent">
<implementation.java class="com.demo.sca.HelloworldImpl"/>
<service name="HelloworldService">
<interface.java interface="com.demo.sca.HelloworldService" />
<binding.ws uri="http://localhost:8080/HelloWorld" />
</service>
</component>

</composite>
This creates a Web service at URL http://localhost:8080/HelloWorld.
Note that the service name should be as same as the Interface Name

Contribution file
In META-INF , there is a file filed name sca-contribution.xml .It used to specify which component will be used as launching component. Replace the code by below code

<?xml version="1.0" encoding="UTF-8"?>

<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
xmlns:sample="http://com.demo.sca">
<deployable composite="sample:hello-sca2"/>
</contribution>
Building the project
Right click on the project and select Run as >Maven Install . It will create a jar file containing the classes of the project.

Running the project
In this example , we will run the project outside of eclipse . Copy the helloworld.jar to $TUSCANY_HOME/bin

Then goto console
In windows

C:> cd $TUSCANY_HOME /bin(replace by actual path)
C:> ./tuscany.bat helloworld.jar

In linux

$ cd $TUSCANY_HOME/bin ( (replace by actual path)
$./tuscany.sh helloworld.jar

If there are no errors, tuscany will create a web service at http://localhost:8080/HelloWorld

Jun 18, 2011

Apache Tuscany : Part 1 - Installing Tuscany Plug in in eclipse

Apache Tuscany is an open source implementation of Service Component Architecture (SCA).This series of posts discuss how to use tuscany in your projects. This tutorial explains how to install and configure tuscany in eclipse(3.4 and above).

Step 1 : Launch Install New Software (3.5) or Find new software (3.4) from Help.
In Eclipse 3.5:Help-->Install New Software

In Eclipse 3.4:Help-->Software Updates -->Available Software

Step 2 : Add the following site http://www.apache.org/dist/tuscany/java/sca/1.5.1/tuscany-sca-1.5.1-updatesite/
Give some time  till eclipse will fetch necessary dependencies

Step 3 : Once fetching is complete , select Apache tuscany core feature

Step 4:   Eclipse requires old update manager to install the plug in





Allow eclipse to use old update manager . Click on launch

Step 5 : Now you got old update manager . Select “Search for new feature to install” and press next.

Step 6 :  Click on New Remote Site and enter the above url in the URL field and give name as tuscany




..
Step 7 : Press OK
Step 8 : Update manager searches in the url and gives the below screen

Select tuscany and press Next . Accept the licence and hit Next and then finish. There will be a window showing some error . Don't bother about it.Just close that window. In progress view , you can see the progress of installation.In slow connection , eclipse shows some exception in getting jar and asks for retry. Just click yes , whenever exception arises.
Step 9 : Once download is complete , it will ask for installing the download . Just select “Install all”
Step 10: Once the installation is complete , just restart the eclipse . You are set to go with the Apache tuscany.

Jun 17, 2011

Web forms: Do it right, A DZone Story


Web is full of forms. Every day when you browse the web, you come across a lot of forms. May be to register to a new site or to write a comment on a blog which you liked. Over the years, building forms has turned an art, where designers put a lot of effort to make forms less boring and more intuitive and interactive to the users. But most of the time you will come across some of designs which drives you crazy .I came across one of those recently and this post is about it.
              
DZone is well known place to get great articles regarding technology. I am a regular user of DZone from a long time and I have never shared any links using it. But after revamping this blog, I thought let me share it on DZone. When I tried to add a new link, it took me to registration page, which is a standard form to signup. Everything looked normal until I hit with strange problem. Every time, I tried to signup, it failed with an error saying “First address is not correct “. I just started wondering how the system is evaluating the addresses. Does it have some magical map based address validation tool? The field was not blank. So there is no question of null value. I changed the country and all the other options but it kept on failing with same error. It started to drive me crazy. The error message was not giving any information about what might have gone wrong. After so many tries I thought of giving up. But suddenly everything worked and I was a registered user of Dzone. I thought of doing research on this mystery form. After a little poking in source I came to know that the field was expecting two characters “#” and any number, which is used to tell home number or street number. But how should I know that? May be, the developers who build the page thought that every address will have a number which may not be the case always. There are some addresses in my country that doesn’t have any numbers both for home and streets.
So after going through the crazy form, I thought its time to rephrase the rules to build good forms. So the following simple rules to make sure your form don’t suck.

  • Don’t make any assumptions. Because your site going to be accessed from different parts of world.
  • Keep the error message information as informative as possible. Even you can suggest example information to say how the field should be filled.
  • Use Ajax whenever possible rather than waiting till user to click submit 
So when you build your next signup pages, make sure you get it right. Users are becoming smart; they may not have the patience or would have very little interest in wasting time on your forms. So work smart, while building smart forms!



Jun 13, 2011

Art … what role do they play in our lives???

Art is as complex as we are. It is hard for any one of us, artist or not, to understand who we are and what we genuinely do and art, which comes out of this creative chaos, reflects our situation and helps us to recognize its variations, how we connect and disconnect with other people, places and ideas.


For people who don't know what art is about, or for those who see it as belonging to the few, art needs to be relevant to people's daily experience, hopes and aspirations. Then it can begin to inspire people to transform not just themselves but also the world around them.
We all have the perception to play and work with our active and vivid imaginations. Artists help us to connect with ideas of making and destroying so that we may feel more confident about renewal rather than frightened of change.


Art can transform the non-human into the human, the formless into the formed, the everyday into the profound, the passing into the permanent, the gathering into a community, the city into an idea.
Art is where we practice being fully human.Art moves us forward …. So can I see this to be a future?? Integrated with our lives?? With technology?? Hope I’m not wrong…


Google Art Project was one step!!
And I just wish it becomes a cutting edge to the technology we are about to envision…

Book Review: JavaScript Patterns

JavaScript is becoming a universal, ubiquitous language. Though it was initially designed to make web pages dynamic, it has gone beyond that. It invaded server space by efforts like Node.js. It’s the language to develop cross platform mobile applications. In fact in HP WebOS operating system, JavaScript is used to build native applications too. So when JavaScript is poised for world domination, it becomes very important to develop quality and complex applications using this language. In that journey of developing applications, “JavaScript Patterns” by Stoyan Stefanov, may help you immensely to create and develop new things or to garnish your thinking.

Update : Read it online here

"Why is that you have to read yet another JavaScript book?” Even though we have “JavaScript: The good parts”,which is a concise reference to good practices and also there are number of books for design patterns in store. So where does this book fit in your shelf? The following are few highlights which may set it apart from the rest.
  • Talks about JavaScript independent of Browser
  • The first few chapters of this book discusses about JavaScript without even mentioning about the browsers. Wait!!..... “JavaScript without a browser!!!??? “ Yes!!!! JavaScript, is no more a browser only language!! It can be run on other platforms like V8, WebOS and upcoming windows 8. So the book looks at the language without the messy DOM, so that you can appreciate the intuitiveness of the language.
  • Patterns, Patterns, Patterns
  • Every pattern you find in GoF book is discussed here using JavaScript. This book doesn’t follow GoF way of explaining the patterns since it doesn’t make any sense for dynamic languages like JavaScript. The book also gives few examples of patterns from open source libraries like JQuery, YUI which helps the reader to have the glimpse of practical use of patterns.
  • Good, Bad and ugly
  • Douglas crockford “JavaScript: The Good parts” is immensely popular in JavaScript community. This book takes the good practices of the former to the next level by combining them with design patterns. Few things, which were really good, like “eval is evil” found in the former you find it here too.
  • ECMA 5 standard
  • One of the fewest JavaScript books to talk about latest ECMA standard. It talks about the upcoming features in languages and also talks about how your code should be ready to harness it.
  • Development vs. Deployment
  • If you think deploying a JavaScript heavy application is just putting the scripts into html pages, this book proves you wrong!! The book discuses about deployment enhancements like minification, caching, script combing which reduces bandwidth requirements.



It’s a must read JavaScript book for anyone who is developing or who have the plans to develop an application using JavaScript. 240 pages book packs great information and writing style makes you learn a lot about the language as smooth as possible. So give it a shot :) Happy reading... :)