There are some open source projects that can help you in generating or reading RSS feeds in Java. I found only two libraries a bit mature, other code is often embedded in other open source products (jroller for example):
Informa: Does various RSS formats and Atom 0.3. Documentation is better than its alternative, but less focused (has some hibernate helper thingy, some lucene helper, etc.).
Sandler: There is no working homepage while I am writing this. But the code is of decent quality, supports Atom 0.3 and RSS 1.0. It is easy to use it. However in reality it is not much more than a wrapper around some XML parser specialized in generating an RSS structure or an Atom structure.
Ooops, I forgot another important one, Rome. This RSS/Atom framework with a catchy name is very similar to Informa, has good documentation and good looking code. Under the hood it makes use of jdom.
I personally use dom4j since I only need to generate RSS, and RSS, or Atom are just XML. I don't find it particularly verbose to use dom4j for that, and it is very flexible.
If you need to parse feeds, then those libraries might make sense and save you a bit of time. For generating, I think their main interest is to abstract you from the differences in formats. So if you need to handle different formats, a framework will allow you to do it through only one API, which can be a big time-saver.
I was writing an Atom feed generator for my current project. I chosed to support Atom 1.0 since it looks like it has the capabilities to establish as the next standard. Unfortunately I quickly saw that it was quite hard to test it in the real world (out of the good feedvalidator), as almost nobody seems to accept Atom 1.0 feeds yet, even if it is rapidely changing (there is support for it in Firefox CVS version).
So I decided to support RSS as well, the big question was: which RSS version? After grabbing lots of info on the subject, I opted for 1.0 again (more flexible, more different than Atom). It was actually quick to support RSS, but then when in real world, neither Google Desktop nor My Yahoo was willing to accept my feed. I looked at every bit of my xml, fiddled with Tomcat configuration in any possible way when I saw that no request was coming to my server from Yahoo or Google. And finally I thought, hmm maybe it's the port. I restarted my server on port 80, and yup, it worked!
I wonder why Google Desktop and My Yahoo don't support another port than port 80 for RSS feeds.
I like the new Google Desktop with the sidebar. It shares similarities with Konfabulator, recently bought by yahoo. They both allow easy access to some custom little widgets that I would call "active". They are active because they are refreshed periodically with new information (processor usage, news, scratch pad, emails, etc). But while Konfabulator choose to emphasize on visual effects, Google prefers a more standard information presentation. This shows as well in their choice of technologies:
Google Sidebar plug-ins are just Windows appz that can take advantage of Google Interfaces. That makes them quite powerful in theory, but programming them is less accessible.
Konfabulator plug-ins are Javascript+XML, the Javascript is not just regular client-side javascript, it can use Konfabulator API (containing many effect and rudimentary network access), and COM objects . That makes them very focused on presentation, and the Internet.
In the long run, Google choice makes sense, the forthcoming Avalon will make visual effects very accessible to windows developers.
Now back to the subject, I missed the 'activation on hotkey' feature from Konfabulator for the Google Sidebar. Fortunately, I a have found a powerful little open-source program, Autohotkey, that allowed me to do that very quickly. Here is the script I use (it's a hack since it relies on toolbar size (but not position), but I like the default position and it works (only using floating deskbar, i let you figure out for the non floating version)): F12:: MouseGetPos, X, Y if WinExist("ahk_class _GD_Sidebar") { WinActivate BlockInput,On MouseClick, left, 160, 16 MouseMove, X,Y BlockInput,Off return } else if WinExist("ahk_class ATL:0044A4C8") { WinActivate BlockInput,On MouseClick, left, 158, 16 MouseMove, X,Y BlockInput,Off return }
I am currently facing a problem that neither Hibernate nor iBatis solves nicely. I also looked at other ORM or just DB framework, without success.
What I would need is a framework that generates PreparedStatements with a query by Criteria like API. I have many queries that are similar but varying according to different input parameters. iBatis can handle this, but for complex queries and scenarios, the XML becomes completely unreadable, and you therefore loose any advantage that iBatis was bringing with the externalization of SQL statements in XML. The other issue I have with using iBatis is that for another part of my project, the automatic generation of SQL statements a-la Hibernate is useful. Hibernate has a very nice Query by Criteria API, but it lacks just a tiny bit of flexibility in customizing queries. For example, I could not find a way to specify a “USE INDEX(index_name)” in the generated SQL, after the SELECT FROM xxx and before the rest of the query. I did not find either a way to specify the use of a “STRAIGHT_JOIN” instead of an INNER JOIN. These are all MySQL specific issues, but those little things are extremely useful at improving some of my queries performances. Writing N sql queries hard coded is not a good option, since this N can be quite big, which is why I am using Query by Criteria in the first place.
When I bookmark articles with delicious, I like to keep the content on my hard drive, because pages sometimes change, or are removed, or I want to do local searches. I believe this is one reason some people like furl (furl keeps a copy on their server that only yourself can read, but does not allow search).
A combination of slogger and delicious could solve partially the problem. But it is not integrated, I can't get my local version from delicious, so I loose the tagging, listing and all other plus from delicious.
I added my own feature to the delicious toolbar, which I like very much. This new toolbar saves automatically the file you bookmark (on the + button), and will add a link in your delicious home to the local version (if it exists).
It is not meant to be used by everybody as it is not official. But the page will give you an idea of what it does. If you think it is useful, I will improve it, otherwise it will stay the way it is because it fits my use.
I am reading an old book, Inside the Java Virtual Machine. Some old books don't age, and this is one of them. The chapter on the Java Virtual Machine is just excellent and should be read by every Java developer. It explains each step a JVM does when you run a Java program, very clearly.
You could get plenty of stupid interview questions from it like: How is the Java stack used? Between method area, heap, pc register, stack which one are shared among threads?
Also they saw the full potential of Java quite early on (1997). They explain how the JVM specs allow for very different implementations, ones that can run in different environments, for example, simplifying a bit: low memory, embedded world, or lots of memory, mainframe world. It is not an accident if Microsoft chosed a very similar design for the CLI of .NET, they have been looking for getting into the embedded area for quite some time, and apparently, they are making good progress.
I have been doing some work on Firefox extensions. Mozilla/Firefox is a really interesting world, it is extremely flexible, you can make it transform the web the way you want.
Recently, someone started YubNub, the "command line for the web", a very simple idea, but useful. This is a bit similar to the Firefox Search Bar, except more powerful, and quicker to use. Mozilla developers actually had that idea a long time ago (around 2000), it is called shortcut url. Basically to any bookmark, you can add a shortcut, you then just have to type that shortcut (let say g for google.com) in the address bar to go to the address pointed by the shortcut. This shortcut accepts 1 parameter (represented by %s in the URL), so you can do "g chasethedevil" to search google for "chasethedevil" if you set up your shortcut properly. Firefox can build this dynamic URL automatically for you if in an input box, you right click and choose "Add a keyword for this search".
Now we have seen the Firefox address bar can be used to quickly perform a search on a selected website. But this can be much more powerful. As this page suggests, you can associate a bookmarklet with a shortcut, you can execute whatever javascript you wish. One very simple example is: javascript:void(location.href= 'http://web.archive.org/web/*dc_/'+location.href). This shows how you can use the address bar in a very flexible manner. It would be easy to support a multiple parameters search using a bookmarklet. There is a whole list of commands very similar to yubnub ones in addition to those on the previously mentioned link.
I first thought about writing a simple extension to have my command line in Firefox (for example by extending the getShortcutOnURI function), but after some information gathering, I discovered it was already possible. Firefox is truly amazing. It is a bit of a shame that this functionality is not a bit better exposed to the user.
I was wondering what was the framework weight in the performance of my application, and I wanted to check at several frameworks performance. I used JMeter to benchmark a stripped application (database access through tomcat) under various loads. My very modest test shows no significant difference between Hibernate Criteria API and HQL access for queries. Criteria might be a few milliseconds slower, but my query time will take 10x more time, even for a relatively simple query (my query is has 3 inner joins, is grouped, with a count and takes only 4ms when performed once in mysql under no load). It seems much more important for the Framework of choice to provide good scalability, easy development and maintenance, rather than saving a few cycles, unless the Framework becomes a bottleneck.
The trick is to create a post with the javarss image and to use the link generated by blogger.com to display the image. Then you can follow the rules from http://www.javarss.com/pages/?page=suggest
I have been doing some Ruby On Rails, for 2 small projects. While I think it is good, I think it is overhyped as well. It is well designed, has good ideas (easy configuration), and focus on the right problem, architecture. But my conclusion is that I am not more productive with it than with Java.
I think most of the development time is not spent coding, but thinking. It is a very obvious statement, and yet too often ignored.
The current Joel On Software article is just making my point: if you look at how much time it took the students to complete their program, you can see it is not the writing that took that much time. And I am sure you noticed the same on your own projects.
So all the nice features of the Ruby language don’t save you a lot of time. And actually when your code size is growing, it becomes increasingly difficult for an outsider to understand your program. Everything can be so dynamic, and your only help is a syntax coloring editor. Compare that to Eclipse, or IDEA, or Netbeans, where you have very convenient search, not text search, but search for declarations, for calls, of methods, variables, classes, all that just a mouse click away. Strong typing goes a little bit in the way while writing, but helps understanding better in many cases (personally I wish Java had type inference, as all the verbosity is not always needed). And when if you really want less verbosity, then you have access to a handful of JVM languages.
A drawback of Java is maybe that you have access to too many libraries. Sometimes, making a choice among the bazaar is not easy and the hype gets scattered.