My current application allows users to define custom web forms through a set of admin screens. it's essentially an EAV type application. As such, I can't hard code HTML or ASP.NET markup to render a given page. Instead, the UI requests an instance of a Form object from the service layer, which in turn constructs one using a several RDM...
How should I have the NHibernate Session Factory and the sessions for a WinForms application?
Should the SessionFactory be a singleton? Or can I create it every time? What about sessions and transactions?
Any help would be appreciated. Thanks
...
Is it ever appropriate to put functionality other than basic setters and getters in a DTO?
...
I'm building a software product, in which the customer will be able to configure their system to use any one of 3 or 4 pre-integrated payment gateway vendors. (eg: PayPal, Authorize.net, etc).
The customer will log into the application, navigate to settings, select which vendor they have an account with, enter the relevant account infor...
I am writing an application using Microsoft's Prism framework and I'm having trouble working out the best way to approach a simple 'Save File' style dialog box.
NB: I can't use the standard dialog as I'm not saving files to the file system so need to write something similar from scratch.
So here are the main controls I have for my dialo...
In my ASP.NET app, I have a Person and a PersonViewModel.
My Person was generated by LinqToSql. It has the properties that will be persisted in the database.
My PersonViewModel has everything Person has, plus a couple "select lists", which will be used to populate combo boxes, as well as a FormattedPhoneNumber (which is basically a Pho...
For example, in an IDE application, say for C#, there are 2 views ClassView and TextView.
In ClassView we need to display the Class information in a hierarchical manner, where as in TextView the code for that Class is shown.
The ClassView needs to query for classes, methods, properties, fields, etc. whereas the Text View queries lines ...
The idea is to create a DOM-like tree. But there are some restrictions, that only certain types can actually contain the other.
I want to use an interface|abstract class|superclass to implement some well known js-functions as appendChild, replaceChild etc.
I'm using the classes page, block and item, where pages can contain blocks and b...
Our team is fairly new to DDD, and are trying to implement some of the concepts in our current project. One question that has come up is whether to put methods into entity objects, or service objects.
Some team members feel that entities should only hold values and all functionality should be contained in services. Others feel this ...
My understanding of the Command Pattern is that you simply have 1 virtual method 'execute()', and all dependencies that an implementation might have are put in the constructor or through setter injection in the implementation (like discussed here).
However, in the WPF implementation of the pattern, I noticed they are passing a generic a...
Hi,
I originally posted about how I should use the state pattern correctly in an ecommerce application. I didn't get any replies so I have now completed my implementation and thought I would post it to get feedback.
This is how I am managing inventory. It would seem that the only real reason for having an enumeration to also represent ...
Hi All,
I have been working on Web application so far and has just got an opportunity to work ong Microsoft Compact Framework. i am pretty new about the framework. In ASP.net application I have been following some of the predefined Design patters and sometimes frameworks like CSLA.net or Factory/Abstract Factory.
Now while looking at t...
Is it possible to remove a decorator from an object?
Say I have the following code:
abstract class Item
{
decimal cost();
}
class Coffee : Item
{
decimal cost()
{ // some stuff }
}
abstract class CoffeeDecorator : Item
{
Item decoratedItem;
}
class Mocha : CoffeeDecorator
{
Item decoratedItem;
public Mocha(...
Joshua Bloch's Effective Java describes a Builder Pattern that can be used to build objects with several optionally customizable parameters. The naming convention he suggests for the Builder functions, which "simulates named optional parameters as found in Ada and Python," doesn't seem to fall in line with Java's standard naming convent...
I am doing my first project in ASP.NET MVC and using the NerdDinner sample project in ScottGu's book as a guide. In his project, all his strongly typed views neatly correspond to the objects he defined (e.g. Dinner). That is not really reality of a business application.
For instance, in my app, a page (e.g. View) gets most of its info...
I was just curious about the subject. I have never used aspect oriented programming (intentionally), and I have only a small amount of knowledge about it.
Here's my question (using logging as the typical use-case):
If i have an existing interface based paradigm for example consider the pseudo-code
class MyClass implements Loggable {
...
I am programming a game as an exercise and I've run into a design problem. My role playing game will have the typical classes like Fighter, Wizard, Theif, Cleric. How do I design my classes so that players can multi-class? For example, one player might start off as a Fighter (and gain the related skills fighters have), then multi-class t...
Hello everyone,
im trying to implement the Data Gateway / Domain Pattern. I understand the basics and its a fantastic pattern to separate domain logic from the persistent data layer. Now i have following requirement:
Lets say i have 2 domain-models: User(s) and Company(ies). When i wanna retrieve a user list with all users, i would do ...
I have seen programmers code way too fast in the classic procedural way. They can code authentication systems in a few hours. Nice, neat, and most notably...delivered "lightning" fast.
But, a major flaw is that whenever a change occurs, we had to go through the core code to fix things.
So I thought of using design patterns; but that wo...
As we have so many design patterns in java, like wise do we have any in c++.Or can we use the same sort of patterns in c++.
...