I am developing a couple of small ASP.NET application and would like to know what pattern. approach do you use in your projects.
My projects involve databases, using Data access and Business logic layers.
The data-access approach that I was using so far is the following(I read in some book and liked it):
For DAL layer:
Creating an...
Say you’re designing an application that, by requirement, allows a user the flexibility of creating custom types (for managing his data, whatever it may be). One way of handling this is to define a schema which allows us to use metadata for defining these types. This often means the resulting db schema will have some way of storing key...
Is there way to better identify design pattern in source codes, esp. if you are not familiar with all of the patterns? What's the best way to identify them?
...
Now I have something that I have not seen it before: the database is really generic. For example: instead of a concrete type we have a generic one: device, and it relates to a custom properties table.
Unfortunatelly, the model over its entities represents those tables, so the model does not talk about the business at all.
At the end p...
Basically i just want to do an arbitrary operation using given arguments of arbitrary types.
Argument type base class is Var, and Operation is base class of the operation that will executed for given arguments.
I have Evaluator class, that hold a collection of operators which mapped using opId. Evaluator will do operation based on opId...
I am a web and mobile application developer and I prefer to use MVC frameworks for development. I have just started to a desktop application (in C#). Application development is not a problem. I had written various desktop application before but they were for personal use or for small companies.
Is there a good open source project that I...
Hi guys,
Say I have a GUI Java project of something that simulates an ATM machine, and i have classes such as :
- RegisterWindow
- LoginWindow
- MainAccountOptionsWindow
etc, where all the classes are focused around the panels/windows rather than normal OO design. Someone told me that this is a specific design pattern, maybe somet...
Hi.
I was wondering if anybody knows how I can use JAXB together with the Builder Pattern?
The builder pattern wants you to set the constructor as private, and JAXB says "1 counts of IllegalAnnotationExceptions myClass does not have a no-arg default constructor"
Is there somehow I can tell JAXB that I don't want no-arg default constru...
I find myself doing this sort of thing from time to time, and I wonder if it's a design smell, or if there's a better design pattern I can use.
There's a process with a number of steps that is known at compile time, but is likely to change down the road. I capture the commonality in an abstract Step class, write a StepLister that return...
Hello all,
I am sticking my toe in the RESTful waters and I just can't find a "satisfactory" solution to how to handle truely "action" oriented calls on a RESTful service? My quandry can be broken down into two parts.
1) Transactional calls: I understand the idea of having an ActionTransactor that you get a resource too with a post...
I have been reading a lot on design patterns lately and some of them can make our lives much easier and some of them seem to just complicate things (at least to me they do). I am curious to know what design patterns everyone sees as underunsed or underappreciated. Some patterns are simple and many people do not even realize they are usin...
Apart from performance concerns, should web-based applications be built differently according to the number of (concurrent) users? If so, what are the main differences for (say) 4, 40, 400 and 4000 users?
I'm particularly interested in how logging, error handling, design patterns etc. would be be used according to the number of concurre...
I just read Factory Method. I understand that it provides a way to delegate the instantiation to sub-classes. But I couldn't understand the possible uses in a real-world scenario.
Can anyone give one typical example showing how Factory method pattern can be used so that I can relate to what I have read.
A problem statement for which fa...
As an exercise in good OO methods and design, I want to know what is a good way to model inventory control in a company. The problem description is
a. A company can have different types of items, like documents (both electronic and physical), computers etc which may further have their own sub types.
b. The items can be kept in a...
The default way to implement singleton patter is:
class MyClass {
private static MyClass instance;
public static MyClass getInstance() {
if (instance == null) {
instance = new MyClass();
}
return instance;
}
}
In an old project, I've tried to simplify the things writing:
class MyClass {
private static final ...
I have a class which is going to need to use the strategy design pattern. At run time I am required to switch different algorithms in and out to see the effects on the performance of the application.
The class in question currently takes four parameters in the constructor, each representing an algorithm.
How using Ninject (or a general...
Is tagging is the best user friendly way to categorize a subject? An example would be the tags mechanism used in this Q/A site /* forum */. (StackOverflow.com). How you would Implement categories in a best user friendly way? Or hierarchical categories are the best user friendly way to present available categories?
Is there any online s...
I'm starting to get to grips with CodeIgniter and came across it's support for the Active Record pattern.
I like the fact that it generates the SQL code for you so essentially you can retrieve, update and insert data in to a database without tying your application to a specific database engine.
It makes simple queries very simple but ...
Hi
I am currently reading head first design patterns book. I feel that the best way to learn design patters is to apply them. So, I wanted to know the most frequently used design patterns, so that I can experiment with them and apply them in the example programs I write.
Which are the most important and useful design patterns you use ...
I'm in the position where I may be creating a new web service from scratch - without much pre-existing infrastructure to have to contend with. What resources are there that talk about the architectural aspects of deploying a web service? [Clarification: I'm not talking about an Enterprise SOA orientation here - rather setting up one fam...