September 19, 2011

Packt - 6th Annual Open Source Awards - Please vote your fav Open Source

OpenSource has revolutionized the way - how the software is consumed and delivered these days. Opensource contributors, developers, professionals, users are truly passionate about their contribution and are thorough professionals.
Packt is publishing its 6th Annual Open source awards.
The Open Source Awards is a contest that aims to encourage, support, recognize and reward Open Source projects. There is reward for nominating your favorite OS in several categories :
  • Open Source CMS
  • Open Source Mobile Toolkits and Libraries
  • Most Promising Open Source project
  • Open Source Business Applications
  • Open Source JavaScript Libraries
  • Open Source Multimedia Software
The details are here
Last year my favourite jQuery made it to the top in JavaScript libraries category.
Please nominate your favorites, vote and show your support for Open Source.

September 15, 2011

CoffeeScript - Nice session

Bodil Stokke did a very good presentation at JavaZone on CoffeeScript with lots of code.
She shows that code written in CoffeeScript is much, much lesser compared to Javascript..in-fact sometimes 1/3 fewer lines. CS has lots of syntactic sugar borrowed heavily from Ruby, Python

Check it out...

September 14, 2011

My Choice - Play Framework!

At my work, there was a need to develop the same application for three different platforms - .NET, LAMP and for Java.  I was asked to pick a framework to develop this app in Java. It was easy for my other colleagues for .NET and LAMP as there was not much choice - ASP.NET was picked for .NET and Ruby on Rails for the LAMP stack.
When it comes to Java, I need not say more, there are tons of choices. Burden of Choice. 
The objectives were clear -
  • Rapid development (code - deploy - test cycle)
  • Deployable on popular Web/App servers (Apache Tomcat, JBoss, Oracle, Websphere etc)
  • Deployable on the cloud
  • Best engineering practices (unit testing, functional testing, clean code)
My friend suggested that I don't have much choice - it has to be either Spring or Groovy on Grails. 

Spring has kind of become the de-facto standard for enterprises, followed by JBoss SEAM.
I have a good experience with Spring and have been an early adopter of this great framework. Spring became popular because of the pit-falls of EJB2 and heavyweight runtime.

But over the past few releases, Spring has grown to be a huge framework. It takes a lifetime to be familiar with all the modules of the Spring and the features it supports.  Recent times - Spring is over-engineered, over-complicated and feature creep.
 
With JBoss SEAM stack, you cannot avoid JSF. I never learnt JSF and would never learn it. There is already enough rants on the web about the design flaws of JSF.

Spring Roo is another great tool to improve the developer productivity but again it's not straightforward. It involves GWT, Spring. Maven etc. Too much. All goes well for a trival hello-world or a simple CRUD app, the moment you try to do a little more complex web-app, things start falling apart.

No doubt these are great frameworks, but I wanted to avoid maven and its pom file nightmares, classpath issues, layers and layers of abstraction, enforced rules,  high learning curve etc.

Enter Play framework !

I'm not advocating this is one of the best frameworks, but it truly matches the productivity of RoR, low learning curve, stateless architecture i.e. made for cloud, dramatically reduces the develop/test/deploy cycle, borrows the best things from RoR, DJango and still retaining the best things about Java (rock solid, enterprise strength scalability and security, great external libraries and developer community etc.).

It has been already a month I'm using this great framework and I must say it has been a very memorable experience.
In my next post, I would be giving some nifty features of this framework and more insights

Until next time ..

September 12, 2011

Apache2 + Tomcat6 on Amazon Linux image

From couple of days, I was having issues configuring Apache 2 to re-direct requests to Tomcat 6 on Ubuntu Linux image. Finally resolved the issue today.
Amazon Linux image which I was configuring is linux-image-2.6.32-316-ec2
Basic tutorial of Apache2 HTTPD is here.
Below are the basic steps (assuming Tomcat 6 and Apache 2 are already installed and configured):
apt-get install libapache2-mod-jk

sudo vim /etc/apache2/workers.properties

# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009

sudo vim /etc/apache2/apache2.conf
#Add the below content at the end of the file
LoadModule    jk_module  /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /etc/apache2/workers.properties
JkShmFile     /var/log/apache2/mod_jk.shm
JkLogFile     /var/log/apache2/mod_jk.log
JkLogLevel    info
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

sudo vim /etc/apache2/sites-enabled/000-default
#Replace "DocumentRoot /var/www" 
#with the below 
JkMount / worker1
JkMount /* worker1

sudo /etc/init.d/apache2 restart

Note: In my case Connector port="8009" was already enabled in /etc/tomcat6/server.xml.
References : here

August 19, 2011

Apps on my Mac

It has been a almost 3 months I switched to Mac using it full time for development and day to day usage. It has been an awesome experience.
During this period, I have installed and uninstalled many tools.
Below are some of the best productivity tools that I'm currently using which surely make the development experience a memorable one.

iTerm2  - the best Terminal - must have
Producteev - The Ultimate Free Task Management Solution. Check it out. It even sends reminders of the late tasks, very intuitive to use
Alfred - makes searching the Mac a breeze. A good alternative for spotlight, lots of features for customization
Sophos  Free Antivirus for Mac. Better to be safe than sorry
Magicprefs  - MagicPrefs is a free application for OS X which aims to improve the functionality and configuration options of the Apple Magic Mouse, Magic Trackpad and the MacBook glass trackpad
TextMate - the missing text editor for Mac
TextWrangler - another awesome free text editor, only limitation - no tab support. I used to love notepad++ on Windows. After downloading TextMate, no looking back.
DTerm - is a handy command line tool - A command line anywhere and everywhere. Use it to believe it
EasyFind - Worthy replacement for in-built Spotlight. Searching a file is many many times faster than Spotlight. Lots of options, it compliments with Alfred quicklauncher

..more later




August 16, 2011

Review - Java EE 6 Development with NetBeans 7

Finally I finished reading the Java EE 6 Development with NetBeans 7 book, reading some chapters in detail and skimming other chapters. Lots of screenshots and pictures make it easy to grasp the content and there are plenty of them in this book.

Netbeans 7 is a very sophisticated IDE supporting many languages. Java EE 6 is latest set of standards which aims at developer productivity plus having all the great things from different well established frameworks. Netbeans 7 + Java EE 6 makes a lethal combination.

This is an excellent book for folks who want to use Netbeans 7 IDE to do enterprise Java development work. The book is written keeping in mind developers who are new or less experienced with Netbeans 7 IDE.

This book contains 11 chapters.

The first chapter is targeted for novice Netbeans users, downloading and installing on different platforms. Experienced users can safely skip this section."NetBeans tips for effective development" is an useful section in this chapter; both for beginners as well as experienced Netbeans user.

Creating jsps, servlets, jspf are a breeze in Netbeans 7 using the GUI tools. The basics of this are covered in the second chapter. A good section on securing webapps, with different types of authentication supported for webapps is neatly covered.

Enhancing JSP Functionality with JSTL and Custom Tags chapter is an easy read. This chapter covers the basic of JSTL with sample examples. It also covers the CRUD operations using SQL JSTL tags (important for throwaway prototypes and quick development of DB apps).

Developing Web Applications using JavaServer Faces 2.0 chapter covers details on creating JSF projects primarily focussing on using Netbeans 7 IDE capabilities.
JSF concepts are covered only what is required from a Netbeans 7 usage point of view. Advanced concepts on JSF are not covered such as Lifecycle, phases etc. A couple of pages on this would have helped the reader to understand the big picture especially the beginners.

Then next chapter is devoted to the intro on PrimeFaces component library; which comes pre-bundled with Netbeans 7. Several features and examples are covered.

Interacting with Databases through the Java Persistence API is a very important chapter in the book. It covers the basics of JPA API and shows how Netbeans 7 can help to speed up the development of JPA applications. A complete example is explained covering from connecting to database to Entity relationships, named queries, validation and generating entity model from the existing database schema.

Implementing the Business Tier with Session Beans chapter covers basic intro to Session beans and very basic example on AOP (advanced conceptual features are left out).
But, all the features of Netbeans 7 IDE to create Session beans, Interceptors and deploying EJBs to Glassfish server are covered in detail.

The CDI chapter covers basics on creating CDI aware apps using Netbeans 7 GUI. Netbeans GUI makes it simple to create the CDI using wizards. All the features supported by the IDE for CDI capabilities are covered by the author with an practical example. Easy read.

Messaging with JMS and Message Driven Beans chapter starts with a basic intro on JMS. Netbeans 7 IDE generates all the boilerplate code for creating, sending and receiving JMS messages. An queue example with Glassfish server is highlighted in this chapter. For creating, testing and deploying JMS enabled apps, you never have to leave the Netbeans 7 IDE.

SOAP Web Services with JAX-WS and RESTful Web Services with JAX-RS are the last two chapters covering the two different flavors of Webservices supported by Java EE 6.
Netbeans 7 allows to modify web services via a graphical interface. All the boilerplate is neatly generated by Netbeans 7 IDE. These chapters include a simple examples on creating a Webservice, as well a simple client to consume the webservice. Author also shows how easy it is to expose existing Session EJB using Netbeans 7 as an Webservice. Although a more sophisticated example of using attachments and webservices security would have been very useful for the reader.

Couple of appendices at the end - Appendix A on using the Netbeans 7 debugger and Appendix B on using the Netbeans 7 profiler cover other important features supported by Netbeans IDE.

Targeted Audience:

The book is kind of basic tutorial on Java EE 6 using almost all the features supported by Netbeans 7 IDE. Naturally this book is for beginners (as well as intermediate developers) who want to switch to Netbeans and understand how to develop the new features of Java EE 6.  Advanced concepts of Java EE 6 are not covered.

What missing (My opinion):

The author should have taken one example at the start of the book and chapter-wise added new features with increasing complexity to this example; somewhat mimicking real world project. This way,  it would have been a little easier for the reader to grasp. Again this is my view. But the author has chosen the right example for each chapter to bring out all the features of the Netbeans 7.

The other missing part - A bit of unit testing using Netbeans 7 IDE (probably an Appendix) and couple of Ajax examples. These are kind of important in this agile era.

Conclusion

Overall it is a good book and would make an beginner to an adept Netbeans 7 user.

Thanks Packt for providing an opportunity to review the book.

August 13, 2011

Java EE 6 Development with NetBeans 7

Couple of days back I got hold of the new book - Java EE 6 Development with NetBeans 7 published by Packt Publications written by David R. Heffelfinger.

I'm super excited to read this book. It covers latest Java EE 6 stack - JSF 2.0, EJB 3.1, JPA 2.0, CDI 1.0 and Servlets 3.0 etc.


Will soon be posting a short review of the same.
Until next time..

March 18, 2011

Set Up and Get to Know Your New Mac

Set Up and Get to Know Your New Mac: "If this is your first time with a Mac, we've got you covered with switching guides, a look at the latest version of Mac OS X (Snow Leopard), and a look at what's to come in Mac OS X Lion this Summer.

* Hack Attack: A guide for switching to a Mac:
If you're new to the Mac platform—fresh off the Windows world—this guide to switching explains how to make sense out of all the differences between Windows and OS X, highlighting how to accomplish the same things in OS X you're already completely familiar with doing in Windows.
* Snow Leopard's Four Best Improvements (for Civilians):
Most of Mac OS 10.6's changes are deep in its underpinnings for developers to put to good use. But what do the rest of us get out of Snow Leopard? Modest, but nice, improvements to the everyday Mac workflow.
* What to Expect in Mac OS X 10.7 Lion - Apple didn't reveal too much about the next iteration of their operating system, but here's a sneak peak at what you can expect when Mac OS X Lion is released in Summer of 2011."

January 30, 2011

Top 5 Java Gurus you should know ....

There are many who have contributed and shaped Java to make it as the most influential programming language of choice. Java software as a platform  has grown leaps and bounds. There are more than 12 proprietary and 25+ opensource implementations of Java Virtural Machine. Not to forget the 100+ JVM languages including the high profile ones Clojure, Groovy, JRuby, Scala, AspectJ etc

Below the top 5 gurus or technologist (in my view) who have made the max impact on the growth of Java.
Note: Again, this is my take. I know everybody who works on Java has made an impact and will keep making an impact on the language :).

5. Kent Beck
     @kentbeck , Blog 
 
     Kent Beck - creator of XP, TDD and JUnit.  TDD in Java world is impossible without JUnit. Without TDD, there is simply no good code. All credit goes to Kent.

4. Joshua Bloch
    @joshbloch

    The best book on Java till date is Effective Java ,written by Joshua. Its a must read for every Java   programmer and arguably the best book. He also created Java collections framework and many features on the Java platform.

3. Rod Johnson
    @springrod, Blog

    Creator of the Spring Framework, which has become the de-facto standard framework for creating enterprise Java applications. He ripped apart EJB pitfalls and made POJO development as the norm for enterprise class Java apps.

2. Rich Hickey
   @richhickey, Blog

   Creator of Clojure, a LISP dialect for the JVM. Clojure is extremely well received and adoption rate is impressive.

1. James Gosling
    Blog
   
   Father of Java language. It was year 1994 the year Java was born. Without James, there would have never seen Java.

January 7, 2011

STEAL THIS PRESENTATION!

Check out this SlideShare Presentation:
STEAL THIS PRESENTATION!
View more presentations from @JESSEDEE.

SlideShare Zeitgeist 2010

Check out this SlideShare Presentation. Presentation about presentation..interesting
SlideShare Zeitgeist 2010
View more presentations from Rashmi Sinha.

November 28, 2010

My take on trends to watch out for...

Couple of days back one of my friend asked me what are the 3 things important according to me for upcoming year 2011. What he meant was - What are the 3 things that I would focus next year? That got me into thinking.

This blog post is an attempt in that direction  - which are the trends that I think would make a difference for any software developer to keep up with the fast pace of change.
(Note: Not in any particular order, all are important)

  1. No SQL.
    • Traditional DBs are good but definitely not "one size fits all" solution. We have to understand  these too have some limitations.We have to stop thinking in rows and columns and start thinking in Documents. Get familiar with some of these concepts, find out what makes these (Mongo DB, Redis etc) successful, what kind of problems can be solved by these. This technology is going to thrive.
  2. Scripting language
    • Enough of Java, C++, C#. Enough of OOPS. Its time to open a notepad and do some quick scripting to get things done. Too much dependency on IDEs have made many of us dumb. Its time to brush-up (or learn) scripting language. Simplicity matters. Be it Ruby, Groovy, Perl, PHP. 
  3. Cloud computing
    • Get familiar with Cloud computing architecture. This technology is already 5 years old. Amazon launched its services in 2006. Computing is cheap these days and just a click away. There would be a time in future when everything would be on cloud. This technology would grow by leaps and bounds
  4. Git / Mercurial (Modern Version Control Systems)
    • Speed is the mantra of this age. Gone are the days of client-server versioning system. In this era of opensource and distributed teams, distributed version controls make life of the developers easy. Every developer should be aware of installing and using these distributed configuration management systems.
  5. Web 3.0 (HTML 5)
    • A month back I attended one day conference on HTML 5 conference in NYC. The takeaway from the conference is - HTML 5 is inevitable. It has been already a decade since HTML standards got updated. The big guns (Google, Apple, Microsoft etc) are all supporting it. HTML 5, CSS3 will be the future of the web. Features like Offline storage, drag drop, geo location, canvas etc will make developing "desktop caliber" web apps a breeze. Developers, Architects ignoring this will be left behind.
  6. Functional language
    • History repeats. Computing started with Functional language (Lisp, Scheme etc), moved to procedural (C, Pascal etc) to object oriented (C++, Java. C#) and again back to Functional languages(F#, Clojure, Erlang, Haskell etc). The job trends already indicate a huge demand for Clojure, F# etc. Hardware has become cheap, grid computing has been norm and some real world problems can be solved insanely easy with these functional languages. Its all about "Share Nothing Architecture". No concurrency issues. Its high time for the developers to start thinking differently and learn (or re-learn) the concepts of functional programming
  7. Data visualization
    • At least two billion tweets are being posted per quarter (Source wikipedia). Wealth of information is available on twitter and all the data is public. Everybody would be interested in visualizing this  data in some form (graphs, charts, trees etc ) to make sense of it.  Its too much information out there. Barack Obama knew this and used this technique to do a wonderful campaign for his elections. This trend would keep growing as more data gets collected on the Internet.
  8. Mobile / Tablet platform
    • iPad has been rated as one of the best devices to consume information. Consumers, executives, enterprise folks - all would have one or the other form of tablet devices in the near future. Its the new trend and a growing trend. Analysts call it "arm platform". Architects, Developers should first think of smart phones, then tablets and finally the notebook - when architecting or designing new enterprise or e commerce applications. 
  9. Agile 
  10.  
    This should take care of your learning appetitie for at-least couple of years :). 
    Please share your list ...

    October 8, 2010

    Top 10 qualities of an Architect

    1. Act as an interface between Business & IT
    2. Identify risks (project, technical , business)
    3. Should not be stereotyped (Keep aside your experience, explore & look for possible alternatives)
    4. Keep upto date of latest technology trends – especially in terms of limitations
    5. Excellent presentation / articulation skills
    6. Master (at-least) one Programming language (OO / Functional)
    7. Develop technical intuition  (Usually comes with experience. Read a lot)
    8. Be Passionate. And Don't be too clever.
    9. Take responsibility of your decisions.
    10. Write Good code. If you design it, you should be able to code it.