tag:blogger.com,1999:blog-31162234148452180472024-03-19T03:48:11.927-05:00Assar Java ConsultingArticles and thoughts on Java technologies, software engineering practices, and agile methods.Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-3116223414845218047.post-38058147573112586982012-09-30T15:21:00.005-05:002012-09-30T15:29:43.560-05:00Team Geek Book ReviewTeam Geek: A Software Developer's Guide to Working Well with Others by Brian W. Fitzpatrick and Ben Collins-Sussman, is a new book published in July 2012. It is written by two Engineers who are thought leaders within Google. They also heavily contributed and led the open source Subversion SVN) project. At the heart of the book is a central theme: Humility, Respect, and Trust (HRT).
The book Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com87tag:blogger.com,1999:blog-3116223414845218047.post-58153097671476397862012-08-12T14:14:00.000-05:002012-08-13T10:48:24.635-05:00Groovy Closures Do Not Have Access to Private Methods in a Super ClassRecently I came upon a groovy oddity. (At least it is perceived by me to be an oddity). Closures in a groovy class do not have access to a private method if that method is defined in the superclass. This seems odd paired against the fact that regular methods in a super class can access private method defined in the super class
Background
Groovy closures have the same scope access to class Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com26tag:blogger.com,1999:blog-3116223414845218047.post-14610454263192182442012-05-20T14:05:00.001-05:002012-06-18T12:09:50.396-05:00Grails Dynamic DropdownRecently I had a UI requirement where a customer wanted to select values from two separate dropdowns. The value of the first dropdown essentially filtered the values for the second dropdown. Given the financial projects we support are not heavy on UI requirements, I had to do some initial learning and experimentation to yield a good implementation. This blog entry details the how to implement Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com105tag:blogger.com,1999:blog-3116223414845218047.post-91872248477639186242012-02-04T15:59:00.001-06:002012-02-05T09:21:12.860-06:00That's Not Agile!If you work with a bunch of agile minded developer's, you often hear the phrase "That's not Agile!" It's quite humorous to hear, because it comes up all the time.
Recently I have been reading Andy Hunt's books and I find them very insightful. The latest book I am reading is "Practices of An Agile Developer", which he co-authored along with Venkat Subramanium. At the beginning of each section Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com6tag:blogger.com,1999:blog-3116223414845218047.post-37618473379165601122012-01-16T10:48:00.000-06:002012-01-17T08:01:39.890-06:00Groovy DSL - A Simple ExampleDomain Specific Languages (DSLs) have become a valuable part of the Groovy idiom. DSLs are used in native Groovy builders, Grails and GORM, and testing frameworks. To a developer, DSLs are consumable and understandable, which makes implementation more fluid as compared to traditional programming. But how is a DSL implemented? How does it work behind the scenes? This article will demonstrate a Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com45tag:blogger.com,1999:blog-3116223414845218047.post-77500192891954920572011-11-12T17:19:00.001-06:002012-01-16T10:52:35.343-06:00Pragmatic Thinking: Novice vs ExpertRecently I started reading Andy Hunt's fine book "Pragmatic Thinking And Learning." Hunt is notorious for writing books which offer
practical, insightful advice in which developers can apply to their work
on a daily basis. His most famous book is "The Pragmatic Programmer",
widely considered one of the top agile programmer books of all time.
Even after reading the book 7 years ago, I Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com7tag:blogger.com,1999:blog-3116223414845218047.post-18297032973386537312011-09-21T15:48:00.001-05:002012-01-16T10:53:22.750-06:004 Groovy Tips You May Not KnowI have been programming in Groovy full time for almost two years now, and I feel quite comfortable with it. In fact, the language's idioms, shortcuts, and syntax has become part of my daily programming thinking. This is fantastic as it has opened my mind to unique programming elegance and artistry, but unfortunately on the flip-side it has cause me to cringe when looking at traditional Java code.Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com8tag:blogger.com,1999:blog-3116223414845218047.post-369862259358236622011-08-28T15:37:00.000-05:002012-01-16T10:53:44.144-06:00Database Migration in GrailsThis blog covers the Grails Database Migration Plugin, the official plugin created by Spring Source and based on the popular Liquibase framework. Examples will demonstrate how database migrations can be controlled, managed, and executed.
Database migrations are an important facet of web development. Preserving existing data while seamlessly adding new functionality and tables is Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com95tag:blogger.com,1999:blog-3116223414845218047.post-45700907414363959142011-07-23T13:29:00.001-05:002011-08-25T14:27:16.900-05:00Interviewing Agile CandidatesAt my current client project, the group I am with is expanding rapidly based on recent success of agile projects in the last two years. With the reputation of our group increasing, our group is in demand for development to support the business. This is a great thing.
This means the group has opened up several positions for agile developers. It also means that the core members of the group have Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com6tag:blogger.com,1999:blog-3116223414845218047.post-63280511075430822432011-02-21T16:16:00.001-06:002011-02-22T15:09:46.336-06:005 Handy Groovy ShortcutsGroovy's main advantage over Java programming is the ability for a developer to implement a solution in fewer lines of code. Groovy's idioms produce concise, short, and clean code. Of course, on first look the code may look strange to a Java developer. But once you learn Groovy's shortcuts you realize the value of consciseness and how less noise produces easier maintenance of code. To me, this isNirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com22tag:blogger.com,1999:blog-3116223414845218047.post-17718392724287758922010-12-30T14:48:00.003-06:002010-12-30T15:05:54.437-06:00mockFor and MockFor in GrailsI recently came across a small shortcoming in Grails' mockFor feature. I wasn't able to return a value from a service that was mocked. I get an error where the return value is always a closure, not the value I intended. (Note this occurred in grails v1.1).
I found that using Groovy's MockFor is just as convenient and does not contain this shortcoming.
Concept Overview
Often a developer would Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com17tag:blogger.com,1999:blog-3116223414845218047.post-7726197360350425562010-10-31T22:35:00.168-05:002010-12-13T20:10:23.472-06:00Grails SpringOne 2GX Presentation SummaryThis month I had the privilege of attending the SpringOne 2GX conference in Chicago. It was an amazing event for me where I got to meet the leaders in the field and learned many new things. I primarily went to dive in deep into the latest Groovy and Grails developments, technologies, and trends. This blog serves as a housing place for my notes on each presentation I attended. At the Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com5tag:blogger.com,1999:blog-3116223414845218047.post-32970629477623149592010-10-28T14:49:00.001-05:002010-12-13T20:11:42.202-06:00Grails One to Many Mapping with Foreign KeyGrails is a fabulous light weight framework that operates by convention over configuration. This mode of operation results in significant developer productivity and a decrease in configuration headaches. However, Grails conventions sometimes yield subtle unwanted results. One example is the default one to many unidirectional mapping configuration, in a very specific scenario. Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com14tag:blogger.com,1999:blog-3116223414845218047.post-54222150673975550462010-08-15T18:54:00.001-05:002010-12-13T20:12:41.929-06:003 Common Ways to Use Groovy ClosuresWhat is a Closure?
The concept of closures is an important part of the Groovy language. A closure resembles a function or method in many aspects of programming. For example a closure can take arguments, can have a return value, and can be executed from one or many clients. A closure is essentially a block of code that is defined and executed a later point. A closure can be assigned to a Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com4tag:blogger.com,1999:blog-3116223414845218047.post-82859904729090797132010-07-21T15:06:00.001-05:002010-07-21T16:09:05.933-05:00Software Principles are like some Life PrinciplesSoftware principles are useful tools for design and implementation and they help us produce quality products. However, software principles can be compromised at times. They don't always have to be followed as there are exceptions to the rule. In some ways, they are similar to some life principles, and this blog explores that idea.
Software and Life
In life we have ethics and morals that we liveNirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com3tag:blogger.com,1999:blog-3116223414845218047.post-65967331243827059052010-07-05T13:22:00.004-05:002010-08-28T11:19:05.679-05:00Apply Groovy Curried Closures and Composition to Business RulesGroovy offers new programming idiomsGroovy is a language that operates on the Java platform and is completely compatible with Java. Many of its features are easily grasped by Java programmers attempting to learn the language. For example, Groovy automatically provides getters and setters for attributes on objects, treats numbers and strings as first class objects, and offers a myriad of Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com16tag:blogger.com,1999:blog-3116223414845218047.post-46064310155867597622010-05-10T11:27:00.000-05:002010-05-10T11:27:16.892-05:00JBoss Seam White Paper PublishedJBoss Seam has been in use within industry for a few years now and has a substantial following in the developer market. Recently, I published a paper highlighting how Seam enables Rapid Application Development (RAD) in the context of Agile environments. The paper was written in collaboration with my colleague, Jacob Orshalick.
JBoss Seam: Agile RIA Development Framework
Much Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com10tag:blogger.com,1999:blog-3116223414845218047.post-36607021207926063042010-04-04T14:26:00.019-05:002015-03-25T09:19:11.420-05:00My Comprehensive Reading ListRecently I decided to track all the books I have read since I graduated college and compile them into one comprehensive list. What I discovered was that I have read many technical books and that my interests lie in a few discrete other areas. All the books I have read contribute to my career path and my personal life in some way, and I try to apply anything I learned from reading.&Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com20tag:blogger.com,1999:blog-3116223414845218047.post-14446560314204295582010-03-28T21:19:00.009-05:002011-03-02T10:29:14.977-06:00One to One Shared Primary Key is Eagerly Fetched in HibernateOne to One Shared Primary Key is Eagerly Fetched Every so often Hibernates presents some peculiarity that, at first observance, doesn't make much sense. However, once you investigate the peculiarity thoroughly, you see why hibernate behaves the way it does. An instance occurs when mapping a one-to-one relationship with a shared primary key. In certain instances, Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com5tag:blogger.com,1999:blog-3116223414845218047.post-69126756097120469452010-03-22T18:56:00.002-05:002010-03-25T10:12:19.333-05:005 Ways to Think Wisely in DevelopmentRecently I have been reading some popular and interesting social psychology books. The contents are based on empirical evidence and scientific research, and often provide stories about how society operates, and why people behave the way they do. Some of the books in this genre include: Freakonomics, The Tipping Point, Outliers and Kluge
The most recent book I read is Kluge: The Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com10tag:blogger.com,1999:blog-3116223414845218047.post-38031951604672782162010-01-31T20:28:00.000-06:002010-01-31T20:28:45.403-06:00JBoss RichFaces 3.3 Book ReviewBoook Title
JBoss RichFaces 3.3
"Enchance your JSF web applications using powerful Ajax components"
by Demetrio Filocamo
Packt Publishing, November 2009
Introduction
JavaServer Faces has been around for several years now and is an established technology for many enterprises. Many component libraries supplement JSF to provide rich UI development to server applications. JBoss Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com5tag:blogger.com,1999:blog-3116223414845218047.post-2180565408214427942009-10-31T15:54:00.014-05:002010-03-28T21:10:04.511-05:00The Perils of Not Unit TestingOverview
Unit testing is a widely accepted practice in most development shops in this day and age, especially with the advent of the tool JUnit. JUnit was so widely effective and used early on that it has been included in the default distribution of eclipse as long as I can remember and I have been programming professionally in Java for about 8 years. However, the drawbacks of not Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com11tag:blogger.com,1999:blog-3116223414845218047.post-23795874304740989982009-08-23T14:44:00.000-05:002009-08-23T14:51:53.169-05:00One to One shared primary key association in JPA with HibernateOverviewOne of the less commonly used mappings in JPA and Hiberate is the @OneToOne mapping with a shared primary key. Conceptually this type of mapping is simple to understand. However, recently I tried to implement this relationship between two objects and ran into some petty issues. No clear example was listed on the net, so I decided to post a solution on a blog for possible reference for Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com66tag:blogger.com,1999:blog-3116223414845218047.post-49816876672996907472009-08-01T15:14:00.022-05:002009-08-01T22:32:20.648-05:00Why Hibernate does "delete all then re-insert" - its not so strangeOverviewHibernate allows developers to interact with data from a relational database in an object-oriented fashion. This brings a lot of benefits to maintenance of development. However, hibernate is an abstraction of data which essentially is its function as an ORM, and this usually forces the developer to know hibernate's internals in order to use the tool effectively.Maintaining collections Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com557tag:blogger.com,1999:blog-3116223414845218047.post-92149114955082077902009-07-12T15:46:00.001-05:002009-08-15T14:12:07.364-05:00Clearing up the mud - Explaining the various "driven developments"OverviewIn recent years within the object oriented and agile community, several approaches to software design and development have materialized and are in use by professional software developers. Test Driven Design (TDD), Domain Driven Design (DDD), Behavior Driven Design (BDD) and Feature Driven Design (DDD) are some of the more well known approaches. While these philosophies all imbibe the Nirav Assarhttp://www.blogger.com/profile/15474798428329603952noreply@blogger.com18