Apr 24, 2008

PHP Tuturial In Action: Objects, Design, Agility


This book’s purpose involves a kind of bigamy. It introduces state-of-the art objectoriented design principles, patterns, and techniques. Then it weds these to two different partners. The first partner is PHP, the programming language. The second partner is the PHP programmer’s everyday work.

More specifically, this book is about handling and implementing these principles, patterns, and techniques in PHP with its specific syntax and characteristics. It is also about how to apply them to the specific and common challenges of web programming.

Who should read this book?
This book is for programmers who develop applications in PHP and want to learn modern object-oriented practices, principles, and techniques, and how to apply them to the everyday challenges of web programming.
It is not a beginner’s book in PHP; it presupposes a minimum of familiarity with PHP—or experience in other programming languages—and with the basic ideas and challenges of web programming.

How this book is organized
The book is divided into four parts. Parts 1 and 2 introduce the principles, patterns, and techniques mentioned initially and demonstrate how they can be implemented in PHP. Part 1 introduces and develops the subjects of object-oriented programming and design. Part 2 deals with unit testing and refactoring.

Parts 3 and 4 apply the material from the first two parts to the everyday challenges of web programming. Part 3 is about the web interface, while part 4 deals with databases and data storage.

Part 1: Basic tools and concepts
Part 1 moves gradually, chapter by chapter, from the nuts and bolts of object-oriented programming in PHP to the more conceptual subject of object-oriented application design.
Chapter 1 introduces and discusses the pros and cons of PHP and agile practices.
Chapter 2 and chapter 3 deal with the mechanics and syntax of object-oriented programming in PHP. Although objects and classes are ultimately inseparable subjects,
chapter 2 focuses mostly on object features and chapter 3 on class features.
Chapter 4 discusses why objects and classes are a good idea, how they relate to the real world, and how we can tell the difference between good and bad object-oriented designs.
Chapter 5 is about the basic class relationships—inheritance, association, and composition— and the role of interfaces in program design.
Chapter 6 is where we start to go into object-oriented design in earnest. It deals with object-oriented principles that serve as general guidelines for design.
Chapter 7 introduces the subject of design patterns—recurrent solutions to common design problems—and describes some of the most common ones.
Chapter 8 shows how design principles and patterns work in the context of an extended example: date and time handling.

Read more and Download

Writing Secure Code (Ms Press)


Organization of This Books (Writing Secure Code):

The book is divided into five parts. Chapter 1, The Need for Secure Systems and Chapter 2, Designing Secure Systems make up.

Part I, Contemporary Security, and outline the reasons why systems should be secured from attack and the guidelines and analysis techniques for designing such systems.

The meat of the book is in Parts II and III. Part II, Secure Coding Techniques, encompassing Chapters 3 through 8, outlines critical coding techniques that apply to almost any application.

Part III, Network-Based Application Considerations, includes four chapters (Chapters 9 through 12) that focus on networked applications, including Web-based applications.

Part IV, Special Topics, includes three chapters (Chapters 13 through 15) that cover less-often-discussed subjects, including security in .NET applications, testing, and secure software installation.
Chapter 16 includes general guidelines that dont fit in any single chapter.

Part V, Appendixes, includes four appendixes covering sundry other matters, including dangerous APIs and the lame excuses we ve heard for not considering security!
Michael wrote Chapters 1, 2, 4,8, and 12,14. David wrote Chapters 3, 9, 11, and 15. Both authors crafted Chapters 10 and 16.

As a final note, unlike the authors of a good many other security books, we wont just tell you how insecure applications are and moan about people not wanting to build secure systems. This book is utterly pragmatic and, again, relentlessly practical. It explains how systems can be attacked, mistakes that are often made, and, most important, how to build secure systems.

Download This Books

Apr 23, 2008

PHP in Action Tutorial Download

PHP in Action Objects, Design, Agility
PHP tutorial Ebooks-Content :
Part 1 Tools and concepts 1
1 PHP and modern software development 3
2 Objects in PHP 18
3 Using PHP classes effectively 40
4 Understanding objects and classes 65
5 Understanding class relationships 87
6 Object-oriented principles 102
7 Design patterns 123
8 Design how-to: date and time handling 152

Part 2 Testing and refactoring 187
9 Test-driven development 189
10 Advanced testing techniques 210
11 Refactoring web applications 232
12 Taking control with web tests 269

Part 3 Building the web interface 293
13 Using templates to manage web presentation 295
14 Constructing complex web pages 325
15 User interaction 338
16 Controllers 356
17 Input validation 377
18 Form handling 413
19 Database connection, abstraction, and configuration 432

Part 4 Databases and infrastructure 449
20 Objects and SQL 451
21 Data class design 470

Download this books

Apr 22, 2008

Java EE and .Net Interoperability: Integration Strategies, Patterns, and Best Practices


Structure of the Book:


This book covers two main constituents of any Java EE.NET integration. The first one pertains to the integration type such as synchronous or asynchronous, outlining how individual Java and .NET components can integrate using their diverse technology set. The second constituent relates to the quality of service requirements, such as security, reliability, and scalability, essential to meet a Service Level Agreement (SLA) across the heterogeneous enterprise environment. If you take a closer look at the book structure, you'll notice that the book represents a catalog of integration strategies that adheres to the following format:
  • Strategy Name The strategy has a unique name that reflects its objective.
  • Problem space Each strategy aims to address a specific Java EE.NET interoperability problem. Asynchronous reliable integration is an example of such a problem.
  • Solution This part of the strategy details a strategy design and outlines technology choices.
  • Benefits and Limitations Any interoperability strategy has its pros and cons that are highlighted here. For example, ease of maintenance or scalability are common benefits of some of the strategies.
  • Related Patterns Industry patterns such as Core J2EE Patterns are used throughout this book to bring those that are familiar to you into the scope of Java EE.NET integration. Are there similar resources in the .NET space?
  • Example Throughout the book, use cases from the WS-I Supply Chain Management Application (SCMA) are utilized to demonstrate how to implement a strategy. Most of the strategies have two sets of samples corresponding to the Java.NET and .NETJava communication.
The strategy catalog comprises the core of this book and can be used as a reference manual on Java EE.NET interoperability. Before delving into the strategy discussion, it is helpful to review the fundamentals of the Java EE and .NET platforms. The emphasis in reviewing these platforms will focus on their interoperability characteristics. Both platforms expose APIs to develop component-based, loosely coupled integration points. The platform overview is followed by Part II, "Synchronous Integration Solutions," which discusses common business scenarios and reasons for synchronous integration. The de facto technology to integrate disparate applications is based on Web services. Chapter 4, "Web Services for Synchronous Integration," demonstrates how a .NET application can discover and access a Web service implemented in Java and vice versa. The synchronous integration discussion continues with the .NET Remoting technology that remains an alternative to Web services and is adopted by open source and various commercial solutions. The .NET Remoting is shipped as part of the Microsoft Indigo Services. Chapter 6, "Resource Tier Synchronous Integration," details database and legacy integration. It demonstrates a simple strategy to build a Data Access Layer to connect to heterogeneous RDMSs, such as MySql and SQL Server. All in all, synchronous integration strategies are useful if you have two systems with tight coupling or strong dependencies. The industry, however, is heavily leaning toward asynchronous application integration.

Asynchronous integrations between Java EE and .NET systems are easier to maintain, less brittle, and tend to be more scalable. Therefore, the majority of the strategies in this book fall under Part III, "Asynchronous Integration Solutions." The first two strategies, Automatic Callback and Response Polling, are based on Web services technologies. They fundamentally differ from the approach taken in the previous section. The main goal of these strategies is to factor out remote calls from the rest of the request processing. The response can be sent via the callback or polling technique. Chapter 9, "Messaging," unveils five distinct strategies that help to automate and streamline the Java EE and .NET system integration around MOM, SMTP, and Enterprise Service Bus technologies. Reliable message delivery is the key differentiator of these strategies. Similar to the previous section, Chapter 10, "Resource Tier Asynchronous Integration," shows how to asynchronously communicate with back-end resources.

Part IV of the book addresses "Quality of Services" for interoperability. It incorporates several chapters that discuss how to implement a secure, reliable, interoperable Java EE.NET environment. This section encompasses distributed transactions and management of a heterogeneous environment, but most importantly it provides best practices on the enterprise architecture that mitigates security, manageability, availability, and reliability risks. The table here outlines strategies listed in this catalog.

Aside from the integration and systemic quality strategies, this book discusses how to deploy a .NET application under a Java EE application server and how to manually port a .NET application to Java. These strategies are included in Chapter 16, "Migrating .NET Applications to Java." Each chapter of this book intends to give the reader an overview of the technologies and concepts used by individual strategies. Messaging, resource pooling, threading, and asynchronous programming models differ under the Java EE and .NET platforms. Understanding these programming models under each platform enables the reader to effectively apply strategy within a specific domain.

Download This Books

THE Java™ EE 5 Tutorial


About This Tutorial:

THE Java™ EE 5 Tutorial is a guide to developing enterprise applications for the Java Platform, Enterprise Edition 5 (Java EE 5). Here we cover all the things you need to know to make the best use of this tutorial.

Who Should Use This Tutorial:

This tutorial is intended for programmers who are interested in developing and deploying Java EE 5 applications on the Sun Java System Application Server Platform Edition 9.

How to Read This Tutorial

The Java EE 5 platform is quite large, and this tutorial reflects this. However, you don’t have to digest everything in it at once. The tutorial has been divided into parts to help you navigate the content more easily.
This tutorial opens with an introductory chapter, which you should read before proceeding to any specific technology area. Chapter 1 covers the Java EE 5 platform architecture and APIs along with the Sun Java System Application Server Platform Edition 9.
When you have digested the basics, you can delve into one or more of the five main technology areas listed next. Because there are dependencies between some of the chapters, Figure 1 contains a roadmap for navigating through the tutorial.

The web-tier technology chapters cover the components used in developing the presentation layer of a Java EE 5 or stand-alone web application:
• Java Servlet • JavaServer Pages (JSP) • JavaServer Pages Standard Tag Library (JSTL) • JavaServer Faces • Web application internationalization and localization

The web services technology chapters cover the APIs used in developing

standard web services:
• The Java API for XML-based Web Services (JAX-WS) • The Java API for XML Binding (JAXB) • The Streaming API for XML (StAX) • The SOAP with Attachments API for Java (SAAJ) • The Java API for XML Registries (JAXR)

The Enterprise JavaBeans (EJB) technology chapters cover the components

used in developing the business logic of a Java EE 5 application:
• Session beans
• Message-driven beans

The Persistence technology chapters cover the Java Persistence API, which

is used for accessing databases from Java EE applications:
• Introduction to the Java Persistence API
• Persistence in the Web Tier
• Persistence in the EJB Tier
• The Java Persistence Query Language

The platform services chapters cover the system services used by all the

Java EE 5 component technologies:
• Transactions
• Resource connections
• Security
• Java Message Service
• The Connector architecture

After you have become familiar with some of the technology areas, you are
ready to tackle the case studies, which tie together several of the technologies discussed in the tutorial. The Coffee Break Application (Chapter 37) describes an application that uses the web application and web services APIs. The Duke’s Bank Application (Chapter 38) describes an application that employs web application technologies, enterprise beans, and the Java Persistence API.

Finally, the appendix contains auxiliary information helpful to the Java EE 5
application developer:
• Java encoding schemes (Appendix A)

Download The Java EE 5 Tutorial