Integration Notes

[Machine Vision, Illumination] [Java, J2EE] [LabVIEW] [ORACLE] [C++] [C#] [Aspect-Oriented Programming] [Embedded] [XP Agile CI] [Software Testing]

C#

ODP.NET . . . . . . . C# 2005 / .NET 3.5 . . . . . . . ODT
Oracle 11g / .NET integration
WCF
Asynchronous Delegates
"The .NET Framework allows you to call any method asynchronously. To do this you define a delegate with the same signature as the method you want to call; the common language runtime automatically defines BeginInvoke and EndInvoke methods for this delegate, with the appropriate signatures. The BeginInvoke method initiates the asynchronous call. It has the same parameters as the method you want to execute asynchronously, plus two additional optional parameters. The first parameter is an AsyncCallback delegate that references a method to be called when the asynchronous call completes. The second parameter is a user-defined object that passes information into the callback method. BeginInvoke returns immediately and does not wait for the asynchronous call to complete. BeginInvoke returns an IAsyncResult, which can be used to monitor the progress of the asynchronous call.
The EndInvoke method retrieves the results of the asynchronous call. It can be called any time after BeginInvoke; if the asynchronous call has not completed, EndInvoke blocks the calling thread until it completes. " Sacha Barber
public delegate void MyDelegate(Label myControl, string myArg2);

private void Button_Click(object sender, EventArgs e)
{
   object[] myArray = new object[2];

   myArray[0] = new Label();
   myArray[1] = "Enter a Value";
   myTextBox.BeginInvoke(new MyDelegate(DelegateMethod), myArray);
}

public void DelegateMethod(Label myControl, string myCaption)
{
   myControl.Location = new Point(16,16);
   myControl.Size = new Size(80, 25);
   myControl.Text = myCaption;
   this.Controls.Add(myControl);
}
JSON, a common lightweight data-interchange format and a standard for Ajax communication, is faster than XML and easy to manipulate. In .Net 3.5, WCF can support JSON but you need to change config file:
<service name="OrderService">
      <endpoint contract="IOrders"
            binding="webHttpBinding"
            bindingConfiguration="jsonBinding"
            address=""   
 behaviorConfiguration="jsonBehavior" />
</service>
<webHttpBinding>
   <binding name="jsonBinding" messageEncoding="Json" />
</webHttpBinding>
  <behaviors>
      <endpointBehaviors>
              <behavior name ="jsonBehavior">
               <webScriptEnable />
              </behavior>
   </endpointBehaviors>
 </behaviors>
While WCF uses SOAP as an underlying structure, WCF can be configured to process "plain" XML data that is not wrapped in a SOAP envelope. WCF can also be extended to support specific XML formats, such as ATOM (a popular RSS standard), and even non-XML formats, such as JavaScript Object Notation (JSON).
C# 2005 / .NET 3.0
Regular Expression
"I Love Jack Daniels": Regular Expression
Unit Test
Tools and Frameworks
  • UI /AJAX tool set from Telrik. $800.00
  • [Grasshopper]Visual Studio plug-in from Mainsoft for Java EE
    • Developer Edition of Mainsoft® for Java™ EE, Free!!
    • Enterprise Edition; ; Includes IDE for WebSphere® Application Server and Tomcat; componebts deploy to Java EE servers such as JBoss and WebLogic®; multi-CPU capabilities;
    • .NET to Java: MSIL to Java bytecode compilation
    • Java EE compliant applications
    • Visual Studio integrated debugger to Java bytecode running on Apache Tomcat.
  • Pocket SOAP - Open Source SOAP client COM component
Managed and unmanaged heap memory deallocation
In .NET after deallocation of the memory the garbage collector compacts the heap by moving all remaining objects to form one contiguous block of memory. This compacting is what sets apart managed and unmanaged code. Microsoft believes that the strategy used by .NET increases the performance. This is because there is no search required when the memory is allocated. Compacted memory leads to less page swapping (Chapter 11. C#2005w.NET3.0).
Connection from C# to Oracle
René Steiner via ODBC
Collection: Extension Method sample: Implementation of Where operator
.
LINQ - Language Integrated Query
.
 
.NET Framework 3.5 - July 2007
Home of[Microsoft .NET Framework 3.5 Beta 2]
    Added or enhanced:
  • Windows Workflow Foundation (WF)
  • Windows Communication Foundation (WCF)
  • Windows Presentation Foundation (WPF)
  • Windows CardSpace
  • Deeper integration of Language Integrated Query (LINQ) and data awareness (SQL data, collections, XML, and DataSets)
  • New Web protocol support for building WCF services including AJAX, JSON, REST, POX, RSS, ATOM, and several new WS-* standards
  • Full tooling support for WF, WCF, and WPF, including the new workflow-enabled services technology
  • New classes in .NET Framework 3.5 base class library (BCL) address the most common customer requests. BCL classes include:
    Namespace Description
    System This namespace includes all the essential support you need for your programming, including base types (String, Int32, DateTime, Boolean, etc.), essential environmental support, and math functions, to name a few
    System.CodeDom all the support necessary to be able to create code, and run it, on the fly
    System.Collections The System.Collections namespace contains interfaces and classes that define various containers, such as lists, queues, bit arrays, hashtables and dictionaries.
    System.Diagnostics All the classes you need to diagnose your application, including event logging, performance counters, tracing, and process management APIs.
    System.Globalization This namespace includes fundamental support for Globalization, used throughout the rest of the Framework
    System.IO Includes fundamental Stream support which can be used by anyone, and then specifically targets the FileSystem (via File and Directory manipulation classes), SerialPorts, and Decompression
    System.Resources Used to allow an application to be translated into multiple languages, and then display the appropriate text based upon the current users language selection
    System.Text This namespace includes support for encodings, and Stringbuilder
    System.Text.RegularExpressions This namespace includes regular expression support, for robust parsing and matching of string data
     
[The Code Project: General C# Programming]
Online References
MicrosoftMSDN]
[The Code Project: General C# Programming]
[TechRepublic]
[ASP Free]



Feedback:


Ajax, Java and PHP snippets.

[Ajax ] [Java IE ] [Java IE ]

Integration Notes

[Machine Vision, Illumination] [Java, J2EE] [LabVIEW] [ORACLE] [C++] [C#] [Aspect-Oriented Programming] [Embedded] [XP Agile CI] [Software Testing]