us site
developer center
search

A Guide to Java MessageFormat (or, How I Learned to Stop Worrying and Love Macros)

December 10th, 2008, by Joel Barciauskas

While working on an application for a client, I encountered some issues with Java’s MessageFormat. In particular, I needed to pass MessageFormat a string that contained single-quotes and curly braces that would be treated literally. This is an issue, because single-quotes and curly braces are special characters in MessageFormat land.

MessageFormat is designed to allow you to dynamically create a string based on a static pattern and a set of inputs. For example, this is from the MessageFormat JavaDoc:

 Object[] testArgs = {new Long(3), "MyDisk"};

 MessageFormat form = new MessageFormat(
     "The disk \"{1}\" contains {0} file(s).");

 System.out.println(form.format(testArgs));

 // output, with different testArgs
 output: The disk "MyDisk" contains 0 file(s).
 output: The disk "MyDisk" contains 1 file(s).
 output: The disk "MyDisk" contains 1,273 file(s).

Read the rest of this entry »

Legacy Impact: Globalization & Application Modernization (Part 1 of 4)

November 5th, 2008, by Adam Markey

Legacy applications have architectural limitations that prohibit their ability to support large scale deployments. They often necessitate servers and technicians at each location with continuous client software maintenance and service, all creating redundant headcounts, resources and costs.

Application modernization toward an open, web architecture can address these technology limitations as they relate to the demands of globalization and will create new opportunities in terms of people and delivery. First, regarding the architectural limitations of legacy technologies, modernization toward an open, web architecture supports centralized deployments and zero-client installation which significantly lessens the need for local technicians, eliminates client software maintenance needs, and supports a reduction in hardware and infrastructure –consequently lessening energy requirements. From a pure software development perspective, adopting a loosely coupled architectural Web approach can reduce the time to execute a change request by 90 percent.

Secondly, modernization with Internet-based technology creates new methods of delivery and new ways to carve the resources pie. In terms of people, transformation toward an open, standardized application platform allows better utilization of a global workforce, especially from countries such as China and India. In terms of delivery, the lack of skilled IT resources against the demand will drive innovation and investment in new delivery models such as SaaS, IT process automation, and Internet-based service offerings that lessen reliance on human resources to resolve issues that can be solved in other ways.

Tutorial: Hibernate, DWR and dojo.E

October 6th, 2008, by Joel Barciauskas

I just presented a tutorial on Friday on using Direct Web Remoting, Hibernate and dojo.E.  It’s a very simple demo, but demonstrates the power of these three technologies combined to create simple, dynamic Java applications very quickly. The tutorial is available on SlideShare.

DWR, Hibernate and Dojo.E - A Tutorial

View SlideShare presentation or Upload your own. (tags: tutorials tutorial)

Note that there is a bug that obscures the URL for the SVN project.  The URL is http://source.nexaweb.com/svn/repos/trunk/tutorials/ajax/DWRExample/.

You can check out the project via SVN using this URL.

Also, to copy and paste the code snippets, download the document and open directly in PowerPoint. When copying and pasting, watch out for “smart quotes”. Some of the quotation characters in the PPT have been replaced with “smart quotes”, which are not recognized by XML parsers.

This will get even more exciting with the new features of DWR 3.0, which will add a RESTful layer to DWR’s remoting.  To learn more about DWR 3.0, I recommend Joe Walker’s presentation from The Ajax Experience last week.  He’s the lead developer for DWR.

Joel Barciauskas

Box layout containers for Dojo

March 20th, 2008, by mmikhaylov

What is it?

HorizontalBoxContainer and VerticalBoxContainer is a pair of layout managers that allow multiple children components to be laid out either vertically or horizontally. This is similar to BoxLayout from the Java Swing toolkit.

Read the rest of this entry »

Nexaweb Advance Getting Plenty of Attention

March 11th, 2008, by Adam Markey

Legacy applications are an even bigger headache than was originally thought. The announcement of Nexaweb Advance has generated huge attention in the media and has caused a 400% jump in traffic to www.nexaweb.com over a normal 5 day period. Check out some of the coverage below:

Read the rest of this entry »

New version of Studio - beta available

March 3rd, 2008, by admin

We’ve been working hard on a new version of our development environment and we’re releasing a beta into the world.

Some highlights:

  1. Data, data, data - all work flows that interact with data integration have been overhauled
  2. Supporting users that have their own Eclipse environment and don’t want ours
  3. Editing our “macros” - declarative modification blocks that can be executed on the client
  4. Supporting JSON visualization for data sources
  5. Results from usability testing has been added in
  6. and more…

If you would like to take the beta for a spin, email our support department.

Rob Gagne

Using the Dojo XML Parser

February 5th, 2008, by admin

I have spent the last few weeks building examples using XML on top of dojo, including an XML version of the mail application (you can see it here http://trac.dojotoolkit.org/ticket/5766).

Read the rest of this entry »

dojo xml parser

January 6th, 2008, by admin

We’ve been using dojo for a while now as part of our Ajax product offering. We’re currently in the process of upgrading from 0.4 to the shiny new dojo 1.0; as part of that we have developed some things that may be useful outside of the Nexaweb product. One of these is a processor, which uses the dojo parser, to read xml and uses it to create dojo components.

For example:

<ui xmlns:dijit=”dijit”>
<dijit:form.Button label=”Hello, World!”/>
</ui>

<ui xmlns:dijit=”dijit.form”>
<dijit:Button label=”Hello, World!”/>
</ui>

would both create a dojo button with the (grammatically correct) “Hello, World!”. The path to the component is the combination of the xml namespace and the element name. An event handler could be added simply by adding an onclick attribute.

HTML can be mixed in using its own namespace:

<ui xmlns:dijit=”dijit” xmlns:html=”html”>
<html:p>HTML before</html:p>
<dijit:form.Button label=”Hello, World!”/>
</ui>

These are all included in an HTML file through the <script/> tag, either inline or via the src attribute.

Why is this useful? It flips the ui description to a full declarative approach from either JavaScript or JavaScript + a div. This has some advantage: can be easier to write and maintain, the dojo part can be seperated from the rest of the HTML, easier to share, can be machine generated or schema validated for correctness, etc.

It’s not all peaches and cream - the declarations get longer and there is another, very short, step before the component is on the screen - but for many the benefits can outweigh the disadvantages.

You can try it yourself by downloading it here. Feedback and thoughts appreciated. More examples on their way.

- Rob Gagne

MR released

January 6th, 2008, by admin

For those on Platform 4.2 we’ve released a new maintenance release. This focuses on some fixes for dynamic layout in flow panes and a new API that helps keep track of the UI update lock count for freezing the screen rendering - something you don’t think about until you need to do it. See the release notes page on the dev center for more info.

- Rob Gagne

Welcome

January 6th, 2008, by admin

Hi Everyone,

Welcome to the new blogroll for Nexaweb. We’ve been blogging for a while now elsewhere (rockstarapps.com and coachwei.com) but these are the first Nexaweb hosted blog sites. You can read about new things coming out of engineering, marketing and our community folks as well as the business side of things.

Enjoy!

- Rob Gagne