Book Image

Backbase 4 RIA Development

Book Image

Backbase 4 RIA Development

Overview of this book

Backbase is a very powerful and complex JavaScript library, with many user interface components to help make web development easier. It allows the development of Rich Internet Applications (RIA) that run within all major browsers but its powers and complexity mean that the choice of component can be overwhelming. Understanding when and how to use the right component might not always be straightforward. This book makes that easier. This is a practical book that teaches you how to use the Backbase Client Framework effectively, with a complete overview and many examples. A core developer of the framework puts the technologies used into a wider perspective of existing web standards and a seasoned software architect explains why XML-based UI definition produces better web applications. The transparent use of AJAX technologies, for example to submit forms, or to retrieve updates for data grids, can be taken for granted with the Backbase framework. Packed with examples, the book shows you how to get the most from the library of UI components, and then extend the library with its own custom language. With this book in hand, it is easy to enable AJAX within your web application. You will be able to use the Backbase framework effectively, from basic applications to complex, custom-defined UI components. This book contains a complete overview of all the UI libraries available within the Backbase framework and shows examples for each element described. The Backbase framework offers an innovative Tag Definition Language (TDL), which allows developers to create new UI components that can be used as XML elements, in the same way as using the built-in GUI library. Using TDL brings considerable development advantages, and this book explains how. Significant attention is also given to architectural aspects of designing a web-application, showing sample applications using a model-view-controller approach.
Table of Contents (16 chapters)
Backbase 4 RIA Development
Credits
About the Authors
About the Reviewers
Preface

Chapter 1. Hello Backbase!

In this chapter, we will say "hello!" to the Backbase Client Framework. We will explain how to download the framework and how to install it. Then, we will discuss how to set up a new application that'll show "Hello World!". At the end of this chapter, we will also show a simple page layout using a Backbase panelSet widget. We will expand this page into a client web application in later chapters.

In each chapter, we will cover some background information that will help you understand how the Backbase framework works. In this chapter we will look at the following subjects in more detail:

  • What are Backbase, AJAX, and RIA?

  • Setting up your development environment, downloading the Backbase Client Framework, and installing it

  • The Backbase Explorer

  • The Backbase page skeleton that is needed to load the client runtime of the framework

  • "Hello Backbase" examples

  • Namespaces and how they are used in the Backbase framework

  • A basic page with a panelSet

What is Backbase?

The Backbase Client Framework is a standards based, server independent, cross-browser solution to creating web applications, ranging from traditional to desktop-like. It uses AJAX technologies to easily develop and deploy Rich Internet Applications.

This is a mouthful of a definition. Let's look at the meaning of those terms first:

  • Standards based: XHMTL, CSS, XML, and JavaScript are used according to defined standards.

  • Server independent: The Backbase Client Framework is server agnostic, as it does not know which server or which server language it is communicating with.

  • AJAX: Asynchronous JavaScript and XML is an enabling technology for creating Rich Internet Applications. We will provide an overview in Chapter 4.

  • RIA (Rich Internet Applications): This is what you can build using the Backbase Client Framework—web applications that have a rich user interface, and allow a user to interact with the application. In addition to AJAX as a communication enabler, there is also an extensive library with UI widgets available.

In addition to the Client Framework, Backbase offers a set of extensions for the Java environment. It includes a JavaServer Faces (JSF) extension, a generic connector for JSP or Struts, and a Data Services extension. These extensions are not discussed in this book.

What can Backbase do for me?

If you are like us and like many web developers, you may have started writing simple HTML when developing web applications. After a while, you may have decided to separate presentation from structure and to give your web pages a better look using CSS. The next thing in your evolution as a web developer would have been making your pages more user friendly and interactive, by creating tool tips, pop-up windows, tab boxes, and by validating forms before submitting. Maybe you did this using little pieces of JavaScript downloaded from the Web or by building your own JavaScript function libraries. On top of this, you may have tried to give your web applications the look and feel of a desktop application by using AJAX, requiring more JavaScript everywhere.

Now, what happened to the source code of your web pages? Again, if you are like us, over time the HTML code became littered with many pieces of JavaScript. It became difficult to see what the structure of the page was, even more so when you tried to generate the HTML code from PHP or JSP or some other server-side scripting language. Perhaps, you found out too that it is really hard to make a web page that will show well in all major browsers.

Would it not be nice if there was...

  • A framework that has the tool tips and the tab boxes readily available for you and will allow you to code these widgets as if they were HTML tags?

  • A framework that has AJAX support almost transparently built in?

  • A framework that allows you to bind data from a database to widgets on your page, such as a data grid with paging, sorting, and more?

  • A framework that allows you to extend the provided widgets or build your own widgets, and then use these widgets in exactly the same way as the widgets provided with the framework?

  • And finally, a framework that runs in standard browsers without requiring a plugin?

The Backbase Client Framework is such a framework. We will call it Backbase most of the time, which is also the name of the company that built the framework. Backbase can be used freely. There is no difference between the commercial and the community edition, except for the license, which states that you should not deploy it commercially on a server with more than two processors.

This book is intended to make you an expert in using the Backbase framework. We will cover just enough of AJAX, XML, XHTML, namespaces, XPath, CSS, and the Document Object Model (DOM) to make the Backbase framework easier to use, and to understand why Backbase is built like it is. While doing so, we hope that we can increase your knowledge of the core client web technologies and how they relate to each other. With this knowledge, you can evaluate Backbase against other frameworks and decide which one suits your purpose the best.

To round off this introduction, let's summarize the advantages of using the Backbase Client Framework:

  • The framework is written in JavaScript. Therefore, it runs on all modern browsers and requires no plugin or prior installation.

  • The framework is XML based. This means that you can define your GUIs using XML tags. This is very important for clarity of code and design, and is more familiar to UI developers.

  • The widgets that are built-in or that you create are objects, in the meaning of being object oriented. This means that you can use object-oriented design methods effectively to design a Backbase application.

  • The framework itself is built using a Model-View-Controller (MVC) architecture. You are encouraged to similarly design your applications using MVC.

  • The framework is standards based and provides cross-browser functionality. This means that the Backbase framework allows you to use standards, such as DOM 3 events or SMIL that may not be available in all browsers.

  • Another transparent feature is the AJAX communication built into several UI widgets. For example, you do not need to create XMLHttpRequest objects to submit a form. The framework will do this automatically for you if and when you tell it where the response should go.

  • There is an Eclipse IDE plugin available to help with the syntax of UI widgets.

  • The framework easily integrates with third-party widgets.