Hi
My first try of MVC. Am trying to implement a simple example. Inspiration from here. Have I got this pattern (yet!)?
View: "Hey, controller, the user just told me he wants the first person"
Controller: "Hmm, having checked his credentials, he is allowed to do that... Hey, model, I want you to get me the first person"
Model: "Firs...
We are starting a new JEE project and am looking for suggestions regarding design patterns to expose the backend interfaces.
It would be preferable if the backend logic can run seamlessly on Tomcat, other JEE5 containers. We are currently veering towards JEE5, EJB3, JPA and the preferred deployment platform is JBoss 5 AS. We would expe...
I'm stuck between a rock and a hard place at the moment trying to decided on a good API layout for a .NET COM wrapper project I am working on. This is mainly a design problem and what would work better.
So I have this COM point object:
public class COMPoint
{
internal COMPoint(MyComObject comobject) {}
public SomeCollection Nod...
I am a beginner in design patterns.
I am trying to use Abstract Factory - pattern while maintaining Open-Closed Principle.
Plz look at the following code:
public interface IAbstractFormFactory
{
void ShowOSName();
}
public class VistaForm : IAbstractFormFactory
{
public void ShowOSName()
{
...
Hello!
I've got this class, let's call it Refund (because that's what it's called). I want to validate some things about this Refund and the Customer it's attached to, and I want to make these validations re-orderable, because the first one that trips will be stored as the reject reason on the Refund, and also some of them are likely to...
I'm trying to understand the Repository Pattern, while developing an ASP.NET MVC application (using .NET 3.5, ASP.NET MVC 1.0 and Entity Framework). I've gotten far enough to get the dependency injection and all working with one Controller and one Entity type, but now I've gotten as far as to implementing support for a relation between d...
Details: C# 2.0, SQL Server 2005
I have recently relinquished the idea that I would be able to get NHibernate working with my project. It would have worked great if I had started with it, but now it just can't adapt to my application. Which is in all honesty probably more an issue with my application that it is NHibernate.
Regardless...
A while back i read somewhere about how to improve upon the MVC pattern to accomodate the highly flexible and layered (web)applications we see today. (and to my frustration, i can't seem to find that article again)
For example, some of the Google applications like GMail or even a browser like Firefox.
It consists of components that ca...
I'm considering the use of C++ for a personal project. I would like to make it platform independent (no Mono please, since some platforms don't yet support it), and that's why I considered C++.
I have one doubt, however. I've grown quite fond of C#'s attributes, and I would like to know if I can use something similar in C++.
Also, is i...
With an abundance of frameworks for Java Enterprise Service Bus(OpenESB, ServiceMix, Apache Synapse, ...), which one should be selected for new projects? What are the pros and cons for each one? How well have they worked for you?
...
Coming from a Relational world things are obviously very different with the Azure Table storage. The first major thing I've run into is how to properly store Many-to-Many relationships.
For example, I may have a system that keeps track of Users and Books that they own. I found one other post here on SO that suggested to have a String Pr...
Any one one know of the best practices to be followed when implementing an application in the cloud?
I would like to build an application, which is cloud independent. So, a DAC should be able to work against S3 / AppEngine / Azure just by changing a configuration. Is there any framework or best pattern to be followed so that code is Clo...
An EJB3 stateless session bean exposing CRUD operations for an entity bean will contain read / write methods which go against a single connection pool. If you would like to have your read & write operations go against different databases for scalability purposes, how do you accomplish this at the code level. Any pointers to appropriate d...
Hi,
I see the following situation quite often in system design and I feel it is an anti-
pattern, what is your take?
I call it the doAnything() method, where on an interface for a component much of the
detail of the contract of the component is hidden by having overly generalised
methods.
The extreme degenerate case of this i...
Just recently I came over an idea called the Application Strangler Pattern. As I understand it it is a solution to the problem with large legacy systems. The idea is to create a new application around the old application. The cost and risk of this will be much less than a complete rewrite of the system. Slowly, over time, the new applica...
As a beginner in programming it always bugs me when I run into a walls.
Currently one of the wall are co-depending objects.
As you can see in my question history I'm currently working on a blackberry application, in which I implemented something I call the MVC Pattern, but it isn't exactly what I think it's meant to be.
You see, a no...
Hi all,
I'm experimenting with implementing a lightweight mvp framework with Delphi 2009.
Views are passive but supports databinding (via an interface property).
I'm facing a dilemna:
I've several very similar views/presenter/model triad, ie :
order form and a customer form = behavior and logic is the same but the datasource for data...
Since I am trying to learn WPF I see more and more the use of the interface IDataErrorInfo to bind the error to the interface. My problem is that I usually put the validation of the data in the setter of the property and not in a method like IDataErrorInfo.this[string columnName]... Here is a blog I have found that have make me confuse.
...
My situation is that I screwed up essentially. I inherited my code base about 1.5 years ago when I took this position and rather than reinventing the wheel, even though I know now that I should have, I kept the DAL in pretty much the same structure as the previous developer.
Essentially there is one file (now at 15k lines of code) that...
EDIT: This question is a duplicate of What is the difference between managed and native resources when disposing? (.NET) and many others. Please answer the others if you have something to add.
According to the Framework Design Guidelines by Krzysztof Cwalina and Brad Abrams, a type that contains instances of disposable types should im...