Skip to main content

Planet Aggregator in GWT and AppEngine. Looks like Planet Gnome.

Hello guys, just for fun I’ve created a GWT + Google AppEngine aggregator application that looks like this:

PlanetShot

It is based on http://www.planetplanet.org/ but just for the idea. The assets are from http://planet.gnome.org/ and the aggregator looks like planet gnome in most cases. It have less features of course. I hope Redhat don't have objections for the assets but I cant find the “assets” license.

The development of the GWT + AppEngine aggregator and the deployment of the application take 2hours, and the application is smaller than 300 lines of code(including view, entry point and service implementation). So I can say that the Google AppEngine is awesome place and way for hosting and developing applications.

The application is deployed at : http://developer-bg.appspot.com/ so you can check it and leave replay. I still have a lot of problems like the html comments in the Radoslav Kirilov posts which exists in the RSS.

For RSS/ATOM parsing I use feed4j project but it has a lot of problems like: not parsing pubDate element in RSS 2.0 and updated in Atom 1.0 but it’s easy to be add/fix it yourself.

I use the planet gnome HTML view so for adding posts I’ve used VerticalPanel and added HTML elements to it. I didn't find better way to do this so if you know other way tell me.

Example :

VerticalPanel vPanel = new VerticalPanel();

for (FeedItem item : result) {

vPanel.add(new HTML("<DIV class=\"entry\">\r\n" +

… +

" </DIV>\r\n" +

"</DIV>"));

}

DOM.setInnerHTML(RootPanel.get("loading").getElement(), "");

RootPanel.get("entries").add(vPanel);

The “loading” div was used for displaying “Loading please wait” while I’ve load the feeds. The loading idea was taken from http://developerlife.com/theblog/?p=156. The feeds are updated on every 30mins not on every call.

Comments

Popular Posts

Hibernate Generic DAO.

When you use Hibernate and DAO pattern it is a good idea to use a Generic Base Dao. The fallowing code snippet contains GenericDAO that is a base class for all my DAO classes. This GenericDAO uses HibernateDaoSupport from Spring for its implementation if you want you can use JpaDaoSupport or JdbcDaoSupport in your projects. My Generic DAO interface looks like this : package org.joke.myproject.dao.base; import java.io.Serializable; import java.util.List; /** * @author Naiden Gochev * @param <E> * @param <PK> */ public interface GenericDao<E,PK  extends Serializable> {     PK save(E newInstance);     void update(E transientObject);     void saveOrUpdate(E transientObject);     void delete(E persistentObject);     E findById(PK id);     List<E> findAll();     List<E> f...

RichFaces server-side paging with DataTable.

Most of the component toolkits have build in support for server-side paging this days but in rest of the cases you need to customize a little the data model or data provider or component itself to have data paging. The reason why I write this post is because when I first saw richfaces everythink was perfect except the server-side paging. They have paging but it was client side based on JavaScript witch just doesn't work in many cases and I loose a lot of time to understand all models, which model I must extend and how to do it to create a data model with server side paging. At the current version of RichFaces on the demo page information about how to do server-side paging at least exist http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=dataModel&cid=3608154 but like always the JBoss/RedHat/Exadel doesn’t provide us a fast full easy working example and we must loose a lot of time to search for classes in the demo. The reason why I write this post is to giv...

Generate JavaDoc with UML diagrams

In my life many times has happened when I am assigned to a totally new project that I have no idea what it is about, that has to go live in 2 weeks and that I have to fix some issues in this ultra strange code sometimes even code written in different language. On my question is there any documentation the answer is: Yes but it is very old or no. So in short they want me to start working on a project with no documentation at all. My second question is is there a javadoc and the anwer is : yeah … kind of … so I am in a project with 30% javadoc with methods in French language for example ( I don’t know even a single word in French) so in short I am loosing 2 weeks to understand what is using what what is the model what is PersonnePhysique  and what is this crazy domain model. I believe this has happened with everyone of you at least once so what can you do ? You can start digging into the java code like crazy ( like everyone of us have tried many times) You can install ...