Preface

Tcl or Tool Command Language is a very powerful, but easy-to-learn dynamic programming language, suitable for a very wide range of uses. Tcl is a mature yet evolving language used by developers, from one man shops to large corporations. .

It is commonly used for rapid prototyping, scripted applications, GUIs, and testing. Tcl is used on embedded-system platforms, both in its full form and in several other small-footprinted versions. Tcl is also used for CGI scripting and as the scripting language for the Eggdrop bot.

Tcl is popularly used today in many automated test harnesses, both for software and hardware, and has a loyal following in the Network Testing and SQA communities. According to the Tcl website, many have called it the "best-kept secret in the software industry". It is used for rapid development, truly cross-platform GUIs, flexible integration, elegant networking model, great I18N and thread support—all that and it's easy to learn and easy to deploy!

This book will delve into the network programming capabilities of Tcl: one of the best-kept secrets of the software industry.

What this book covers

Chapter 1, Introducing Tcl serves as a quick introduction to the Tcl world. It explains what the Tcl is, how to install it and start using it. It presents some tools for making development easy, such as Eclipse and Komodo. It describes Tcl language basics, such as language syntax, data types, and the important commands. This and the following chapters build a solid base for Tcl programming.

Chapter 2, Advanced Tcl Features focuses on advanced topics. More common commands are introduced. The reader learns how to handle time, namespaces, and use Tcl as an object-oriented programming language. A large part of the chapter is dedicated to file I/O operations. The reader also learns how to create Tcl packages or modules. Event loop and various types of events are also discussed. Threads are introduced in the end.

Chapter 3, Tcl Standalone Binaries teaches you how to break free from the constraint of having the Tcl interpreter installed, and how to build portable, standalone executable applications written in Tcl. You will also learn about the Metakit database concepts and its usage.

Chapter 4, Troubleshooting Tcl Applications focuses on topics related to "fixing" the applications. First, the reader learns how to introduce, configure, and apply logging information to the code. Later, the available tools and ways of debugging both local and remote applications are presented.

Chapter 5, Data Storage discusses topics such as text data storage and processing. Some of these include working with SQL databases (both remote systems such as MySQL and Postgresql, and local ones like SQLite), processing XML data (parsing and generation), handling plaintext data while focusing on common encoding issues.

Chapter 6, Networking in Tcl presents basic information about the TCP/UDP networking abilities of Tcl, from both the client and server sides. Core concepts and commands are discussed extensively along with examples.

Chapter 7, Using Common Internet Services teaches you how to send e-mails from Tcl, build e-mails containing HTML and various kinds of messages. It discusses how to retrieve, parse, and process e-mail messages, and also covers how to get data over HTTP, read RSS feeds, and upload and download files over FTP.

Chapter 8, Using Additional Internet Services introduces the reader to additional Internet protocols: querying information using DNS and querying the current date and time over an NTP service. It also discusses LDAP and how to use it to query information about user registries and how to authorize users. It describes the comm protocol, which can be used to communicate between local and remote Tcl applications. It presents how the protocol can be used and how the comm commands can be made secure.

Chapter 9, Learning SNMP describes SNMP (Simple Network Management Protocol) and its use for management of multiple types of devices such as routers, switches, modems, and servers. It introduces the reader to how data is structured in SNMP by describing MIB (Management Information Base). It describes Scotty package, which provides SNMP functionality to Tcl. Step-by-step instructions are given for retrieving information and retrieving notifications from devices. It also describes how Tcl can be used to create custom SNMP agents using the Scotty package. This chapter also describes ICMP-related features; performing ping and trace routes.

Chapter 10, Web Programming in Tcl introduces Tclhttpd: a Tcl-based web server that can be used standalone and embedded in other applications. Using it for providing static files and web applications is described in detail. Built-in templating system is shown as well. This chapter also gives information on other subjects, using CGI scripts, handling specific types of files from Tcl, authorizing requests, and creating custom template systems.

Chapter 11, TclHttpd in Client-Server Applications provides details on creating HTTP-based client-server applications. It gives the reader a good understanding of how such applications are created, by providing a step-by-step example of building such an application. It also discusses building the client and the server as standalone binaries and providing automatic updates of the client. This example is then extended to show how modules can be added to allow additional code to be deployed to clients on demand.

Chapter 12, SOAP and XML-RPC covers creating and using web services from Tcl. It describes how to invoke methods over XML-RPC, along with an example of how this can be done to automatically add blog posts. SOAP is also described. This chapter shows how to create an SOAP-based web service and how such services can be used from within Tcl.

Chapter 13, SSL and Security focuses on the security aspects of network programming. It shows the reader how to secure communications and ensure that applications or users can authenticate remote systems. Step-by-step instructions are given on how to create a public key infrastructure and securely transfer keys to systems in the network. The chapter also introduces the reader to Tcl's safe interpreter feature and how it can be used to create a role-based security model for running unsecure Tcl code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.235.8