I've got a .NET Web Service Reference to a 3rd party WSDL.
In that reference are 2 classes. Basically these 2 classes are most likely Interfaces on the 3rd Party API side but in .NET end up as 2 proxy classes.
I have a need to combine both these classes into one class. Why? Because it's stupid that these are split, they're the servi...
VBScript guarantees that the GC will run after every line, so if you create an object and don't keep a reference, its destructor will be called at the end of the line. This allows you to do a number of interesting things, one of which is simulating optional arguments:
with foo(mandatoryArg)
.optArg = 42
end
Another is allowing for...
I'm sorry if this is a basic question. I've been googling, searching StackOverflow, and looking through example code for hours and haven't found anything satisfactory for my skill level.
I'm wanting something like a design pattern for handling network functions on the iPhone SDK. I have heard of people using a singleton class but have h...
Where do you guys put your static pages, like "home", in an MVC framework? Do you have a "home" controller? A "pages" controller? Do you create actions for each static page?
I'm using CFWheels now, and I'm trying to figure out the best place to put them.
Edit: Apparently CFWheels doesn't require you to create actions for all your vie...
Since a week I'm reading Programming in Scala.
The authors introduce elements of the language step by step , but I'm still confused when to use the functional things like actors, closures, currying,....
I'm looking for a catalog of typical use cases or best practices for functional contructs.
I don't mean reimplementing well known pa...
In my application, I'm executing a transaction which can be in three different states at the end of the execution:
Success
Failure
Pending
Depending on the state, the application client will want to perform different actions. In the case of success, they will want to retrieve the transaction result (a Widget). In the case of failur...
I was just reading a thread on SO that was discussing the merits of Singleton vs. Static Classes.
Some people mentioned that pattern X appeared to be more of a 'factory' rather than a Singleton 'pattern'.
What are the differences between a 'factory' and a 'design pattern'?
...
I am getting my knickers in a twist recently about View Models (VM).
Just like this guy I have come to the conclusion that the collections I need to expose on my VM typically contain a different type to the collections exposed on my business objects.
Hence there must be a bi-directional mapping or transformation between these two types...
I'm writing an application using an MVC framework which takes care of a lot of the boilerplate wiring of our system. Specifically - application is written in Flex, using the Parsley MVC framework. However, the question is not language specific.
In my Presentation Model / Code-Behind / View-Controller (whatever you want to call it), I ...
I have been doing Java for a long time and started Scala about 6 months ago. I love the language. One thing that I discovered is that there are multiple ways to do things. I don't know if it is because of the nature of the language or because it's still young and evolving and idioms and best practices haven't emerged.
What surprises me ...
I have 5 different tables in a database. I have written an abstract "Converter.java" class that take out data from the database and convert it into a "tree.xml" file.
Tree.xml
<?xml version="1.0" standalone="no"?>
<tree>
<declarations>
<attributeDec1 name="name" type="String"/>
</declarations>
<branch>
<attribut...
I want suggestion any design pattern in which I want to process unlimited events.
I am not sure how many events I may get when the system is running.
I have some actions defined on those events.
I am looking for solutions which can give me processing actions in near real time.
...
This is a pretty basic C++ design question:
I have a class that contains some data which is read-only, once the object is constructed:
class Foo {
private:
class Impl;
Impl* impl_;
public:
int get(int i); // access internal data elements
};
Now, I'd like to implement several ways to construct a Foo object and fill it with dat...
We have recently adopted the specification patterns for validating domain objects and now want to introduce unit testing of our domain objects to improve code quality.
One problem I have found is how best to unit test the validate functionality shown in the example below. The specification hits the database so I want to be able to mock...
I am in the design process of an application, and I would like to use the command pattern for undo/redo purposes. I did some research into the command pattern but the only thing I don't get is: Should a command have the undo and redo methods, or should I make two separate commands, one for undo and one for redo, and call those from the m...
Letting BizTalk aside - I like it, but only for variety purposes.
Which others ESB solutions would you use in a SOA .Net arquitecture?
thanks in advance : )
...
Is there a pattern that I may use for calling the required initialization and cleanup routines of an underlying (C) library? In my case, I would like to create the wrapper class so that it can be composed into other objects. The problem is that, when I destroy the wrapper class, the cleanup routines of the underlying library are called. ...
I'm working on a new project now, and have given some thought to the IoC setup. I'm aware that you shouldn't be depending on the service location pattern (much, anyway), but that there are just a few places in a well-structured application where it may be necessary. In that case, do you use the CommonServiceLocator project, or not bother...
I have a hierarchical generic data structure. There is a root node and under that there can be many tree nodes, or just a single data node, and tree nodes can have more tree nodes. A basic tree structure.
All data in my system is persisted in this format. I do however want to have a strongly typed interface to some of the different type...
Say you have an abstract base class Task which is a task a user can complete. There are two concrete Tasks: SimpleTask and ChecklistTask. What if you wanted the (ASP.NET) UI to show a different control based on which type of Task it is?
In WPF you could use DataTemplates, but what is a nice way to do it in ASP.NET? We are trying to avoi...