" /> Linux Web Developer: August 2006 Archives

« July 2006 | Main | September 2006 »

August 21, 2006

Tenmiles Corporation Offers Helpdesk Pilot 1.5.0


Tenmiles Corporation Offers Helpdesk Pilot 1.5.0
CXOToday.com, India - Aug 11, 2006... The cross platform application, based on PHP & MySQL technologies can be deployed on any server running Windows, Linux, Macintosh, BSD and other OS. ...

Perl Best Practices

Perl Best Practices Many programmers code by instinct, relying on convenient habits or a "style" they picked up early on. They aren't conscious of all the choices they make, like how they format their source, the names they use for variables, or the kinds of loops they use. They're focused entirely on problems they're solving, solutions they're creating, and algorithms they're implementing. So they write code in the way that seems natural, that happens intuitively, and that feels good.

But if you're serious about your profession, intuition isn't enough. Perl Best Practices author Damian Conway explains that rules, conventions, standards, and practices not only help programmers communicate and coordinate with one another, they also provide a reliable framework for thinking about problems, and a common language for expressing solutions. This is especially critical in Perl, because the language is designed to offer many ways to accomplish the same task, and consequently it supports many incompatible dialects.

With a good dose of Aussie humor, Dr. Conway (familiar to many in the Perl community) offers 256 guidelines on the art of coding to help you write better Perl code--in fact, the best Perl code you possibly can. The guidelines cover code layout, naming conventions, choice of data and control structures, program decomposition, interface design and implementation, modularity, object orientation, error handling, testing, and debugging.

They're designed to work together to produce code that is clear, robust, efficient, maintainable, and concise, but Dr. Conway doesn't pretend that this is the one true universal and unequivocal set of best practices. Instead, Perl Best Practices offers coherent and widely applicable suggestions based on real-world experience of how code is actually written, rather than on someone's ivory-tower theories on how software ought to be created.

Most of all, Perl Best Practices offers guidelines that actually work, and that many developers around the world are already using. Much like Perl itself, these guidelines are about helping you to get your job done, without getting in the way.

Praise for Perl Best Practices from Perl community members:

"As a manager of a large Perl project, I'd ensure that every member of my team has a copy of Perl Best Practices on their desk, and use it as the basis for an in-house style guide." -- Randal Schwartz

"There are no more excuses for writing bad Perl programs. All levels of Perl programmer will be more productive after reading this book." -- Peter Scott

"Perl Best Practices will be the next big important book in the evolution of Perl. The ideas and practices Damian lays down will help bring Perl out from under the embarrassing heading of "scripting languages". Many of us have known Perl is a real programming language, worthy of all the tasks normally delegated to Java and C++. With Perl Best Practices, Damian shows specifically how and why, so everyone else can see, too." -- Andy Lester

"Damian's done what many thought impossible: show how to build large, maintainable Perl applications, while still letting Perl be the powerful, expressive language that programmers have loved for years." -- Bill Odom

"Finally, a means to bring lasting order to the process and product of real Perl development teams." -- Andrew Sundstrom

"Perl Best Practices provides a valuable education in how to write robust, maintainable Perl, and is a definitive citation source when coaching other programmers." -- Bennett Todd "I've been teaching Perl for years, and find the same question keeps being asked: Where can I find a reference for writing reusable, maintainable Perl code? Finally I have a decent answer." -- Paul Fenwick "At last a well researched, well thought-out, comprehensive guide to Perl style. Instead of each of us developing our own, we can learn good practices from one of Perl's most prolific and experienced authors. I recommend this book to anyone who prefers getting on with the job rather than going back and fixing errors caused by syntax and poor style issues." -- Jacinta Richardson "If you care about programming in any language read this book. Even if you don't intend to follow all of the practices, thinking through your style will improve it." -- Steven Lembark "The Perl community's best author is back with another outstanding book. There has never been a comprehensive reference on high quality Perl coding and style until Perl Best Practices. This book fills a large gap in every Perl bookshelf." -- Uri Guttman
Customer Review: Good Coding Methods to Improve Your Perl
I have to admit that I can bristle at books that try to preach, so Perl Best Practices was on a hiding to nothing when I came to review it. I also have to admit to being torn about the author -- after all, he is one of those poor fools who insist on living in cold, unenlightened Melbourne, while I live in vastly superior Sydney. On the other hand, how can I dislike a man who manages to place a quote that involves my favourite character, Lady Bracknell. from my favourite comic play, 'The Importance of Being Earnest,' in the first few pages of his book?

Many years ago I read a marvelous article that explained why so may early editors and word processors supported the keyboard commands of WordStar. When it's first born, a baby duck can be easily convinced that almost anything is its mother. The small bird imprints, and it takes a lot to shift its focus. "Baby Duck Syndrome" affects programmers in a number of ways, not just their choice of editor, and Conway is walking right into the middle and arguing with your imprinting on almost every page. A brave man; fortunately he has the street cred to make you at least listen.

So I carefully placed my bias and bigotry in the bottom drawer and prepared myself. I discovered a well-written, informed and engaging book that covers a number of methods (hey, 256 rules, come on Derrick, 2 ^ 8 rules can't be a coincidence!) for improving your Perl software when working in a team. That means all of us when you remember an adage a guru once told me: "Every piece of computer software, no matter how small, involves at least a team of two -- me, and me six months from now when I have to fix it." Conway puts it differently "Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."

The first chapter outlines the why and where of the book. The why is to improve your code with three goals; robustness, efficiency and maintainability. The chapter finishes with a short exhortation to us to "rehabit." Don't like the word much but I applaud the aim.

Conway is far from timid. He jumps right in to the deep end of the wars, with formatting the appearance of your code. I thought the chapter was brilliantly written until he told me I shouldn't "cuddle else statements," at which point I realized what an ill-informed idiot he was. Oh, hang on. Hey, that almost makes sense. OK, that's a cogent argument for your point of view, Conway. I also have to admit that earlier you did say that your rules for this bit weren't gospel, that if you wanted a variation that was OK, just have a standard and make sure you can support it with a code prettier. Perhaps not a total idiot after all.

After successfully negotiating those shark infested waters, Conway -- obviously a man who knows no fear -- wades into naming conventions. Once again he gives coherent arguments, pointed examples and counterexamples. It all makes sense.

The book's page at O'Reilly has an example chapter and a good description, but no table of contents so here's a quick list of the headings:

1. Best Practices
2. Code Layout
3. Naming Conventions
4. Values and Expressions
5. Variables
6. Control Structures
7. Documentation
8. Built-in Functions
9. Subroutines
10. I/O
11. References
12. Regular Expressions
13. Error Handling
14. Command-Line Processing
15. Objects
16. Class Hierarchies
17. Modules
18. Testing and Debugging
19. Miscellanea

Suffice to say that Conway leaves no corner of Perl uncovered, offering well-reasoned and well-explained advice on improving your Perl code.

The book is also well-written and well-edited. The order of topics covered is a sensible one, and the book is appropriately structured. It reads and feels as if you are being given the wisdom from many a hard-won battle coding and maintaining Perl code.

My one complaint is that I found it dry: you are reading through pages of argument and examples without much relief. Perhaps this book might be best digested in a number of chunks, making the effort to use the ideas from each chunk for a while before moving on to the next.

Every so often I read a book from O'Reilly that makes me fear that they are slipping, then along comes a book like Perl Best Practices, and I'm reminded that when it comes to Perl, O'Reilly authors wrote the book. Once you've rushed through Larry's book and learnt the finer points with Schwartz and Phoenix's 'Learning' titles, you may well find that this is the perfect volume to complete your Perl education. If you believe your Perl education is complete, then buy this volume and I'm sure you'll find a lesson or two for yourself.

This book is not really aimed at the occasional Perl programmer (though many of us would probably benefit from its wisdom), but at the person who is professionally programming in Perl and wants to produce better quality, more easily maintained code. For this person Perl Best Practices is a 5. For the rest of us, the 'rehabiting' process might be a little too arduous; personally, I'm going to pick a few of the chapters and work on those for a while, maybe naming conventions and variables. For me I'll give it 4 stars.


Technorati Tags:

Discover Python, Part 8: Reading and writing data using Python's input and output functionality


Discover Python, Part 8: Reading and writing data using Python's input and output functionality
In this article, you learn how to work with files. First, we review a simple way to output data in Python, using the print statement, then learn about the file object, which is used by Python programs to read and write data to a file. The different modes with which a file can be opened are demonstrated, and the article concludes by showing how to read and write a binary file.

Check your PHP code at every level with unit tests


Check your PHP code at every level with unit tests
Test-driven development and unit tests are the latest way to make sure your code is behaving as you expect through changes and refactoring. Find out how to unit test your PHP code at the module, database, and user interface (UI) level.

XML Matters: Lighter than microformats: Picoformats


XML Matters: Lighter than microformats: Picoformats
In a past installment of XML Matters, David Mertz explored reStructured Text, a lightweight markup language for formatting mostly text documents, and prior to that he looked at YAML, a lightweight markup language for mostly data documents. With the rise of AJAX and microformats, are these still useful, or are microformats "light" enough? See how to leverage JSON (lighter than YAML) using MochiKit for AJAX without the X, and apply reStructured Text to the task of generating microformats.

Leveraging MySQL skills to learn DB2 Express: DB2 versus MySQL administration and basic tasks


Leveraging MySQL skills to learn DB2 Express: DB2 versus MySQL administration and basic tasks
Does your database environment require you to have cross-database skills? If you already know MySQL, you can use many of the skills you already have to learn DB2 Express. This article, the first in a series on leveraging your MySQL skills to learn DB2, starts you out with a comparison of administrative tasks, data types, SQL, locking, and more.

Learning Perl, Fourth Edition

Learning Perl, Fourth Edition Learning Perl, better known as "the Llama book", starts the programmer on the way to mastery. Written by three prominent members of the Perl community who each have several years of experience teaching Perl around the world, this edition has been updated to account for all the recent changes to the language up to Perl 5.8. Perl is the language for people who want to get work done. It started as a tool for Unix system administrators who needed something powerful for small tasks. Since then, Perl has blossomed into a full-featured programming language used for web programming, database manipulation, XML processing, and system administration--on practically all platforms--while remaining the favorite tool for the small daily tasks it was designed for. You might start using Perl because you need it, but you'll continue to use it because you love it. Informed by their years of success at teaching Perl as consultants, the authors have re-engineered the Llama to better match the pace and scope appropriate for readers getting started with Perl, while retaining the detailed discussion, thorough examples, and eclectic wit for which the Llama is famous. The book includes new exercises and solutions so you can practice what you've learned while it's still fresh in your mind. Here are just some of the topics covered:

  • Perl variable types
  • subroutines
  • file operations
  • regular expressions
  • text processing
  • strings and sorting
  • process management
  • using third party modules
If you ask Perl programmers today what book they relied on most when they were learning Perl, you'll find that an overwhelming majority will point to the Llama. With good reason. Other books may teach you to program in Perl, but this book will turn you into a Perl programmer.
Customer Review: craptacular
Most of the answers to the exercises in Appendix A don't even compile, much less work. I admit I'm not a great code writer, but at some point you need the answer, otherwise you can sit in front of your screen all day writing code that doesn't work or compile. I can do that without the help of this book.


Technorati Tags:

Discover Python, Part 8: Reading and writing data using Python's input and output functionality


Discover Python, Part 8: Reading and writing data using Python's input and output functionality
In this article, you learn how to work with files. First, we review a simple way to output data in Python, using the print statement, then learn about the file object, which is used by Python programs to read and write data to a file. The different modes with which a file can be opened are demonstrated, and the article concludes by showing how to read and write a binary file.

Five common PHP database problems


Five common PHP database problems
Discover five common database problems that occur in PHP applications -- including database schema design, database access, and the business logic code that uses the database -- as well as their solutions.

Understanding the Zend Framework, Part 6: Sending e-mail


Understanding the Zend Framework, Part 6: Sending e-mail
Earlier installments in this "Understanding the Zend Framework" series use the PHP Zend Framework to create the basic Chomp online feed reader. Now it's time to add e-mail to the mix. This article explains how to use the Zend_Mail component to send text and HTML e-mail alerts to users when new content has been added to subscribed feeds.

Technorati Tags

All Hail Shale: Anatomy of a Shale application


All Hail Shale: Anatomy of a Shale application
Brett McLaughlin continues his introduction to Shale with an in-depth look at the framework's application directory structure. Using the Shale starter application introduced in the first article in this series, Brett walks you through the core directories, from src/ to dist/. He shows you how Shale stores its libraries, where custom files go, and where you can insert specialized behaviors into your Shale applications. Along the way, he gives you some important tips about managing the Shale directories and gets you started with an example application (based on the Shale starter application) that serves as the basis of his discussion for the remainder of the series.

Tutorial: Creating a JSR 168 portlet for use by diverse portals


Tutorial: Creating a JSR 168 portlet for use by diverse portals
This two-part tutorial shows you how to create a JSR 168 portlet which can be consumed by multiple portals using Web Services for Remote Portlets. You can either use the Rational IDE or you can hand-code in your favorite editor. Next, you enable the portlet to access a database from the portlet using SQL. Then, you see how to access the portlet from a portal running under WebSphere Portal V5.1.

IBM Tivoli monitoring for Q Replication


IBM Tivoli monitoring for Q Replication
Learn how to access Q Replication monitoring information, how to bring this data into the Tivoli platform, and how to use Tivoli alerts and situations so that Q Replication receives notifications when critical events occur. IBM Tivoli Monitoring is a family of products designed to monitor the health and performance of your enterprise applications.

Technorati Tags:

Linux project publications: Security


Linux project publications: Security
The publications on this page represent contributions by members of the IBM Linux Technology Center to the development community on the topic of Linux security.

DB2 9 Fundamentals exam 730 prep, Part 2: Security


DB2 9 Fundamentals exam 730 prep, Part 2: Security
This tutorial introduces the concepts of authentication, authorization and privileges as they relate to DB2 9. You should have basic knowledge of database concepts and operating system security. This is the second in a series of seven tutorials to help you prepare for the DB2 9 for Linux, UNIX, and Windows Fundamentals exam 730.

Technorati Tags:

The Java XPath API


The Java XPath API
Elliotte Rusty Harold demonstrates Java 5's new XPath API.

Automation for the people: Continuous Inspection


Automation for the people: Continuous Inspection
Enhance your software development process by employing source code analysis tools to automatically obtain the latest information on code complexity, duplication, and coding standards adherence.

The DB2 for Linux, UNIX, and Windows DBA Checklist


The DB2 for Linux, UNIX, and Windows DBA Checklist
Just like a high performance sports car, a database requires some checks to keep it running optimally. This article is broken down into tasks or checks that can be run at different intervals on your DB2 for Linux, UNIX, and Windows database, to do just that. Updated for DB2 9.

Technorati Tags:

SW750: Functional Overview of IBM WebSphere Host Access Transformation Services


SW750: Functional Overview of IBM WebSphere Host Access Transformation Services
This Web-based training course is based on IBM WebSphere Host Access Transformation Services Version 5. The course is self-directed and self-paced, and divided into modules that can be selected to customize the course to your educational requirements.

IBM WebSphere Developer Technical Journal : A guided tour of WebSphere Integration Developer -- Part 5


IBM WebSphere Developer Technical Journal : A guided tour of WebSphere Integration Developer -- Part 5
This series explores a service-oriented approach to application integration using IBM WebSphere Integration Developer. This article dives into how to build a business process, including when to use a business process versus a state machine.

Technorati Tags:

DB2 Label-Based Access Control, a practical guide, Part 1: Understand the basics of LBAC in DB2


DB2 Label-Based Access Control, a practical guide, Part 1: Understand the basics of LBAC in DB2
LBAC is a security feature introduced in the DB2 Viper release. With LBAC, administrators can control read and write access of user to a table column and row level. This tutorial includes use case scenarios that demostrate how users can apply LBAC to protect their data from illegal access, and yet has the flexibility of allowing the user to access data restrictively. The tutorial provides a step-by-step guide to create LBAC solutions based on use-case scenarios.

Technorati Tags:

August 09, 2006

Leveraging MySQL skills to learn DB2 Express: DB2 versus MySQL administration and basic tasks


Leveraging MySQL skills to learn DB2 Express: DB2 versus MySQL administration and basic tasks
Does your database environment require you to have cross-database skills? If you already know MySQL, you can use many of the skills you already have to learn DB2 Express. This article, the first in a series on leveraging your MySQL skills to learn DB2, starts you out with a comparison of administrative tasks, data types, SQL, locking, and more.

Perl Cookbook, Second Edition

Perl Cookbook, Second Edition Find a Perl programmer, and you'll find a copy of Perl Cookbook nearby. Perl Cookbook is a comprehensive collection of problems, solutions, and practical examples for anyone programming in Perl. The book contains hundreds of rigorously reviewed Perl "recipes" and thousands of examples ranging from brief one-liners to complete applications. The second edition of Perl Cookbook has been fully updated for Perl 5.8, with extensive changes for Unicode support, I/O layers, mod_perl, and new technologies that have emerged since the previous edition of the book. Recipes have been updated to include the latest modules. New recipes have been added to every chapter of the book, and some chapters have almost doubled in size. Covered topic areas include:

  • Manipulating strings, numbers, dates, arrays, and hashes
  • Pattern matching and text substitutions
  • References, data structures, objects, and classes
  • Signals and exceptions
  • Screen addressing, menus, and graphical applications
  • Managing other processes
  • Writing secure scripts
  • Client-server programming
  • Internet applications programming with mail, news, ftp, and telnet
  • CGI and mod_perl programming
  • Web programming
Since its first release in 1998, Perl Cookbook has earned its place in the libraries of serious Perl users of all levels of expertise by providing practical answers, code examples, and mini-tutorials addressing the challenges that programmers face. Now the second edition of this bestselling book is ready to earn its place among the ranks of favorite Perl books as well. Whether you're a novice or veteran Perl programmer, you'll find Perl Cookbook, 2nd Edition to be one of the most useful books on Perl available. Its comfortable discussion style and accurate attention to detail cover just about any topic you'd want to know about. You can get by without having this book in your library, but once you've tried a few of the recipes, you won't want to.
Customer Review: Mine is the strength of 10 ...
Mine is the strength of 10 - for I know perl.

This book is enjoyable to read - warm and chatty. This book has recipes you can clip and modify. This book is my favorite perl book.

Hey, y'all - I am usually agnostic when it comes to languages and platforms and such - after all, what good does it do to denigrate somebody's favorite programming language?

But I am a lover of perl and turn to it first, if possible.

A reasonable mastery of perl will increase your sysadm, programming, and scripting powers manyfold. Launch a process and monitor it! Grind thru humugously huge log files! In the words of the immortal Steve Wittie "I'll never write shell script again!"

Larry Wall - the great Larry Wall, Tom Christianson and the rest have the grace and good humor of Donald Knuth and Dennis Ritchie in the days of old.

And perl is so 'cool' so flexible, so fun.




Technorati Tags:

Python Web frameworks, Part 2: Web development with TurboGears and Python


Python Web frameworks, Part 2: Web development with TurboGears and Python
In this second article of a two-part series, we demonstrate TurboGears, another open source MVC-style Web application framework based on Python. Where the first article was an introduction to the Django framework, this one shows how to use TurboGears to create a Web-based shopping application and concludes with a comparison between Turbogears and Django.

Introducing DB2 9: Application development enhancements


Introducing DB2 9: Application development enhancements
Take a look at enhancements for developers in DB2 9. These enhancements include a new Developer Workbench, deeper integration with .NET environments, rich support for XML and SOA environments, new drivers and adapters for PHP and Ruby on Rails, and new application samples.

Have your application call my application, Part 1: Apache Geronimo communication basics -- developing, deploying, and testing


Have your application call my application, Part 1: Apache Geronimo communication basics -- developing, deploying, and testing
Apache Geronimo includes a top-notch messaging implementation alongside a world-class Enterprise JavaBeans (EJB) implementation, making message-driven beans (MDBs) available for your application. That means other components can interact with your application using messaging as long as the proper resource adapter is in place. This tutorial series chronicles the creation of a Java Platform, Enterprise Edition (Java EE) application in which users, administrators, and even other applications can interact using MDBs by sending an e-mail to the Java Apache Mail Enterprise Server (also known as Apache James), which then communicates back to Geronimo using a J2EE Connector Architecture (JCA) resource adapter.

Technorati Tags

DWR makes interportlet messaging with Ajax easy


DWR makes interportlet messaging with Ajax easy
Many developers are looking to use Ajax technologies to improve the user experience of Web-based applications, but Ajax programming can be a tricky task. The open source Direct Web Remoting (DWR) library can make Ajax development easier for Java developers by automatically transforming Java classes into JavaScript classes. In this article, you'll learn how how to use DWR and JSR-168-compliant portlets to build an Ajax application quickly and easily.

Deploy SOA applications in Apache Geronimo using XMLBeans


Deploy SOA applications in Apache Geronimo using XMLBeans
Curious about XMLBeans? This advanced, easy-to-use XML-Java binding technology lets you access an XML file just like you would any Java object or JavaBean. Find out more about XMLBeans technology, including how to use it with Apache Geronimo and how it simplifies and streamlines service-oriented architecture (SOA) development.

LPI exam 202 prep, Topic 208: Web services


LPI exam 202 prep, Topic 208: Web services
In this tutorial, the fourth in a series of seven tutorials covering intermediate network administration on Linux, David Mertz continues preparing you to take the Linux Professional Institute Intermediate Level Administration (LPIC-2) Exam 208. Here, David Mertz discusses how to configure and run the Apache HTTP server and the Squid proxy server.

The Java XPath API


The Java XPath API
Elliotte Rusty Harold demonstrates Java 5's new XPath API.

DWR makes interportlet messaging with Ajax easy


DWR makes interportlet messaging with Ajax easy
Many developers are looking to use Ajax technologies to improve the user experience of Web-based applications, but Ajax programming can be a tricky task. The open source Direct Web Remoting (DWR) library can make Ajax development easier for Java developers by automatically transforming Java classes into JavaScript classes. In this article, you'll learn how how to use DWR and JSR-168-compliant portlets to build an Ajax application quickly and easily.

Render PDF applications using DB2 SQL/XML functions


Render PDF applications using DB2 SQL/XML functions
This tutorial shows developers how to render PDF applications using DB2 SQL/XML functions, WebSphere Studio Application Developer (Application Developer), and the Apache Formatting Objects Processor (FOP) project.

Exploiting the WebSphere Portal V5.1.0.1 programming model: Part 3: Integrating WebSphere Portal into your security environment and user management system


Exploiting the WebSphere Portal V5.1.0.1 programming model: Part 3: Integrating WebSphere Portal into your security environment and user management system
Use the portal programming interfaces to implement single sign-on (SSO), customize portal login behavior, and work with the user profiles. See the interfaces applied to the calendar and todo example from Part 1.

Technorati Tags:

IBM DB2 Data Access Application Blocks for .NET


IBM DB2 Data Access Application Blocks for .NET
Learn how to use an optimized data access component to call stored procedures and execute SQL text commands against a DB2 Server, as well as obtain DB2DataReader, DataSet, and XmlReader objects. Download the source code for this component and learn how to use it to reduce the amount of custom code you need to write, test, and maintain.

Technorati Tags:

Comparing IBM DB2 Content Manager family products, Part 3: Document Management Services for IBM DB2 Content Manager


Comparing IBM DB2 Content Manager family products, Part 3: Document Management Services for IBM DB2 Content Manager
IBM offers many information management products, solutions, and services. This series of articles introduces the IBM Content Management family products to help you understand where each product fits within the family. This third article in the series discusses IBM DB2 Document Manager.

Technorati Tags: