-- Zed Shaw |
Wednesday, May 28, 2008
Using Facelets along with JSP in a JSF application
I wanted to use Facelets for some pages in an existing JSP/JSF application.
To achieve this I had to perform the following steps:
To achieve this I had to perform the following steps:
If you use maven you can include the following dependency in your pom:
com.sun.facelets
jsf-facelets
1.1.14
facelets.VIEW_MAPPINGS
*.xhtml
facelets.DEVELOPMENT
true
Useful maven commands
To skip tests, you can set the property maven.test.skip=true, i.e:
To list all the dependencies of your project, you can use the dependency plugin, i.e:
To build a web-site with a lot of information about your project, you can use the site plugin, i.e:
This generates a directory 'site' inside your 'target'.
mvn -Dmaven.test.skip=true package
To list all the dependencies of your project, you can use the dependency plugin, i.e:
mvn dependency:tree
To build a web-site with a lot of information about your project, you can use the site plugin, i.e:
mvn site
This generates a directory 'site' inside your 'target'.
Impressions from Zühlke Camp
I spend a week in the middle of nowhere with my teammates from work.
www.flickr.com |
Tuesday, May 27, 2008
Using Facelets with Apache MyFaces Tomahawk
Probably the easiest way to use Facelets with Apache MyFaces Tomahawk is using the tomahawk-facelets project.
Installing the library into your local maven repository is easy:
Then you can use it in your pom:
Installing the library into your local maven repository is easy:
mvn install:install-file -Dfile=tomahawk-facelets.jar -DgroupId=com.google.code.tomahawk -DartifactId=tomahawk-facelets -Dversion=1.1.6.2 -Dpackaging=jar -DgeneratePom=true
Then you can use it in your pom:
Directory Deployment in Glassfish
Directory deployment can help you to improve your productivity when developing web-applications with GlassFish.
Instead of deploying a packaged archive (.war) you can point GlassFish to a directory and let it pick up and deploy the application from there.
You can do this by using the command asadmin deploydir path_to_app_dir.
This has the following benefits:
The directory you point GlassFish to should have the following structure:
–|myproj
–|–|web-sources (JSPs, facelets, css ... subdirectories are possible)
–|–|...
–|–|–|WEB-INF
–|–|–|–lib
–|–|–|–classes
–|–|–|–web.xml
–|–|.reload
The trick is to configure your IDE/Environment, so that you can work directly on the above structure...
By touching '.reload', you can force the application to be redeployed.
Instead of deploying a packaged archive (.war) you can point GlassFish to a directory and let it pick up and deploy the application from there.
You can do this by using the command asadmin deploydir path_to_app_dir.
This has the following benefits:
The directory you point GlassFish to should have the following structure:
–|myproj
–|–|web-sources (JSPs, facelets, css ... subdirectories are possible)
–|–|...
–|–|–|WEB-INF
–|–|–|–lib
–|–|–|–classes
–|–|–|–web.xml
–|–|.reload
The trick is to configure your IDE/Environment, so that you can work directly on the above structure...
By touching '.reload', you can force the application to be redeployed.
Sunday, May 25, 2008
IntelliJ IDEA Caret Placement
One of the most annoying behaviors in IntelliJ IDEA is the placement of the caret in the text editor. When you click in the editor, the cursor is paced exactly at the position where you pointed the mouse, even if there is no text anywhere nearby!
I cant see the benefit or a sensible use-case for this behavior...
In every other graphical text editor I know of, the cursor jumps to the end of the text on the respective line.
Now I finally found the setting that lets IntelliJ behave like the other text editors I know:
Under Settings->Editor->Behavior switch off "Allow placement of caret after end of line" (in the box "Virtual Space").
I think this should be the default , new users probably expect this behavior.
I cant see the benefit or a sensible use-case for this behavior...
In every other graphical text editor I know of, the cursor jumps to the end of the text on the respective line.
Now I finally found the setting that lets IntelliJ behave like the other text editors I know:
Under Settings->Editor->Behavior switch off "Allow placement of caret after end of line" (in the box "Virtual Space").
I think this should be the default , new users probably expect this behavior.
Thursday, May 22, 2008
Hofstadter's Law
|
Friday, May 16, 2008
Realityloop?
Last week, I was a the SET 2008.
One particularly funny tidbit was the close occurrence of the following two quotes.
One particularly funny tidbit was the close occurrence of the following two quotes.
In a panel discussion about 'software engineering tomorrow' a sarcastic comment about the failed CASE hype in the 80ies was made. Allegedly, the promise of some tool-vendor was:
The whole audience was laughing...
A bit earlier this day, there was a session about 'Event Driven Architecture'. Basically this was a product presentation of BEA Event Server and its application in a real-world scenario. At the end one of the speaker proudly declared:
This time the audience was expected to be impressed ...
You don't have to program any more! Just fill in the method-bodies.
The whole audience was laughing...
A bit earlier this day, there was a session about 'Event Driven Architecture'. Basically this was a product presentation of BEA Event Server and its application in a real-world scenario. At the end one of the speaker proudly declared:
Because of our framework we do almost no programming any more! All we do, is a lot of scripting and configuration.
This time the audience was expected to be impressed ...
Thursday, May 15, 2008
Where are the ruby jobs?
In my current job I get in touch with a lot of heavy-weight (if not obese!) Java projects.
Not being overly happy with those kind of projects (along with them comes usually legacy and overhead of all kinds, out-dated technology ... and little fun), I am wondering if there are any alternatives in enterprise application development.
In my current naive view, Ruby could be such an alternative. Ruby On Rails as a prototype of lightweight web development appears fresh and sexy. It is still a playground for alpha-geeks, but ready for the enterprise at the same time.
Not beeing mainstream means that it can attract new and innovative but not dead-critical projects. Where you can achieve a lot with little overhead... thats where the fun lies!
According to indeed.com there should be a real demand for Ruby programmers.
Compared to Java and .NET:
But this trend seems not to be reflected here in Switzerland:
It seems I have to keep looking ...
Not being overly happy with those kind of projects (along with them comes usually legacy and overhead of all kinds, out-dated technology ... and little fun), I am wondering if there are any alternatives in enterprise application development.
In my current naive view, Ruby could be such an alternative. Ruby On Rails as a prototype of lightweight web development appears fresh and sexy. It is still a playground for alpha-geeks, but ready for the enterprise at the same time.
Not beeing mainstream means that it can attract new and innovative but not dead-critical projects. Where you can achieve a lot with little overhead... thats where the fun lies!
According to indeed.com there should be a real demand for Ruby programmers.
Compared to Java and .NET:
But this trend seems not to be reflected here in Switzerland:
It seems I have to keep looking ...
Wednesday, May 14, 2008
Leap into your sources
Leap seems to be quite an interesting product.
It aims to be an alternative to the Finder in Mac OS X.
Leap implements some advanced and interesting UI-concepts. Especially the "Go Deep"-mode combined with filtering allows interesting usages.
In combination with Quick Look, Leap can really be helpful.
Especially when browsing through java projects with their nested directory structure Leap can help you avoid to step up and down the directory ladder i.e. when looking at a domain object and a related service.
Leap offers a lot of other features (like tagging), but I have not yet found the way to using them efficiently ...
But I have not yet decided if it is really worth it's price for me ...
Leap implements some advanced and interesting UI-concepts. Especially the "Go Deep"-mode combined with filtering allows interesting usages.
In combination with Quick Look, Leap can really be helpful.
Especially when browsing through java projects with their nested directory structure Leap can help you avoid to step up and down the directory ladder i.e. when looking at a domain object and a related service.
Leap offers a lot of other features (like tagging), but I have not yet found the way to using them efficiently ...
But I have not yet decided if it is really worth it's price for me ...
Friday, May 9, 2008
Monday, May 5, 2008
What is your point?
--Eric Evans, InfoQ |
Friday, May 2, 2008
Subscribe to:
Posts (Atom)