Monday, December 20, 2010
JPA 2.0 with Spring 3.0 bug
I was trying to make a sample application using Spring3 and JPA2 on my new shiny IntelliJ IDEA 10, but stumbled quickly on a problem when I tried to run the application. Spring was complaining that the version attribute in my persistence.xml was wrong. It was set to "2.0", but Spring insisted that it could only be "1.0". I spent hours trying to figure out where the problem was. A wrong XMLSchema being picked up ? A problem with my JPA libraries ? A problem with my JPA provider ? No. The problem was coming from Spring itself (SPR-6711). Upgrading to Spring 3.0.5 fixed it. What a waste of time. It wouldn't have happened if I had used the latest libraries in the first place, instead of letting IDEA automatically import them (I guess version 3.0.0 were downloaded and added to my project).
Monday, November 8, 2010
Book review : Essential GWT: Building for the Web with Google Web Toolkit 2 (Developer's Library)
Essential GWT: Building for the Web with Google Web Toolkit 2 (Developer's Library)
Essential GWT is a misleading title. You could suppose, as I did, that it contains at least GWT basics. It doesn't. There is an overview of GWT, but nothing which will get you started if you're a beginner. So if you're expecting a tutorial about GWT development, widgets, etc..., pass your way. You should read another book or the online tutorial first. This book should have been named something like "Practical GWT Cookbook", as it contains some recipes about common web development topics like file uploading, security and much more.
I felt that the first half of the book was not very well structured. For example, I didn't understand why there is a paragraph on Code Generation in Chapter 4, Working with Browsers. Explanations are illustrated with code samples, but there are either too few, or too much. Too much, like the methods of the JDBC examples. Only one would have been enough. Too few, like the EJB example. Someone who knows EJB will know how to call a bean. Someone who doesn't will need much more information.
There are some annoying errors, especially in the MVP explanation. The same class gets three or four different names, making it very difficult to follow. MVP is an "essential" topic in this book, so it should have been carefully polished.
Nevertheless, the book still contains some interesting tips and techniques. I particularly enjoyed the speed measurement and the testing chapter. But overall I think it is falling short at explaining the essential.
Essential GWT is a misleading title. You could suppose, as I did, that it contains at least GWT basics. It doesn't. There is an overview of GWT, but nothing which will get you started if you're a beginner. So if you're expecting a tutorial about GWT development, widgets, etc..., pass your way. You should read another book or the online tutorial first. This book should have been named something like "Practical GWT Cookbook", as it contains some recipes about common web development topics like file uploading, security and much more.
I felt that the first half of the book was not very well structured. For example, I didn't understand why there is a paragraph on Code Generation in Chapter 4, Working with Browsers. Explanations are illustrated with code samples, but there are either too few, or too much. Too much, like the methods of the JDBC examples. Only one would have been enough. Too few, like the EJB example. Someone who knows EJB will know how to call a bean. Someone who doesn't will need much more information.
There are some annoying errors, especially in the MVP explanation. The same class gets three or four different names, making it very difficult to follow. MVP is an "essential" topic in this book, so it should have been carefully polished.
Nevertheless, the book still contains some interesting tips and techniques. I particularly enjoyed the speed measurement and the testing chapter. But overall I think it is falling short at explaining the essential.
Labels:
books
Wednesday, November 3, 2010
Book review : Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions, Second Edition
Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions, Second Edition
No need to introduce Tom Kyte from "Ask Tom". Now imagine this great Oracle Database expert, sitting in front of you, lecturing about topics like table and index design or file management. Impossible you think ? Think twice. "Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions" is Tom Kyte giving you a lecture. The book talks to you. The book forces you to open SQL*Plus and try yourself. This book is full of examples. Reading about databases might not be as fun as reading about programming, but you'll never get bored.
A chapter at the beginning of the book will help you create a proper test environment. Other chapters can be picked up in any order. In each chapter the author introduces some features, explains why you could be interested in them and how to use them. This includes tons of examples, common pitfalls and misuses.
I've been using Oracle Database for years, not as a DBA, but as a software developer. The amount of knowledge I have learnt with this book is tremendous. Tom Kyte has completely changed the way I see the database. Every developer using the Oracle Database should know more than just SQL. If you're one of them, grab this book as soon as possible.
No need to introduce Tom Kyte from "Ask Tom". Now imagine this great Oracle Database expert, sitting in front of you, lecturing about topics like table and index design or file management. Impossible you think ? Think twice. "Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions" is Tom Kyte giving you a lecture. The book talks to you. The book forces you to open SQL*Plus and try yourself. This book is full of examples. Reading about databases might not be as fun as reading about programming, but you'll never get bored.
A chapter at the beginning of the book will help you create a proper test environment. Other chapters can be picked up in any order. In each chapter the author introduces some features, explains why you could be interested in them and how to use them. This includes tons of examples, common pitfalls and misuses.
I've been using Oracle Database for years, not as a DBA, but as a software developer. The amount of knowledge I have learnt with this book is tremendous. Tom Kyte has completely changed the way I see the database. Every developer using the Oracle Database should know more than just SQL. If you're one of them, grab this book as soon as possible.
Labels:
books
Tuesday, October 5, 2010
Vimperator
Vimperator is a Firefox plugin which turns your browser into a kind of "Vi" for the web. If you like the Vi/Vim editor, you should give it a try. You can do most common tasks using the keyboard. After some experiment, I got addicted to it. Opening a link in the same tab, in a new tab, searching something with one of the installed search engines, filling forms, switching tabs... No need to reach for the mouse.
After installing it, the menu bar, navigation toolbar and bookmark toolbar will be hidden. This may be inconvenient at first, but you can display them again via ":set guioptions+=mTB". You can display the help screen at any time via the ":help" command.
Here is some of the commands I usually use :
There are other ways to browse efficiently. Check the help and find which one suits you best.
After installing it, the menu bar, navigation toolbar and bookmark toolbar will be hidden. This may be inconvenient at first, but you can display them again via ":set guioptions+=mTB". You can display the help screen at any time via the ":help" command.
Here is some of the commands I usually use :
- Open a URL in the current tab : ":open
". Pressing tab while writing the url will show possible results.
- Open a URL in a new tab : t
- Open a link in the current tab : "f" followed by the number assigned to the link
- Open a link in a new tab : "F" followed by the number assigned to the link
- Click on a button, select a checkbox, move into a textarea... : "f" followed by the number assigned to the element
- Close a tab : d
- Open a previously closed tab : u
- Use one of the search engines to search for some keywords : ":open
". The engine name is displayed in Firefox Search Engines dialog (:dialog searchengines). For example, ":open wikipedia something" will search for something on Wikipedia. To show the results in a new tab, use "t" or ":tabopen" instead of ":open"
- Move around : h,j,k,l
- Page Up/Down : Ctrl+f,Ctrl+b
- Go to beginning/end of page : gg/G
- Go forward/barckward in history : Ctrl+i/Ctrl+o
- Go to next/previous tab : gt/gT
- Reloading a page : r
- Search in page : / followed by the keyword. After pressing enter, use "n"/"N" to go the next/previous occurence.
- Copy the current URL in clipboard : y
- Selecting text within a page : "i" to switch to CARET mode. This allows you to move at the beginning of the text you want to paste. "v" to switch to VISUAL mode to select the text, then "y" to yank it. "/
" to search some text, before entering CARET mode is even faster.
- Invoke gVim from a textarea : Ctrl+i. It helps if you have a long text to write.
- Open a URL in a new tab : t
There are other ways to browse efficiently. Check the help and find which one suits you best.
Labels:
firefox
Tuesday, September 28, 2010
Book review : Eclipse Rich Client Platform, 2nd Edition
Eclipse Rich Client Platform
will teach you how to create professional and redistributable RCP applications. Part I and II look like a tutorial, but the rest of the book goes far beyond. First, you will create a chat application, adding views, editors, actions, help, integrating a third party library... The style is clear, and the progression is logical. API details are left for Part III, where RCP indispensable components are discussed, and that is where the simple tutorial ends.
Part IV introduces more advanced features like p2, dynamic plug-ins, product configurations for various platforms, testing... I found that this part required more thinking than the rest of the book, but it is invaluable if you aim at making a professional application. The last part is a reference about Eclipse and OSGi.
If you plan to make an Eclipse RCP application, if you have some interest in it or in Eclipse plug-ins, if you just like the Eclipse IDE, this book is for you. You'll learn a lot about the Eclipse architecture, and you will learn it the easy way. I also own another book of the Eclipse Series, Eclipse Plug-ins, 3rd Edition, which I enjoyed a lot. I was not disappointed by Eclipse Rich Client Platform, 2nd Edition. I highly recommend it.
Part IV introduces more advanced features like p2, dynamic plug-ins, product configurations for various platforms, testing... I found that this part required more thinking than the rest of the book, but it is invaluable if you aim at making a professional application. The last part is a reference about Eclipse and OSGi.
If you plan to make an Eclipse RCP application, if you have some interest in it or in Eclipse plug-ins, if you just like the Eclipse IDE, this book is for you. You'll learn a lot about the Eclipse architecture, and you will learn it the easy way. I also own another book of the Eclipse Series, Eclipse Plug-ins, 3rd Edition, which I enjoyed a lot. I was not disappointed by Eclipse Rich Client Platform, 2nd Edition. I highly recommend it.
Labels:
books
Wednesday, August 11, 2010
Beginning Java EE 6 with GlassFish 3, Second Edition delayed again
I'm looking forward to reading Beginning Java EE 6 with GlassFish 3, Second Edition
. The book was supposed to be released at the end of July, but it has been postponed once to mid-August, and again to the end of August. Let's hope it's the last time the publication date is being delayed.
Labels:
books
Tuesday, August 10, 2010
Grails 1.3.4 and the Functional Testing Plugin 1.2.7
I've reached the end of chapter 7 of Grails in Action
, where functional testing is introduced. I was using Grails 1.1, but I encountered some problems with the Navigation plugin, so I upgraded to the latest version. The good news is that the Navigation plugin is now working fine. The bad news is that the Functional Testing Plugin is not ! "grails create-functional-test PostList" does not create PostListTests.groovy in the functional directory. It looks like somebody already reported that problem. No hands-on exercise this time. I'm not going to bother downgrading Grails to make it work.
Labels:
grails
Subscribe to:
Posts (Atom)