Hi,
I have an old VB6 application. I want to recreate it in VB.Net using WPF. But I am a bit confused about the "Model View Controller"-pattern. I have two books about design patterns (GoF and J.Bishop) afair this pattern is indeed not mentioned inside one of the two books. I have also searched the internet I found some java-examples. Bu...
Hi,
I have a conceptual Python design dilemma.
Say I have a City class, which represents a city in the database. The City object can be initialized in two ways:
An integer (actually, an ID of an existing city in a database)
A list of properties (name, country, population, ...), which will generate a new city in the database, and re...
This may seem a bit odd, but I really need to create a workaround for the very complicated duplex - communication - handling in C#, especially to force other developers to observe the DRY - principle.
So what I'm doing is to have a type based multiton that looks like this:
internal sealed class SessionManager<T> where T : DuplexService...
Hello,
I am in the process of renovating our CMS and I've run into a situation that I don't know which solution to adopt. Basically each one of our clients houses their website's content in their own database. This includes content, surveys, search words used by visitors, menu strucutre, etc.
A lot of the content on our clients' websit...
So, I've come back to ask, once more, a patterns-related question. This may be too generic to answer, but my problem is this (I am programming and applying concepts that I learn as I go along):
I have several structures within structures (note, I'm using the word structure in the general sense, not in the strict C struct sense (whoa, w...
This might be a silly question, but here goes:
Is there a standard or best practice, which specifies in what order the foreign key columns in a table should?
I for one like the idea of the PK being the very first column in the table, followed by all the foreign keys, and then the columns thats relevant to that table..
Other way of do...
Forms have Fields. Fields have a Widget. If a Field name is omitted, it takes the variable name specified in the form. For example,
MyForm(Form):
username = Field(name=None, widget=MyWidget(args))
The field name would become "username". However, this can't be established until the form is constructed. Would it be so awful to set t...
I have the following code running, but I sometimes get some sort of concurrency exception when running it.
ArrayList<Mob> carriers = new ArrayList<Mob>();
ArrayList<Mob> mobs = new ArrayList<Mob>();
...
for (Mob carrier : carriers){
for (Mob mob : mobs){
checkInfections (carrier, mob);
}
}
I refactored it to solve the...
Forms have Fields, Fields have a value. However, they only get a value after the form has been submitted.
How should I store this value? Should I give every field a value attribute, field.value,
leave it as None prior to posting, and fill it in afterwords?
Omit it completely, and dynamically add it?
Store it on the form instead, li...
Hi,
I have a class A that has a series of handlers e.g. public void handleEv1(),public void handleEv2() etc.
When an event occurs, another thread in class B, calls the correspondent handler from class A (class B has a reference to class A kind of observer-observable).
In the handling of the event in the corresponding method of class A, ...
We have a web application and its front end is implemented with GWT/GXT. Users can belong to various groups and these groups can then have various permissions. The permissions are quite fine grained, for example comment_create, comment_edit, comment_delete and comment_read.
What would be the best way to enable and disable user interface...
Hi All,
I have classes Project,*Resource* and File.
where
A Project contains LIST of Resources.
Each Resource contains LIST of of Files of particular type.
This is mapped to an XML :
<Project>
<Resource id=1>
<File id="1" path="" type="A" />
<File id="2" path="" type="B" />
<File id="3" path="" type="B" />
<File id="4" path="" t...
In HomeCADEngine facade class I have a method "addRoom(room:Room)" and it will add this room to a ArrayList. But is it break facade pattern when we create a room outside facade class and then pass it into addRom() method??
...
hi all,
Well, MS introduced the IObservable interface as part of the .net FW 4 and i thought "great finally, i must use it !".
So i dug deep and read posts and documentation and even implemented the pattern.
After doing so i've realized that the basic implementation actually sends all the Observable events to all of its subscribers wi...
I am looking for a way to create an in-place editor in JavaScript like JEditable or similar plugins. However, the difference is that my editor would be a multi-field form rather than single field.
Since the same form will be used in different parts, i.e. editing existing items and creating new items, I would like to be able to specify t...
I have a C# class which needs to process a sequence of items (IEnumerable<T>) across a bunch of methods, so I cannot simply foreach inside a method. I call .GetEnumerator() and pass this IEnumerator<T> around and it works great giving me the flexibility I need while looping through a single sequence.
Now I want to allow others to add lo...
I am currently working on a PHP project which includes extensive database usage. The basics are: I have a PDOFactory class which follows the Factory pattern and an abstract SQL class with static methods (just a container for those methods) which in turn talks to PDOFactory
As I said, the project involves extensive database usage, so the...
Hi, Id like use some design patterns for messenger. Messenger functions are :
*Login user on server
*Load friends into contact list
*Receive / Send messages
*Logout user
I am beginner in design patterns, so I need some advice. Which of patterns is adequate for this situation?
I think about Proxy pattern.
...
Specification
C# Distributed Application.
Client/Server design.
Client (Winforms), Server (Windows Service), Communication via .Net Remoting.
The below question relates to the Server-Side of the application.
(EDIT) The Server-side of the application runs on a server with 8 Cores and 12Gb Ram
(EDIT) The CPU of this server is always hitt...
Hi,
I am working on application where user invokes a method from UI , on this I am calling a method from business class which calls another methods
UI--> Method1 -->Method2 --> Method3
I want to display the error message to user if any exception occurs in any of the method.
Shall I go with throwing the exception directly to the calle...