<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5091911614046591579</id><updated>2011-11-27T15:39:12.899-08:00</updated><category term='EJB'/><category term='google app engine'/><category term='BPM'/><category term='POJO'/><category term='JPA Hibernate ORM'/><category term='template'/><category term='personal'/><category term='java'/><category term='python'/><category term='swing'/><category term='filter'/><title type='text'>Java and Java EE wonders</title><subtitle type='html'>My experience on Java language.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-1872109639546386142</id><published>2011-07-23T01:52:00.000-07:00</published><updated>2011-08-30T11:43:52.065-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BPM'/><title type='text'>Thoughts about Business Process Management</title><content type='html'>Here is my random thought's list about Business Process Management. Please don't expect it to be complete, new thoughts always comes and at random time and in random order. I will try to update it as new thoughts will come.&lt;br /&gt;&lt;br /&gt;In general some person or group of the persons in the organization understands the full business process. When business process is automated then people are starting to rely on the business process executed by the Information System. At some point the system becomes too complicated and people starts trust business processes executed by the system. Employees leaves and new comes and at some time it's obvious that nobody fully understand what was intention of currently running business process, or some parts of it. Once you have reached that state, people is starting to be scared to change anything and keeps doing work in the same, sometimes inefficient way. Business conditions are changing permanently, but Business Process are not changing as fast and they should. My points are:&lt;br /&gt;* business processes should be well understood by people who are working with system and organization's management.&lt;br /&gt;* they should be collected out of smaller easier to understand subprocesses (if that can be achieved).&lt;br /&gt;* all business processes should be graphically presented and documented in simple terms and short sentences.&lt;br /&gt;* business language should be used to describe process, technical terms should be avoided as much as it could be.&lt;br /&gt;* should be regularly revisited and updated as needed, without a fear of changes.&lt;br /&gt;&lt;br /&gt;In my humble opinion, It's better to have a well understood, easy to change and maybe not perfect business process instead of huge, sophisticated process and be dependent on it without understanding what is going on and why organization is following some steps.&lt;br /&gt;&lt;br /&gt;Worst possible Business Process or Workflow Management system is an embedded system. Embedded system will be considered and used by this one system and probably will not be able to work with other Applications and Information Systems or external data. Business Process and Workflow management system most of the time acts and integration tool between different systems and should be deployed ad used as such. It's better to have one scalable, performant system and integrate with other tools and systems used in the organization.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-1872109639546386142?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/1872109639546386142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=1872109639546386142' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/1872109639546386142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/1872109639546386142'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2011/07/thoughts-about-business-process.html' title='Thoughts about Business Process Management'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-6774331503130419896</id><published>2009-01-07T00:38:00.000-08:00</published><updated>2009-01-14T14:58:02.298-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='EJB'/><category scheme='http://www.blogger.com/atom/ns#' term='POJO'/><title type='text'>EJB 3.1 embeddable container and end of life for spring framework.</title><content type='html'>Just amazing what can be found in borring JCP document. All this story started once I decided to do some research regarding EJB 3.1 specification.&lt;br /&gt;&lt;br /&gt;I will print only a few sentences from JSR-318 and will add some thought and comments about only one tiny part of it, just what is related with Embedded EJB container. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Enterprise JavaBeansTM 3.1 and what is said about Embedded Container.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Embeddable usage allows client code and its corresponding EJB 3.1 to run within the same JVM and class loader. This provides better support for testing, offline processing (e.g. batch), and the use of the EJB programming model in desktop applications.&lt;br /&gt;&lt;br /&gt;The client uses a spec-defined bootstrapping API to start the container and identify the set of enterprise bean components for execution. The embeddable EJB container provides a managed environment with support for the same basic services that exist within a Java EE runtime : injection, access to a component environment, container-managed transactions, etc. In general, enterprise bean components are unaware of the kind of managed environment in which they are running. This allows maximum reusability of enterprise components across a wide range of testing and deployment scenarios without significant rework. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;My comments and thoughts.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;What makes me happy, this is an ability to have an EJB in desktop applications or regular java web application packaged as war and running in tomcat or other servlet container. Idea of having an EJB in tomcat is not absolutely new, &lt;a href="http://openejb.apache.org/"&gt;OpenEJB&lt;/a&gt; does exactly that, but to be used in desktop application, for me it's a mind blowing idea. I like it very much. &lt;br /&gt;Most of the people are using spring for their desktop applications and it helps a lot. Everyone knows that there are more frameworks following dependency injection pattern such as &lt;a href="http://code.google.com/p/google-guice/"&gt;google-guice&lt;/a&gt;, &lt;a href="http://www.picocontainer.org/"&gt;pico container&lt;/a&gt; and others. Some of them have better performance, others are easier to use, but all, all of them without exceptions makes you dependent on them, you can not throw them out or replace by something more suitable later, or remove from runtime. Yes application is always dependent on execution environment and in this case dependent on spring or some other DI or EJB container. The point is an EJB container is a specification and it can be replaced by another more suitable for current task or environment, but spring can be replaced only by a newer version of spring.&lt;br /&gt;&lt;br /&gt;What is most amazing, even full blown EJB containers such as Glassfish already are  close to or almost at the same level of performance as spring framework and is easier to write and configure. Feel shocked, trust me or read these blog posts.   &lt;br /&gt;&lt;br /&gt;And here are some other interesting blog posts, for example I will list a few of them with some comments:&lt;br /&gt;* &lt;a href="http://www.adam-bien.com/roller/abien/entry/simplest_possible_ejb_3_1"&gt;Simplest possible EJB 3.1&lt;/a&gt; shows what effort it takes to write an EJB 3.1 compliant bean, no xml, no interfaces, nothing what you ever could call &lt;a href="http://en.wikipedia.org/wiki/Boilerplate_(text)"&gt;boilerplate code&lt;/a&gt;.&lt;br /&gt;* Some interesting thoughts about &lt;a href="http://www.adam-bien.com/roller/abien/entry/heavyweight_ejbs_lightweight_pojos_or"&gt;EJB vs POJO&lt;/a&gt;.&lt;br /&gt;* &lt;a href="http://www.adam-bien.com/roller/abien/entry/is_it_worth_using_pojos"&gt;EJB vs POJO performance&lt;/a&gt;&lt;br /&gt;* &lt;a href="http://www.adam-bien.com/roller/abien/entry/ejb_3_and_memory_consumption"&gt;EJB3 memory consumption&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And now the last thoughts. Everyone knows that spring framework is going to become application server, scary, yeah that's right a Java EE Application Server. Don't you think that spring has no option anymore, EJB's already becoming more effective in some cases and it's not a vendor lock in. Only option for spring is to become another option in list of options. What irony I see, is that spring lost his enemy, spring always was an opposition to EE, and now it becomes an EE by himself. That automatically makes it less appealing choice for new projects.&lt;br /&gt;&lt;br /&gt;Have fun feature are bright&lt;br /&gt;&lt;br /&gt;Regards Remigijus Bauzys&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-6774331503130419896?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/6774331503130419896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=6774331503130419896' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/6774331503130419896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/6774331503130419896'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2009/01/ejb-31-embeddable-container-and-end-of.html' title='EJB 3.1 embeddable container and end of life for spring framework.'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-7570778609649600330</id><published>2009-01-05T09:47:00.000-08:00</published><updated>2009-01-05T16:58:21.632-08:00</updated><title type='text'>RESTful Web Services with Jersey JSR-311</title><content type='html'>Currently I'm excited about RESTful web services. REST is a kind of buzzword at this time and there are some good reasons for buzz. I do believe that REST for web services will stay for long time or hopefully even as long as web will exist. And today I'll try to do my first RESTful web service based on jersey.&lt;br /&gt;&lt;br /&gt;&lt;a href="https://jersey.dev.java.net/"&gt;Project Jersey&lt;/a&gt; is a reference implementation for JSR-311 for building RESTful Web services. As this speciﬁcation states "it deﬁnes a set of Java APIs for the development of Web services built according to the 3 &lt;br /&gt;Representational State Transfer (REST) architectural style".&lt;br /&gt;&lt;br /&gt;I was watching this project for quite long time, saw some presentations and red quite a lot about it and did a little bit of RESTful web services. So all this staff is not very new to me. Nevertheless this is my first try on JSR-311 and Jersey.&lt;br /&gt;&lt;br /&gt;First impressions&lt;br /&gt;&lt;br /&gt;At the beginning I thought and hoped that jersey will be something very or reasonably lightweight, few jars and servlet configuration for web.xml. These expectations comes from the stripes framework which I currently use and enjoy it very much. In general it has a very similar annotation based mapping between URI and handler methods and can be used with little bit adoption for similar things. But as you already guessed it is different, actually it has a lot of dependencies and comes even with grizzly or light weight http server, all JAXB jars if you a still on Java SE 5, ASM and other jars as optional. Documentation on jersey site scared me a little bit, it was not easy to understand what do I need for minimal start. I guess if I would be a maven friend everything could be easier. &lt;br /&gt;&lt;br /&gt;At some point, when I was close to getting angry, about insane documentation I made decision to start with NetBeans. For the beginning I created a new  Hello World (RESTful) Web Services project from one of the NetBeans samples project, after what I got a new project what was running and ready to go. This is the easiest way to get started. From that point everything went very smooth I knew what REST is and what I like to get at the end. Of course in order to understand what I should expect form Jersey and how can it differ from traditional RESTful I downloaded JSR-311 documentation in PDF form and JavaDocs.&lt;br /&gt;&lt;br /&gt;JSR documentation is very short, only 49 pages and easy to read and understand. I'm true believer in the KISS, so I liked simplicity of this JSR.&lt;br /&gt;&lt;br /&gt;The source code of my application is in one file. Application is just a simple test case where I want to have a catalog of the products and vendors. For this time I did most of the CRUD operations for vendor, they are : list vendors, add new vendor, and delete vendor. Update operation for vendor I didn't do because just for simplicity vendor has only one field which is a vendor's title and that makes unreasonable to do update operation. &lt;br /&gt; &lt;br /&gt;&lt;pre&gt;&lt;br /&gt;package helloworld;&lt;br /&gt;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import javax.ws.rs.DELETE;&lt;br /&gt;import javax.ws.rs.GET;&lt;br /&gt;import javax.ws.rs.POST;&lt;br /&gt;import javax.ws.rs.Path;&lt;br /&gt;import javax.ws.rs.PathParam;&lt;br /&gt;import javax.ws.rs.Produces;&lt;br /&gt;import javax.ws.rs.core.Response;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; *&lt;br /&gt; * @author remis&lt;br /&gt; */&lt;br /&gt;@Path("/catalog")&lt;br /&gt;public class CatalogResource {&lt;br /&gt;&lt;br /&gt;    private static ArrayList&lt;String&gt; vendors = new ArrayList&lt;String&gt;();&lt;br /&gt;&lt;br /&gt;    @GET&lt;br /&gt;    public String getCatalog() {&lt;br /&gt;        return "catalog index";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * On HTTP GET method for /catalog/vendor returns full list of vendors.&lt;br /&gt;     * @return string with full list of vendors separated by semicolon.&lt;br /&gt;     */&lt;br /&gt;    @GET&lt;br /&gt;    @Path("vendor")&lt;br /&gt;    public Response getVendors() {&lt;br /&gt;        StringBuilder sb = new StringBuilder();&lt;br /&gt;        for (String vendor : vendors) {&lt;br /&gt;            sb.append(vendor).append(";");&lt;br /&gt;        }&lt;br /&gt;        return Response.ok(sb.toString()).build();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * On HTTP GET method for /catalog/vendor/{title} returns&lt;br /&gt;     * data of the specified vendor.&lt;br /&gt;     * @return string with title of found vendor. In case if such vendor&lt;br /&gt;     *         does not exist&lt;br /&gt;     */&lt;br /&gt;    @GET&lt;br /&gt;    @Produces("text/plain")&lt;br /&gt;    @Path("vendor/{title}")&lt;br /&gt;    public Response getVendor(@PathParam("title") String title) {&lt;br /&gt;        Response result = null;&lt;br /&gt;        if (! hasVendor(title)) {&lt;br /&gt;            result = Response.ok(title).build();&lt;br /&gt;        } else {&lt;br /&gt;            result = Response.noContent().build();&lt;br /&gt;        }&lt;br /&gt;        return result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private boolean hasVendor(String vendor) {&lt;br /&gt;        return (vendor != null &amp;&amp; vendors.contains(vendor));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @DELETE&lt;br /&gt;    @Produces("text/plain")&lt;br /&gt;    @Path("vendor/{title}")&lt;br /&gt;    public Response deleteVendor(@PathParam("title") String title) {&lt;br /&gt;        Response result = null;&lt;br /&gt;        if (hasVendor(title)) {&lt;br /&gt;            vendors.remove(title);&lt;br /&gt;            result = Response.ok().build();&lt;br /&gt;        }&lt;br /&gt;        return result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @POST&lt;br /&gt;    @Produces("text/plain")&lt;br /&gt;    @Path("vendor/{title}")&lt;br /&gt;    public Response addVendor(@PathParam("title") String title) {&lt;br /&gt;        Response result = null;&lt;br /&gt;        if (! hasVendor(title)) {&lt;br /&gt;            vendors.add(title);&lt;br /&gt;            result = Response.ok().build();&lt;br /&gt;        }&lt;br /&gt;        return result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @GET&lt;br /&gt;    @Path("product")&lt;br /&gt;    public String getProducts() {&lt;br /&gt;        return "product list is not implemented yet";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @GET&lt;br /&gt;    @Path("feature")&lt;br /&gt;    public String getFeatures() {&lt;br /&gt;        return "feature list";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @GET&lt;br /&gt;    @Path("tag")&lt;br /&gt;    public String getTags() {&lt;br /&gt;        return "tag list";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @GET&lt;br /&gt;    @Produces("text/plain")&lt;br /&gt;    public String getList() {&lt;br /&gt;        return "catalog list";&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;And here is result of my solution. There is a set of steps, with command curl -d "" URI I adding three vendors step by step. Three HTTP post methods are used to add 3 new vendors: SONY, PANASONIC and PHILIPS. Last HTTP GET command is used to retrieve all added vendors.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;remis$ curl -X POST http://localhost:8080/restHello/resources/catalog/vendor/SONY&lt;br /&gt;remis$ curl -X POST http://localhost:8080/restHello/resources/catalog/vendor/PANASONIC&lt;br /&gt;remis$ curl -X POST http://localhost:8080/restHello/resources/catalog/vendor/PHILIPS&lt;br /&gt;remis$ curl -X GET http://localhost:8080/restHello/resources/catalog/vendor&lt;br /&gt;remis$ curl -X DELETE http://localhost:8080/restHello/resources/catalog/vendor/PANASONIC&lt;br /&gt;remis$ curl -X GET http://localhost:8080/restHello/resources/catalog/vendor&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;How does it works? Simple, on every http request jersey does the matching between URI and path annotation, then based on the http method issued, corresponding handler method is executed. In case if method has additional parameter, which in my case is retrieved from URI path, this parameter is passed to the method and method uses parameter for business logic.&lt;br /&gt;&lt;br /&gt;The list of curl commands listed above does the following commands line by line. Adds new vendor SONY, then another vendor PANASONIC and PHILIPS, later it prints out a full list of vendors and removes PANASONIC vendor. At the end of the list another command which outputs full list of vendors, but in this case it will enter only two vendors, because PANASONIC vendor was removed by previous command.&lt;br /&gt;&lt;br /&gt;You can use a regular web browser in order to get an output for HTTP GET method, but it will be much harder to do HTTP POST and DELETE methods. If you know any easier and more user friendly  way to issue HTTP POST and DELETE methods be very kind and enlighten my.&lt;br /&gt;&lt;br /&gt;Maybe, I will update this blog entry later or even will write another story about Jersey, but for now it's enough. I have tried Jersey, I got my own opinion about it and next time decisions will be based on real experience. &lt;br /&gt;&lt;br /&gt;As conclusion I would like to say, I haven't seen nothing easier that this Web Service API. It is easy to understand, clean, very productive and looks very fresh as fresh as spring. I haven't tested performance of it, but I guess hardly anything will beat it. As the last word I think I will look at other JSR-311 implementations, maybe they will be easier to start and lighter on dependencies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-7570778609649600330?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/7570778609649600330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=7570778609649600330' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/7570778609649600330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/7570778609649600330'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2009/01/jersey-jsr-311-project-in-few-steps.html' title='RESTful Web Services with Jersey JSR-311'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-545624402866847728</id><published>2009-01-03T04:21:00.000-08:00</published><updated>2009-01-03T10:10:32.613-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='filter'/><category scheme='http://www.blogger.com/atom/ns#' term='template'/><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='google app engine'/><title type='text'>Google app engine templates and custom filters.</title><content type='html'>Last month I was messing with google app engine. That's right GAE (google app engine) and python. &lt;br /&gt;&lt;br /&gt;Still hardly can find any productivity gains from switching to python or as other will say "dynamic programming language" from java, but I still hope to see a "light at the end of the tunnel". With hope to experience some new, more dynamic and less restrictive thinking and software development, I'm still keep going by this new path.&lt;br /&gt;&lt;br /&gt;Here is a new tiny challenge I got and how I'm going to deal with it. GAE uses template engine for view generation, what is greatly welcomed. Template engine and most of other code are borrowed from django, which is a high-level Python web framework. So this is a reason why I going to refer to django. Django Template engine has a nice feature which is called a template filter. Template filters are used to modify variables for display, this means that before variable value will be written to the output it can be formatted or modified in any way as it's needed.&lt;br /&gt;&lt;br /&gt;For beginning I used &lt;a href="http://daily.profeth.de/2008/04/using-custom-django-template-helpers.html"&gt;this blog post&lt;/a&gt; as my starting point. It has a list of steps what is needed to get started. In order to get solution I like to dig a little dipper and understand what is going on. Here is a few questions what I wold like to know before I will do what I need.&lt;br /&gt;&lt;br /&gt;# What are the differences between GAE and django template engine?&lt;br /&gt;# How can I add my custom filters?&lt;br /&gt;# What is a default set of filters in GAE?&lt;br /&gt;&lt;br /&gt;Ok here are some my questions and answers to them.&lt;br /&gt;&lt;br /&gt;What are the differences between GAE and django template engine?&lt;br /&gt;&lt;br /&gt;First difference is a minor one. Location of Template class in django and GAE differs. Django uses django.template.Template class and GAE has it's own appengine.ext.template.Template class and it is just a simple wrapper class for the django Template class. This wrapper class handles all differences between django and app engine and makes programmers work easier.&lt;br /&gt;&lt;br /&gt;How can I add my custom filters?&lt;br /&gt;&lt;br /&gt;Google app engine and django uses different steps for custom filter registration. I had to create a new package, in my case I created a new package &lt;i&gt;"common"&lt;/i&gt; and &lt;i&gt;templatefilters.py&lt;/i&gt; file in it with content listed bellow. In case you want to look how can it be done in django here is a source of this file.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import urllib&lt;br /&gt;from google.appengine.ext import webapp&lt;br /&gt;&lt;br /&gt;def truncate(value,maxsize,stopper = '...'):&lt;br /&gt;""" truncates a string to a given maximum&lt;br /&gt;   size and appends the stopper if needed """&lt;br /&gt;stoplen = len(stopper)&lt;br /&gt;if len(value) &gt; maxsize and maxsize &gt; stoplen:&lt;br /&gt;  return value[:(maxsize-stoplen)] + stopper&lt;br /&gt;else:&lt;br /&gt;  return value[:maxsize]&lt;br /&gt;&lt;br /&gt;def rb_quote_plus(value):&lt;br /&gt;""" Replace special characters in string using&lt;br /&gt;   the %xx escape. Letters, digits, and the&lt;br /&gt;   characters '_.-' are never quoted. Also&lt;br /&gt;   replaces spaces by plus signs, as required&lt;br /&gt;   for quoting HTML form values. """&lt;br /&gt;&lt;br /&gt;return urllib.quote_plus(value)&lt;br /&gt;&lt;br /&gt;# get registry, we need it to register our filter later.&lt;br /&gt;register = webapp.template.create_template_register()&lt;br /&gt;register.filter(truncate)&lt;br /&gt;register.filter(rb_quote_plus)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;One last step is needed in your main.py file or any other fail with main method at the top level you have to add code listed bellow. This will instruct app engine to register new teplate filters from &lt;i&gt;common.templatefilters.py&lt;/i&gt; file.&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;webapp.template.register_template_library('common.templatefilters')&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here are &lt;a href="http://www.djangoproject.com/documentation/0.96/templates/#built-in-filter-reference"&gt;default list of filters&lt;/a&gt; in django template. In case if it's not enough and you need some more information what can be done with filters, information is provided in django documentation &lt;a href="http://docs.djangoproject.com/en/dev/howto/custom-template-tags"&gt;custom template tags and filters&lt;/a&gt;. This reference is for django version 1.0 and I guess something will not work because GAE uses 0.96 version as basis.&lt;br /&gt;&lt;br /&gt;Conclusions&lt;br /&gt;I was not able to find information in form I liked. This blog post is consequence of that. In general I liked how easy it's to extend and customize templates. I'm impressed how easy to get additional power in view layer without mixing business and UI logic in one place. Some features what I haven't tried yet, and I think they could not work in GAE, such as decorator @register.filter makes me excited. Once I found what and how filters can be added, I should say, this is an easiest way to add custom features to templates.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-545624402866847728?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/545624402866847728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=545624402866847728' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/545624402866847728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/545624402866847728'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2009/01/google-app-engine-templates-and-custom.html' title='Google app engine templates and custom filters.'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-6423200479987637465</id><published>2008-07-20T01:01:00.001-07:00</published><updated>2008-07-20T01:24:07.792-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JPA Hibernate ORM'/><title type='text'>Hibernate or JPA</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Back to java. Busy time in future?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have some works to be finished, new project what just starting for my new client and waiting for new huge projects, from few new customers. It looks I will be very, very busy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Better solution in less time&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Everyone is using hibernate for ORM, but not me. Yes I was ignoring it, since I have tried it first time 4 or even 5 years back. I always thought, why do I have to add another technology layer, introduce another dependency and make my applications dependent on technology which could not be easily removed or replaced. All my software is layered in the UI,  BO and DAO layers and I never had a problem to write DAO layer classes for data manipulation with JDBC. I always felt I have more power, flexibility and options by doing it on my own. &lt;br /&gt;&lt;br /&gt;It's still possible to write another implementation of DAO class and to have an option to replace JDBC implementation class with hibernate, but it's not as easy to do as easy to say. If you have big number of entities and relations between them, Hibernate does a lot of nice work by handling relations and lazy loading, this is a really nice feature, I like it and it's handled automatically. Problem is, once you accept features from Hibernate and start to use them, it's no way ho I can do that with JDBC. How can I make a lazy loading of linked list, I became dependent on Hibernate? The irony is, if taking hibernate road I have to change my way of thinking and application design. By doing that I'm loosing a way back, I will never be back.&lt;br /&gt;&lt;br /&gt;The same dependency upon technology I see with spring framework. They call it Dependency Injection pattern and say that you components are loosely coupled, that's fine. But you have to be very careful, it's just amazing how fast you can be dependent on spring. The technology that is sold as a way to make you components independent makes yours application design dependent on spring. What is a difference, to have independent class and dependent application. Fine, I know there are some benefits but they can write   in red &lt;span style="font-weight:bold;"&gt;"By making your classes and components independent on each other you making your application dependent on spring. And you are in danger to make yourself dependent on Spring. Please don't overuse it"&lt;/span&gt;.   &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;JPA may be a better choice &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Lately since I moved my development to Glassfish and EJB3 I'm started to use JPA yes the same thing, but with important differences. The choice was obvious either JPA or CMB. CMB is too old, inefficient and technology dead end. JPA still new but annotation base with different implementations and it's specification based, jsr.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Why now?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I'm going to sacrifice somthing in order to get a better productivity, time spend on project development. I'm not happy how much time I spend on DAO layer. Yes the main reason is time, no less, no more just time. I hope I will get some advantages and will be able to improve time. &lt;br /&gt;&lt;br /&gt;I still have to make some decisions where to go JPA or Hibernate. It looks that JPA could be better for me, but still have to decide.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-6423200479987637465?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/6423200479987637465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=6423200479987637465' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/6423200479987637465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/6423200479987637465'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2008/07/hibernate-or-jpa.html' title='Hibernate or JPA'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-4042287477565253983</id><published>2008-07-19T23:52:00.000-07:00</published><updated>2008-07-20T01:20:22.199-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='personal'/><title type='text'>Busy time, a log changes</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Busy time, a lot of changes&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;I've been quite busy last month. Had to spend some time with my family, changed my job and I'm again a freelancer. And I'm on the way to even bigger changes in my personal and professional life. I'm looking to move to new country, I'm very open with new opportunity and looking to move to any EU country or to UAE, Dubai. Where I would like to base my personal IT business. Hope some offers and decisions will come and I will be able to accept them.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Back to java. Busy time in future?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I have some works to be finished, new project what just starting for my new client and waiting for new huge projects, from few new customers. It looks I will be very, very busy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-4042287477565253983?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/4042287477565253983/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=4042287477565253983' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/4042287477565253983'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/4042287477565253983'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2008/07/not-everything-works.html' title='Busy time, a log changes'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-3082338453091119526</id><published>2008-05-04T04:51:00.000-07:00</published><updated>2008-05-04T23:51:16.599-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><title type='text'>Time to share even more ideas</title><content type='html'>&lt;span style="font-weight: bold;font-size:100%;" &gt;Intro&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The biggest source of nice ideas on swing UI I got from JGoodies. The Author of Jgoodies libraries, Karsten Lentzsch, I could proudly call my inspirational guru. First time I visited jgoodies.com site was 5 years back and used it in my first Java Applet. Later I reused all that code in desktop application. I liked its look, layout manager, form builders and simplicity, I also saw clear deep understanding of UI design and usability issues.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;My personal experience&lt;/span&gt;&lt;br /&gt;Now I'm using all his libraries: jgoodies-forms, jgoodies-looks, jgoodies-validation and jgoodies-binding. He was one of the first people who showed and said how swing application can and should look and behave, that was before anyone started to talk about these problems in loud.&lt;br /&gt;&lt;br /&gt;Six years ago, once again I went on freelance. Major focus for my service was and still is on Java Web applications for business. As always happens from time to time I had to do some swing programming. I and my company (now I'm running small software development business) did 4 applications on swing, all of them was based on jgoodies. All these applications are functioning perfectly, customers are happy, and have best opinion about desktop software developed on swing. All of them like application's look, usability, easy of use and performance. Looks like great success story.&lt;br /&gt;&lt;br /&gt;Now Karsten Lentzsch, author of JGoodies is on JCP-295 Beans Binding and JCP-296 Swing Application Framework expert group list. I hope that will come to great specifications and products.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Some points&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;IMHO good code is a code which is easy to read, understand and follows natural way of thinking. It has be easy to understand by the person who will come after me and will have to extend, modify or support it. Another important point that UI should be consistent and elegant.&lt;br /&gt;&lt;br /&gt;As wiki or blog editor does not care about HTML, CSS, HTTP or all other technical stuff you don't have to care about SWING components. In case you know what you are doing you can mess with swing, but you should do that only where it's needed, not everywhere. So we need some abstraction layer, layer which seats between end user and swing components.&lt;br /&gt;&lt;br /&gt;How do we use swing components? Simple answer is inefficient! Every time I have to add a new record such as Customer, Product or whatever, we are  dealing with JTextField, JDialog, JButtom, JAction, different action listeners. But this way is too deep, takes too much time and is hugely inefficient, everything I want is a common add, edit or delete form, where I have a list of required and optional fields and Ok, Cancel buttons. It would be nice to have some help or hints and validation of entered data.&lt;br /&gt;&lt;br /&gt;And at last there is some Domain Specific Languages, this is where I'm leading. I'm not going to go through Domain language definition, everything is on wikipedia &lt;a href="http://en.wikipedia.org/wiki/Domain_Specific_Language"&gt;domain specific languages&lt;/a&gt;. This Domain Specific Language, or UI abstraction layer should hide unneeded details and hide complexity, but without introducing new limitations.  I mean, if I need a deeper control and still want to deal with swing controls, I still can do that and don't want to have another Domain language which I have different syntax to learn and maintain.&lt;br /&gt;&lt;br /&gt;Just to tease you here is a window's screenshot from one of my application. All these windows are consistent across all application, they follow common UI guidelines. There is one small but, I have to remove these classes from my old applications, do some little cleaning, update them a little bit and make them available as open source package.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_8YGF66WQ3d4/SB6sdhJ5cjI/AAAAAAAAAAg/PlkWcA_DjmA/s1600-h/add+dialog.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_8YGF66WQ3d4/SB6sdhJ5cjI/AAAAAAAAAAg/PlkWcA_DjmA/s320/add+dialog.png" alt="" id="BLOGGER_PHOTO_ID_5196780643148198450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In order to collect all requirements and update I need some opinion from outside.&lt;br /&gt;&lt;br /&gt;What we can expect to get at the end:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;less lines of code - better productivity, less bugs&lt;/li&gt;&lt;li&gt;source code have to be easy to read, understand and maintain&lt;/li&gt;&lt;li&gt;UI - must be consistent and with no surprises&lt;br /&gt;&lt;/li&gt;&lt;li&gt;UI - should be nice and pleasant to work with&lt;/li&gt;&lt;li&gt;software developer have to be able to change UI as he likes, UI does not have to be forced by framework&lt;/li&gt;&lt;li&gt;It does not have to meet everyones expectation. Bloated library is the worst thing can be.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;As result of that you will gain pleased and happy developers and customers. All new requests from customer will be easy to achieve and customer will almost never hear answer no or it's under budget.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-3082338453091119526?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/3082338453091119526/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=3082338453091119526' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/3082338453091119526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/3082338453091119526'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2008/05/time-to-share-even-more-ideas.html' title='Time to share even more ideas'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_8YGF66WQ3d4/SB6sdhJ5cjI/AAAAAAAAAAg/PlkWcA_DjmA/s72-c/add+dialog.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-1015654961182976734</id><published>2008-05-02T04:57:00.000-07:00</published><updated>2008-05-02T06:45:22.997-07:00</updated><title type='text'>Swing preview panel evolution</title><content type='html'>By following and evolving ideas from the last post, I extended preview pane builder class I had done before. I added ability to update UI controls without dealing with them at all, that's right updating JTextField controls without even knowing about them. Now I don't need to define variables, create them and update, I even don't have to mess with date formatting and all that stuff. By following DRY I have it placed in &lt;code&gt;RemisPreviewPanelBuilder&lt;/code&gt; and will try to reuse that every time I need it. That will keep my code easy to read, understand, evolve in the feature and UI of my application will be consistent across all application.&lt;br /&gt;&lt;br /&gt;The most obvious use case for this functionality is to have a list of items and show detailed view of selected one in preview pane. Same idea is used in all mail and a lot of other applications. Screenshot from my application is shown bellow in figure 1.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_8YGF66WQ3d4/SBsXlxJ5ciI/AAAAAAAAAAY/rnLhKDx6M38/s1600-h/previewPanel2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_8YGF66WQ3d4/SBsXlxJ5ciI/AAAAAAAAAAY/rnLhKDx6M38/s320/previewPanel2.png" alt="" id="BLOGGER_PHOTO_ID_5195772532719448610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The code which produces view, you see above and shows how to use it is below in list 1.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import java.awt.Component;&lt;br /&gt;import lt.gloria.ptcs.rent.structure.Client;&lt;br /&gt;import lt.gloria.swing.builder.RemisPreviewPanelBuilder;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* CustomerPersonPreviewPanel class is an UI class used to build, show and&lt;br /&gt;* update preview panel and update UI controls in it when new customer&lt;br /&gt;* object is passed.&lt;br /&gt;*&lt;br /&gt;* @author Remigijus Bauzys&lt;br /&gt;*/&lt;br /&gt;public class CustomerPersonPreviewPanel {&lt;br /&gt;  &lt;br /&gt;   private static String ID = "Id";&lt;br /&gt;   private static String PERSON_NAME = "Asmens vardas";   &lt;br /&gt;   private static String PERSON_CODE = "Asmens kodas";&lt;br /&gt;   private static String REGISTRATION_DATE = "Registracijos data";&lt;br /&gt;   private static String CITIZENSHIP = "Pilietybė";&lt;br /&gt;  &lt;br /&gt;   private Component pane;&lt;br /&gt;   private RemisPreviewPanelBuilder builder;&lt;br /&gt;   private Client client;&lt;br /&gt;  &lt;br /&gt;   public void setSelected(Client client) {&lt;br /&gt;       this.client = client;&lt;br /&gt;       modelToView();&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public Client getSelected() {&lt;br /&gt;       return this.client;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   public Component getPane() {&lt;br /&gt;      &lt;br /&gt;       if (pane == null) {&lt;br /&gt;           builder = new RemisPreviewPanelBuilder();&lt;br /&gt;&lt;br /&gt;           builder.addRow(ID, "");&lt;br /&gt;           builder.addRow(PERSON_NAME, "");&lt;br /&gt;           builder.addRow(PERSON_CODE, "");&lt;br /&gt;           builder.addRow(REGISTRATION_DATE, "");&lt;br /&gt;           builder.addRow(CITIZENSHIP, "");&lt;br /&gt;          &lt;br /&gt;           pane = builder.getPanel();&lt;br /&gt;       }&lt;br /&gt;       return pane;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   private void modelToView() {&lt;br /&gt;      &lt;br /&gt;       builder.setValue(ID, client.getId());&lt;br /&gt;       builder.setValue(PERSON_NAME, client.getPerson().getTitle());&lt;br /&gt;       builder.setValue(PERSON_CODE, client.getPerson().getIdnumber());&lt;br /&gt;       builder.setValue(REGISTRATION_DATE, client.getPerson().getRegistrationDate());&lt;br /&gt;       builder.setValue(CITIZENSHIP, client.getPerson().getCitizenship());&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Just wondering, what else can be added or improved without adding a lot of complexity.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next day I hope, I will add samples for AddPanelBuilder and EditPanelBuilder.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-1015654961182976734?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/1015654961182976734/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=1015654961182976734' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/1015654961182976734'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/1015654961182976734'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2008/05/swing-preview-panel-evolution.html' title='Swing preview panel evolution'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_8YGF66WQ3d4/SBsXlxJ5ciI/AAAAAAAAAAY/rnLhKDx6M38/s72-c/previewPanel2.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5091911614046591579.post-5726582371036119886</id><published>2008-05-01T06:50:00.000-07:00</published><updated>2008-05-01T10:51:36.621-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='java'/><category scheme='http://www.blogger.com/atom/ns#' term='swing'/><title type='text'>Again on Blog with Java and swing</title><content type='html'>&lt;span style="font-family:lucida grande;"&gt;Hi I'm on blog again, h&lt;/span&gt;&lt;span style="font-family:lucida grande;"&gt;ard to remember, but I guess it's fourth or fifth time I'm starting blogging. Will see how long it will last.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;Just because I'm passioned Java developer all blog will be around Java goodness.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;At the present time I'm working on swing application for one of my customers. For this project I'm using my preferred libraries jgoodies-looks, jgoodies-forms and jgoodies-validation. It's hard to find something better.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;One thing what I like most is a &lt;/span&gt;&lt;code style="font-family: lucida grande;"&gt;com.jgoodies.forms.builder.PanelBuilder&lt;/code&gt;&lt;span style="font-family:lucida grande;"&gt; class from jgoodies-forms library. In order to save time and in fashion of DRY I extended PanelBuilder class and got what I needed. Code is small simple, easy to understand and perfect visual result. Nothing extreme but very effective.&lt;/span&gt;&lt;br /&gt;&lt;pre style="font-family: lucida grande;"&gt;&lt;pre&gt;&lt;br /&gt;public Component getPane() {&lt;br /&gt;    initField();&lt;br /&gt;&lt;br /&gt;    RemisPreviewPanelBuilder builder = new RemisPreviewPanelBuilder();&lt;br /&gt;&lt;br /&gt;    builder.addRow("Id", id);&lt;br /&gt;    builder.addRow("Company title", title);&lt;br /&gt;    builder.addRow("Company code", regCode);&lt;br /&gt;    builder.addRow("VAT code", vatCode);&lt;br /&gt;    builder.addRow("Country", country);&lt;br /&gt;&lt;br /&gt;    return builder.getPanel();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;and result is&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-family: lucida grande;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_8YGF66WQ3d4/SBnXGRJ5chI/AAAAAAAAAAM/MnkzrNp1KwI/s1600-h/previewPanelBuilder.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_8YGF66WQ3d4/SBnXGRJ5chI/AAAAAAAAAAM/MnkzrNp1KwI/s320/previewPanelBuilder.png" alt="" id="BLOGGER_PHOTO_ID_5195420147832680978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:lucida grande;"&gt;Of course there is more interesting Swing UI builders such as &lt;code&gt;RemisDeleteViewPanel&lt;/code&gt; and &lt;code&gt;RemisEditViewPanel&lt;/code&gt;.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5091911614046591579-5726582371036119886?l=javawonders.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://javawonders.blogspot.com/feeds/5726582371036119886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5091911614046591579&amp;postID=5726582371036119886' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/5726582371036119886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5091911614046591579/posts/default/5726582371036119886'/><link rel='alternate' type='text/html' href='http://javawonders.blogspot.com/2008/05/again-on-blog-with-java-and-swing.html' title='Again on Blog with Java and swing'/><author><name>Remis B</name><uri>http://www.blogger.com/profile/17285335407838883148</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_8YGF66WQ3d4/SBnXGRJ5chI/AAAAAAAAAAM/MnkzrNp1KwI/s72-c/previewPanelBuilder.png' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
