Code Groups



October 17, 2007

Working with .NET access modifiers

Filed under: Code Groups — admin @ 2:49 pm

 An important aspect of any development platform is security and controlling access to resources. There are many facets to security, beginning with controlling application access to defining how code can be used. You can use access modifiers to define the declared accessibility of code. Here is a rundown of the various access modifiers available with the .NET Framework.
 
Controlling accessAccess modifiers are an integral part of object-oriented programming. They support the concept of encapsulation, which promotes the idea of hiding functionality. Access modifiers allow you to define who does or doesn?t have access to certain features.
 
Access levelsThere are five levels of access allowed in .NET. The first access level provides access to everyone with no restrictions. This is called public, so any classes, methods, or properties defined as public are visible to all other code. The classes for ASP.NET pages are public since they need to be accessed to render the page.
 
The exact opposite of this public access is private, which limits access to its own. Properties or methods defined as private are only accessible by code contained within the same class. Private elements may not be accessed by derived classes or other classes.
 
There are a few other access levels between the public and private spectrum. The protected access level says that properties and methods defined as protected are visible within its own class and any classes derived from it.
 
The next level is called a friend in VB.NET and internal in C#. It says properties and methods defined as a friend or internal are accessible to all code by any class within its containing assembly. This level may be combined with the protected access level to define properties and methods that are accessible by all derived classes, as well as any classes within its assembly. This is commonly called ?protected or friend/internal? since it supports either approach.
 
These five access modifiers are supported by certain VB.NET and C# keywords as the following sections outline.
 
KeywordsBoth C# and VB.NET includes optional keywords that correspond to the five access levels. The following list provides an overview of these keywords as used in C#:
 
public: No access restrictions.
protected: Access limited to containing/derived classes.
internal: Access limited to containing type.
protected internal: Access limited to the current project.
private: Access limited to containing/derived classes and the current project.
The corresponding VB.NET list follows:
 
Public: No access restrictions.
Protected: Access limited to containing/derived classes.
Private: Access limited to containing type.
Friend: Access limited to the current project.
Protected Friend: Access limited to containing/derived classes and the current project.
These access modifiers are placed before its associated type. The following VB.NET provides a rudimentary example of the access levels in use. The overall Namespace does not get an access level (it never does) but the class does. The AssemblyOnly class is defined as a Friend, so all code within the assembly may use it. The Function called Test is Public, so it is available for use by everyone within the assembly since its containing class is defined as Friend.
 
The testField is set as Private, so it is only accessible within its class. Access to the testField is controlled through properties defined as Public, so it is accessible to all within the assembly since the containing class is defined as Friend. The ChildClassMayExtend method is defined as Protected, so it is accessible in derived classes with these derived classes.
 
Namespace Example
 Friend Class AssemblyOnly
 Public Function Test
 Return “Test”
 End Function
 End Class
 Public Class EverybodyUse
 Private testField As String
 Public Sub New
 End Sub
 Public Property TestProperty() As String
 Get
 Return testField
 End Get
 Set(ByVal value As String)
 testField = value
 End Set
 End Property
 Protected Overridable Sub ChildClassMayExtend()
 ’ Code here
 End Sub
 End Class
 End NamespaceThe equivalent C# code follows:
 
namespace test {
 internal class AssemblyOnly {
 public string test() {
 return “test”;
 }
 public class EverybodyUse {
 public EverybodyUse() { }
 private string testField;
 public string TestField {
 get { return testField; }
 set { testField = value; }
 }
 internal virtual void ChildClassMayExtend(){
 } } } }Default accessA default access level is used if no access modifier is specified in a member declaration. The following list defines the default access modifier for certain C# types:
 
enum: The default and only access modifier supported is public.
class: The default access for a class is private. It may be explicitly defined using any of the access modifiers.
interface: The default and only access modifier supported is public.
struct: The default access is private with public and internal supported as well.
The default access may suffice for a given situation, but you should specify the access modifier you want to use to ensure proper application behavior.
 
More controlProper object-oriented development involves encapsulation that hides functionality from those who don?t need to see it. The access modifiers available in .NET allow you to put encapsulation in action by defining who can use classes, methods, properties, and so forth, as well as keeping out those who don?t need them. The five access levels available in both C# and VB.NET provide enough control to cover every design situation.
 
Have you embraced object-oriented development with the .NET Framework? Share your thoughts and experiences with the .NET community.
 
Tony Patton began his professional career as an application developer earning Java, VB, Lotus, and XML certifications to bolster his knowledge.
 
 


September 23, 2007

Test Drive VB9 and DLinq

Filed under: Code Groups — admin @ 1:10 pm

The January 2006 Language Integrated Query (LINQ) preview for the next (”Orcas”) version of Visual Basic enables automating SQL Server object-relational mapping for DLinq and enhances XLinq syntax for literal XML and late binding.

Technology Toolbox: VB.NET, SQL Server 2005, XML, Visual Studio 2005, or Visual Basic or Visual Web Developer Express editions, Visual Basic 9.0 LINQ Technology Preview (January 2006), SQL

by Roger Jennings

Server 2005 Express Edition or higher, Northwind sample database

The forthcoming Visual Studio “Orcas” release promises major upgrades to data-management programming with Visual Basic 9.0 and C# 3.0.

Language Integrated Query (LINQ) and its data (DLinq) and XML (XLinq) libraries transform relational data and XML documents into first-class, interoperable CLR objects. My “Streamline Mapping With Orcas and LINQ” article in the VSM December 2005 issue described the “impedance mismatch” caused by mixing literal SQL query strings and XML InfoSet text with .NET’s statically-typed data objects. That article covered the initial LINQ technical preview, which Microsoft released in September 2005 at the Professional Developers Conference (PDC). The PDC release represented a major step toward CLR support for a common query language across application objects, relational data, and XML documents, but offered only XLinq support for VB. DLinq for object-relational mapping (ORM) worked in C# projects, but wasn’t accessible to VB programmers.

The VB team overcame this lack of VB 9.0 parity with C# 3.0 by delivering an upgraded VB-only technical preview in January 2006. I’ll explain the newly added DLinq and XLink features and why they’re important to VB developers. I’ll also show you how to generate VB classes from SQL Server databases, and describe the article’s sample application that shows LINQ, DLinq, and XLinq coding techniques for querying, joining, and updating data objects and XML documents (see the Go Online box for details). The sample application includes a Windows Form that demonstrates DLinq databinding with three auto-generated DataGridView controls in a parent-child-grandchild relationship.

Paul Vick, Microsoft’s technical lead for the VB language and compiler, says that the VB team has been “working on improving data access in the Visual Basic language” with the focus on two primary areas. First, the team wants to design a unified syntax?based on SQL’s SELECT… FROM… WHERE… ORDER BY syntax?for querying application objects, relational data, and XML documents. Achieving this goal should more than compensate for loss of the ObjectSpaces ORM add-in and XQuery 1.0 namespaces that Microsoft dropped from VS 2005 and .NET 2.0. Second, the team intends to simplify production of XML InfoSet documents by embedding XML literals into VB 9.0 code. This feature makes it easy for database developers to generate XML documents in the middle or client tier, without incurring the server resource consumption and network traffic overhead of FOR XML AUTO queries. XLinq gains support for XML namespaces with the Imports statement, whitespace preservation for cut-and-paste insertion of XML document structures into the VB code editor, auto-indentation, auto-correction of closing tags, and code colorizing.

Get started with January’s VB-only LINQ upgrade by downloading the LINQ VB Preview (Jan 2006) .msi file from the Future Versions page of MSDN’s VB Developer Center. Running the installer adds a VB LINQ Preview node to your Programs menu, creates and populates a \Program Files\VB LINQ Preview folder with a Readme.htm file and Bin, Docs, and Samples subfolders. It also replaces the RTM version (8.0.50727.42) of the VB compiler with the LINQ-enabled release (8.0.50926.00) and adds LINQ Windows Application, LINQ Console Application, and LINQ Class Library templates to the New Project dialog’s Visual Basic Templates pane. Updated System.Query.dll, System.Data.Dlinq.dll, and System.Xml.Xlinq.dll assemblies provide the namespaces for required LINQ, DLinq, and XLinq references. The VB LINQ upgrade runs side-by-side with, and doesn’t affect, the November 2005 C# LINQ Preview and sample applications for the VS 2005 RTM version.

Create a new VB LINQ project in VS 2005 or VB Express by choosing the LINQ Windows Application template, which adds to the standard System, System.Data, System.Deployment, System.Drawing, and System.Windows.Forms namespace references to System.Query, System.Data.Dlinq, and System.Xml.Xlinq. Surprisingly, the expected System.Xml namespace reference is missing from the templated project.

Put the Pedal to SqlMetal
Writing and executing DLinq queries requires a class that implements the DataContext interface to map an SQL Server database’s relational tables to LINQ objects, and vice-versa. The DataContext class also translates LINQ query code and object modifications into SQL statements for retrieving and updating data. The VB LINQ preview includes an upgraded version of the SqlMetal.exe utility to auto-generate a strongly-typed VB DataContext class file from an SQL Server 2000 or 2005 database’s metadata with this execution syntax:

usage: \path\sqlmetal [options] [<input file[>]options:? ? ? /server:<name> database server name? ? ? /database:<name> database catalog on server? ? ? /user:<name> login user id? ? ? /password:<name> login password? ? ? /views extract database views? ? ? /xml[:file] output as xml to file? ? ? /code[:file] output as code to file? ? ? /language:xxx for code (vb or csharp)? ? ? /namespace:<name> code namespace? ? ? /pluralize auto-pluralize table namesThis instruction (the sample application’s NwindCls.bat file) generates a Northwind.vb DataContext class file in the current folder from the Northwind sample database of a local SQL Server 200x instance with Windows authentication:

“\program files\vb linq preview\bin\sqlmetal.exe”/server:localhost /database:Northwind/namespace:NWind /language:vb /code:Northwind.vbIf you want to create an identical DataContext class file from a Northwind.mdf file that you attach to SQL Server 2005 [Express], drop the /server:localhost and /database:Northwind options and add the database file name as the <input file> argument:

“\program files\vb linq preview\bin\sqlmetal.exe “/namespace:NWind /language:vb /code:Northwind.vb Northwind.mdfYou also can generate an XML schema document (NwindCls.xml) from SQL metadata extracted from the Northwind database with this command (NwindXml.bat):

“\program files\vb linq preview\bin\sqlmetal.exe”/server:localhost /database:Northwind/xml:NwindCls.xmlCurrent LINQ previews don’t use the schema document, which is not an XML schema (XSD) file. The final LINQ implementation probably will include a designer to simplify SqlMetal.exe operations.

The DataContext (database) class that SqlMetal.exe generates contains a strongly typed generic Table member for each of the database’s table collections. Here’s the abbreviated code for the sample project’s Northwind DataContext class:

Partial Public Class Northwind? ? ? Inherits DataContext
? ? ? Public Customers As Table(Of Customers)? ? ? Public Orders As Table(Of Orders)? ? ? Public OrderDetails As Table(Of OrderDetails)? ? ? …? ? ? Public Employees As Table(Of Employees)? ? ? Public Products As Table(Of Products)? ? ? ..? ? ? Public Sub New(ByVal connection As String)? ? ? ? ? MyBase.New(connection)? ? ? End SubEnd ClassCreating a new DataContext requires passing an ADO.NET connection string for SQL Server 200x or SQL Express to the constructor. The LINQ team’s current plan is to support only SQL Server 200x versions directly, while enabling other database vendors to substitute their native .NET data providers for SqlClient.

An entity class decorated with a <Table(Name:=”Table Name”)> attribute defines each table. Private members specify strongly-typed table columns and EntryRef(Of RelatedTable) types designate one-to-many foreign-key/primary-key relationships, such as that between the Order Details and Products tables:

<Table(Name:=”Order Details”)> _Partial Public Class OrderDetails? ? ? Implements System.Data.DLinq.IChangeNotifier
? ? ? Private _OrderID As Integer? ? ? Private _ProductID As Integer? ? ? Private _UnitPrice As Decimal? ? ? Private _Quantity As Short? ? ? Private _Discount As Single? ? ? Private _Orders As EntityRef(Of Orders)? ? ? Private _Products As EntityRef(Of Products)? ? ? …End ClassAn EntitySet<Of RelatedTable> defines one-to-many primary key/foreign-key relationships, such as Customers to Orders and Orders to OrderDetails (see Figure 1).

Column attributes designate the column storage member, SQL Server data type and, if applicable, Id=True specifies that the column is the primary key or part of a composite primary key, as in this partial entity class for the ProductID column:

<Column(Storage:=”_ProductID”, _? ? ? DbType:=”Int NOT NULL”, Id:=True)> _Public Property ProductID() As Integer? ? ? Get? ? ? ? ? Return Me._ProductID? ? ? End Get? ? ? Set(ByVal value As Integer)? ? ? ? ? …? ? ? ? ? Me._ProductID = value? ? ? ? ? …? ? ? End SetEnd PropertyMap to Column References
The <Association> attribute maps related entities to column references so that queries can access column values from matching row(s) of related tables. The EntityRef’s ThisKey attribute changes to OtherKey for EntitySet attributes. This abbreviated property procedure returns the Products row for the ProductID value of the current OrderDetails row:

<Association(Name:=”FK_Order_Details_Products”, ? ? ? Storage:=”_Products”, ThisKey:=”ProductID”)> _Public Property Products() As Products? ? ? Get? ? ? ? ? Return Me._Products.Entity? ? ? End Get? ? ? Set(ByVal value As Products)? ? ? ? ? …? ? ? ? ? Me._Products.Entity = value? ? ? ? ? …? ? ? End SetEnd PropertyEntity classes also contain event delegates and methods for raising ObjectChanged events when you update, insert, or delete an instance.

Competing with ADO.NET 2.0 DataSets requires the capability to bind DLinq DataContext instances to DataGridView, TextBox, DatePicker and other data-aware controls. The technical preview download doesn’t include any updated DLinq documentation, but the SampleQueries.sln project has 101 simple DLinq query examples that you can execute against the Northwind sample database (see Figure 2). Unfortunately, the sample queries don’t provide much help in testing DLinq databinding.

VS 2005’s Data Source Configuration Wizard recognizes DataContext classes as business objects, so you can add hierarchical DLinq data sources to your project (see Figure 3). Data sources generated from DataContext classes are similar to those from DataSets; you can drag the top-level entity?Northwind’s Customers Table for this example?node to a form to add CustomersBindingNavigator, CustomersBindingSource, and CustomersDataGridView, TextBox, or DatePicker controls. DLinq EntitySets correspond to members of the DataSet.Relations property’s collection of DataRelation objects. Thus, you can drag DLinq EntitySets to the form Orders and OrderDetails EntitySet nodes of the Customers entity that add OrdersBindingSource and OrderDetailsBindingSource controls to the tray, and bound OrdersDataGridView and OrderDetailsDataGridView to the form (see Figure 4).

You can’t add new rows to the DataGridView that’s bound to the topmost entity; adding new rows to DataGridViews bound to EntityRefs causes the BindingSource to throw an “ArgumentException was unhandled; value does not fall within the expected range” exception. For the technical preview, it appears that you must write code to add new entity instances and rows to the database tables. Fortunately, you can add new parent, child, and grandchild rows to tables with a single DataContext.SubmitChanges method invocation (see Listing 1). Adding new rows with DataGridViews is an uncommon practice, so the code requirement isn’t a serious DLinq drawback.

Attempting to delete rows from tables by deleting a DataGridView row also exhibits mysterious behavior; only the OrdersDataGridView responds as expected when you add the DataContext.SubmitChanges instruction to the UserDeletedRows event handler. Deleting Customers or OrderDetails rows from the database requires a query to return a specific instance and passing the instance as the argument of the DataContext.Entity.Remove(Object) method, as in this example:

Private Sub OrderDGV_UserDeletedRow(ByVal _? ? ? sender As Object, ByVal e As ? ? ? System.Windows.Forms. _? ? ? DataGridViewRowEventArgs) Handles _? ? ? OrderDetailsDataGridView.UserDeletedRow
? ? ? ‘Return the OrderDetails instance to delete? ? ? Dim objDelDetail = (Select d _? ? ? ? ? From d In dbNwind.OrderDetails _? ? ? ? ? Where d.OrderID = delOrderID AndAlso ? ? ? ? ? ? ? d.ProductID = delProductID).First()? ? ? ? ? dbNwind.OrderDetails.Remove(objDelDetail)? ? ? ? ? dbNwind.SubmitChanges()? ? ? End SubCode in the UserDeletingRow event handler sets the values of the delOrderID and delProductID constraints to specify the OrderDetails instance to delete. Applying the SubmitChanges method deletes the row from the database table.

DLinq Tracks Changes in Memory
Edits to DataGridView cell values behave as expected, because DLinq tracks the changes in memory. Applying the DataContext.SubmitChanges method updates the database tables. The DataContext’s SQL DELETE and UPDATE queries handle concurrency conflicts with syntax similar to that generated by the ADO.NET’s CommandBuilder or strongly typed Data Sets. DataContext updates initiate a transaction; in the event of a conflict, DLinq rolls back the changes and throws an exception. The DLinq tracker records all changes, so you can add code to rectify the conflict and repeat the DataContext.SubmitChanges( ) instruction.

The preceding event-handling code includes a typical DLinq query to return an instance that represents a single row of an entity. Consider this statement:

Select d From d In DataContext.Table ? ? ? Where ExpressionIt returns a Query(Of Table) object, which requires an iterator?such as a For Each [Dim] Object In Collection… Next construct?to execute the Query object and extract its value(s). Applying the First( ) method to the Select code executes the Query and eliminates the need for an iterator. Similarly, invoking the Count( ), Sum( ), Avg( ), Min( ) or Max( ) methods returns aggregate values. The VB 9.0 compiler infers data types and verifies the syntax, which minimizes the probability of runtime exceptions. The VB Team’s goal is to provide full IntelliSense statement completion when writing the code for LINQ Query objects, without resorting to C#’s approach: moving the From clause before the Select list. The technical preview implements IntelliSense for Select lists in the For Each ? Next iterator only.

The XLinq library’s literal syntax simplifies generating XML documents from DLinq or other business objects, as mentioned earlier. The sample project’s VbLinqDemo form’s LiteralXmlFromDlinq procedure generates a complex, hierarchical XDocument object from the dbNwind DataContext’s Orders, Customers, OrderDetails, Products, Suppliers, and Shippers entities. XLinq XDocuments are a lighter-weight, faster version of the .NET Framework’s full-bodied XmlDocument class; XDocuments are much less of a memory hog than XmlDocuments.

The CreateXmlFromJoins procedure illustrates using joins to combine data from DataContext entities and related XML documents containing related lookup elements into an almost-identical XML document (see Figure 5). The XLinq code joins the Northwind Orders entity with XDocument objects that contain Customers, Employees, Shippers, LineItems, Products, and Suppliers elements. (See Listing 2). Adding the six joins to the XDocument creation process increases the execution time by 20 percent or less. Although this example might appear contrived, merging XML content from Web services with client-side DLinq entities, or business object instances, is much easier for most VB or C# programmers than writing, testing, and debugging the corresponding XML transform.

My tests with much larger DLinq entities and XLinq documents indicate that LINQ’s developers have made significant progress since the first technical preview at PDC 2005. VB 9.0 promises to meet or exceed the LINQ-related capabilities of C# 3.0 in the “Orcas” release. As Microsoft’s Samuel Drucker noted in his DAT 312 presentation, “‘WinFS’ And ADO.NET: Future Directions for Data Access Scenarios” at PDC 2005, LINQ will be the primary API for querying and manipulating WinFS objects. It’s a reasonably good bet that WinFS will RTM in about the same timeframe as Orcas’s .NET Framework 3.0, C# 3.0, and VB 9.0.

It’s not too early for VB programmers to climb on the LINQ bandwagon and become familiar with the next generation of Windows’ data objects. C# aficionados can look forward to a Spring 2006 LINQ technical preview update, which probably will include minor improvements to VB XLinq literal syntax. Download and experiment with this article’s VbLinqDemo sample and the SampleQueries projects. ? end article

You can contact Roger about “Test Drive VB9 and DLinq” at editor@vsmagazine.com.

via: http://mcpmag.com/features/article.asp?EditorialsID=1313

end.gif


ASP.NET and LINQ

Filed under: Code Groups — admin @ 1:10 pm

The Language Integrated Query (LINQ) facilities make querying a first-class concept in the .NET Framework 3.5. Because ASP.NET is just a development platform built on top of the .NET Framework, there’s no reason why you can’t query data in a Web context using LINQ.

It’s hard to imagine a piece of software that never needs to query for data. When this happens, chances are that the data to query comes from a relational database. Like it or not, the old faithful Structured Query Language (SQL) invented in the early 70s at IBM is still our main source of inspiration when it comes to setting up a query against some data. Whenever we developers think of a query we automatically put it down as a SELECT FROM some sort of storage medium. In spite of the high demand for queries, programming languages never added query operators to their baggage; that is, until the newest Visual Basic .NET and C# compilers in the .NET Framework 3.5 shipped with the Language Integrated Query (LINQ) facilities. (The .NET Framework 3.5 is currently in Beta 2, but it’s scheduled for release later this year).

Available in Visual Studio 2008, the new VB.NET and C# compilers make querying a first-class concept and supply ad hoc operators. It is interesting to point out that none of the core data classes in the .NET Framework (namely, system.data) has been touched to support the new query model. New classes and tools have been introduced in the .NET Framework, but they are insulated in new assemblies. Operators in the languages automatically bind to these low-level classes and make rich data queries a reality in the .NET Framework 3.5.

LINQ defines a set of query operators that allow code to filter, enumerate, and select data from a variety of data sources using the same syntax?to a large extent reminiscent of SQL. LINQ-enabled data sources currently include arrays, collections, ADO.NET DataSets, XML, and result sets obtained from relational databases. The model is extensible to the point that third-party vendors can create and sell their own LINQ engine to query inside of their own data model using the standard syntax and set of operators.

The general-purpose query engine of LINQ is specialized in a library specific of a given data source. So you have LINQ-to-SQL to query relational data, LINQ-to-XML to query XML documents, and so forth. All these engines belong to the .NET Framework and are backed up by language compilers. Because ASP.NET is just a development platform built on top of the .NET Framework, there’s no reason why you can’t query data in a Web context using any of the LINQ engines. The following code, therefore, is perfectly legal and works successfully as long as you run it from within an ASP.NET 3.5 project.

protected void Button1_Click(object sender, EventArgs e){ // Getting data var data = from c in context.Customers where c.Country == “USA” select c;

// Simple and direct binding GridView1.DataSource = data; GridView1.DataBind();}

As you can see, the code is bound to the Click event of a Web button. It selects all the customers from the United States that can be located in the configured context (in the end, a connection string to a relational SQL Server database). Where are the new LINQ operators and syntax elements? The var element defines a piece of data whose type will be inferred at run time. Operators like from, where, and select?just like the similar SQL operators?define the returned result set of the query and its source.

Using LINQ syntax from within ASP.NET 3.5 page is definitely possible. Can we ask for more? In ASP.NET applications, you can use any flavors of LINQ in a variety of ways, mostly depending on your vision of the overall application’s architecture. For example, you can use any LINQ syntax to query data directly in the UI layer of the pages. More likely, instead, you might want to use any LINQ in the Data Access Layer of a multi-tier system.

<asp:LinqDataSource ID=”LinqDataSource1″ runat=”server” ContextTypeName=”NorthwindDataContext” TableName=”Customers” Select=”new (CustomerID, CompanyName, Country)” Where=”Country == @Country”> <whereparameters> <asp:parameter Name=”Country” Type=”String” DefaultValue=”USA” /> </whereparameters></asp:LinqDataSource>

Finally, if you love pages with a close-to-zero amount of code, you can use the new LinqDataSource control to specify LINQ commands and bind results to ASP.NET controls according to the popular data source model.


http://www.ddj.com/windows/201807901


SJJ Embedded Micro Solutions Releases the Embedded Development Kit for the Microsoft .NET Micro Framework

Filed under: Code Groups — admin @ 1:10 pm

San Diego, Calif., Sept 18, 2007 ? SJJ Embedded Micro Solutions is pleased to announce the release of the Embedded Development Kit (EDK) for the Microsoft .NET Micro Framework. The EDK contains a multipurpose development board with the .NET Micro Framework already installed and ready to run C# applications. The kit contains a step-by-step instruction manual to guide engineers, students, and hobbyists, through the process of developing .NET Micro Framework applications with managed code.

?The EDK continues our history of learn-by-doing products to facilitate learning of new technologies,? said Sean Liming, Owner of SJJ Embedded Micro Solutions. ?With the EDK, developers can create a variety of applications from robotics to industrial controls.?

The Microsoft .NET Micro Framework is a .NET platform that runs on devices with low-cost 32-bit processors and as little as a few hundred kilobytes of RAM. Through its support for modern rapid application development tools and paradigms?including C#, managed code, and Microsoft Visual Studio?the reliable, efficient .NET Micro Framework significantly increases the productivity of embedded developers and creates an exciting new opportunity for C# programmers.

The EDK consists of the following:

? EMAC’s iPac-9302 ARM9 development board with .NET Micro Framework on board
? Serial Cables for application download
? CD containing Step-By Step development Guide and sample applications
? Power supply

The EDK is being offered at a special introductory price of $135.00 USD. Individual iPac-9302 boards are available to be purchased in production quantities. The EDK can be purchased online at www.sjjmicro.com or contact via e-mail sales@sjjmicro.com.

About SJJ Embedded Micro Solutions, LLC (www.sjjmicro.com)

SJJ Embedded Micro Solutions was founded in 2004 to provide a better approach to learning and implementing embedded systems with the ?Learn-by-Doing? philosophy. SJJ offers training, consulting, and various books and software products for Windows® Embedded.

The names of actual companies and products mentioned herein may be the trademarks of their respective owners.


How to Write High-Performance C# Code

Filed under: Code Groups — admin @ 1:10 pm

How to Write High-Performance C# Code
 

Writing code that runs quickly is sometimes at odds with writing code quickly. C.A.R. Hoare, computer science luminary and discoverer of the QuickSort algorithm, famously proclaimed, “Premature optimization is the root of all evil.” The extreme programming design principle of “You Aren’t Gonna Need It” (YAGNI) argues against implementing any features, including performance optimizations, until they’re needed.

Writing unnecessary code is undoubtedly bad for work efficiency. However, it’s important to realize that different situations have different needs. Code for vehicular real-time control systems has inherent up-front responsibilities for stability and performance that aren’t present in, say, a small one-off departmental application. Therefore, it’s more important in such code to optimize early and often.

Performance tuning for real-world applications often involves activities geared towards finding bottlenecks: in code, in the network transport layer, and at transaction boundaries. However, these techniques alone cannot solve the dreaded problem of uniformly slow code, which surfaces when large bottlenecks have been resolved but the code still exhibits inadequate performance. This is code that has been written without attention to correct usage, often by junior programmers, in the same style across whole modules or applications. Unfortunately, the best solution for this problem is to make sure that all programmers on a project follow correct coding practice when writing the code the first time; coding guidelines and good shared libraries help enormously.

This article presents helpful tips for writing in-process .NET managed code that performs well. It’s assumed that basic programming skills such as factoring control structures, pulling work outside of loops whenever possible, caching variables for reuse, use of the switch statement, and the like are known to the average reader.

All code examples referred to in this article can be downloaded from the .NET Developer’s Journal Web site, at www.sys-con.com/dotnet/sourcec.cfm. The code comes with a Windows Forms application that can be used to easily view the code and run all the tests on your own machine. You’ll need the .NET Runtime 1.1 to run the code.

Tools
While testing tools such as NUnit and the upcoming VS.NET 2005 Team System can help you find bottlenecks, when tuning small sections of code, there’s still no substitute for the micro-benchmark. This is because most generic testing frameworks depend on things like delegates, attributes, and/or interface method calls to do testing, and the code usually is not written with benchmarking primarily in mind. This can be very significant if you’re interested in measuring the execution time of a batch of code down to the microsecond or even nanosecond level.

A micro-benchmark consists of a tight loop isolating the code that’s being tested for performance, with a time reading before and after. When the test has finished, the start time is subtracted from the end time, and this duration is divided by the number of iterations to get the per-iteration time cost. The following code shows a simple micro-benchmark construct:

int loopCount = 1000000000;long startTime, endTime;double nanoseconds;startTime = DateTime.Now.Ticks * 100;for(int x = 0; x < loopCount; x++) { // put the code to be tested here}endTime = DateTime.Now.Ticks * 100;nanoseconds = ((double)(endTime - startTime)) / ((double)loopCount);Console.WriteLine(nanoseconds.ToString(”F”) + ” ns per operation”);

When performing a simple micro-benchmark, it’s important to remember a couple of things. First, small fluctuations (noise) are normal, so to obtain the most accurate results, each test should be run several times. In particular, the first set of tests executed after program initialization may be skewed due to the lazy acquisition of resources by the .NET runtime. Also, if your results are very inconsistent, you may not have penetrated the “noise floor” of the measurement. The best solution for this is to increase the number of loops and/or tests. Another thing to remember is that looping itself introduces overhead, and for the most accurate readings, you should subtract this from the result. On a P4-M 2-GHz laptop, the per-loop overhead for a for loop with an int counter in release mode is around 1 nanosecond.

I’d never advocate running each code fragment from a long program through micro-benchmarks, but benchmarking is a good way to become familiar with the relative costs of different types of expressions. True knowledge of the performance of your code is built on actual observations. As time goes on, you’ll find yourself needing such tests less and less, and you’ll keep track in the back of your head of the relative performance of the statements you’re writing.

Another important tool is ildasm.exe, the IL disassembler. With it, you can inspect the IL of your release builds to see if your assumptions are correct about what’s going on under the covers. IL is not hard to read for a person familiar with the .NET framework; if you’re interested in learning more, I suggest starting with Serge Lidin’s book on the subject.

A great free tool for decompiling IL to C# or VB source, Reflector, is found at www.aisto.com/roeder/dotnet/; it’s incredibly useful for viewing code that ships with the .NET Framework, for those of you less familiar with IL.

The CLR Profiler, available as a free download from Microsoft’s Web site, allows you to track memory allocation and garbage collection activity, among other useful features. Also, the MSDN Web site has excellent coverage of performance metrics tools such as WMI and performance counters.

Working with Objects and Value Types
Objects: A Double Whammy
Objects are expensive to use, partly because of the overhead involved in allocating memory from the heap (which is actually well-optimized in .NET) and partly because every created object must eventually be destroyed. The destruction of an object may take longer than its creation and initialization, especially if the class contains a custom finalization routine. Also, the garbage collector runs in an indeterministic way; there’s no guarantee that an object’s memory will be immediately reclaimed when it goes out of scope, and until it’s collected, this wasted memory can adversely affect performance.

The Garbage Collector in a Nutshell
It’s necessary to understand garbage collection to appreciate the full impact of using objects. The single most important fact to know about the garbage collector is that it divides objects into three “generations”: 0, 1, and 2. Every object starts out in generation 0; if it survives (if at least one reference is maintained) long enough, it goes to 1; much later, it transitions to 2. The cost of collecting an object increases with each generation. For this reason, it’s important to avoid creating unnecessary objects, and to destroy each reference as quickly as possible. The objects that are left will often be long-lived and won’t be destroyed until application shutdown.

Lazy Instantiation/Initialization
The Singleton design pattern is often used to provide a single global instance of a class. Sometimes it’s the case that a particular singleton won’t be needed during an application run. It’s generally good practice to delay the creation of any object until it’s needed, unless there’s a specific need to the contrary - for instance, to pre-cache slow-initializing objects such as database connections. The “double-checked locking” pattern is useful in these situations, as a way to avoid synchronization and still ensure that a needed action is only performed once. Lazy initialization is a technique that can enhance the performance of an entire application through object reduction.

Avoiding Use of Class Destructors
Class destructors (implemented as the Finalize() method in VB.NET) cause extra overhead for the garbage collector, because it must track which objects have been finalized before their memory can be reclaimed. I’ve never had a need for finalizers in a purely managed application.

Casting and Boxing/Unboxing Overhead
Casting is the dynamic conversion of a type at runtime to another, and boxing is the creation of a reference wrapper for a value type (unboxing being the conversion back to the wrapped value type). The overhead of both is most heavily felt in collections classes, as they all - with the exception of certain specialized ones like StringDictionary - store each value as an Object. For instance, when you store an Int32 in an ArrayList, it is first boxed (wrapped in an object) when it is inserted; each time the value is read, it is unboxed before it is returned to the calling code.

This will be fixed in the next version of .NET with the introduction of generics, but for now you can avoid it by creating strongly typed collections and by typing variables and parameters as strongly as possible. If you’re unsure about whether or not boxing/unboxing is taking place, you can check the IL of your code for appearances of the box and unbox keywords.

Trusting the Garbage Collector
Programmers new to .NET sometimes worry about memory allocation to the point that they explicitly invoke System.GC.Collect(). Garbage collection is a fairly expensive process, and it usually works best when left to its own devices. The .NET garbage collection scheme can intentionally delay reclamation of objects until memory is available, and in particular longer-lived objects (those that make it to generation 1 or 2) may not be reclaimed for an extended period. Even a simple “Hello, world!” console application may allocate 15 MB or more of memory for its “working set.” My advice: don’t call GC.Collect() unless you really know what you’re doing.

Properties, Methods, and Delegates
Avoiding Overuse of Property Getters and Setters
Most people don’t realize that property getters and setters are similar to methods when it comes to overhead; it’s mainly syntax that differentiates them. A non-virtual property getter or setter that contains no instructions other than the field access will be inlined by the compiler, but in many other cases, this isn’t possible. You should carefully consider your use of properties; from inside a class, access fields directly (if possible), and never blindly call properties repeatedly without storing the value in a variable. All that said, this doesn’t mean that you should use public fields! Example 1 demonstrates the performance of properties and field access in several common situations.

About Delegates
Delegates are slower to execute than interface methods. Delegates are often used to introduce a level of indirection in code, but in almost all cases interfaces allow a cleaner design. Of course, it’s impossible to completely shun delegates; the entire event-handling paradigm in .NET is based on them. Example 2 compares the performance of delegates and direct method calls.

Minimizing Method Calls
The .NET compiler is capable of performing many optimizations for release builds. One of them is called “method inlining.” If method A calls method B and certain other conditions are met, such as the code in method B being small enough, the code from B will be copied into A during compilation. However, .NET won’t or can’t inline certain types of methods, such as virtual methods or methods over a certain size. Each method invocation/property access entails significant overhead, such as the allocation of a stack frame, etc. Of course, you should never repeatedly call a method for the same result on purpose, but you should also be mindful of the impact of method calls in general.

Using the ‘Sealed’ Keyword
Wherever extensibility is not required, you should use the sealed keyword. This makes your design easier to understand, as someone can tell at a glance if a certain class or method isn’t meant to be extended or overridden. It also increases the chances that the compiler will inline code.

Working with Collections
Avoid Overuse of Collections
This might sound strange, but I’m not advocating working without data structures. The fact is, I’ve seen collections used many times when they don’t actually simplify the code or provide any benefit at all. The single biggest avoidable use of collections is the use of an ArrayList when a simple array would suffice. It should be obvious that there’s no way that calling a collection method - which may do significant work under the covers - can compare to something as simple as an array access for performance. See Example 3 for more information.

for vs foreach
The rumor abounds that the foreach loop is bad for performance. The truth is actually a little more complicated. Basically, foreach involves no performance penalty when used against arrays. However, when used against lists it involves the same overhead as creating an enumerator and using it within a try/catch block! Ildasm.exe may come in handy here to see what’s going on. This isn’t a complete killer, but if you do enough list access you may want to avoid it. Example 4 compares the two statements for access against an array and an ArrayList.

Enumerators: Don’t Go Overboard
Just because the possibility exists for the enumerating of a collection doesn’t mean you have to do it. For instance, the ArrayList class is useful as an array replacement; one of its best features is indexed element access. By using an enumerator with ArrayList, you hide its most useful features and introduce needless overhead. Example 5 shows the performance difference between indexed access and the use of an enumerator.

Avoid Overuse of Collection Wrappers
A peek at the code in classes such as ArrayList shows that, to implement synchronized, fixed-size, and read-only versions of these, methods such as Synchronized() actually create a new wrapper list around the original one (this scheme was copied from Java). While this is nice from certain design standpoints, it degrades performance; the method-call overhead for each operation is multiplied. For a fixed-size, synchronized ArrayList, this overhead is tripled! Chances are, if you’re working with a collection and need synchronization, the code using the collection is already synchronized. In any case, simply locking on the collection itself around every access turns out to be faster than using a synchronized wrapper. Example 6 compares the use of a synchronized ArrayList with synchronizing access to an ArrayList.

Working With Strings
Don’t Use String.Format() to Concatenate Strings
While string-formatting routines built into .NET are very useful for globalization and other tasks, they’re not meant to be used for appending strings to each other. Example 7 tests the performance difference between String.Format() and string concatenation.

Use StringBuilder to Build Strings Inside Loops
The StringBuilder class is basically an array list for string fragments; the StringBuilder takes care of expanding its internal char array, hiding this from the user. The use of this class is also specially optimized by the .NET compiler, making it impossible to duplicate this functionality with equivalent performance (for instance, by manipulating char arrays directly and converting to a string afterwards). Example 8 shows the performance benefit of building a large string using StringBuilder instead of string concatenation.

Don’t Use StringBuilder to Concatenate Small Numbers of Strings
Many .NET developers who consider themselves well-versed in performance matters advocate the use of the StringBuilder class whenever possible. However, it’s not the fastest approach for concatenating small numbers of strings. Actually, any number can be combined in a single statement, although the performance benefit tends to dwindle above five or six substrings. This is due to instantiation and destruction overhead for the StringBuilder instance, as well as method-call overhead involved in calling Append() once for every added substring and ToString() once the string is built. What are the alternatives? Plus-sign concatenation and the String.Concat() method are equivalent; I prefer plus signs for readability. Note that this cannot be used across loops because the entire concatenation must occur within a single statement. Example 9 tests String.Concat() vs. StringBuilder for various numbers of substrings.

Don’t Be Afraid to Use String Literals
Many developers incorrectly assume that a new object is created for every string literal, and, therefore, avoid their use. In some cases, using string literals directly in your code is a better approach than using string constants! It can make the code easier to understand and has no adverse impact on performance. This is due to the use of the .NET interned string table; this table maintains a String instance for every known string and reuses this instance whenever the same character sequence is used as a literal. See the documentation of the String.Intern() method for more details. Example 10 compares string literals to the use of string constants.

Threading
In itself, this is a huge topic. Most easy-to-apply, synchronization-related optimizations focus on minimizing the amount of code executing inside synchronized blocks, which may involve moving some code from inside to outside such blocks. In some cases, thoughtful programming may allow elimination of synchronization entirely from a class (see “Immutable Objects”).

Performing a multithreaded micro-benchmark is more complicated than running a simple loop. In the simplest method, multiple threads are spawned, each looping over the benchmarked code; the reading is not started until all threads are successfully executing the code, and is terminated before the threads are shut down.

Thread Reuse
Newbie programmers make the common mistake of spawning a new thread for every request or other action. This can result in worse performance than using a single-threaded approach; the relative performance degradation is worse the quicker the individual requests can be serviced.

Writing Your Own Threading Code
Even better than the .NET thread pool, with its dependence on delegates, is to write your own threading code. Instead of using QueueUserWorkItem(), you typically write your own queueing code to coordinate work items. This also allows other benefits such as priority-based queueing.

Immutable Objects
Immutable objects are objects in which the data cannot be changed. In most cases, this is achieved by setting all fields in constructor methods and providing only property getters and/or methods that retrieve data from the object, without any mutator logic whatsoever. Many classes in the .NET Common Type System are immutable: System.String, System. Drawing.Font, etc. In addition, care should be taken that any values returned from property accessors, etc. are immutable as well. Otherwise, this data may be copied to insure the integrity of the object itself. Example 11 shows the performance benefit of immutable objects over synchronization.

Data Copying
This flies in the face of the advice given earlier, to minimize the use of objects. However, it’s really the other side of the coin from immutable objects. Object copying allows you to use the data in a non-immutable object, but in a way that still completely avoids synchronization. The more highly multithreaded the environment, the more strategies like this make sense.

Read-Write Locks
Synchronization issues in managed code mirror those in databases. In some situations, optimistic concurrency strategies can be used; in some dirty reads are acceptable, etc. For situations in which a structure is seldom updated and often read, the ReaderWriterLock class can give significant performance benefits over simple synchronization. It allows either multiple read access or single write access at once. Example 12 compares ReaderWriterLock to simple synchronization in a read-heavy scenario.

Minimizing Synchronized Blocks
The use of the [MethodImpl Attribute(MethodImplOptions.Synchronized)]attribute should be avoided, as it always locks an entire method and is also non-standard C# usage. Instead, the lock keyword or one of the System.Threading classes should be used. Wherever possible, adjust the start of a synchronized section forward and the end backward. Do whatever you can to decrease the number of synchronized operations.

Suggested Reading

  • Lidin, Serge. (2002). Inside Microsoft .NET IL Assembler: Microsoft Press.
  • Archer, Tom, and Whitechapel, Andrew. (2002). Inside C#, Second Edition. Microsoft Press.
  • Rico Mariani’s Weblog: http://blogs.msdn.com/ricom
  • Garbage Collector Basics and Performance Hints: dotnetgcbasics.asp
  • Improving .NET Application Performance and Scalability: scalenet.asp
  • An Introduction to C# Generics: csharp_generics.asp
  • WikiWikiWeb: http://c2.com/cgi/wiki?UniformlySlowCode

  • September 17, 2007

    Visual Basic and C#: Differences in Nullable Types

    Filed under: Code Groups — admin @ 2:52 pm

    When .NET 1.0 was released, VB and C# were very similar. But with the fourth version nearing release, the differences are really mounting. Today we look at the subtle differences in nullable types that can trip up developers.

    Nullable types were introduced with .Net 2.0. Using generics, any value type can be wrapped in Nullable, allow it to have a null value. Previously this could only be done by creating a custom class or boxing the value and assigning it to a variable of type object.

    C# immediately added language support for nullable types. VB, still dealing with the fallout from the VB to VB.Net transition, was unable to do likewise. Nullables can still be used, but only at the API level.

    With version 9, Visual Basic will add full support for nullable types. It will use a syntax nearly identical to C#, but with very different semantics. With C#, comparison operations always returns a true or false. In VB, nulls are propagated and thus a comparison may return true, false, or null.

     a=null, b=null Operator C# Result  VB Result   == true   Nothing  !=  false  Nothing  >  false  Nothing  <  false  Nothing  >=  false  Nothing  <=  false  Nothing

     a=1, b=null Operator C# Result  VB Result   == false  Nothing  !=  true  Nothing  >  false  Nothing  <  false  Nothing  >=  false  Nothing  <=  false  Nothing

    These tables show an interesting anomaly in C#. While a==b returns true when both are null, a>=b and a<=b return false.

    When it comes to checks requiring Booleans, C# is clear. VB, on the other hand has to somehow map its three-state logic to a Boolean value. It does this by equating null with false for the purpose of Boolean checks like If, While, and Until. This can lead to surprising results of its own.

    a = null, b = null
    If a=b Then
    ’skipped
    Else
    ‘this line is executed
    End if

    If Not (a=b) Then
    ’skipped
    Else
    ‘this line is executed
    End if

    Both (a=b) and Not (a=b) return a null, and thus are considered to be false.

    Knowing these differences and inconsistencies by heart is essential for developers working with nullable types in either language, lest subtle bugs be introduced.


    September 15, 2007

    European Developers Embrace C#, AJAX

    Filed under: Code Groups — admin @ 3:57 pm

    Evans Data spends all of its time trying to figure out what developers are thinking. They ask what technologies developers like and dislike, what they are using and what they plan to use, and what other issues affect the application development cycle. The latest Evans Data poll of programmers in Europe shows that usage of C#, Microsoft’s analog to Java for its .NET environment, and Asynchronous JavaScript and XML (AJAX), are on the rise.

    In its latest survey of developers in EMEA, Evans Data found that the usage of C# has increased among the shops it polls for its studies by 40 percent in the past year. Last year this time, 25.1 percent of programmers polled in EMEA survey said that they were using C# part of the time as they cranked out code for their employers; a year later, that figure has risen to 34.9 percent of those polled. But C# has a long way to go before it can be said to dominate European data centers and software development organizations.

    “Microsoft was smart to have ECMA ratify C# early on, as that has helped the language find acceptance in Europe and consolidate its market share,” says John Andrews, chief executive officer at Evans Data. “In addition, .NET has made significant inroads in the region and, of course, C# is the language that best reflects the CLI which is at the heart of .NET.”

    While 13.2 percent of developers polled said they use C# more than half the time, up 40 percent from the 9.4 percent level seen a year ago, clearly the vast majority programmers are using other tools more than half the time. And given the tendency for programmers to be cantankerous and to resist change, it is probably a safe bet that no particular programming language can be said to dominate the software development process.

    Among European developers, just above half of the developers polled said that they are using .NET to deploy Web services, up slightly since last year. Some 40 percent of those polled said that they have extended or are working on extending applications on legacy host systems to new applications, and 65 percent of developers said that they are using or plan to use AJAX for some of their development.

     


    European Developers Embrace C#, AJAX

    Filed under: Code Groups — admin @ 3:52 pm

    Evans Data spends all of its time trying to figure out what developers are thinking. They ask what technologies developers like and dislike, what they are using and what they plan to use, and what other issues affect the application development cycle. The latest Evans Data poll of programmers in Europe shows that usage of C#, Microsoft’s analog to Java for its .NET environment, and Asynchronous JavaScript and XML (AJAX), are on the rise.

    In its latest survey of developers in EMEA, Evans Data found that the usage of C# has increased among the shops it polls for its studies by 40 percent in the past year. Last year this time, 25.1 percent of programmers polled in EMEA survey said that they were using C# part of the time as they cranked out code for their employers; a year later, that figure has risen to 34.9 percent of those polled. But C# has a long way to go before it can be said to dominate European data centers and software development organizations.

    “Microsoft was smart to have ECMA ratify C# early on, as that has helped the language find acceptance in Europe and consolidate its market share,” says John Andrews, chief executive officer at Evans Data. “In addition, .NET has made significant inroads in the region and, of course, C# is the language that best reflects the CLI which is at the heart of .NET.”

    While 13.2 percent of developers polled said they use C# more than half the time, up 40 percent from the 9.4 percent level seen a year ago, clearly the vast majority programmers are using other tools more than half the time. And given the tendency for programmers to be cantankerous and to resist change, it is probably a safe bet that no particular programming language can be said to dominate the software development process.

    Among European developers, just above half of the developers polled said that they are using .NET to deploy Web services, up slightly since last year. Some 40 percent of those polled said that they have extended or are working on extending applications on legacy host systems to new applications, and 65 percent of developers said that they are using or plan to use AJAX for some of their development.

     


    European Developers Embrace C#, AJAX

    Filed under: Code Groups — admin @ 3:47 pm

    Evans Data spends all of its time trying to figure out what developers are thinking. They ask what technologies developers like and dislike, what they are using and what they plan to use, and what other issues affect the application development cycle. The latest Evans Data poll of programmers in Europe shows that usage of C#, Microsoft’s analog to Java for its .NET environment, and Asynchronous JavaScript and XML (AJAX), are on the rise.

    In its latest survey of developers in EMEA, Evans Data found that the usage of C# has increased among the shops it polls for its studies by 40 percent in the past year. Last year this time, 25.1 percent of programmers polled in EMEA survey said that they were using C# part of the time as they cranked out code for their employers; a year later, that figure has risen to 34.9 percent of those polled. But C# has a long way to go before it can be said to dominate European data centers and software development organizations.

    “Microsoft was smart to have ECMA ratify C# early on, as that has helped the language find acceptance in Europe and consolidate its market share,” says John Andrews, chief executive officer at Evans Data. “In addition, .NET has made significant inroads in the region and, of course, C# is the language that best reflects the CLI which is at the heart of .NET.”

    While 13.2 percent of developers polled said they use C# more than half the time, up 40 percent from the 9.4 percent level seen a year ago, clearly the vast majority programmers are using other tools more than half the time. And given the tendency for programmers to be cantankerous and to resist change, it is probably a safe bet that no particular programming language can be said to dominate the software development process.

    Among European developers, just above half of the developers polled said that they are using .NET to deploy Web services, up slightly since last year. Some 40 percent of those polled said that they have extended or are working on extending applications on legacy host systems to new applications, and 65 percent of developers said that they are using or plan to use AJAX for some of their development.

     


    European Developers Embrace C#, AJAX

    Filed under: Code Groups — admin @ 3:09 pm

    Evans Data spends all of its time trying to figure out what developers are thinking. They ask what technologies developers like and dislike, what they are using and what they plan to use, and what other issues affect the application development cycle. The latest Evans Data poll of programmers in Europe shows that usage of C#, Microsoft’s analog to Java for its .NET environment, and Asynchronous JavaScript and XML (AJAX), are on the rise.

    In its latest survey of developers in EMEA, Evans Data found that the usage of C# has increased among the shops it polls for its studies by 40 percent in the past year. Last year this time, 25.1 percent of programmers polled in EMEA survey said that they were using C# part of the time as they cranked out code for their employers; a year later, that figure has risen to 34.9 percent of those polled. But C# has a long way to go before it can be said to dominate European data centers and software development organizations.

    “Microsoft was smart to have ECMA ratify C# early on, as that has helped the language find acceptance in Europe and consolidate its market share,” says John Andrews, chief executive officer at Evans Data. “In addition, .NET has made significant inroads in the region and, of course, C# is the language that best reflects the CLI which is at the heart of .NET.”

    While 13.2 percent of developers polled said they use C# more than half the time, up 40 percent from the 9.4 percent level seen a year ago, clearly the vast majority programmers are using other tools more than half the time. And given the tendency for programmers to be cantankerous and to resist change, it is probably a safe bet that no particular programming language can be said to dominate the software development process.

    Among European developers, just above half of the developers polled said that they are using .NET to deploy Web services, up slightly since last year. Some 40 percent of those polled said that they have extended or are working on extending applications on legacy host systems to new applications, and 65 percent of developers said that they are using or plan to use AJAX for some of their development.

     


    Next Page »

    Powered by WordPress

    Close
    E-mail It
    tramadol mechanism wellbutrin pravachol zovirax cialis viagra australia supply buy cheap tramadol o avandia and glucophage tetracyclines mechanism of action generic drugs for lexapro levitra vs cialis vs viagra sildenafil citrate us overnight delivery celexa vs prozac us licensed pharmacies carisoprodol by chicos phentermine 37.5 without precrition different mg of atenolol liquid tadalafil ingestion doses of lexapro alcohol falce positive for fioricet synthroid medication long term use cervical radiculopathy prednisone diclofenac interactions with xanax prozac dailey strength wellbutrin 200 sr maximum prescribed daily does of ultram clomiphene vs tamoxifen as pct dangers of prednisone in dogs canines meridia industrial members corporation email contacts buspar or xanax inventor of lorazepam wyeth soma inc when is xanax prescribed carisoprodol vs methocarbamol workign around sexual side effectson lexapro singulair and acid reflux lexapro positive side effects saturday tramadol delivery medicine cause tendinitis phentermine xanax withdrawls matt lauer as the amazons viagra t pallidum treponema doxycycline tetracycline kentucky weight lose adipex phentermine xanax anxiety 0.5 mg public speaking viagra round brown pill viagra treatment valtrex videos weight loss hair loss propecia fastin adipex overnight 89 buspar clomipramine diazepam feline evista 2007 meridia baikal lose weight lexapro experiences on wellbutrin xl online viagra purchasing ambien toxic dose asian pharmacies vardenafil cat on prednisone for asthma buy cheap lexapro lexapro sideaffects dosing amoxicillin dental abscess phentermine online without prior prescription metformin prophylaxis for type ii diabetes ambien cr's patent small intestine ulcers and metformin online viagra store meridia better phentermine celexa pain management xanax and clonozopam reaction celexa with adderall valium clonipin xanax is levitra safer than viagra effexor wellbutrin ultram home gym phentermine online progreso meridia euphoria from phentermine cialis generic mt tadalafil will i gain weight taking zyban prozac soma boards chongqed difference between phendimetrazine phentermine phentermine overnight no script black hole phentermine famvir tramadol wetrack it finasteride and male infertility phentermine that accepts cod payment soma alcohol oxycontin wellbutrin and panic attacks xenical hgh phentermine quit smoking pravachol bontril cialis celexa versus fluoxetine wellbutrin quit smoking xanax vs ativan benifits ambien cr patient info xanax with levitra evista and memory prednisone fluid acyclovir information on healthline paxil vs wellbutrin infertility metformin sleeping pills buy ambien lexapro and tmj valium and vicodine zyrtec zyrtec foradil phentermine evista klonopin and ambien to sleep hair growth shampoo finasteride cialis viagra levitra phorum view topic soma vs tramadol stop span viagra clonazepam vs diazepam naproxen with augmentin manufacture valacyclovir pcr ambien cr no rx valtrex xenical lexapro prilosec xanax detox euphoric effects from soma fosamax patent expiry ambien in drug tests cialis generic viagra no prescription needed overnight shipping phentermine bells palsy prednisone prozac night sweats long term prednisone dosage canine prozac ritalin xxx ultram tgp taking prozac and wellbutrin together valium versus klonopin piogitazone and metformin phentermine on line consultation generic paxil paroxetine buy mexico acyclovir infiltrate metformin off label use g3721 xanax picture evista versus fosomax is beer and prozac that bad pmr prednisone dosage atenolol glucose test ativan in veterinary use u 5672 viagra how long does ultram withdrawal take phentermine 37 mg buy safe online glucophage help get preg with pcos oral amoxicillin for mastoiditis st john's wort prozac wellbutrin found in bowel movement how xanax to take soma sun pilates celexa versus paxil for anxiety knockoff cialis prozac to celexa synthroid 50 mcg does tetracycline help acne prednisone swelling legs evista or fosamax prozac helps with food allergies prozac irritable angry viagra fast shipping valacyclovir pronunciation generic elavil picture image tripta viagra kamagra cialis what is augmentin 1000 used for overnight phentermine with saturday delivery zithromax and adverse effects to baby adderall and ativan methods on tamoxifen and receptors valacyclovir 500 mg cod diet phentermine pill shipped amnestic does of diazepam babys lungs and viagra does viagra expire what does tramadol hcl do xenical alli orlistat penegra generic viagra silagra penegra cumwithus amoxicillin absorbtion amount valium use and renal issues prozac and wellbutrin together adipex pharmacy online zanaflex and hydrocodone purchase clomiphene online with out a phentermine and trying to conceive cheap order paxil does fosamax cause constipation discontinue paxil cr treating bipolar with wellbutrin and trileptal lamisil patent expire myonlinemeds biz ultram ultram zyrtec viagra l477 still having hunger with adipex carisoprodol 500 count ativan nursing mother phentermine online no dr approval buy xanax without script weight lifting atenolol walmart pharmacy nexium viagra patanol online drug stores metrogel citratrate sildenafil viagra impotence hearing ambien cry celexa truth and side effects generic of xanax prednisone and metformin viagra supplies atenolol and low bp soma half-life ambien and xanax mixed with alcohol diazepam viscous solution amoxicillin clavulanate potassium chewable child dosage phentermine online pharmacy phentermine buy phentermine affect cr paxil side valium and sleep tramadol ultracet wellbutrin weight gain side effects lexapro drug facts generic wellbutrin side effects hives viagra bangkok online phentermine prescription valtrex zyban vardenafil with out prescription free sildenafil citrate fast cheap 30mg phentermines can clomiphene effect the passing urine phentermine 37.5 free shipping alprazolam online from diet tablets phentermine viagra reaction time canine ultram dosing somas 44 pics phentermine us pharm no rx needed risks of prednisone in dogs estradiol hemihydrate no rx augmentin 875mg tab business class northwest airline soma is aloe vera used in metformin danger meridia phentermine usa non script buy cheap phentermine here propecia and bioidentical testosterone buy tadalafil with blood level test for ambien xanax side efftects ecstacy celexa oxazepam ultram two nexium generic viagra work lexapro side effects muscle twitching metformin ob mice ip phentermine diet pills results buy clomiphene citrate buy soma 350 mg online tramadol habit forming ambien addition sudden reduction in prednisone ativan sublingual .5mg negative effects of xanax and valium can you mix xanax and codeine where can i purchase soma order tadalafil sale online meridia chat room prescription free phentermine how much does xenical cost tadalafil levitra generic viagra soma picture frame minoxidil finasteride after hair transplant seritonin syndrome prozac paxil diabetis byetta glucophage avandia viagra joke of the day buy prednisone with out a prescription generic viagra review lexapro drug interaction warnings bartonella zithromax metformin 750mg er ambien and xanax together glucophage weight ambien zr prednisone how supplied three day diet adipex diet pill nexium drugs viagra or cialis prices is xanax safe adipex phentermine online dr approval valium while pregnant prozac par irritability ambien viral disease zovirax order temp soma slippers hiv viagra lexapro package insert meatholes soma atenolol and impotence effects side sexual flight northwest airline soma 175 danger levitra 252 buy steriods phentermine lexapro cause high blood pressure nicorette wellbutrin nicotrol nicoderm zyban fluoxetine dose 40mg ativan drug rehab programs wellbutrin xl and depakote prednisone loose bloody stool carisoprodol carisoprodol 350mg crazy meds wellbutrin drug interactions ativan scopolamine prozac benadryl and prednisone where to buy phentermine cheap prozac candace pert evista ibuprofen caution protein bound pdr atenolol xanax without a prescription overnight delivery atenolol 25mg high blood pressure yeast lamisil key levitra metformin manfacturers lexapro prozac vs damge from nexium how to heal taking yourself off of paxil vicodin viagra cialis sildenafil citrate overseas amoxicillin gluten adipex interactions fischer soma boots how can i find tadalafil adipex diet plan celecoxib depigmentation wild thing prozac zenerx natural viagra statistics on prozac nexium and protonix studies phentermine without a presecription ultracet no prescription zoloft vs celexa diffrence in medication discount valacyclovir alcohol with alprazolam diet online phentermine pill purchase elavil picture false positive drug tests ambien lexapro storage polar disorder levitra vardenafil bargain prices monopril vs atenolol prozac nation read online wellbutrin effects on synthroid vardenafil patent levitra prednisone poison oak diazepam oral generic wellbutrin efficacy ambien prescription carisoprodol paxil cns effects celexa valium consumer information about phentermine valium have side effects amoxicillin allergic reaction symtoms benefits risks of the drug metformin loose stool synthroid prednisone upjohn valium or xanax when was lorazepam found video viagra cheapest phentermine quicktopic document review itchy rash prednisone not helping wellbutrin lexapro side effects alprazolam buy lexapro weight gain experiences diazepam mylan 345 prednisone for sunburn collect on delivery valium ultram test can you take prozac with ibuprofin same as viagra over the counter is klonopin water soluble tramadol without prescription ups shipping wellbutrin and auditory hallucinations metformin corosolic xanax online legal inexpensive tadalafil phentermine 24 hour adipex online no rx brenda antibiotic amoxicillin diazepam enema buy diazepam overseas what do you use carisoprodol for metformin pcos and pregnancy bell's palsy prednisone acyclovir valium 0554 xenical and poop metformin and prediabetes ultram controlled substance levitra without a prescription proscar finasteride xanax street value mrsa tetracycline acyclovir en espanol valerian root celexa stories of couples using drug levitra valium or xanax to treat dystonia buy vardenafil purchase vardenafil vardenafil tadalafil sildenafil citrate cheap celexa and vasodepressor syncope clonazepam message boards problems with lexapro finasteride half-life propecia specifications prozac takes weeks full effect zanaflex to soman effective ativan lamictil acyclovir reynaud's phenomenon valium 2nd day delivery diazepam prescribing inforomation wellbutrin sr bupropion washington phentermine breast feeding premarin provera clomiphene famvir ultram acyclovir taking xanax an lexapro together viagra tarket market paxil side effects in children cialis free consultation buy xanax valium online wellbutrin success forum finder air travel finder soma tetracycline treatment chlamydia ativan overnight delivery no prescription prednisone's effects on hypothyroidism paxil effects of long term use rapid absorption of synthroid lexapro en espano prescription medication soma in fla anyone taking phentermine yellow boots viagra drug interactions lisinopril adn wellbutrin treatment for molluscum contagiosum zovirax soma crystal bottle ambien sleeping mdicine xanax dosage dog viagra testosterone series side effects of lexapro wellbutrin withdrawal issues tadalafil drugstore generic viagra next day shipping femring estradiol order lamisil prescription led flashlights made by soma augmenti