Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Ext JS 3.0 Cookbook
Ext JS 3.0 Cookbook

Ext JS 3.0 Cookbook: Clear step-by-step recipes for building impressive rich internet applications using the Ext JS JavaScript library

€32.99 €22.99
Book Oct 2009 376 pages 1st Edition
eBook
€32.99 €22.99
Print
€41.99
Subscription
€14.99 Monthly
eBook
€32.99 €22.99
Print
€41.99
Subscription
€14.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Oct 20, 2009
Length 376 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781847198709
Category :
Table of content icon View table of contents Preview book icon Preview Book

Ext JS 3.0 Cookbook

Chapter 1. DOM and Data Types, the Ext JS Way

In this chapter, you will learn the following recipes:

  • Detecting browsers and platforms used by clients

  • Retrieving DOM nodes and elements

  • Acquiring references to Ext JS components

  • Running high-performance DOM queries

  • Encoding and decoding JSON

  • Encoding and decoding URL data

  • Determining the object type and converting empty references to a default value

  • Finding objects in an array and removing array items

  • Manipulating strings à la Ext JS

  • Effortless range checking for numbers

  • Formatting, parsing, and manipulating dates

  • Preventing naming conflicts and scoping non-global variables

  • Extending JavaScript objects, the Ext JS way

  • Adding features to the Ext JS classes

  • Building custom JavaScript classes that inherit the functionality of Ext JS

Introduction

In this chapter, you will learn how to accomplish tasks related to working with different browsers, platforms, the Document Object Model (DOM), and the Ext JS data types. You will also take in how to create custom data types that extend the functionality of the native Ext JS types.

Introduction


In this chapter, you will learn how to accomplish tasks related to working with different browsers, platforms, the Document Object Model (DOM), and the Ext JS data types. You will also take in how to create custom data types that extend the functionality of the native Ext JS types.

Detecting browsers and platforms used by clients


Although Ext JS is a cross-browser library, there are instances when your application needs to show a different behavior depending on the user's browser or platform. Browser and platform detection are very simple tasks with Ext JS, and this recipe shows how it's done.

How to do it...

You can detect various browsers and platforms used by your clients in the following way:

  • You can use Ext.isChrome to find out if the detected browser is Chrome:

    var browser = "";
    if (Ext.isChrome) {
    browser = "Hi! I'm the new kid on the block";
    }
    
  • The browsers such as Mozilla and Firefox that use the Gecko rendering engine are detected with Ext.isGecko, Ext.isGecko2, and Ext.isGecko3:

    if (Ext.isGecko) {
    browser = "Gecko";
    }
    if (Ext.isGecko2) {
    browser = "Gecko2";
    }
    if (Ext.isGecko3) {
    browser = "We like Firefox!";
    }
    
  • The Internet Explorer versions are flagged by Ext.isIE, Ext.isIE6, Ext.isIE7, and Ext.isIE8:

    if (Ext.isIE) {
    browser = "IE";
    }
    if (Ext.isIE6) {
    browser = "Get a decent browser, now!";
    }
    if (Ext.isIE7) {
    browser = "IE7";
    }
    if (Ext.isIE8) {
    browser = "IE8";
    }
    
  • Opera is detected with Ext.isOpera:

    if (Ext.isOpera) {
    browser = "Opera";
    }
    
  • And finally, Safari is detected with Ext.isSafari, Ext.isSafari2, Ext.isSafari3, and Ext.isSafari4:

    if (Ext.isSafari) {
    browser = "Safari";
    }
    if (Ext.isSafari2) {
    browser = "Safari2";
    }
    if (Ext.isSafari3) {
    browser = "Safari3";
    }
    if (Ext.isSafari4) {
    browser = "Safari4";
    }
    
  • When it comes to platform detection, Adobe's Air is detected with Ext.isAir:

    var platform = "";
    if (Ext.isAir) {
    platform = "Air";
    }
    
  • Linux is detected withExt.isLinux:

    if (Ext.isLinux) {
    platform = "Linux";
    }
    
  • Mac OS is detected with Ext.isMac:

    if (Ext.isMac) {
    platform = "Mac";
    }
    
  • Windows is detected with Ext.isWindows:

    if (Ext.isWindows) {
    platform = "Windows ";
    }
    

How it works...

As you can imagine, the values for Ext JS's browser and platform type flags are all obtained from parsing the value of the userAgent property of the JavaScript navigator object.

There's more...

Use this recipe when you need to alter the features or behavior of your application depending on the browser or platform being used. For example, depending on the platform used, you can provide Mac or Windows versions of a browser plugin; or you can account for rendering differences of various browsers when positioning DOM elements.

Retrieving DOM nodes and elements


Web development involves hefty doses of DOM manipulation. This recipe shows how you can use Ext JS to get a handle on any DOM element.

How to do it...

Using a div element as an example, you can get a handle to the div in the following way:

<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" 
href="../ext/css/ext-all.css"/>
<script type="text/javascript" src="../ext/ext-base.js"></script>
<script type="text/javascript" 
src="../ext/ext-all-debug.js"></script>
<script type="text/javascript"> Ext.BLANK_IMAGE_URL = '../ext/images/default/s.gif';
Ext.onReady(function() {
var firstDiv = Ext.get("div-1");
Ext.Msg.alert('Using Ext.get(el)', firstDiv.id);
});
</script>
</head>
<body>
<div id="div-1">This is the first div</div>
</body>
</html>

How it works...

The previous code uses Ext.get(element), a shorthand for Ext.Element.get(element), to acquire a reference to a div element in the document. You can use this function to retrieve references that encapsulate DOM elements.

There's more...

The Ext.get(element) function uses simple caching to consistently return the same object. Note that Ext.get(element) does not retrieve Ext JS components. This is can be accomplished using Ext.getCmp(), explained in the next recipe.

See also...

  • The next recipe, Acquiring references to Ext JS components, explains how to obtain a reference to a previously created component.

  • The Running high performance DOM queries recipe, which is covered later in this chapter, teaches you how to run queries against the DOM using Ext JS.

Acquiring references to Ext JS components


As Ext JS is all about working with components, it's essential to learn how to acquire a reference to any component in your code. For example, this recipe shows how easy it is to reference a ComboBox component.

How to do it...

You can reference a ComboBox component as shown in the following code:

<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" 
href="../ext/css/ext-all.css"/>
<script type="text/javascript" src="../ext/ext-base.js"></script>
<script type="text/javascript" 
src="../ext/ext-all-debug.js"></script>
<script type="text/javascript"> 
Ext.BLANK_IMAGE_URL = '../ext/images/default/s.gif';
Ext.onReady(function() {
var colorsStore = new Ext.data.SimpleStore({
fields: ['name'],
data: [['Blue'],['Red'],['White']]
});
var combo = new Ext.form.ComboBox({
store: colorsStore,
displayField: 'name',
typeAhead: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
emptyText: 'Select a color...',
selectOnFocus: true,
applyTo: 'colors-combo',
id: 'colors-combo'
});
// Get a reference to the combobox using Ext.getCmp(id).
var combo = Ext.getCmp("colors-combo");
// Using the reference to the combo, add a handler to the
//'select' event.
combo.on('select', function() {
Ext.Msg.alert('Using Ext.getCmp(id)', 
The selected color is ' + combo.getValue();
});
});
</script>
</head>
<body>
<input type="text" id="colors-combo"/>
</body>
</html>

How it works...

References to components are obtained using the Ext.getCmp(id) function, where id is the ID of the component. Keeping track of components is possible, thanks to the ComponentMgr class. It provides for easy registration, un-registration and retrieval, as well as notifications when components are added or removed.

There's more...

This method is particularly useful when explicit component references do not already exist in your code, for example when components are defined as part of the items collection of a container. (Think of a tab panel and its tabs, or a border layout and its contained panels.)

There are other DOM and component utilities provided by Ext JS:

  • Ext.getBody() returns the body of the document as an Ext.Element

  • Ext.getDoc() returns the current HTML document as an Ext.Element

  • Ext.getDom(id) returns the DOM node for the supplied ID, DOM node, or element

See also...

  • The Retrieving DOM nodes and elements recipe, covered earlier in this chapter, explains how to get a handle on any DOM element.

  • The next recipe, Running high-performance DOM queries, teaches you about running queries against the DOM.

Running high-performance DOM queries


Now you'll see how to run queries against the DOM using Ext JS—a must-have when you need to manipulate or perform actions on multiple, related DOM elements. The examples show how to reference all the div elements in a document, obtain all the elements with a CSS class name msg, and iterate over the options of a select element.

How to do it...

The following code snippets are examples of how to run high-performance queries against the DOM using Ext JS:

  • When you need to retrieve the elements that match the div selector to find the div elements in the document, use the following code snippet:

    Ext.onReady(function() {
    // Get all the div elements.
    var nodes = Ext.query('div');
    Ext.each(nodes, function(item, index, allItems) {
    document.write(index + '<br/>');
    });
    });
    
  • When you need to reference the elements with the class name msg, use the following code snippet:

    var msgLinks = Ext.query('.msg');
    Ext.each(msgLinks, function(item,index) {
    // Do something with the element here.
    });
    
  • When you want to iterate over the options of a select element, use the following code snippet:

    var select = Ext.get('countries-select');
    Ext.each(select.options, function(item,index) {
    // Do something with the item here.
    });
    

How it works...

The previous examples use Ext.query(path, [root]), a shorthand of Ext.DomQuery.select(path, [root]), to retrieve an array of DOM nodes that match a given selector.

There's more...

DomQuery provides high-performance selector/XPath processing by compiling queries into reusable functions. It works on HTML and XML documents, supports most of the CSS3 selector's specification as well as some custom selectors and basic XPath, and allows you to plug new pseudo classes and matchers.

See also...

  • The Retrieving DOM nodes and elements recipe, covered earlier in this chapter, shows how you can use Ext JS to get a handle on any DOM element.

  • The Acquiring references to Ext JS components recipe, covered earlier in this chapter, explains how to acquire a reference to any component in your code.

Encoding and decoding JSON


Converting JavaScript and Ext JS objects to JSON, and converting JSON data back to JavaScript objects is easily achievable with Ext JS. For example, here's how to JSON-encode an array and how to rebuild the array from its JSON representation:

Note

JavaScript Object Notation (JSON) is a lightweight text format where an object is represented with an unordered set of name/value pairs and an array with an ordered collection of values.

JSON is completely language independent, easy for humans to read and write, and easy for machines to parse and generate. These properties make JSON an ideal data-interchange format.

Find out more about JSON at www.json.org.

How to do it...

Let's encode an array of colors using the following steps:

  1. 1. Create an array called colorsArray:

    var colorsArray = new Array();
    
  2. 2. Put some values in the array:

    colorsArray[0] = 'Blue';
    colorsArray[1] = 'Red';
    colorsArray[2] = 'White';
    
  3. 3. Now, convert to JSON:

    var colorsJson = Ext.encode(colorsArray);
    

    The value of the colorsJson variable should be the string ["Blue","Red","White"] string

  4. 4. Let's re-create the array based on its JSON string. Take the JSON representation of colorsArray:

    var colorsJson = '["Blue","Red","White"]';
    
  5. 5. Parse the JSON and rebuild the array:

    var colorsArray = Ext.decode(colorsJson);
    

After this, colorsArray contains the colors data: colorsArray[0] is 'Blue', colorsArray[1] is 'Red', and colorsArray[2] is 'White'.

How it works...

To obtain a JSON representation of an array, object, or other value, pass the value to Ext.util.JSON.encode(object). You can also use the shorthand, Ext.encode(object).

You can parse a JSON string by using Ext.util.JSON.decode(json), or its shorthand Ext.decode(json).

While decoding JSON involves simply calling the JavaScript eval(String) function, the encoding process is more complicated and requires different implementations depending on the data type being encoded. Internally, the encode(object) function calls specialized encoding functions for arrays, dates, Boolean values, strings, and other types.

You can also set the Ext.USE_NATIVE_JSON property to true, which will cause calls to encode(object) and decode(json) to use the browser's native JSON handling features. This option is turned off by default. If you turn it on, beware that native JSON methods will not work on objects that have functions, and that property names should be quoted in order for the data to be correctly decoded.

There's more...

JSON encoding and decoding is a pillar of modern web development, given the role of JSON—a language-independent, data-interchange format—in facilitating communications between the client-side and server-side of web applications. For instance, you can expect to find JSON manipulation when your application needs to send data to the server, as well as when the application needs to dynamically create objects from server-supplied data.

See also...

  • The next recipe, Encoding and decoding URL data, shows how to do two-way conversion between objects and URL data.

Encoding and decoding URL data


Two-way conversion between objects and URL data is a challenge that Ext JS can help with. Let's examine how a JavaScript object can be encoded for transmission through the URL query string, as well as how information contained in a URL can be used to build a JavaScript object.

How to do it...

The following steps will guide you through the process of encoding and decoding URL data:

  1. 1. Take a selectedColors object as the data to be passed in a URL:

    var selectedColors = {color1:'Blue', color2:'Red', color3:'White'};
    
  2. 2. Convert the object to URL data like this:

    var encodedUrl = Ext.urlEncode(selectedColors);
    // encodedUrl is an encoded URL query string:
    //color1=Blue&color2=Red&color3=White.
    
  3. 3. Now, a URL can be built using the data just created. For example, http://MyGreatApp/SetSelectedColors?color1=Blue&color2=Red&color3=White.

  4. 4. You can easily create objects from the encoded URL. Assuming we obtained the data from the URL we used above (http://MyGreatApp/SetSelectedColors?color1=Blue&color2=Red&color3=White), obtain the URL data like this:

    encodedUrl = location.search;
    
  5. 5. Re-create the selectedColors object as follows:

    var selectedColors = Ext.urlDecode(encodedUrl); 
    // Now the value of selectedColors' color1 property is 'Blue',
    // color2's value is 'Red' and color3's value is 'White'.
    

How it works...

Ext.urlEncode(object) and Ext.urlDecode(string, overwrite) provide object serialization to URL data and URL data deserialization to objects respectively. Encoding is accomplished by creating the URL query string's key-value pairs based on each object property, or array value passed to the encoding function. Decoding is accomplished by creating an object with a property for each key-value pair that exists in the URL's query string.

There's more...

You can use this recipe when your application needs to send information to the server via AJAX or standard HTTP requests, as well as when you need to use the URL's query string to feed the application data that can later be converted to JavaScript objects.

See also...

  • The Encoding and decoding JSON recipe, covered earlier in this chapter, explains how to convert JavaScript objects to JSON and how to convert JSON to JavaScript objects.

Determining the object type and converting empty references to a default value


This recipe teaches you how to determine the types of different objects using the facilities of Ext JS, as well as a simple method that can be used to initialize empty references with a default value.

How to do it...

You can determine the types of different objects in the following way:

  1. 1. Create some dummy data structures:

    var colorsArray = new Array();
    colorsArray[0] = 'Blue';
    colorsArray[1] = 'Red';
    colorsArray[2] = 'White';
    var colorsObject = { color1: 'Blue', color2: 'Red', color3: 'White' };
    var aNumber = 1;
    var aString = '1';
    var sample;
    var empty;
    
  2. 2. Check the types of our variables:

    var colorsArrayType = Ext.type(colorsArray);
    // colorsArrayType's value is "array".
    var isArray = Ext.isArray(colorsArray);
    // isArray is true
    var colorsObjectType = Ext.type(colorsObject);
    // colorsObjectType's value is "object".
    var isArray = Ext.isArray(colorsObject);
    // isArray is false
    var number = Ext.num(aNumber, 0);
    // number is 1.
    number = Ext.num(aString, 0);
    // Since aString is not numeric, the supplied
    // default value (0) will be returned.
    var defined = Ext.util.Format.undef(sample);
    // defined is an empty string
    sample = "sample is now defined";
    defined = Ext.util.Format.undef(sample);
    // defined is now "sample is now defined".
    var notEmpty = Ext.value(empty, 'defaultValue', false);
    // notEmpty is 'defaultValue'
    

How it works...

The Ext.type(object) function is capable of detecting elements, objects, text nodes, whitespaces, functions, arrays, regular expressions, numbers, and node lists.

As its name indicates, Ext.isArray(object) simply checks whether the passed object is a JavaScript array. Ext.num(value, defaultValue), in turn, does a numeric type check on the passed value and returns the default value when the argument is not numeric.

Ext.util.Format.undef(value) is a very useful function when you need to test for undefined values. It returns either the supplied argument or an empty string if the argument is undefined.

Ext.value(value, defaultValue, allowBlank) also allows you to specify a default value when the value being tested is undefined.

Finding objects in an array and removing array items


The main task in this recipe is to find out whether an arbitrary object exists in an array. A way to remove objects from the array is also explored.

How to do it...

The following steps illustrate how you can perform object existence tests and object removal in an array:

  1. 1. Create a sample array as follows:

    var colorsArray = new Array();
    colorsArray[0] = 'Blue';
    colorsArray[1] = 'Red';
    colorsArray[2] = 'White';
    
  2. 2. Determine whether an object exists in an array by trying to find its position in the array:

    var position = colorsArray.indexOf('White');
    // postition is 2, the index of 'White' in the array.
    position = colorsArray.indexOf('Brown');
    // 'Brown' does not exist in the array,
    // position is -1.
    
  3. 3. Remove one of the objects from the array:

    colorsArray.remove('Blue');
    position = colorsArray.indexOf('Blue');
    // 'Blue' does not exist anymore,
    // position is -1.
    

How it works...

Ext JS augments the native Array class with Array.indexOf(object) and Array.remove(object). While indexOf(object) works by examining each array element until it finds one that matches the supplied argument, remove(object) uses the native Array.splice(index, howmany, element1,....., elementX) function to remove the supplied argument from the array.

Left arrow icon Right arrow icon

Key benefits

  • Master the Ext JS widgets and learn to create custom components to suit your needs
  • Build striking native and custom layouts, forms, grids, listviews, treeviews, charts, tab panels, menus, toolbars and much more for your real-world user interfaces
  • Packed with easy-to-follow examples to exercise all of the features of the Ext JS library
  • Part of Packt's Cookbook series: Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible

Description

Using Ext JS you can easily build desktop-style interfaces in your web applications. Over 400,000 developers are working smarter with Ext JS and yet most of them fail to exercise all of the features that this powerful JavaScript library has to offer. Get to grips with all of the features that you would expect with this quick and easy-to-follow Ext JS Cookbook. This book provides clear instructions for getting the most out of Ext JS with and offers many exercises to build impressive rich internet applications. This cookbook shows techniques and "patterns" for building particular interface styles and features in Ext JS. Pick what you want and move ahead. It teaches you how to use all of the Ext JS widgets and components smartly, through practical examples and exercises. Native and custom layouts, forms, grids, listviews, treeviews, charts, tab panels, menus, toolbars, and many more components are covered in a multitude of examples.The book also looks at best practices on data storage, application architecture, code organization, presenting recipes for improving themóour cookbook provides expert information for people working with Ext JS.

What you will learn

Work with different browsers, platforms, and the DOM, as well as determine and understand the different ExtJS data types Create your own custom Ext JS data types as you extend their functionality Build great-looking and friendly forms by using client and server-side field validation, form loading, submission, field customization, and layout techniques Explore the different layouts provided by the Ext JS library as well as create your own, and understand their common uses Display, edit, and group tabular data generated by the server using Grid Panels Explore the advantages and the efficiency tradeoffs of widgets such as Combo boxes Use the drag and drop features of the grid component, data editing with the new RowEditor Class, and the new lightweight ListView component Explore multiple ways of displaying master-details relationships Group components or information under the same container to build hierarchical views of information by using TabPanel components Use patterns to build a solid and flexible application architecture and implement additional design patterns such as auto-saving form elements, component state management, and code modules to build robust and flexible applications with Ext JS Build your own custom components on top of the Ext framework and enhance the custom components created by the Ext JS users community

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Oct 20, 2009
Length 376 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781847198709
Category :

Table of Contents

15 Chapters
Ext JS 3.0 Cookbook Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewer Chevron down icon Chevron up icon
1. Preface Chevron down icon Chevron up icon
1. DOM and Data Types, the Ext JS Way Chevron down icon Chevron up icon
2. Laying Out a Rich User Interface Chevron down icon Chevron up icon
3. Load, Validate, and Submit Forms Chevron down icon Chevron up icon
4. Fun with Combo Boxes and Date Fields Chevron down icon Chevron up icon
5. Using Grid Panels to Display and Edit Tabular Data Chevron down icon Chevron up icon
6. More Applications of Grid and List Views Chevron down icon Chevron up icon
7. Keeping Tabs on Your Trees Chevron down icon Chevron up icon
8. Making Progress with Menus and Toolbars Chevron down icon Chevron up icon
9. Well-charted Territory Chevron down icon Chevron up icon
10. Patterns in Ext JS Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.