Programming References and tutorials for Developers.

Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition (Windows.Net)

By The Saint on Monday, April 06, 2009

comments (3)

Filed Under:

Pro C# 2008 and the .NET 3.5 Platform, Fourth Edition (Windows.Net)
By Andrew Troelsen

The first edition of this book was released at the 2001 Tech Ed conference in Atlanta, Georgia. Since that time, this text has been revised, tweaked, and enhanced to account for the changes found within each release of the .NET platform (1.1, 2.0, 3.0 and now 3.5).

The last version, .NET 3.0, was more of an augmentative release, essentially providing three new APIs: Windows Presentation Foundation (WPF), Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF). As you would expect, coverage of the "W's" has been expanded a great deal in this version of the book from the previous Special Edition text.

Unlike .NET 3.0, .NET 3.5 provides dozens of new C# language features and .NET APIs. This edition of the book will walk you through all of this new material using the same readable approach as was found in previous editions. Rest assured, you'll find detailed coverage of Language Integrated Query (LINQ), the C# 2008 language changes (automatic properties, extension methods, anonymous types, etc.) and the numerous bells and whistles of Visual Studio 2008. What you will learn

* Everything you need to know - get up to speed with C# 2008 quickly and efficiently.
* Discover all the new .NET 3.5 features -- Language Integrated Query, anonymous types, extension methods, automatic properties, and more.
* Get a professional foothold -- targeted to appeal to experienced software professionals, this book gives you the facts you need the way you need to see them.
* A rock-solid foundation - focuses on everything you need to be a successful .NET 3.5 programmer, not just the new features. Get comfortable with all the core aspects of the platform -- including assemblies, remoting, Windows Forms, Web Forms, ADO.NET, XML web services, and much more.

Who is this book for?

If you're checking out this book for the first time, understand that it targets experienced software professionals and/or students of computer science (so please don't expect three chapters devoted to "for" loops). The mission of this text is to provide you with a rock-solid foundation to the C# 2008 programming language and the core aspects of the .NET platform (OOP, assemblies, file IO, Windows Forms/WPF, ASP.NET, ADO.NET, WCF,WF, etc.). Once you digest the information presented in these 33 chapters, you'll be in a perfect position to apply this knowledge to your specific programming assignments, and you'll be well equipped to explore the .NET universe on your own terms. About the Apress Pro series

You have gotten the job; now you need to go hone your skills in these tough competitive times. Apress Pro Series books expand your skills and expertise in exactly the areas you need. Master the content of a Pro book and you will always be able to get the job done in a professional manner. Written by experts in their field, Pro Series books give you the hard-won solutions to problems you will face in your professional programming career.

To bu this book click here

Professional Visual Studio 2008

By The Saint on Monday, April 06, 2009

comments (0)

Filed Under:

Professional Visual Studio 2008

Microsoft Visual Studio 2008 is the latest version in the ongoing evolution of the Integrated Development Environment (IDE), and this resource examines the diverse facets of the IDE—from common tasks to intricate functions to the powerful tools that accompany the main code editing and design windows. Written by a unique author duo and offering an in-depth look at the powerful and fascinating features and techniques of the IDE, this book explores each aspect of the development life cycle from the perspective of how Visual Studio 2008 can make your life easier.

Each chapter is packed with examples that illustrate uses for various tools, commands, and shortcuts of Visual Studio 2008. You will gradually learn to identify where a feature is used, conclude how you can use it to its fullest potential, and then seamlessly apply that feature to help solve real-world problems.

What you will learn from this book
* How to create project templates and wizards
* Methods for using IntelliSense, code refactoring, class modeling, and unit testing
* Tips for using DataSets, LINQ, and Synchronization Services for working with data
* How to build web applications using ASP.NET AJAX, Silverlight, and ASP.NET MVC
* Ideas for building Office and Mobile applications, WPF, WCF, and WF projects
* Ways to effectively analyze and identify bugs using the advanced debugging features
* How to automate repetitive tasks using the Visual Studio 2008 add-ins and macros
* Suggestions for using Visual Studio Team System components coupled with Team Foundation Server
* Techniques for building more secure applications

Who this book is for

This book is for programmers who want to become proficient with the latest version of Visual Studio and are interested in the advanced capabilities of the IDE.

Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers, developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day. They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a better job.

To buy this book Click here

Declaring a Variable in Java

By The Saint on Saturday, April 04, 2009

comments (0)

Filed Under:

Declaring a Variable in Java
Variables were introduced in Module 1. Here, we will take a closer look at them. As you learned earlier, variables are declared using this form of statement,

type var-name;

where type is the data type of the variable, and var-name is its name. You can declare a variable of any valid type, including the simple types just described. When you create a variable, you are creating an instance of its type. Thus, the capabilities of a variable are determined by its type. For example, a variable of type boolean cannot be used to store floating-point values. Furthermore, the type of a variable cannot change during its lifetime. An int variable cannot turn into a char variable, for example.

All variables in Java must be declared prior to their use. This is necessary because the compiler must know what type of data a variable contains before it can properly compile any statement that uses the variable. It also enables Java to perform strict type checking.

Initializing a Variable
In general, you must give a variable a value prior to using it. One way to give a variable a value is through an assignment statement, as you have already seen. Another way is by giving it an initial value when it is declared. To do this, follow the variable’s name with an equal sign and the value being assigned. The general form of initialization is shown here:

type var = value;

Here, value is the value that is given to var when var is created. The value must be compatible
with the specified type. Here are some examples:

int count = 150; // give count an initial value of 150
char ch = 'X'; // initialize ch with the letter X
float f = 10.5F; // f is initialized with 10.5
When declaring two or more variables of the same type using a comma-separated list, you
can give one or more of those variables an initial value. For example:
int a, b = 20, c = 35, d; // b and c have initializations

In this case, only b and c are initialized.

Java: A Beginner's Guide, Third Edition (Beginner's Guide)

By The Saint on Thursday, April 02, 2009

comments (0)

Filed Under:


Essential Skills--Made Easy! Updated and Expanded for J2SE 5

Learn to program in Java from master programmer and best-selling author Herb Schildt. Completely revised and updated to cover Java 2 Platform, Standard Edition 5 (J2SEj 5), this step-by-step guide will have you programming in practically no time. You’ll start at the beginning, learning why Java is the preeminent language of the Internet, how it relates to object-oriented programming (OOP), and the general form of a Java program. Next, it’s on to Java fundamentals, including data types, operators, program control statements, classes, objects, and methods. You’ll then progress to more advanced topics, such as inheritance, exception handling, the I/O system, multithreading, and applets. Of course Herb covers the powerful, new features added by J2SE 5, such as generics, autoboxing, enumerations, and static import. Get started programming in Java today with this easy-to-follow tutorial. Designed for Easy Learning:

* Modules--Each concept is divided into logically organized modules (chapters), ideal for self-paced learning
* Critical Skills--Each module opens with the specific skills covered in the module
* Mastery Checks--End-of-module reviews test knowledge using short-answer, multiple-choice, and fill-in-the-blank questions
* Ask the Experts--Q&A sections throughout are filled with bonus information and helpful tips
* Progress Checks--Quick self-assessment sections check your progress
* Projects--Practical exercises show how to apply the critical skills learned in each module
* Annotated Syntax--Example code annotated with commentary that describes the programming techniques being illustrated

About the Author: Herbert Schildt is a leading authority on Java, C, C++, and C#. His programming books have sold more than 3 million copies worldwide and have been translated into all major foreign languages. He is the author of numerous best-sellers, including Java: The Complete Reference, J2SE 5 Edition; C++: The Complete Reference; C: The Complete Reference; and many others.
About the Author
Herb Schildt (Mahomet, IL) is a leading authority on C and C++ and a best-selling author whose books have sold more than 2 million copies. His acclaimed C and C++ books include Teach Yourself C, C++ from the Ground Up, C++: The Complete Reference, Java Programmer's Reference, STL Programming from the Ground Up, Windows 98 Programming from the Ground Up, and co-author of C/C++ Annotated Archives.

To buy this book click here

Java Two Control Statements

By The Saint on Thursday, April 02, 2009

comments (0)

Filed Under:

Java Two Control Statements
Inside a method, execution proceeds from one statement to the next, top to bottom. However, it is possible to alter this flow through the use of the various program control statements supported by Java. Although we will look closely at control statements later, two are briefly introduced here because we will be using them to write sample programs.
The if Statement
You can selectively execute part of a program through the use of Java’s conditional statement: the if. The Java if statement works much like the IF statement in any other language. Its simplest form is shown here:

if(condition) statement;

Here, condition is a Boolean expression. If condition is true, then the statement is executed. If condition is false, then the statement is bypassed. Here is an example:

if(10 < 11) System.out.println("10 is less than 11");

In this case, since 10 is less than 11, the conditional expression is true, and println( ) will execute. However, consider the following:

if(10 < 9) System.out.println("this won't be displayed");

In this case, 10 is not less than 9. Thus, the call to println( ) will not take place.

Java defines a full complement of relational operators that may be used in a conditional expression. They are shown here:

Operator Meaning
< Less than
<= Less than or equal
> Greater than
>= Greater than or equal
= = Equal to
!= Not equal

Java’s Contribution to the Internet

By The Saint on Thursday, April 02, 2009

comments (0)

Filed Under:

Java’s Contribution to the Internet
The Internet helped catapult Java to the forefront of programming, and Java, in turn, has had a profound effect on the Internet. The reason for this is quite simple: Java expands the universe of objects that can move about freely in cyberspace. In a network, there are two very broad categories of objects that are transmitted between the server and your personal computer:
passive information and dynamic, active programs. For example, when you read your e-mail, you are viewing passive data. Even when you download a program, the program’s code is still only passive data until you execute it. However, a second type of object can be transmitted to your computer: a dynamic, self-executing program. Such a program is an active agent on the client computer, yet it is initiated by the server. For example, a program might be provided by the server to properly display the data that it is sending.

As desirable as dynamic, networked programs are, they also present serious problems in the areas of security and portability. Prior to Java, cyberspace was effectively closed to half of the entities that now live there. As you will see, Java addresses those concerns and, in doing so, has defined a new form of program: the applet.

Java Applets
An applet is a special kind of Java program that is designed to be transmitted over the Internet and automatically executed by a Java-compatible Web browser. Furthermore, an applet is downloaded on demand, just like an image, sound file, or video clip. The important difference is that an applet is an intelligent program, ot just an animation or media file. In other words, an applet is a program that can react to user input and dynamically change—not just run the same animation or sound over and over.

As exciting as applets are, they would be nothing more than wishful thinking if Java
were not able to address the two fundamental problems associated with them: security and portability. Before continuing, let’s define what these two terms mean relative to the Internet.

Security
As you are almost certainly aware, every time you download a “normal” program, you are risking a viral infection. Prior to Java, most users did not download executable programs frequently, and those that did, scanned them for viruses prior to execution. Even so, most users still worried about the possibility of infecting their systems with a virus or allowing a malicious program to run wild in their systems. (A malicious program might gather private information, such as credit card numbers, bank account balances, and passwords by searching the contents
of your computer’s local file system.) Java answers these concerns by providing a firewall between a networked application and your computer.

When using a Java-compatible web browser, it is possible to safely download Java applets without fear of viral infection. The way that Java achieves this is by confining a Java program to the Java execution environment and not allowing it access to other parts of the computer. (You will see how this is accomplished, shortly.) Frankly, the ability to download applets with confidence that no harm will be done to the client computer is the single most important aspect
of Java.

Portability
As discussed earlier, many types of computers and operating systems are connected to the Internet. For programs to be dynamically downloaded to all of the various types of platforms, some means of generating portable executable code is needed. As you will soon see, the same mechanism that helps ensure security also helps create portability. Indeed, Java’s solution to these two problems is both elegant and efficient.

How Java Relates to C#

By The Saint on Thursday, April 02, 2009

comments (0)

Filed Under:

How Java Relates to C#

Recently a new language called C# has come on the scene. Created by Microsoft to support its .NET Framework, C# is closely reated to Java. In fact, many of C#’s features were directly adapted from Java. Both Java and C# share the same general C++-style syntax, support distributed programming, and utilize the same object model. There are, of course, differences between Java and C#, but the overall “look and feel” of these languages is very similar. This means that if you already know C#, then learning Java will be especially easy. Conversely, if C# is in your future, then your knowledge of Java will come in handy.

Given the similarity between Java and C#, one might naturally ask, “Will C# replace
Java?” The answer is No. Java and C# are optimized for two different types of computing
environments. Just as C++ and Java will co-exist for a long time to come, so will C# and Java.

How Java Relates to C and C++

By The Saint on Thursday, April 02, 2009

comments (0)

Filed Under:

How Java Relates to C and C++

Java is directly related to both C and C++. Java inherits its syntax from C. Its object model is adapted from C++. Java’s relationship with C and C++ is important for several reasons. First, many programmers are familiar with the C/C++ syntax. This makes it easy for a C/C++ programmer to learn Java and, conversely, for a Java programmer to learn C/C++.

Second, Java’s designers did not “reinvent the wheel.” Instead, they further refined an already highly successful programming paradigm. The modern age of programming began with C. It moved to C++, and now to Java. By inheriting and building upon that rich heritage, Java provides a powerful, logically consistent programming environment that takes the best of the past and adds new features required by the online environment. Perhaps most important, because of their similarities, C, C++, and Java define a common, conceptual framework for the professional programmer. Programmers do not face major rifts when switching from one language to another.

One of the central design philosophies of both C and C++ is that the programmer is in
charge! Java also inherits this philosophy. Except for those constraints imposed by the Internet environment, Java gives you, the programmer, full control. If you program well, your programs reflect it. If you program poorly, your programs reflect that, too. Put differently, Java is not a language with training wheels. It is a language for professional programmers.

Java has one other attribute in common with C and C++: it was designed, tested, and refined by real, working programmers. It is a language grounded in the needs and experiences of the people who devised it. There is no better way to produce a top-flight professional programming language.

Because of the similarities between Java and C++, especially their support for objectoriented programming, it is tempting to think of Java as simply the “Internet version of C++.” However, to do so would be a mistake. Java has significant practical and philosophical differences.

Although Java was influenced by C++, it is not an enhanced version of C++. For example, it is neither upwardly nor downwardly compatible with C++. Of course, the similarities with C++ are significant, and if you are a C++ programmer, you will feel right at home with Java. Another point: Java was not designed to replace C++. Java was designed to solve a certain set of problems. C++ was designed to solve a different set of problems. Both will coexist for many years to come.