.NET for Java Developers - Jawahar Puvvala, Alok Pota

.NET for Java Developers

Migrating to C#
Buch | Softcover
720 Seiten
2003
Addison Wesley (Verlag)
978-0-672-32402-4 (ISBN)
57,65 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
Allows Java programmers to quickly begin using C# and the .NET Framework, through a meticulous comparison of Java and C#.
.NET for Java Developers explains the .NET Framework from a Java programmer's perspective. Java has become such a popular language partly because it makes web-based rapid application development possible on different platforms. For Windows applications, however, Java has not been able to utilize all the platform-specific features that are available to Visual Basic and Visual C++. C# is the perfect solution. The similarities between Java and C# offer a channel for Java programmers to reuse their skills on the Windows platform. This book is filled with comparisons between Java and C#, to help Java programmers easily migrate their current skills to C# and the .NET set of development tools. It contains extensive sample code to illustrate the concepts. The authors start with the essentials, and move on to advanced topics such as garbage collection, memory management, and design patterns. This is the book for every Java programmer who wants to learn to develop applications for Windows.

Jawahar Puvvala is a consultant at Nucor Corporation in Charlotte, North Carolina, where he develops mission-critical server side and client side applications using cutting edge technology. His educational background is in writing software for mechanical and structural engineering systems, topics on which he has published scientific journal and conference articles. Alok Pota is a J2EE application developer at Digital Motorworks (DMi) in Austin, Texas, where he develops server side enterprise applications using J2EE technologies. His educational background is in writing scientific numerical analysis and visualization software in Visual C++, Visual Basic, and FORTRAN. Alok's published works include numerous scientific articles on mathematical modeling and expert systems. 0672324024AB06242003

Preface.
I. C# ESSENTIALS.

1. The .NET Framework.


What Is .NET?



NET Framework Terminology and Core Concepts.



CLR.



Managed Code.



MSIL.



Assembly.



Application Domain.



Runtime Host.



The Common Type System.



Common Language Specification.



CLR and the JVM.



.NET MSIL.



.NET JIT.



The Java Virtual Machine.



Memory Management.



Garbage Collection in the CLR.



Garbage Collection in the JVM.



Security Management.



Policy-Driven Security Based on Code Evidence.



Role-Based Security, Authentication, and Authorization.



Isolated Storage.



Cryptography.



Security in Java.



Exception Management.



Exception Management in the CLR.



Exception Management in Java.



Overview of the .NET Framework Class Library.



Summary.

Chapter 2 Starting with C#.


The .NET SDK.



Writing Your First C# Program.



C# Performance.



C# Tools.



Visual Studio .NET.



The Intermediate Language Disassembler.



Summary.

3. C# and Java: What Is the Difference?


Programming Platforms (.NET and Java).



The Java Platform.



The .NET Suite.



The Presentation Layer.



The Business Logic Layer.



The Data Layer.



Runtime Architecture.



The JVM.



The CLR.



ASP.NET.



Internet Explorer.



Shell Executables.



The OOP Model.



Language Constructs, Syntax, and the API.



Data Types.



Operators.



Control Flow Statements.



Exception Support.



Common Objects.



Common Language Elements.



Collections Library.



Threading.



Input/Output.



Namespaces and Assemblies.



What's Missing from Java?



What's Missing from C#?



Summary.

4. Writing Objects.


Object Creation.



The C# Equivalent of java.lang.Object.



Classes.



Class Modifiers.



Class Access Modifiers and Inheritance.



Constructors.



Methods.



public.



protected.



private.



internal.



static.



sealed.



extern.



unsafe.



virtual.



override.



abstract.



new.



Method Inheritance.



Method Overloading.



Method Parameters.



Fields.



public.



private.



protected.



internal.



const.



readonly.



static. BHEADS = volatile.



Properties.



Inheritance and Properties.



Variable Scoping.



Object Destruction.



Summary.

5. Understanding Inheritance and Polymorphism.


Inheritance.



Polymorphism and Virtual Methods.



Exploring C# Polymorphism.



Using the virtual and override Keywords.



Effects of Method Parameters and Conversion Rules.



Methods and Inheritance.



Access Modifiers.



The base Keyword.



Static Methods and Inheritance.



Abstract Methods and Inheritance.



Casting.



Composition versus Inheritance.



Summary.

6. Implementing Interfaces.


Basic Interfaces.



Differences between C# and Java Interfaces.



Multiple Interfaces and Explicit Interface Declaration.



Inheritance in Interfaces.



The as Operator.



Summary.

7. Data Types.


The Java Value Type.



The Java Reference Type.



The C# Value Type.



The struct Type.



The enum Type.



The Built-in Value Types.



Built-in Integral Value Types.



The Built-in Floating-Point Types.



The Built-in Decimal Value Types.



The Built-in Boolean Value Types.



Explicit Conversions.



The C# Reference Types.



Boxing and Unboxing.



Boxing.



Unboxing.



The typeof Operator.



Unsafe Code.



The Pointer Data Type.



Summary.

8. Operators.


Arithmetic Operators.



Logical Operators.



Bitwise Operators.



The & Operator.



The | Operator.



The ^ Operator.



The ~ Operator.



String Concatenation Operators.



The Increment and Decrement Operators.



Shift Operators.



The << Operator.



The >> Operator.



Relational Operators.



The == Operator.



The != Operator.



The < Operator.



The > Operator.



The <= Operator.



The >= Operator.



Assignment Operators.



The = Operator.



The += Operator.



The -= Operator.



The *= Operator.



The /= Operator.



The %= Operator.



The &= Operator.



The |= Operator.



The ^= Operator.



The >>= Operator.



The <<= Operator.



The Member Access (Dot) Operator.



The Casting Operator.



The Indexing Operator.



The Conditional Operator.



Object Creation Operator.



Type Information Operators.



The is Operator.



The as Operator.



The sizeof Operator.



The typeof Operator.



Overflow Exception Control.



The checked Operator.



The unchecked Operator.



Pointer Type Operators.



Operator Precedence.



Operator Overloading.



Summary.

9. Essential Control Flow.


The if Statement.



The while Loop.



The do while Loop.



The for Loop.



The switch Statement.



The foreach Statement.



Jump Statements.



Summary.

10. Programming with Exceptions.


Fundamentals of the try-catch-finally Construct.



Custom Exceptions.



Inheritance and Exceptions.



CLR Exceptions.



Design Considerations.



Let It Throw.



Catch, Clean Up, and Rethrow.



Catch, Clean Up, and Rethrow as a Different Exception.



Summary.

11. Working with Arrays.


Java Versus C# Arrays.



Java Arrays.



C# Arrays.



One-Dimensional Arrays.



Multidimensional Arrays.



Jagged Arrays.



Copying Arrays.



Arrays as Collections.



Summary.

12. Processing Strings.


The System.String Class.



Initializing Strings.



The + Operator and Strings.



Regular Expressions.



Summary.

13. Formatting Numbers, Strings, and Dates.


Formatting.



Number Formatting.



Currency Formatting.



Scientific Formatting.



Number, Fixed-Point, and General Formatting.



Percent Formatting.



Custom Specifiers.



Section, Hexadecimal, and Escaping Specifiers.



Date and Time Formatting.



Formatting Custom Objects.



Parsing.



Summary.

14. Using Collections.


The System.Collections Interfaces.



The System.Collections Classes.



Thread Safety.



Type Safety.



Immutability.



Accessibility.



Using the System.Collections Classes.



ArrayList.



BitArray.



Hashtable.



Queue. BHEADS = Stack.



SortedList.



Icomparer.



IhashCodeProvider.



Ienumerator.



Type-Safe Collections.



Custom Collections.



Summary.

15. Working with the C# I/O API.


Streams.



The FileStream Class.



The BufferedStream Class.



The MemoryStream Class.



The NetworkStream Class.



Readers and Writers.



Files and Directories.



AppendText.



Exists, Copy, Move, and Delete.



Open, OpenWrite, OpenText, and OpenRead.



Asynchronous I/O.



Serialization.



Basic Serialization.



Custom Serialization.



Summary.

16. Thread Programming.


The System.Threading Namespace.



Creating Threads Using the System.Threading.Thread Class.



Starting a Thread.



The Life Cycle of a Thread.



Stopping a Thread Safely in C#.



Creating Threads Using the System.Threading.ThreadPool Class.



Creating Threads Using the System.Threading.Timer Class.



Creating Threads Using the Asynchronous Callback.



Thread Synchronization.



The ReaderWriterLock Class.



Interlocked Operations.



Summary.

17. Using C# Properties, Indexers, and Attributes.


Properties.



Indexers.



Indexers with an Integer Index.



Indexers with a String Index.



Indexers with Multiple Indices.



Attributes.



Summary.

18. Delegates and Event Programming.


Using Delegates.



Multicasting.



Event Programming.



Summary.

II. ADVANCED C# TOPICS.

19. Accessing Databases.


Inside ADO.NET.



JDBC 2.0+.



Getting Started with ADO.NET.



Establishing a Connection to the Database.



Running a SELECT Query and Getting Data.



Running an INSERT, UPDATE, or DELETE Query.



Running a Stored Procedure.



Processing Transactions.



Exploring Database Metadata.



DataSets.



Loading Data into a DataSet.



Saving Data to the RDBMS Using a DataSet.



Summary.

20. Processing XML.


XML Support in Java.



XML and .NET.



Reading and Writing XML.



Reading XML in .NET.



Writing XML in .NET.



Using the DOM API in .NET.



Xpath.



XSLT.



Summary.

21. GUI Programming in C#.


Choosing a GUI Library: Java or .NET?



Using the IDE to Develop a Small Application.



Step 1: Creating a New Project.



Step 2: Designing the Form.



Step 3: Modifying the Form.



Windows Forms, Component Controls, and Their Associated .NET Classes.



Putting It All Together.



What the Application Does.



Source Files of the Application.



The Application Controls.



Anchoring and Docking.



Anchoring.



Docking.



Drawing with .NET GUI Classes.



System.Drawing.



Double Buffering.



Sample Drawing Program.



Summary.

22. Reflection.


The Core Reflection Classes.



Browsing and Querying Members.



Invoking Methods and Setting Fields and Properties.



Generating Dynamic IL Using Reflection Emit.



Summary.

23. Assemblies, Application Configuration, and Process Management.


The .NET Assembly.



The Assembly Manifest.



Modules.



Resources.



Creating an Assembly.



Programmatic Access to Assemblies.



Versioning.



Application Configuration.



Single-Tag Section.



Name/Value Section.



Dictionary Section.



A Sample Config File.



Process Management.



Querying the Current Application Domain.



Executing an Application in a Remote Application Domain.



Invoking a Method in a Remote Application Domain.



Querying Processes.



Creating and Killing Processes.



Redirecting Process Output.



Detecting Process Completion.



Exiting a Process.



Summary.

Appendix: Java and C# API Comparison.


The java.lang Package.



The java.util Package.



The java.io Package.



The java.sql Package.



The java.text Package.



The org.w3c.dom Package.



The javax.swing Package.



The java.awt Package.

Index.

Erscheint lt. Verlag 22.7.2003
Mitarbeit Herausgeber (Serie): JOHN FULLER
Verlagsort Harlow
Sprache englisch
Themenwelt Informatik Office Programme Outlook
Informatik Programmiersprachen / -werkzeuge Java
Mathematik / Informatik Informatik Web / Internet
ISBN-10 0-672-32402-4 / 0672324024
ISBN-13 978-0-672-32402-4 / 9780672324024
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich