Sep 06 2009

Freemarker: Java Template Engine

Category: JavaPhil @ 8:35 pm

Freemarker has been around for several years and is an unbelievably simple and powerful tool. Freemarker is used by numerous tools and frameworks, just click the “powered by” link to the right. Although it has not had a major release for some time, it is still an active project. I believe the tool is so mature, that it essentially does exactly what it needs to, minimizing the need for new features/releases. I first became aware of Freemarker using the Hibernate reverse engineering tool. We had some specific code fragments and styles we wanted to generate; it was very simple to augment and override the base code generation functionality, once you knew what was going on! I also worked on a Struts2-based project, which also utilized Freemarker.

I liked the Freemarker overview picture, taken from the project’s web site; it shows just how simple the tool is to understand and use. I thought I would highlight a non-traditional use of Freemarker to demonstrate how easily it can be integrated into any project. And, hopefully get you thinking about some interesting ways it can be utilized. The API is extremely configurable, capable of utilizing multiple types of input, such as databases or files, and can even be used as an alternative to XSLT. Please read the feature page for a full list of capabilities.

To start with, I created a simple little wrapper class to hide the Freemarker specifics and make it easier to deal with different type input objects. Freemarker can populate templates using a Map or simple Java bean, my preferred method of interaction. The helper class has a simple API, one overloaded method named process. You simply provide the template as a String, along with the input object; the generated result String is returned from the method. I have not really needed to do anything super fancy and the helper class meets all of my needs, from conditional logic, iteration, to custom formating, which is all implemented in the template.

public class FreemarkerHelper {

    private static final Logger LOGGER = LoggerFactory.getLogger(FreemarkerHelper.class);

    public String process(final String template, final Object input) {
       final Configuration cfg = new Configuration();
       cfg.setObjectWrapper(new DefaultObjectWrapper());
       return process(cfg, template, input);
    }

    public String process(final String template, final Map<String, Object> input) {
	return process(new Configuration(), template, input);
    }

    private String process(final Configuration cfg, final String template, final Object input) {
        String rc = null;

       try {
           final Template temp =new Template("TemporaryTemplate", new StringReader(template), cfg);

           final Writer out = new StringWriter();
	   temp.process(input, out);
	   rc = out.toString();
	   out.close();
       }
       catch (final Exception e) {
           LOGGER.error("Problem",e));
       }

       return rc;
    }
}

In a recent project, I used Freemarker for multiple purposes, generating dynamic filenames and simple XML files. The system needed to dynamically generate filenames based on a specific set of meta data, such as the object id, user id, date, and other application specific data. We allowed the files names to be specified as a Freemarker template, such as….

String template = “MyFile_${userid}_${date?string(\”yyyyMMddHHmmss\”)}_${oid?string(\”#\”)}.xml“;
String template2 = “${oid?string(\”0000000000\”)}.${filename}“;

Using the basic formatting features, Freemarker allowed us to generate any filename (format) that was required, without changing the code. We could format the numeric object id as a simple number or padded with leading zeros. Likewise, dates could also be formatted using any combination of the date’s components, using just part of the date or the time. The more interesting part is that you just pass in a Java bean or map with those attributes defined and Freemarker does the real work. This is a pretty trivial usage of Freemarker, and might not be the most common usage pattern. However, I literally did not have to write any code, other than my little helper class, which I have used on multiple projects, and I can support unlimited filename combinations; Huge bang for the buck! Once I had the filename generated, I needed to generate a simple XML file to control some external processing. The file always had the same structure, just different values. This was perfect use of Freemarker, no need for for any heavy frameworks such as XML Beans or Castor. I just created a simple Java bean that captured the descriptive data and an XML template; within minutes, my XML control file was generated.

Another quick example, I recently built a little Servlet to act as a web service for a function that we wanted to make available to multiple applications. The primary output from was either a JSON or XML stream, but I also added a basic HTML response for testing and demonstrations purposes. I hacked together some basic HTML, but was disappointed by how ugly the application was! I Google for a free CSS template, and integrated it with my Servlet. I created a single page as a template and added variables for the title, menu, and body. Using my helper class, I was able to conditionally control the menus, as well as dynamically add the main body contents. Once again, this only took minutes to implement, and was quite a bit simpler than messing with Tiles or Sitemesh!

<#if current == "home" >
      <li id="current"><a href="/Context">Home</a></li>
<#else>
      <li><a href="/Context">Home</a></li>
</#if>
https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Aug 04 2009

My New Toy, A Kindle DX

Category: KindlePhil @ 8:00 pm

KindleAd I’ve been kind of busy lately and neglecting my blogging. Unfortunately, my readership has falling off too!!! Anyway, my blogging has been replaced by reading. Not a bad trade! My family gave me a Kindle for father’s day. They splurged and went for the Kindle DX. It is actually pretty cool. I don’t feel like I’m such an avid reader to really justify a Kindle, but think I will put it to good use. The DX has a much larger screen and more memory than the smaller, Kindle2. I actually prefer the button layout on the DX over the regular Kindle.  They also purchased a nice leather cover that is made to work with the Kindle. The Kindle has a couple of small slots on the left-hand side and the portfolio has a matching clasp system that hold the device nice and secure. There are some magnets in the portfolio that  hold the Kindle from falling forward and helps keep the  cover closed too.

Since receiving my Kindle, I have been using it to read my RSS feeds. The Kindle has an experimental web browser feature that takes advantage of the built-in 3G Sprint connectivity. I sure hope they don’t take it away (soon or ever), but I don’t think that Amazon is under any obligation to provide that level of access!  The browser is pretty basic and handles simple web pages best; there is no Flash support and high-graphic content web pages seem to blog down the render times. We were driving on the Pennsylvania Turnpike a couple of weeks ago; everyone was getting hungry and we had no idea where the next rest stop was located. I pulled out my Kindle, popped over to Google and searched for “PA turnpike rest stop locations”. The results popped right up. I clicked on the PA Turnpike website to find the next rest stop.  I was really surprised how nice the page looked (it did take quite a bit of time to display); it had a very graphic intensive, static menu system, along with two maps that showed all of the exits and the location of each rest stop. Pretty cool! Most web sites work pretty well. However, I could not get the NewsGator web-based RSS reader to work on the Kindle; I think their implementation is a little too complex for the browser. I read that other Kindle owners have been using Bloglines to access their RSS. I have switched over half of my feeds and it works fairly well. The speed is slightly slower than I would liked, but the connectivity is free (you can’t discount the high initial cost!) and gives me a new way to access information.

I think the Kindle could be the ultimate “Swiss army knife” reading tool. It is so easy and convenient to use, and the display is amazing easy to read, even in direct sunlight driving in a car! The integrated 3G connectivity seamlessly provides all of your content. Here are some of my initial observations…

  • The main page of the Kindle is kind of like your inbox.  Each entry has an associated series of dots; the length of the dot series gives you some idea on the size of each book or article. As you read thru the document, the dots turn bold to show you how much of the document you have completed. As new items arrive on your Kindle, they show up at the top of the list with a little “new” icon. Many people complain about the lack of folders; I don’t have that much content yet, but can see where it would be a problem if you had lots of subscriptions or stored your library on the Kindle.
  • I subscribed to the Readers Digest magazine while travelling on the Pennsylvania Turnpike. Within seconds, I was reading the current issue. That is just too cool! Obviously, it does a great job on books too. You can quickly search Amazon.com for books, magazines, blogs, and quickly load up your device.
  • It would be so cool to use the Kindle as my RSS feed reader, using the native approach, the one Amazon wants me to use. I subscribe to the free Amazon blog and it works pretty good. It does seem to have on small flaw, keeping track of what I previously read. It seems that when new items arrive, the Kindle forgets that I have already read some of the articles. Not really a big deal, if I keep up with my reading, but diminishes the value of the “dots”! I would not mind paying a few bucks each month for the built-in functionality to read my RSS feeds, but I personally have a problem paying for “things” that I can generally get for free. I also think Amazon is over-charging for the feeds, $.0.99 or $1.99 PER RSS feed. I had about 25 feeds I regularly follow and about 10 that I truly read. So, I would have to pay another $20 to $50 a month to read free RSS feeds?  I don’t think it is really costing Sprint that much to push down a few bytes to my Kindle every day, I think that price is just crazy! I have a friend that subscribes to hundreds of feeds, that could literally run hundreds of dollars per month. I personally don’t think they have the right pricing model for RSS feeds.
  • kindleThe Kindle has the ability to read PDF and Microsoft Office formatted documents. The Kindle DX has native support for PDFs. All you have to do is connect your Kindle to your computer with the supplied USB cable, and the Kindle will show up like an external disk drive (even on my Ubuntu box!). Next, you drag PDF documents from your computer into the Kindle’s document folder. Pretty simple! The PDFs show up on the main Kindle screen with the “new” icon, just like any other document.  Unfortunately, the PDF text can not be re-sized like real eBooks, but are still very usable. I have copied over the PDF version of monthly technical magazine subscriptions I get at work. I have also downloaded multiple user guides from the internet, such as JSF, CSS and Spring Framework documentation. I have not tried any Office documents yet.
  • On of the more interesting features is the Kindle’s ability to read text aloud. I have yet to decide if this is a valuable feature, but I am evaluating it on my first eBook. I am letting the Kindle read the book to me while I follow along. I’m hoping that this approach is giving me additional re-enforcement of the content that I’m supposed to be reading. I also don’t fall asleep nearly as often when the Kindle reads to me!
  • The Kindle also has a built-in MP3 player. I’m not impressed by the implementation what so ever. I think the lack of any type of user interface is a real deal breaker. I did not take the time to learn all of the undocumented key bindings, but it did work.
  • You can actually email documents to your Kindle too, but you do have to pay for each message!

Overall, I’m very happy with my Father’s Day Gift. If you are a seriously reader, I would highly recommend you get yourself a Kindle.

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jul 09 2009

Overview of the Eclipse Galileo Plug-in Manager

Category: EclipsePhil @ 8:56 pm

The Eclipse developers did a really nice upgrade to the Plug-in manager in the new Galileo release. Managing plug-in sites seems much easier and cleaner with the new Available Software Sites menu option in the main preferences area. Not really a new feature, but seemingly more obvious, is the ability to import and export update sites to and from your team mates. I have exported my settings and linked them to the XML file icon on the left. Simply download the XML file and import them into Eclipse and you are ready to go. I can’t believe I never used this feature in the previous versions!

Also, don’t forget that you can also have Eclipse automatically find new updates for you. This is not a new feature either, but one that I always seem to forget! I just hit the Check for updates option every so often; not nearly as convenient! You can find this option under the Install/Update preferences panel as well.

Once you have your software sites configured, it is time to install or update your configuration.  Under the main Help option, select Install New Software.  You can select multiple plug-ins for installation  or use the new Work with: option. You can filter your plug-ins based on a specific site’s configuration file. I’m not exactly sure why I like this better, but the old multi-tab Ganymede version was just too busy. I think the new screens are much cleaner and easier to work with.

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jul 09 2009

Eclipse Launch Tip

Category: EclipsePhil @ 7:40 pm

I have to give credit to a co-worker who overheard me complaining about Eclipse one day… Ever since upgrading to the Ganymede version of Eclipse, the launch buttons for executing and debugging applications and unit tests were tied to the currently active editor. This was so annoying, I could not believe the Eclipse developers changed this behavior. Every time I clicked on the button, Eclipse would ask me what I wanted to do…. No, I don’t want to execute the XML file I was looking! No, I don’t want to execute the random Java file that I just fixed; I want to run the last unit test!

Pre-Ganymede versions of Eclipse simply ran the previously launched application or unit test. It was so convenient to just click the button and rerun the test. Apparently, I was not smart enough to look at all of the available options in the preferences menu; I conditioned myself to click on the little arrow next to the launch buttons and select the test I wanted to run from the menu. To my surprise, there was a new menu option that controlled the behavior of these buttons! Unfortunately, the default behavior is the un-desirable one, in my opinion; but with a quick click of the mouse, the world is right again! Hopefully, this little tip will make your Eclipse usage a little happier and smoother too. Thanks Jason!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jul 07 2009

Social Bookmark Services?

Category: BloggingPhil @ 11:01 pm

I’m sure that everyone has seen this little icon on some web page or blog. Probably, like me, you never bothered to really check it out. How many tools or services do we need to save our bookmarks? I never worried about bookmark synchronization in the past. I would just re-Google my search, nine chances out of ten, I would find the page I was looking for.  I generally don’t have time at work to read most (any) of the interesting articles I run across. To solve this problem, I started emailing the URLs to my home email and would read them in my spare time. This worked fine, but was kind of painful.  I decided to gave http://delicious.com a try. I know this is nothing new; many of my friends have been using Xmarks (Foxmarks) for many years, but I wanted something that was more social. I created an account, http://delicious.com/philbeiler  and use it pretty regularly. I have not gotten into the whole tagging thing yet, I use it mainly to save myself time.  The Firefox plug-in works great. It only takes a second to create new bookmarks or find one that I recently created.

The sad part is, that I have no one in my bookmark network! I think it would be really cool to see what my friends and co-workers were bookmarking. It my opinion, Web 2.0 is about sharing and learning; social bookmarking is just another method for enabling this information exchange. It is so easy for me to send someone to my bookmarks, to share what I have been reading or found interesting. It is also valuable to visit the home link on delicious, just to checkout the most popular bookmarks and tags. I guarantee, you will find something of interest!

I also in the process of migrating my RSS aggregator from NewsGator to Bloglines. Bloglines makes it easier to share what I’m reading as well, creating a public presence on their site, http://www.bloglines.com/public/PhilBeiler.  I have not moved over all of my feeds yet, but it has worked well thus far. More on the reason behind the move later! I have to save that for another blog post!  So, if anyone is using delicious, please add me to your network!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jul 07 2009

More Firefox Plug-ins – Useful Firebug Extensions

Category: Blogging,TestingPhil @ 7:41 pm

I found an interesting web that has all kinds of great information on website design. A highlighted a couple posts that I thought were very interesting: 10 Unusual Places to Get Design Inspiration and 10 Useful Firebug Extensions. You seriously should click on the design inspiration link, especially if you want to see how creative people can really be; check the beautiful web sites and unforgettable business cards. Truly amazing!

I also did not realize that people were building plug-ins to extend plug-ins! What a concept! I guess that is what makes Firefox such a powerful web browser, tool, platform; there are plug-ins to do about everything. I previously blogged about Firebug and YSlow, but I did not realize that Firebug was also a platform for other developer centric tools, such as HTML validation and code coverage. Someone was nice enough to create a Mozilla Collection for Web Debug Tools, it provides links to all of the referenced plug-ins. 

I recently found a plug-in that I wanted to share as well, called IE Tab. A couple of weeks ago, I was working on a web application and was validating the browser compatibility of our CSS; it was kind of painful switching back and forth between the IE and Firefox, especially since I preferred using Firefox. Fortunately, I discovered IE Tab, which is unfortunately not available on Linux! It simply embeds Internet Explorer in a Firefox tab to render the current page’s content. There will be a little browser icon in the lower right-hand corner of the window; it indicates which browser was used to render the page/tab. Just click on the icon to switch between the two rendering approaches. I think this is much better than having two switch between browsers! Maybe I’m just lazy! There is one small short coming using this approach, it can only use the version of Internet Explorer that you have installed on your computer. I happened to be using IE8 and our testers were using IE6. Needless to say, we had a couple of unexpected issues! Can you believe that IE6 is still being used? I think I would go crazy with out tabbed browsing!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jun 23 2009

Doing more with jUnit: faster, cleaner unit testing

Category: Java,TestingPhil @ 9:20 pm

These are not really new features, but I bet most developers (like myself) have not given them the attention they deserve! Earlier this month, I read an interesting article on the Atlassian Developer Blog which peaked my jUnit interest. I remember reading about these features when jUnit 4.4 was released a couple of years ago (release notes), but I never took the time to try them out. JUnit included new abilities and concepts, such as Assumptions and Theories. To be real honest, the Assumptions and Theories sound really good in theory, but I’m not sure how practical they are in the real world! How can you argue with definition of a Theory… More flexible and expressive assertions, combined with the ability to state assumptions clearly, lead to a new kind of statement of intent.

First, I’m not sure how well Spring and Theories actually play together. They both need to have their own @RunWith annotation. Second, it is hard enough to get some developers to create a simple unit test! I will have to do some more pondering on Theories. Also, don’t get too carried away with the assumptions without doing some more reading; they have some rather unexpected behavior. Assumptions cause future assertions to pass, irregardless of the asserted value! Interesting?

The real power is in the “Matcher” functionality provided by Hamcrest, creating new capabilities (without writing additional code), a cleaner assertion syntax, creating more readable unit test code. Check out the multitude of convenince Matchers that are provided from Hamcrest. I focused on the power of the assertThat() method. The following code snippet demonstrates a couple of the matchers that I could have used a dozen times in the past and probably implemented my own nasty, non-reusable solution!

	@Test
	public void assertions() {

		final String colors = "color me crazy";
		final Collection<String> colorList = new ArrayList<String>();
		colorList.add("color");

		assertThat(colors, either(containsString("color")).or(containsString("colour")));

		assertThat(colorList, either(contains("color")).or(contains("colour")));

		assertThat("custom error message", colorList, //
				not(either(contains("red")).or(contains("green"))));

		assumeThat(colorList, contains("red"));
		fail("jUnit Still successful!! Does not fail!");
	}

Random Thoughts…

  • jUnit 4.6 was recently released (release notes). I did not see anything exciting in new new release, other that some new integration with JUnit Max.
  • As cool as JUnit Max sounds, it is now dead to me! The subscription fee has jumped to $10 per month… That is more than my XM Radio subscription!!! If continuous testing is really that cool, hopefully, other smart people are working on even better, open-source alternatives!
  • The Spring 2.x framework integration was broken with jUnit 4.5 and required version 4.4. The new 3.x version of Spring, still in beta, works with both 4.5 and 4.6. It actually no longer works with 4.4!
https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jun 15 2009

Galileo Eclipse Update

Category: EclipsePhil @ 6:27 pm

I might be in the minority, but I’m just not that excited by this release of Eclipse. I started using the RC3 version for real last week, and have had no issues at all; it seems very solid.  I attempted to use with the first couple release candidates, but they did not seem to play well with the Subversion plug-ins. I’m sure it was user error; it could not have been that messed up! For whatever reason, Eclipse completely toasted my work area (multiple attempts) after every commit. Needless to say, I did not even bother using them.  I have Eclipse integrated with the Spring IDE, Checkstyle, PMD, and Ivy plug-ins. I heavily use the Web Tools Platform for deploying web applications to Tomcat.  At least for what I have been doing lately, there is nothing to get me really excited. I think the best part is, that everything still just works! I notice a new little feature every so often, but nothing that says that’s a keeper! I have been using the Implementors plug-in for many years and was glad to see they finally implemented this feature within Eclipse. It works pretty well,  but they only implemented half of the functionality! With the Implementors plug-in, you can click on the interface method and ask to see all of the concrete implementations.  You can, sort of, get the same functionality through the type hierarchy view, but not as nicely. After seeing the Open Implementation feature, I thought this was a new feature too; I did not know that you could just click on a URL and have it open up in the browser, kind of handy!

One other thing that seems new, is the ability to search using partial camel-case entries. If you are really lazy or can not spell worth a crap, then you will probably use this feature a lot. Simple type in mixed case letters in the entry field, and Eclipse will automatically match to those classes. I thought the bold-ing of the matched letters was a nice touch.

There are two features that need some work, especially when you are moving between (upgrading) Eclipse versions.

  1. I thought the Clean Up and Save Actions functionality were excellent additions to the Ganymede release. I still can not figure out why I have to enter my configurations on both option panels. You can import/export the configuration on the Clean Up panel, but not on the Save Actions panel; you have to re-enter everything. I understand that some people might want different behaviors, but you should at least be able to import/export your settings on the Save Actions panel too; allowing us to reuse the other panel’s settings. I thought for sure this would have been fixed, small  bummer.
  2. The Content Assist Favorites drives me crazy, especially because I’m a big jUnit believer/implementer. Because I only use jUnit 4.x annotations and static import assertions in my unit tests, Eclipse is not smart enough to add the imports when I hit <CTRL><SHIFT>o or ask for the content assist. Maybe I learned something new tonight, from this blog.  I typically enter all of the jUnit assertion signatures (method names only) that I typically use. It looks like their might be an easier way, just by specifying the Type, I will have to try this tomorrow! Personally, I think jUnit assertions should be added by default, but that is just me!

If I’m missing out on a new killer Eclipse feature that was added to Galileo, please let me know! I don’t want to take away any of the great work that was done on this release, unfortunately, I don’t use any of those new additions! But I don’t think you can go wrong with this upgrade.

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jun 14 2009

New Trees… Like we don't have enough!

Category: MiscPhil @ 6:40 pm

Fortunately, we only lost a couple of trees last summer due to the drought.  Unfortunately, there were both relatively close to the house, so they really needed to be replaced. Amazingly, there were only two trees on our lot when we purchased it, now there are over two hundred! Call me crazy, I push mow around all of them before mowing with the big mower! I can’t believe how these trees have grown; we purchased about 150 Evergreens that were only 18 inches tall; many of them are over 10 fee tall now. Pretty cool!

We found a nice little nursery up in Frederick MD this weekend,  The Dutch Plant Farm. We live far enough to the west, that we can actually go up to Frederick, out to Winchester, or over to West Virginia; the distance is about the same any direction we go! The staff was very helpful and the prices were more reasonable than some of the big Northern Virginia nurseries.

One of the trees we lost was a six year old Japanese Maple. We wanted to replace it with another one, but were a little worried about their hardiness and cost. Between the hot, humid summers, too much rain, not enough rain, and the crazy amount of wind we get in the winter, we have some pretty tough tree growing conditions!  We ended up purchasing a different variety of Japanese Maple, one that was a little more tolerant of direct sunlight, a Red Dragon.  I obviously need to do some mulching, but it is a really pretty tree. The other tree we lost was a Harry Lauder Walking Stick; it was several years old too, but never really did that well.  We decided to replace it with a Raspberry Sundae Crapemyrtle. Living in the south, you see so many Crapemrytles, I think they are one of my favorites; especially when they start blooming. Hopefully, they will both survive the summer heat; I guess I will just have to keep up with my watering!

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


Jun 10 2009

Hudson Continuous Integration and Eclipse Update Sites

I was looking for a development build of the IvyDE plug-in for Eclipse tonight and I stumbled across the Apache Hudson server. You have to check this out. Pretty cool, Hudson running over 150 jobs!  Their build farm consist of both Solaris and Ubuntu servers. What I found most interesting was how they used Hudson for creating an Eclipse update site. I subscribe to the Hudson mailing list, summarized here, to follow what is going on with the project. People seem to use Hudson for a variety of different purposes, such as a cross platform testing tool and even as a deployment tool. I have only been able to get people interested in Hudson as a “Cruise Control” replacement…. but at least it is a good start!

This site also demonstrates how multiple projects can be linked together, triggering builds of dependent downstream projects.  I’m not exactly sure how these jobs were assembled, but at a high-level, Ivy and IvyDE each have its own build loop (job). Each job is responsible for creating build artifacts. After a successful build of either job, a third job is triggered which creates/updates and Eclipse update site.  Pretty slick. (As any FYI, the dev plug-in looks better, new presentation and several new new options)

Another small plug for Continuous Integration. We recently set up something kind of cool (trivial, but cool)! As we continue trying to convince the powers that be, to move away from Weblogic towards Tomcat (or even JBoss), we found a really nice little feature. Since Tomcat and JBoss can hot deploy a new version of the WAR file, just by noticing a difference on the file system, combined with the fact that we can spin up a Tomcat instance in about 2 minutes, we actually created an auto deployment mechanism.  Our Weblogic environment seems so cumbersome in comparison…. We could have built the WAR and deployed in in our build loop, but that would have minimally added another 25 minutes to the loop (let’s just say we have an interesting deployment process). With Tomcat, we did a one time deployment to the location of the WAR file inside the Hudson workspace. Now, with each series of check-ins, we build the WAR as normal and Tomcat instantly deploys it, in seconds! If we were a little more sophisticated, we would write some jUnits to bang against it, making sure we did not break anything or create any new dependencies.  Maybe I will throw that in during my next project!!! I know this integration was possible before (with Weblogic), but no way as simple!  Even better Continuous Integration… on my last project I had Ant spin up an embedded Jetty web server, ran my jUnits against the Clover instrumented code, and finally had Ant shut down Jetty…. Pretty slick, from a code coverage collection perspective…

https://www.beilers.com/wp-content/plugins/sociofluid/images/digg_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/reddit_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/dzone_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/stumbleupon_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/delicious_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blinklist_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/blogmarks_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/google_48.png https://www.beilers.com/wp-content/plugins/sociofluid/images/facebook_48.png


« Previous PageNext Page »