Groovy/Grails Talk
Home     Login     Register
These are all the Blogs posted in January, 2009.
Friday, 30
Handling Db Criteria That Differs Across Domains
In my previous post, I spoke of having forgotten to change the test environment settings when I configured for SQL Server 2005. There really was another solution. The out of the box definition of DataSource.groovy defines the driverClassName, username and password in the outermost dataSource closure. Any or all of these attributes can be moved into the various environment dataSource closures. By doing this, you can have different logins/passwords per environment, or even have different databases, if you wish (though I cannot imagine why you would want your database to differ across environments).
Posted by Bill Turner at 08:56 AM
in GORM, Persistence, DBs | Installation & Configuration

Installing and Configuring SQL Server 2005 in Groovy
This was a relatively simple task to do, though I ran into one gotcha (mainly because I was not paying attention). Here are the steps followed:

1) Created database MyDb using MS SQL Server Management Studio Express

2) Added user MyUser and defined a password. Roles were specified as: db_datareader, db_datawriter, db_ddladmin. The first two allow reading and updating of data. The last allows creation of tables and other DDL commands.

3) Downloaded jdbc driver. http://www.microsoft.com/downloads/details.aspx?FamilyId=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en

4) After executing the archive and extracting to the drive, copy sqljdbc.jar to [APPLICATION_HOME]/lib.

Changed [APPLICATION_HOME]/grails-app/conf/DataSource.groovy as follows:

1) Set dataSource pooled to false

2) Set dataSource driverClassName to "com.microsoft.sqlserver.jdbc.SQLServerDriver"

3) Set dataSource username

4) Set dataSource password

5) Set environments.development.dataSource dbCreate to "update"

6) Set environments.development.dataSource url to "jdbc:sqlserver://localhost:5356;DatabaseName=MyDb"

The port in the url defaults to 1433. I am using a non-standard port number.

I created a domain with no implementation and defined an integration test. Here is the gotcha. When I ran the integration test, it dumped for not being able to find a suitable driver. I had only changed the development dataSource in DataSource.groovy. Once I updated the test dataSource, the tests ran properly.


Posted by Bill Turner at 08:42 AM
in GORM, Persistence, DBs | Installation & Configuration
Saturday, 24
January Groovy And Grails Job market
The TIOBE Programming Community Index has Groovy at 0.135%.
Dice has 12 Groovy/Grails postings this morning, 17 Grails postings, and 31 Groovy postings.
Indeed has 71 Groovy/Grails postings this morning, 121 Grails postings, and 385 Groovy postings.


The search engine results should be considered carefully as the results are just the numbers returned from key word searches.

Posted by Bill Turner at 09:47 AM
in News, Jobs, Marketplace
Friday, 23
My first real project
I've begun working on my first real project, after having gone through Getting Started With Grails by Rudolph (available for free download at www.infoq.com) and Beginning Groovy and Grails by Judd, Nusairat and Shingler. It should be challenging enough. I am still in the process of defining use cases and other preliminary documentation. This is a customer facing web application. Creating a use case flow with swimlanes will make it very easy to describe to the end customers. The big thing, though, that I am most unsure about, is that it seems I will end up with some sort of star schema design for a database (yes, there will be a few typical tables, such as users). I am not sure how this will translate into domain constructs. Likely, I will generate the db separately and attach to it as a legacy app, though I may attempt to define one of the dimensions as a domain. I'll begin prototyping next week. Stay tuned.
Posted by Bill Turner at 06:58 AM
in Domain Modeling | Miscellaneous Topics

It is ironic
It's ironic, I know, that a blog about Groovy and Grails is based upon ColdFusion technology. The reasons for that are many, and, in hindsight, it may have been better for me to have developed the site in G/G or used the open source version an acquaintance spoke of. I had downloaded this CF blog from http://www.daydreaminc.com/demoblog. It seemed to have most of the functionality needed, except that I wanted to cross post between topics, allow for registered users, use captcha for anonymous users (not yet implemented), and allow for multiple bloggers (two close acquaintances, Rich and Doug DesCombaz, of mine might be joining me). Plus, I wanted a section for bios of the bloggers. This needs more work, for I want to link to each bloggers posts. I may change it so that the link on my name in the posts takes you to the bio, and the right nav link gets a list of my blog entries.



Sorry for requiring you to register and login to post comments. Hopefully anonymous posting will be available soon.

[UPDATE: anonymous posting as well as several of the other changes mentioned above are complete.]

Posted by Bill Turner at 06:43 AM
in Miscellaneous Topics
sun mon tue wed thu fri sat
     1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Latest Posts
Archives
Categories
Bookmarks
Authors
Search
Syndicate This Site
Add to Technorati Favorites