My stint with TOGAF™ 9 (by Open Group) architecture started today. I'm attending a 5 Day full time classroom training course on TOGAF™ 9. Day 1 got over today. It was little taxing to sit thru for almost 9 hours on first day. I don't blame the instructor - he has lots to cover - moreover he made it really interesting answering many questions - even vague and stupid questions from audience. It is just that am lost touch with these full day trainings'. He encouraged lots of participation and quoted good examples from his experience and learning.
TOGAF™ defines a methodology as well as a framework for Enterprise Architecture. It is interesting to know that the first version of TOGAF™ came out in 1995 and was based on the US Department of Defense Technical Architecture Framework for Information Management (TAFIM). It has gone thru multiple revisions and recently in 2009 - TOGAF™ 9 version was released. Check out the Wikipedia link - gives a good brief overview.
Today the focus was more on Introduction, Why Enterprise Architecture? Why TOGAF™? and good introduction on TOGAF™ ADM framework and its phases (below image). TOGAF™ ADM is the heart and soul of TOGAF™ 9 methodology.
Until next time.. i.e. tomm
Tryst with software development, web and Java.. “a man whom life intoxicates, who has no need of wine” (Anaïs Nin).
October 3, 2011
September 30, 2011
Play Framework CookBook - Book Review - worth buying
It has been a while I got hold of new book on Play framework from Packt publications - Play Framework Cookbook. I just completed reading this book.
Play online documentation is itself awesome - explaining the basics and leaving the readers to explore complex features on these basics. This book complements the online documentation and digs deep on some of the great features of the framework - providing practical techniques with source code.
The book is written by Alexander Reelsen.
Pre-requisites:
This book is intended for experienced Play users - not the beginners. By experienced I mean, users who understand the basics, high level architecture of Play and who have worked on few examples. There is very less introductory stuff.
Review:
The book covers the Play 1.2 version, whereas the current online version available online is 1.2.3. One of the technical review member is none other - Guillaume Bort - the creator of the Play framework. There is no question of technicalities and correctness of the code examples.
There are 7 chapters with an Appendix covering about 60 recipes.
The most useful chapters that I found where:
1. Leveraging Modules - This chapter covers dependency injection with Spring and Guice. There is a recipe of using MongoDB module which I found useful. The recipes are useful and gives a good insight into how modules can provide powerful extensions to Play’s core functionality.
2. Introduction to Writing Modules - This is another useful chapter - which is not easily found on the web. When the project size increases, it is best to split into modules and manage the complexity. This covers Play plugins, understanding events, managing module dependencies.
3. Running in Production - This is an very important chapter which will be most useful for any project team. Almost all the recipes presented in this chapter like - Test automation, SSL for certain controllers, running jobs in distributed environment are very useful and clearly explained.
Criticisms
1. The code examples span multiple pages and not very well formatted. This is nothing to do with the content but with more of formatting and presenting. Just look at any O'reilly book, their editors do an awesome job
2. Few recipes lack good explanation - it could have been improved - For e.g. - "Understanding events" in the "Introduction to Writing Modules"
3. The reader can make out that English is not the first language of the Author. This is some room for improvement in this area.
Conclusion: It is definitely a very useful book for teams who have already started using the framework. As I said earlier - it complements the online documentation. It is a good buy - worth the investment.
Disclosure: I was provided with an eBook copy of the Play Framework Cookbook by Packt Publishing for the purposes of this review.
Play online documentation is itself awesome - explaining the basics and leaving the readers to explore complex features on these basics. This book complements the online documentation and digs deep on some of the great features of the framework - providing practical techniques with source code.
The book is written by Alexander Reelsen.
Pre-requisites:
This book is intended for experienced Play users - not the beginners. By experienced I mean, users who understand the basics, high level architecture of Play and who have worked on few examples. There is very less introductory stuff.
Review:
The book covers the Play 1.2 version, whereas the current online version available online is 1.2.3. One of the technical review member is none other - Guillaume Bort - the creator of the Play framework. There is no question of technicalities and correctness of the code examples.
There are 7 chapters with an Appendix covering about 60 recipes.
The most useful chapters that I found where:
1. Leveraging Modules - This chapter covers dependency injection with Spring and Guice. There is a recipe of using MongoDB module which I found useful. The recipes are useful and gives a good insight into how modules can provide powerful extensions to Play’s core functionality.
2. Introduction to Writing Modules - This is another useful chapter - which is not easily found on the web. When the project size increases, it is best to split into modules and manage the complexity. This covers Play plugins, understanding events, managing module dependencies.
3. Running in Production - This is an very important chapter which will be most useful for any project team. Almost all the recipes presented in this chapter like - Test automation, SSL for certain controllers, running jobs in distributed environment are very useful and clearly explained.
Criticisms
1. The code examples span multiple pages and not very well formatted. This is nothing to do with the content but with more of formatting and presenting. Just look at any O'reilly book, their editors do an awesome job
2. Few recipes lack good explanation - it could have been improved - For e.g. - "Understanding events" in the "Introduction to Writing Modules"
3. The reader can make out that English is not the first language of the Author. This is some room for improvement in this area.
Conclusion: It is definitely a very useful book for teams who have already started using the framework. As I said earlier - it complements the online documentation. It is a good buy - worth the investment.
Disclosure: I was provided with an eBook copy of the Play Framework Cookbook by Packt Publishing for the purposes of this review.
September 28, 2011
Software Architecture Review
Software Architecture Review - in my opinion happens at two levels
1. Macro Level
2. Micro Level
To review an existing system for any recommendations or trouble shooting - is not a one man job especially for complex Enterprise systems. This is simply not feasible. This is a team effort -at least a team of 3 to 4 - you need strong developers, architects, designers, database architects, domain architects etc.
But for simple to medium complex applications - one person can do the review - provided he networks and seeks help in areas which he is not hands-on.
Coming to the review part, first and foremost - the reviewer (or the review team) should understand from the stakeholders:
Why this review is being conducted?
What are the existing concerns?
What measures have they taken already to address the issues? What have they learned till now?
Or is it a pro-active measure by the management?
These questions would set the right direction for the reviewer. He should exercise his personal judgment and be unbiased.
At Macro Level - the focus should be on the
1. Macro Level
2. Micro Level
To review an existing system for any recommendations or trouble shooting - is not a one man job especially for complex Enterprise systems. This is simply not feasible. This is a team effort -at least a team of 3 to 4 - you need strong developers, architects, designers, database architects, domain architects etc.
But for simple to medium complex applications - one person can do the review - provided he networks and seeks help in areas which he is not hands-on.
Coming to the review part, first and foremost - the reviewer (or the review team) should understand from the stakeholders:
Why this review is being conducted?
What are the existing concerns?
What measures have they taken already to address the issues? What have they learned till now?
Or is it a pro-active measure by the management?
These questions would set the right direction for the reviewer. He should exercise his personal judgment and be unbiased.
At Macro Level - the focus should be on the
- Big picture
- What problem is being solved?
- Looking at Architectural layers, Domain objects, their dependencies
- Metrics (Size of the system, violations, outliers)
- How are the NFRs addressed?
- History, timeline of the project execution
- Bug database - if one exists
- What kind of tools the team uses?
- Continuous Integration (i.e. are nightly builds happening)
- Process, guidelines, standards followed
- Team Dynamics
- Code review using many opensource or commercial tools i.e. static analysis of the code
- Class Design
- Build file - How is the build done?
- Does the team has Source Control? Look at the commit history? What is the trend?
- Are there unit testcases?
- Coding standards and guidelines
- Peer review process
September 26, 2011
Installed Scala...the journey begins..
Scala has caught my interest lately. It has been due on my learning list.
Also - Play Framework (which I'm currently using) has got awesome Scala support (I see lot of answers and questions of Play and Scala on the Google groups).
I've read the primer..looks very interesting. Now to do code something concrete.
To download Scala (latest as of today) and install on Mac (Snow Leopard 10.8) is quite easy:
Open a terminal and type scala and you should see the below output
To begin - here is the awesome link on Learning Scala for beginners.
I also installed Scala Eclipse IDE - a plugin for Scala development on Eclipse.
Until next time...
Also - Play Framework (which I'm currently using) has got awesome Scala support (I see lot of answers and questions of Play and Scala on the Google groups).
I've read the primer..looks very interesting. Now to do code something concrete.
To download Scala (latest as of today) and install on Mac (Snow Leopard 10.8) is quite easy:
curl -O http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final-installer.jarAfter it is downloaded, execute the below command
java -jar scala-2.9.1.final-installer.jarI installed scala at this location
~/scalaAdd the executable to the path.
vim .profile # append or add to the PATH variable ~/scala/bin export PATH=$PATH:~/scala/bin(or to the bash profile i.e. vim .bash_profile)
Open a terminal and type scala and you should see the below output
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_26). Type in expressions to have them evaluated. Type :help for more information. scala>Try the below example:
scala> val numbers = Map(1 -> "one", 2 -> "two") numbers: scala.collection.immutable.Map[Int,java.lang.String] = Map(1 -> one, 2 -> two) scala> numbers.get(2) res0: Option[java.lang.String] = Some(two) scala> numbers.get(3) res1: Option[java.lang.String] = NoneTo quit the interpreter, just type quit.
To begin - here is the awesome link on Learning Scala for beginners.
I also installed Scala Eclipse IDE - a plugin for Scala development on Eclipse.
Until next time...
September 25, 2011
Packt - 6th Annual Open Source Awards - Finalists
The final nomination list is out of the opensource software on the Packt website.
Whats interesting is jQuery Mobile has gained lot of prominence in last few months. Its a strong contender on the Open Source Mobile Toolkits and Libraries.
The other section which I always keep an watch is Most Promising Open Source Project. PHP rules the web - there are couple of php related frameworks. There one which I like most is the Impress Pages - its looks very promising and a very great content management software. Worth downloading and playing with it.
Please visit the awards home page and vote your favorite one. I just finished voting.
Whats interesting is jQuery Mobile has gained lot of prominence in last few months. Its a strong contender on the Open Source Mobile Toolkits and Libraries.
The other section which I always keep an watch is Most Promising Open Source Project. PHP rules the web - there are couple of php related frameworks. There one which I like most is the Impress Pages - its looks very promising and a very great content management software. Worth downloading and playing with it.
Please visit the awards home page and vote your favorite one. I just finished voting.
September 21, 2011
Play Framework - Excel report example
It's breeze to create excel reports using Play framework. Let me run thru an example.
Let's create a sample project - excel-example.
However there is one additional library that would be required to ouptut xslx excel formats - which is the newer format depending on Office Open XML documents. This is because xslx is basically a zip format.
Download the ooxml-schemas-1.1.jar from the maven repository and put it in the lib directory of the excel-example project.
Then eclipsify again so that eclispe classpath reflects the new dependencies.
Start the play server.
I have created a simple xslx file which shows displays the list of customers and their phone numbers. You can get the file here. Below is an image for easy reference. Using jxls is a great advantage. Your excel template can contain all required formatting, formulas, macros etc which will be preserved intact. You need to use specific notation (common these days in groovy, ruby language) to indicate placement of data. Refer the below image.
Save this file under under
The home page contains just one link to download the excel report as shown below
Edit the controller Application.java and add a method - customerphonelist() which outputs the excel file as shown below:
Line No 22 to 25 creates a Customer model class and populates it with some random data.
Line No 26 to 30 puts the objects in to the renderArgs map. These objects would be available as part of the actual excel file which can be used to render the dynamic content.
Line No 29 is of special interest which sets the ASYNC to true. This is a very powerful feature of Play framework. This helps in transparent asynchronous rendering of the excel. You don't have to deal with Future, Promise, await, request.new etc and you get the power for nearly free. The existing HTTP request is suspended and then when the excel report generation is done, this thread is resumed and the response sent back to the client. Think about the fact that a large Excel table rendering might take as long as 500ms and blocking request handling thread for half second is NOT acceptable in a high performance web server like play which use only limited thread (N+1) to handle web requests. Read more about this here.
Last step :), Open
That completes the example.
Let's create a sample project - excel-example.
$ play new excel-exampleThen eclipsify and import into eclipse.
$ play eclipsify excel-exampleEdit the dependencies.yml and include the excel module
# Application dependencies
require:
- play 1.2.3
- play -> excel 1.2.3
Run the play dependencies command. Play connects to the web and downloads the excel-module into the modules directory$ play deps excel-example ~ _ _ ~ _ __ | | __ _ _ _| | ~ | '_ \| |/ _' | || |_| ~ | __/|_|\____|\__ (_) ~ |_| |__/ ~ ~ play! 1.2.3, http://www.playframework.org ~ ~ Resolving dependencies using /Users/play/excel-example/conf/dependencies.yml, ~ ~ play->excel 1.2.3 (from playLocalModules) ~ ~ Installing resolved dependencies, ~ ~ modules/excel-1.2.3 -> /Users/play/frameworks/play-1.2.3/modules/excel-1.2.3 ~ ~ Done! ~Plays excel module uses jxls internally which uses Apache POI library - the one and only one library in Java world for excel manipulation. All the dependencies of jxls are bundled with excel-module and dependencies managed.
However there is one additional library that would be required to ouptut xslx excel formats - which is the newer format depending on Office Open XML documents. This is because xslx is basically a zip format.
Download the ooxml-schemas-1.1.jar from the maven repository and put it in the lib directory of the excel-example project.
Then eclipsify again so that eclispe classpath reflects the new dependencies.
$ play eclipsify excel-exampleRefresh the Project in eclipse.
Start the play server.
$ play run excel-example ~ _ _ ~ _ __ | | __ _ _ _| | ~ | '_ \| |/ _' | || |_| ~ | __/|_|\____|\__ (_) ~ |_| |__/ ~ ~ play! 1.2.3, http://www.playframework.org ~ ~ Ctrl+C to stop ~ JPDA port 8000 is already used. Will try to use any free port for debugging Listening for transport dt_socket at address: 50675 00:54:21,975 INFO ~ Starting /Users/play/excel-example 00:54:21,979 INFO ~ Module excel is available (/Users/play/frameworks/play-1.2.3/modules/excel-1.2.3) 00:54:22,603 WARN ~ You're running Play! in DEV mode 00:54:22,769 INFO ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...check at localhost:9000, you should see a welcome page (I'm just using command line to do a quick check).
$ curl http://localhost:9000The next step is to Create Sample Excel template file
I have created a simple xslx file which shows displays the list of customers and their phone numbers. You can get the file here. Below is an image for easy reference. Using jxls is a great advantage. Your excel template can contain all required formatting, formulas, macros etc which will be preserved intact. You need to use specific notation (common these days in groovy, ruby language) to indicate placement of data. Refer the below image.
excel-example/app/views/Application/customerphonelist.xlsxLets edit the default index.html which is under excel-example/app/views/Application/
The home page contains just one link to download the excel report as shown below
#{extends 'main.html' /}
#{set title:'Home' /}
<a href="@{customerphonelist()}"/> Download Customer Phone Numbers Excel Report </a>
#{set title:'Home' /}
<a href="@{customerphonelist()}"/> Download Customer Phone Numbers Excel Report </a>
Edit the controller Application.java and add a method - customerphonelist() which outputs the excel file as shown below:
package controllers;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.RandomStringUtils;
import models.Customer;
import play.Logger;
import play.modules.excel.RenderExcel;
import play.mvc.Controller;
import play.mvc.With;
@With(ExcelControllerHelper.class)
public class Application extends Controller {
public static void index() {
render();
}
public static void customerphonelist(){
Logger.info("Generating Customer Phone List Excel report ");
request.format = "xlsx";
Date date = new Date();
String user = "Bob";
List customers = new ArrayList();
for (int i = 0 ;i < 10; i++){
customers.add(new Customer("Mr", RandomStringUtils.randomAlphabetic(15), RandomStringUtils.randomNumeric(10)));
}
renderArgs.put("date", date);
renderArgs.put("user", user);
renderArgs.put("customers", customers);
renderArgs.put(RenderExcel.RA_ASYNC, true);
renderArgs.put(RenderExcel.RA_FILENAME, "customer_list_report.xlsx");
render();
Logger.info("Completed Customer Phone List Excel report ");
}
}
Above at line no 11 - @With(ExcelControllerHelper.class)annotation is used. ExcelControllerHelper class is part of play excel module. @With is an interceptor. This interceptor loads the excel template.
Line No 22 to 25 creates a Customer model class and populates it with some random data.
Line No 26 to 30 puts the objects in to the renderArgs map. These objects would be available as part of the actual excel file which can be used to render the dynamic content.
Line No 29 is of special interest which sets the ASYNC to true. This is a very powerful feature of Play framework. This helps in transparent asynchronous rendering of the excel. You don't have to deal with Future, Promise, await, request.new etc and you get the power for nearly free. The existing HTTP request is suspended and then when the excel report generation is done, this thread is resumed and the response sent back to the client. Think about the fact that a large Excel table rendering might take as long as 500ms and blocking request handling thread for half second is NOT acceptable in a high performance web server like play which use only limited thread (N+1) to handle web requests. Read more about this here.
Last step :), Open
http://localhost:9000and click on the Download Customer Phone Numbers Excel Report link. A excel report should be generated and should look some thing like below.
That completes the example.
September 19, 2011
Let the Force be with you --Yoda :)
Created a Salesforce developer account. Completed a simple cookbook example. No coding yet, most of it from the developer portal, using mouse and clicking to create apps and entering label values.
Everything is controlled on the platform - database tables (called as Custom Objects in Salesforce language), form creation etc. Prima facie the tool looks like it targets Business users to create basic enterprise apps.
All the development happens on the Web page (no IDE required). Also there is an Eclipse plugin available to do the development.
The programming language is Apex (predominantly Java syntax) but the code gets compiled to a meta-data which gets interpreted by Apex runtime.
Apps created on SalesForce are completely data-driven and tightly integrated with Data. You can create apps and share with others as well as use any of the available apps on the platform (provided you have rights). Common enterprise services like user management, file upload, reports, search etc are available and usable without any customization.
Its easy to get started and the developer account is free, register here.
The example which I tried is Warehouse example.
Some basics and fundamentals of the platform are here, which I have started going thru it.
I have just spent 1 hr and it was fairly easy to try out hands on the Force platform.
I have barely scratched the surface ...will keep exploring it.
Everything is controlled on the platform - database tables (called as Custom Objects in Salesforce language), form creation etc. Prima facie the tool looks like it targets Business users to create basic enterprise apps.
All the development happens on the Web page (no IDE required). Also there is an Eclipse plugin available to do the development.
The programming language is Apex (predominantly Java syntax) but the code gets compiled to a meta-data which gets interpreted by Apex runtime.
Apps created on SalesForce are completely data-driven and tightly integrated with Data. You can create apps and share with others as well as use any of the available apps on the platform (provided you have rights). Common enterprise services like user management, file upload, reports, search etc are available and usable without any customization.
Its easy to get started and the developer account is free, register here.
The example which I tried is Warehouse example.
Some basics and fundamentals of the platform are here, which I have started going thru it.
I have just spent 1 hr and it was fairly easy to try out hands on the Force platform.
I have barely scratched the surface ...will keep exploring it.
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 :
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.
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
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...
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 -
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 ..
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)
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):
References : here
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 restartNote: 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
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.
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..
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..
June 15, 2011
June 12, 2011
March 23, 2011
Testing In Java
Check out this SlideShare Presentation:
Testing In Java
View more presentations from David Noble.
March 22, 2011
Productivity Gains Using Open Source products
Check out this SlideShare Presentation:
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."
* 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.
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.
Subscribe to:
Posts (Atom)







