.NET

Facebook Twitter

Ioc

Embedding JavaScript Strings from an ASP.NET Page : CSharpFeeds. Source Code Search Engine. Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library) LINQ (language integrated query) is one of the new features provided with VS 2008 and .NET 3.5.

Dynamic LINQ (Part 1: Using the LINQ Dynamic Query Library)

LINQ makes the concept of querying data a first class programming concept in .NET, and enables you to efficiently express queries in your programming language of choice. One of the benefits of LINQ is that it enables you to write type-safe queries in VB and C#. This means you get compile-time checking of your LINQ queries, and full intellisense and refactoring support over your code: While writing type-safe queries is great for most scenarios, there are cases where you want the flexibility to dynamically construct queries on the fly. For example: you might want to provide business intelligence UI within your application that allows an end-user business analyst to use drop-downs to build and express their own custom queries/views on top of data. Traditionally these types of dynamic query scenarios are often handled by concatenating strings together to construct dynamic SQL queries. Scott.

Dependency Patterns: Optional Dependencies and Primal Dependenci. Jim Newkirk is blogging about the down side of setup and teardown methods in test classes, and why you shouldn’t use them.

Dependency Patterns: Optional Dependencies and Primal Dependenci

Setup and teardown methods attract entropy faster than an outsource programmer with his first patterns book. Jim’s new framework, xUnit.NET doesn’t have primitives for setup and teardown, although it sounds like there are mechanisms that could be used to accomplish the same kind of thing. Roy feels that xUnit.NET isn’t quite there yet. I think that Roy’s perspective will be reflected by lots of folks who have become used to NUnit (et al) over the past six years. I think that Jim is on the right track, but I’m the kind of guy that feels that a test class’s greatest responsibility is to document behavior in the clearest possible way, even if that means sacrificing design qualities best reserved for functional code – like reuse.

An RSpec context (“Describe” block) doesn’t have a direct equivalent in .NET and NUnit, but the spirit of a test context can still be achieved. Cutting Edge: Canceling Server Tasks with ASP.NET AJAX. Cutting Edge Canceling Server Tasks with ASP.NET AJAX Dino Esposito Code download available at:CuttingEdge2007_08.exe(167 KB) Last month I built a framework to monitor ongoing server-side tasks from the client. Using this framework, which I’ll call Progress Monitor Framework (or PMF), you can provide Web users with information about the progress of operations running on the server, something that typically requires a lot of custom code to do. Some early feedback about last month’s column pointed out two potential enhancements. Formalizing Remote Tasks A remote task is a piece of code that executes on the server in response to a client event.

Once the task on the server has been triggered, the client no longer has control over it. Canceling Tasks the Easy Way ASP.NET AJAX can make canceling remote operations really easy, but there are two restrictions. Figure 2 Progress Template with a Cancel Button (Click the image for a larger view) Inside the abortPostBack Method The Client Code Transactions.