paul_houle

Stories kicked by paul_houle

First Class Functions And Logical Negation in C#(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 2 months ago

This article works around the hazards of functional programming C# to develop a first-order function: a function that returns the logical negation of a boolean function, illustrating the power of C# as a functional language once you master certain details of the type system. read more...

add a comment |category: |Views: 21

tags: another

Testing an IEnumerable<T> for Distinctness(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 3 months ago

A simple extension method to tell if the members of an IEnumerable<> are distinct. Can you write a better one? read more...

add a comment |category: |Views: 13

tags: another

WebForms or MVC? What about the third option?(blog.madskristensen.dk)

submitted by drugarcedrugarce(610) 3 years, 3 months ago

I’ve read a lot of posts and articles about why and when you should choose WebForms or the MVC framework to build your ASP.NET websites. They are all pretty good, but for some reason they forget or ignore the obvious third option - standard ASP.NET without the WebForm. read more...

6 comments |category: |Views: 745

tags: another

Inheriting From Silverlight UserControls defined in XAML(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 3 months ago

UserControls defined with XAML cannot be inherited from directly. This article presents a technique that pushes the XAML-defined control outside the inheritance hierarchy of a containing control, making it possible to derive subclasses. read more...

add a comment |category: |Views: 24

tags: another

Control HTML Form Elements From Silverlight(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 4 months ago

This article contains a simple example of a Silverlight 2 application that controls a hidden HTML form embedded in the host document. read more...

add a comment |category: |Views: 26

tags: another

Don’t use Delete Links because they create Security Holes(stephenwalther.com)

submitted by MarwanMarwan(850) 3 years, 4 months ago

Reasons why you shouldn't use a Delete link in your web application read more...

3 comments |category: |Views: 640

tags: another

Whitehouse.gov: an ASP.NET site(dotnetperls.com)

submitted by samdnpsamdnp(980) 3 years, 4 months ago

This article looks into the JavaScript libraries, HTTP headers, platform and more of the new Whitehouse website. It includes statistics and some suggestions. read more...

5 comments |category: |Views: 676

tags: another

Stop Catching Exceptions!(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 9 months ago

Too many programmers catch exceptions too often, causing both mainline and error handling logic to be complex and error-prone. Although C#, PHP and other languages don't make the mistake that Java made with Checked Exceptions, Java trained a generation of programmers in bad habits. A strategy that (i) uses finally as the first resort for containing corrupting and maintaining invariants, (ii) uses catch locally when the exceptions thrown in an area are completely understood, and (iii) surrounds independent units of work with try-catch blocks is an effective basis for using exceptions that can be built upon to develop an exception handling policy for a particular application. read more...

add a comment |category: |Views: 31

tags: another

The Mysterious Multiton Manages Asynchronous State Updates(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 10 months ago

The Muliton Pattern is an initialization pattern in the sense defined in the notorious “Design Patterns” Book. Mulitons are like Singletons in that they use static methods to control access to a private constructor, but instead of maintaining a single copy of an object in an address space, a Multiton maintains a mapping from key values to objects. A number of uses are emerging for mulitons: (i) Multitons are useful when we want to use something like the Singleton pattern, but support multiple named instances of a system in an an address space and (ii) Multitons can be a useful representation of an object in a persistent store, such as a relational database. read more...

add a comment |category: |Views: 9

tags: another

Building Reliable Silverlight Apps With Model-View Separation(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 10 months ago

When people start developing RIA’s in environments such as Silverlight they often write asynchronous communication callbacks in an unstructured manner, putting them wherever is convenient — often in a instance members of user interface components. Several problems almost invariably occur as applications become more complex that force the development of an architecture that decouples communication event handlers from the user interface: a straightforward answer is to create a model layer that’s responsible for notifying interested user interface components about data updates. read more...

add a comment |category: |Views: 31

tags: another

Missing Keys in Dictionaries: Semantics of C#, Java, PHP and Python(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 10 months ago

Today's popular languages implement Dictionaries: a structure that can efficiently look up values associated with a set of keys. On close examination, we find that different implementations provide programmers different options for missing keys: something that can make a big difference for the reliability and maintainability of applications. This article contrasts the implementation of Dictionaries in C#, PHP, Python and Java and provides implementations of Python-style semantics as a PHP function and C# extension method read more...

1 comment |category: |Views: 8

tags: another

The Weird And Wonderful World Of Extension Methods in C#(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 10 months ago

Extension methods are the most controversial feature that Microsoft has introduced in C# 3.0. Introduced to support the LINQ query framework, extension methods make it possible to define new methods for existing classes. Although extension methods can greatly simplify code that uses them, many are concerned that they could transform C# into something that programmers find unrecognizable, or that C#’s namespace mechanisms are inadequate for managing large systems that use extension methods. Adoption of the LINQ framework, however, means that extension methods are here to stay, and that .net programmers need to understand how to use them effectively, and, in particular, how extension methods are different from regular methods. read more...

add a comment |category: |Views: 266

tags: another

Dropping Unique Constraints in SQL Server(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 10 months ago

This article presents a simple stored procedure which makes it possible to delete a stored procedure in SQL Server without knowing it's name, an important tool when automating the maintainance of database schemas in Microsoft SQL Server read more...

add a comment |category: |Views: 9

tags: another

How To Access The User Interface Thread In Silverlight 2(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 11 months ago

Silverlight 2 Beta 2 introduces a major change in the concurrency model for asynchronous communication requests. Unlike SL2B1, where asynchronous requests executed on the user interface thread, SL2B2 launches asynchronous callbacks on multiple threads. Although this model offers better performance and responsiveness, it requires Silverlight programmers to explicitly transfer execution to the UI thread before accessing UI objects: most SL2B1 applications will need to be reworked. This article introduces a simple static class, UIThread, which makes it easy to schedule execution in the UI Thread. read more...

add a comment |category: |Views: 19

tags: another

Which kind of cast should you use in C#?(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 11 months ago

C# offers two casting operators: the prefix-cast and the as-cast. Although the two operators compile to different op-codes in the CLR, the practical difference between them is in how they handle failed casts. Prefix-cast throws an exception on cast failure, while as-cast returns null. It’s easier to implement correct error handling when you use prefix cast, because it doesn’t require manual checks for null values that can cause problems in distant parts of your program. Prefix-cast should be the default cast operator on your fingertips, that you use for everyday situations — reserve as-cast for special cases where performance matters. read more...

3 comments |category: |Views: 493

tags: another

Dropping Primary Keys In SQL Server(gen5.info)

submitted by paul_houlepaul_houle(435) 3 years, 11 months ago

This article introduces a simple stored procedure that makes it easy to drop the primary key index on a table without knowing the name of the key. read more...

add a comment |category: |Views: 8

tags: another