This book will show how to use Ext.NET 2 to create sophisticated and highly interactive web applications whether you use ASP.NET Web Forms or ASP.NET MVC. The chapters will go through setting up and exploring various controls that Ext.NET provides. It will look at the sophisticated AJAX and data-handling options available while also providing tips and guidance for creating reusable and maintainable components.
The list of components that Ext.NET covers and the variety of ways in which you can use them are immense. It would be beyond the scope of this book to detail all of them, so this book will cover the most common and/or interesting ones, but importantly it will also empower you with the ability to learn and explore the rest in your own time.
Chapter 1, Getting Started with Ext.NET, provides an overview of what Ext.NET is and how it is related to Ext JS and ASP.NET. In addition, this chapter covers how you can obtain and set up your development environment ready for Ext.NET development.
Chapter 2, Ext.NET Controls Overview, introduces various types of controls available in Ext.NET. Using the Button control, we introduce many concepts common throughout the Ext.NET control suite. We also look at how client-side and server-side events can be set up. This chapter also introduces other more common components including Panels, Toolbars, Menus, Windows, and Tooltips. We also get a glimpse of some of the complex UIs that are possible by reusing these components.
Chapter 3, Layout with Ext.NET, covers the numerous layout options available in Ext.NET to help you organize your web applications. Topics covered include the Viewport, and specific layouts such as Border, Accordion, Fit, HBox, VBox, and more.
Chapter 4, AJAX with Ext.NET, looks at the powerful AJAX options Ext.NET supports. We cover the powerful DirectEvents and DirectMethods features, as well as AJAX options specific to certain controls. This is a powerful chapter that lays the foundation for slick and usable applications that are responsive to user interactions.
Chapter 5, Working with Data, looks at the powerful data handling techniques available in Ext.NET. We cover XTemplates, which allows you to define HTML templates to bind data to, and we explain the Stores, Models, and Proxies architecture that allows for powerful data-binding reuse across many Ext.NET components. The ComboBox and DataView are introduced as examples of controls that reuse this architecture.
Chapter 6, Introducing GridPanels, covers the popular and highly sophisticated GridPanel control. It is another control that reuses the Stores, Models, and Proxies architecture, but is given its own chapter. We look at various features of the GridPanel such as paging, filtering, sorting, grouping, column summaries, row expanding, and selection models. We also look at how grid editing can be enabled, including in-line grid editing at the row or cell level. As large as this chapter is, there are many other GridPanel capabilities that we have not been able to fit into this book, so many links to further examples and resources are also provided.
Chapter 7, Forms and Validation, looks at the numerous form controls available in Ext.NET, how to lay them out, and how to enable client and remote validation. We also look at how custom validators can be created. Lastly, we also see how Ext.NET's data-binding capabilities can also be reused with forms.
Chapter 8, Trees and Tabs with Ext.NET, introduces the popular TreePanel and TabPanel controls. Due to limited space in the book, we cannot cover all the sophisticated possibilities that these controls offer, but we do provide an overview of how tree nodes can be loaded asynchronously and how to reuse the Store, Models, and Proxies architecture to bind data to trees. We also look at various ways TabPanels can be configured, including how to load content on-demand using various AJAX techniques supported by Ext.NET.
Chapter 9, Extending Ext.NET Controls – Custom Controls and Plugins, is perhaps the most powerful chapter in this book. It shows you how to extend Ext.NET controls in a variety of ways to support both ASP.NET Web Forms and ASP.NET MVC Razor templates, enabling you to create highly reusable components. Most of the chapter looks at how controls can be extended, but we also look at how you can use the available plugin mechanisms to reuse functionality across different types of components.
Chapter 10, Troubleshooting and Debugging, looks at how to debug your Ext.NET applications. In particular, we look at how to enable debug versions of Ext.NET and Ext JS JavaScript and what tools to use for cross-browser troubleshooting. This chapter also provides important tips on how to request help in the Ext.NET forums in a way that will increase your chances of receiving a quick response.
Chapter 1, Getting Started with Ext.NET will explain prerequisites further. But as a summary, you will need Visual Studio 2008 or later (the book uses Visual Studio 2010). In addition to Internet Explorer, it is recommended to also use Chrome and Firefox (with the Firebug plugin installed) to test the examples.
This book is for anyone who wants to use ASP.NET to create sophisticated applications, whether you have used Ext JS directly with ASP.NET before or not.
As a .NET based component framework, Ext.NET code can be written in any supported .NET language, but this book will use C#. As such, familiarity with C# and ASP.NET is assumed. It is also assumed that the reader will have some basic knowledge of HTML, CSS, and JavaScript.
Although it is not essential to know Ext JS upfront, it would be highly beneficial. That being said, some Ext JS code will naturally be used in various examples, where necessary. Such code will be explained appropriately and references for further Ext JS related information will also be provided, where needed.
In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: "When normally developing ASP.NET applications, you add controls to the container's Controls
collection."
A block of code is set as follows:
<pages> <controls> <add tagPrefix="ext" namespace="Ext.Net" assembly="Ext.Net"/> </controls> </pages>
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
<ext:Viewport runat="server" Layout="Border">
<Items>
<ext:UserControlLoader Path="WestPanel.ascx" />
<ext:Panel Region="Center" />
</Items>
</ext:Viewport>
Any command-line input or output is written as follows:
Install-Package Ext.NET.MVC
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Right-click on the file and select View in Browser and you will see a page similar to the following".
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
We also provide you a PDF file that has color images of the screenshots used in this book. You can download this file from http://www.packtpub.com/sites/default/files/downloads/3240OT_Images.pdf.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.