What is new in GWT 2.6

In the end of 2013 we are expecting really cool present from GWT development team, that would be the new GWT 2.6 version.  There are some really important changes provided in this version, which will make many GWT devs very happy:) We can already use the GWT 2.6 RC-1 version, which can be found in maven and in google code.

Read more of this post

Advertisements

GQuery Animations – how to use them

Animations are very popular and often used by web designers while creating web pages. I have covered the basics of GWT Animation in my old post. The topic seems  easy and worn-out, but I am still getting a lot of questions about using animations in GWT. That is why I  wrote some words about newest approach for animating DOM elements in modern web applications. Read more of this post

Marquee with GWT and GQuery

Some people who had read my blog, asked me about “marquee” widget in GWT.  I must admit I have never needed to use this element in any of my applications, but maybe someone would find it useful. Writing it with GQuery is so simple and fast that I have decided to share this little functionality. You may enhance this code as needed.

Technologies I have used in the project and I assume you know a little about them:

  • GWT 2.5.1
  • GQuery 1.3.3
  • Maven 3.x
  • Git i.8.x

Read more of this post

JBoss 7.x : Retrieve Datasource properties ( username, database name, password) at runtime, using JMX

Introduction

Working with database connections, on enterprise application servers like JBoss, is in 99.9% very simple and well standardized. After configuring your environment, you can use JPA in order to handle all database interactions. In that way, you do not need to create any database connections or bother what is the name of: database, username/password as well as datasource name. However, there is this 0.1% of cases in which your application is extraordinary (been there ;-) ) and you need to have some more information and control over your database connections. If you do, in this post you will find how to retrieve properties describing predefined Datasources and will also get idea how to call mbeans methods or get other attributes.

If you just need a list of available datasources, without their properties, you can read this post: list available datasources on JBoss 7. 
If you work on JBoss 6, then follow this article: Datasource Properties on JBoss 6.x

Read more of this post

Free JBoss/Tomcat hosting on OpenShift

Introduction

Lately I was looking for free hosting on application servers such as JBoss or Tomcat. I have found some options, among wich I have decided to try OpenShift and I am really happy with it. If you are looking for a place where you can test out your project or show it to the public ( student project, open source project, enterprise examples ) it could be nice solution.

Read more of this post

JBoss 7: Retrieve list of configured datasources at runtime

Introduction

Working with database connections on enterprise application servers like JBoss is in 99.9% very simple and well standardized. After configuring your environment, you can use JPA in order to handle all database interactions. In that way, during coding, you do not need to create any database connections or bother what is the name of database as well as datasource name. However, there is this 0.1% of cases in which your application is extraordinary (been there ;-) ) and you need to have some more information and control over your database connections. If you do, in this post you will find how to retrieve a list of available datasources.
Read more of this post

JBoss 6.x : Retrieve Datasource properties ( username, database name, password) at runtime, using JMX

Introduction

Working with database connections on enterprise application servers like JBoss is in 99.9% very simple and well standardized. After configuring your environment, you can use JPA in order to handle all database interactions. In that way, you do not need to create any database connections or bother what is the name of: database, username/password as well as datasource name. However, there is this 0.1% of cases in which your application is extraordinary (been there ;-) ) and you need to have some more information and control over your database connections. If you do, in this post you will find how to retrieve properties describing predefined Datasources.

If you just need a list of available datasources, without their properties, you can read this post: list available datasources on JBoss 6.

Read more of this post

JBoss 6 : Retrieve list of configured datasources at runtime

Introduction

Working with database connections on enterprise application servers like JBoss is in 99.9% very simple and well standardized. What one needs to do is:

  1. Configure datasources (*-DS.xml files)
  2. Configure persistence units in persistence.xml file
  3. Use dependency injection (@PersistenceContext(unitName=”pUnit”)) in order to obtain EntityManager

, and voilà: you are ready to work with defined databases. In your code you do not need to create any database connections or bother what is the name of database, username/password as well as datasource name. However, there is this 0.1% of cases in which your application is  extraordinary (been there 😉 ) and you need to have some more information and control over db-layers or you just simply need it for some reason I cannot even imagine 🙂 If you do, in this post you will find how to retrieve a list of available datasources.

Read more of this post

Exciting life of Entity Proxies in contexts of RequestFactory

Introduction

Since  GWT 2.1  we can use special Request Factory interface to implement  data access layer to server side objects.  There are several pages  which describe how to use it properly. For me the most resourceful are :

– official explanation from GWT site http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html

– dynatablerf project, which shows request factory in action: http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/dynatablerf/?r=8464

– google groups where a lots of issues have been solved and questions have been answered : http://groups.google.com/group/google-web-toolkit

– blogs and tutorials, e.g. Thomas Broyer blog: http://tbroyer.posterous.com/(moved)  http://blog.ltgt.net/

I am using those pages really often, but still, sometimes  I am running into problems which are not described anywhere.. E.g. I was having some issues while using RequestContext’s and EntityProxies  in some typical user workflows. After learning about how it works and how it should be used correctly I have decided to share this knowledge, because I was not able to find anywhere before. I will not explain how the request factory works, if you need to make first steps on that, follow the link  http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.html.

Read more of this post

gwt 2.0.x gilead hibernate tutorial

UPDATE: 05.08.2013

If you came to this blog in order to learn how to manage Data transfer from Server layer to the GWT layer, please note that since 2010 GWT team has introduced new and comfortable way to do that. The mechanism is called Request Factory and you can read more about it here:  http://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html.

If you run to any problems you can check my other blog post where I explain how the most common update/save workflow works in Request Factory: exciting life of entity proxies.

UPDATE: 14.10.2010 – official GWT 2.1 .RC release with Request Factory

When I was writing this tutorial, there was no official GWT support for sending Entities from server to client side.  Since GWT 2.1.rc is officially released the suggested way to connect JPA or Hibernate with GWT is to use RequestFactory. Read more on : http://code.google.com/webtoolkit/doc/trunk/DevGuideRequestFactory.html.
If you are interested in gilead with gwt 2.0.4 anyway you can still read my tutorial:)
afd

GWT Gilead tutorial – what for?

Writing client code in GWT is very nice way to produce user layout fast and easy. But when you need to get some data from the database.. debate begins. GWT has some restrictions which don’t allow you to use every framework in  every way you want. Especially if you are using object relational mapping frameworks you need to make some workaround if you want to send your entities to the client side.  E.g. you can use Data Transfer Objects (DTO) – which in some cases may be good because they encourage you to send only this information which you really need to show. But still you have to take care of cloning all your entities..
Another solution is using Gilead framework, which takes care about serializing your entities also handling lazy loaded parameters. There are some examples on the web how to use it but I haven’t found any example with the newest version of gilead and gwt as well with annotated hibernate entities.  That is why I have decided to share the steps I have made to configure such a project.
I will present you already working GWT project example which doesn’t have Gilead support. Then I will describe steps you need to take to add Gilead framework to it. If you are lazy you can just download the final version of project which is configured and ready to go.