Microsoft Visual J# .NET

John Longshaw, Andy Longshaw, Andy Sharp

  • 出版商: Microsoft Press
  • 出版日期: 2002-09-08
  • 售價: $2,087
  • 貴賓價: 9.5$1,983
  • 語言: 英文
  • 頁數: 944
  • 裝訂: Hardcover
  • ISBN: 0735615500
  • ISBN-13: 9780735615502
  • 相關分類: .NET

已絕版

買這商品的人也買了...

相關主題

商品描述

Description:

Java-language developers—learn how to create .NET applications with the Microsoft development tool for you: Visual J# .NET!

Leverage your Java skills and learn how to create powerful Windows® applications and high-performance, distributed applications with Microsoft® Visual J#® .NET in this comprehensive tutorial and reference. Presented in an easy-to-browse format, this erudite book provides the authoritative technical details you need to leverage Visual J# .NET and the richness of the Microsoft .NET Framework to build scalable, enterprise-level applications. You’ll examine the architecture of .NET, find out how to process data with Visual J# .NET, see how to create XML Web services, and discover how to build multithreaded applications that span the local area network. You’ll also look at the key topics for building applications that use Windows features and services and find out how to provide a global reach to your applications via the Internet. Topics covered include:

• The challenge of n-tier development
• The .NET platform
• Java and the common language runtime
• Graphical user interfaces
• Processing XML
• Transforming XML
• Microsoft ADO.NET
• Multithreading with .NET
• Basic network programming
• Serializing objects
• .NET remoting
• Using message queues
• Integrating with unmanaged components
• Serviced components and COM+
• Writing Windows services
• Microsoft ASP.NET—a better ASP
• Building a Web service
• Creating a Web service client

 

Table of Contents:

 Introduction xvii
PART I  THE ARCHITECTURE OF .NET  
1  The Challenge of N-Tier Development 3
    Client/Server and N-Tier Architectures 4
        Two-Tier Architecture 4
        N-Tier Architecture 6
        The Northwind Traders Example 8
    Connectivity and Data Formats 12
        Sockets 12
        Remote Procedure Calls 14
        Object RPCs 16
        Remote Method Invocation 17
        The Web 19
    Data Access 21
        Open Database Connectivity 21
        Java Database Connectivity 22
        ADO and ADO.NET 22
    Nonfunctional Requirements 23
        Security 23
        Scalability and Availability 24
        Integrity and Transactions 25
    .NET Enterprise Servers 25
    Java and .NET 26
    Summary 27
2  Microsoft .NET 29
    Compilers and Language Support 29
        The Common Language Runtime 30
        Cross-Language Development 40
        Memory Management 45
        Integrating Unmanaged Code into .NET Applications 50
    Assemblies and Deployment 51
        The Joy of DLLs: The Movie 51
        .NET Assemblies 52
        Private Assemblies 55
        The Global Assembly Cache 56
        Configuring an Application 60
    The .NET Framework Class Library 65
        Namespaces 67
    .NET Remoting and the Web 69
        The .NET Remoting Architecture 69
        Remote Object Activation 71
        ASP.NET 71
        Web Services 72
    .NET Security 73
        Application Domains 74
        Role-Based Security 76
    Code Access Security 81
    Summary 87
3  Java and the Common Language Runtime 89
    Components and Java 91
        JavaBeans 92
        Components in .NET 98
    Java, J#, and the .NET Framework 106
        Packaging and Locating Classes 106
        The Java Class Hierarchy 108
        Other Issues 118
        Migrating to J# 121
    Metadata and Attributes 123
        Reflection in .NET 124
        Attributes 131
    Enterprise Java 133
        The Elements of J2EE 133
        Comparing .NET to J2EE 139
        The Java Pet Store 142
    Summary 144
4  Graphical User Interfaces 145
    Desktop GUIs 146
        Revisiting Java GUI Development 146
        The Windows Forms Library 149
    Porting Existing Java Applications 150
        Porting AWT Applications to .NET 157
    Writing a GUI Application Using the .NET Classes 159
        Creating the Windows Form 160
        Adding Controls to the Form 165
        Handling Events 171
        Using File Dialog Boxes 174
        Working with the System Clipboard 178
        Building and Running the Application 180
    Summary 181
PART II  MANAGING AND MANIPULATING DATA  
5  Processing XML 185
    Using XML in a .NET Application 186
        XML as a Data Format 186
        Roles for XML 189
        What Applications Need from XML Support 190
        Processing XML Data 191
        Support for XML in Visual J# and the .NET Framework 192
    Single-Pass Processing of XML Documents 195
        Parsing XML Documents Using the XMLReader Class 196
        Processing XML Using an XMLTextReader Instance 197
        Other Options for Reading and Navigation 205
        Types and Namespaces 207
        Exception Handling 208
        Writing XML Documents Using the XmlWriter Class 209
        Escaping and Copying When Writing 212
    Validation and Entity Resolution 213
        Validating XML Documents 213
        Resolving Entities 218
    Processing XML Documents in Memory 219
        In-Memory Processing 219
        Loading XML into the XmlDocument Class 221
        Obtaining Information from a DOM Document 222
        Treating a DOM Fragment as a Stream 227
    Writing and Manipulating In-Memory XML Documents 227
        Altering Content in a DOM Tree 227
        Making Substantial Changes to XML Documents 228
        Writing Out the DOM Tree 230
    XML and Data 230
        Links Between XML and ADO.NET Data 231
        Viewing XML as Relational Data 232
        Manipulating XML as Relational Data 233
        Viewing Relational Data as XML 234
        Summary 235
6  Transforming XML 237
    Transforming XML in .NET Applications 238
        The Need for Transformation 238
        The XSLT Processing Model 240
        Applying Transformations 244
        .NET Support for XML Transformations 246
    Applying Stylesheets to XML Documents 246
        Simple Transformations Using XslTransform 247
        Transformation Sources and Targets 248
        Transforming a DataSet 250
    Optimization and Partial Transformation 250
        Searching and Navigating Using XPath 251
        Optimizing XSLT Transformations 252
        Partial Transformations 253
    Parameterization and External Functionality 254
        Passing in Parameters 254
        Invoking External Functionality 258
    Summary 263
7  ADO.NET 265
    The ADO.NET Architecture 265
        ADO.NET Components 266
        DataSet Objects 268
        Connections and Data Adapters 269
    Connecting to a Data Store 270
        Connecting to a Data Source (OLE DB and SQL) 270
        Connections and Visual Studio .NET 272
        Connection Pooling 273
        Consuming Connection Events 273
    Executing Commands Against a Data Store 274
        Building Commands 275
        Using Parameters in Statements 276
        Invoking Stored Procedures 282
        Retrieving a Single Record from a Data Source 283
        Using a DataReader Object for Read-Only Data Retrieval 283
    Using DataSet Objects for Data Access 285
        Populating a DataSet Table from a Data Adapter 285
        Navigating a Typed DataSet 288
        Navigating an Untyped DataSet 291
        Manipulating and Updating a Data Store from a Data Adapter 292
        Defining Relationships and Constraints 296
    Transaction Management 299
    Working with XML and ADO.NET 301
        Writing a DataSet as XML 301
        Writing DataRelation Objects as XML 304
        Inferring the DataSet Structure from XML 304
    Summary 306
PART III  DEVELOPING FOR THE ENTERPRISE  
8  Multithreading with .NET 309
    Threads and .NET 310
        Application Domains and Threads 312
        Creating Threads 312
        Threads and Security 314
        Passing Parameters to Threads 314
        Thread States 315
        Terminating Threads 318
        Scheduling Threads 321
        Threads and Unmanaged Code 323
    Synchronization 325
        Manual Synchronization 329
        Automatic Synchronization 338
        Static and Thread Data 341
    Interthread Communication 343
        Thread Notification 343
        Timers 354
    Thread Pooling 355
        The ThreadPool Class 356
        Asynchronous I/O 357
    Summary 359
9  Basic Network Programming 361
    Sockets Essentials 362
        Connection-Oriented Sockets 363
        Data Transmission Issues 380
        Connectionless Sockets 382
        Blocking and Nonblocking Sockets 387
    Using Sockets Asynchronously 389
        The Poll and Select Methods 389
        Network Streams 391
    Web Network Programming 393
        Pluggable Protocols 394
        Requesting and Receiving Data Using HTTP 396
        Posting Data 399
        Processing Requests Asynchronously 401
        Using a WebClient Object 402
        HTTP Connection Management and Pooling 403
    Security over the Internet 405
        Authentication and Authorization 405
        Encryption 408
    Summary 409
10  Serializing Objects 411
    Serializing and Deserializing Data 412
        Formatting Data 412
        Deserialization 416
        Versioning 417
        Being Selective 422
    Advanced Serialization 423
        Customizing Serialization 423
        Handling Object Graphs 427
    XML Serialization 433
        XML Formatting 433
        Deserializing an XML Stream 441
    Summary 445
11  .NET Remoting 447
    The Common Language Runtime Remoting Architecture 447
        Remote Objects 448
        The .NET Remoting Model 451
        The ObjRef Object and Proxies 457
        Messages, Channels, and Channel Sinks 458
    Programming with TCP Remoting 460
        Server-Activated Object Remoting 461
        Client-Activated Object Remoting 469
        Managing Object Lifetimes and Leases 471
        TCP Remoting Security 474
        Remote Method Parameters 475
        Remote Events 476
    HTTP Remoting 480
        Remoting Server Hosting 481
        Hosting with IIS 483
        HTTP Remoting Security 485
    Customizing Remoting 486
        One-Way Remoting 486
        The RemotingServices Class 487
        Tracking Handlers 489
        Custom Channel Sinks and Channels 492
    Summary 494
12  Using Message Queues 495
    The Architecture of Message Queuing 3.0 496
        Queues, Servers, and Active Directory 496
        Transactional Message Queues 498
        Managing Queues 498
        System Queues 500
        Message Delivery 501
        Message Queuing Triggers 502
    Programming Message Queues 502
        Posting and Receiving Messages 502
        Handling Messages 514
        Managing Queues 520
    Asynchronous Operations 525
        Receiving Messages Asynchronously 525
        Disconnected Queues 527
        Requesting an Acknowledgment 530
    Messaging in the Real World 532
        Reliability and Transactions 532
        Message Authentication and Encryption 537
        Messaging over HTTP 540
    Summary 540
PART IV  INTEGRATING WITH WINDOWS  
13  Integrating with Unmanaged Components 543
    Managed and Unmanaged Code 544
    Invoking Methods in Unmanaged DLLs 545
        Using J/Direct 546
        The Platform Invoke Service 551
        Other P/Invoke Issues 567
    Calling COM Components 571
        Creating and Using an RCW 572
        Sinking COM Events 577
        Using COM Objects Without Type Libraries 580
    Integrating .NET Components into COM 589
        Designing .NET Components for COM Interop 589
        Creating a COM Callable Wrapper 594
        Testing the CCW 598
    Interoperability with Other Technologies 600
        The Real Solution: XML Web Services 602
    Summary 603
14  Serviced Components and COM+ 605
    Using an Existing COM+ Component 607
        The FourthCoffee Components Revisited 608
        Configuring the Fourth Coffee COM+ Application 608
        Using the Fourth Coffee COM+ Application 612
        Subscribing to a Loosely Coupled Event 613
    Building a Serviced Component 621
        Serviced Component Basics 622
        Registering and Using the Serviced Component 629
    Features of Serviced Components 633
        Synchronization, Activities, and Context 633
        Static Methods 637
        Serviced Component Activation 638
        Caching Shared State 645
        More About Transactions 650
    .NET and COM+ Security 655
        Code Access Security Requirements 655
        The .NET Role-Based Security Model 655
   &nbs