patterns

Implement Exception Handling in ASP.NET C# Project

hi, I have an application that has many tiers. as in, i have... Presentation Layer (PL) - > contains all the html My Codes Layer (CL) -> has all my code Entity Layer (EL) -> has all the container entities Business Logic Layer (BLL) -> has the necessary business logic Data Logic Layer (DLL) -> any logic against data Data Access Layer (DA...

Files mapping architecture

I need to know How I can achieve this goal by classes : we have two different applications in the company (App1 , App2) Appl can export xml with know items ( ID , Name) we need app2 to import this data but App2 display different items (CarID, CarName) and this items defined like this with the mapping info <CarID> <Mapping name="...

What software design pattern is best for the following scenario (C#)

I have a gps device that records data e.g. datetime, latitude, longitude I have an sdk that reads the data from the device. The way the data is read: A command packet (basically a combination of int values in a struct) is sent to the device. The device responds with the data in fixed size chunks e.g. 64bytes Depending on the command i...

Is it possible, with simple F# pattern matching transformations, to ignore unmatched values without a warning?

So, I previously asked this question: http://stackoverflow.com/questions/2820234/can-someone-help-me-compare-using-f-over-c-in-this-specific-example-ip-address I was looking at the posted code and I was wondering if this code could be written without it producing a warning: let [|a;b;c;d|] = s.Split [|'.'|] IP(parseOrParts a, parseOrP...

what pattern to use for multi-argument method?

I have a method with the following signature: foo (Sample sample, Aliquot aliquot) "foo" needs to alter a Sample object, either the first argument or from the second argument it can extract its Sample. For example: foo (Sample sample, Aliquot aliquot) { Sample out = null; if (sample != null) out = sample else ...

Using blackboard pattern (& implementation) instead of a BPMS?

Hi, we are developing a complex core banking system containing 30+ systems. Because of orchestration and system collaboration, we typically use a BPMS (e.g. Jboss jBPM). Since systems are more independent and volume of human tasks is high (vs. software system operations) and also to gain benefit of async architecture I am looking for oth...

.Net web architecture literature

Hi, Can somebody please advise a very advanced book on the architecture of the web application development, preferably in .Net I'm interested in patterns and designs, code security and re-usability I have studied a variety of books, but they all seem to be for beginner/intermediate levels. ...

MVC - Calling Controller Methods

Hello, My application is following the MVC design pattern. The problem I keep running into is needing to call methods inside a Controller class from outside that Controller class (ex. A View class wants to call a Controller method, or a Manager class wants to call a Controller method). Is calling Controller methods in this way allowed ...

Using a regex pattern to find revision numbers from a svn merge

svn diff -rXX:HEAD Will give me a format like this, if there has been a merge between those revisions: Merged /<branch>:rXXX,XXX-XXX or Merged /<branch>:rXXX I'm not very familiar with regex and am trying to put together a pattern which will match all the numbers (merged revision numbers) AFTER matching the "Merged /branch:r" part. ...

How to generate named patterns in Mathematica?

In principle, what I want to use the following to generate a named pattern for later use: In[1]:= Replace[var["x"],var[name_]:>Pattern[Apply[Symbol,name],_]] I expected to see this result. A named pattern which I can use in subsequent rules: Out[1]= x_ But instead, I got: Out[1]= Pattern[Symbol @@ x,_] The documentation says tha...

PHP MVC: How to implement an effective Controller/View Association like ZendFramework guys do!

Hi, I am making my own PHP-MVC framework. i have a question regarding Controller and View Association. I love the way Zend framework uses view within Controller as follow: $this->view->data = 'Data here'; so it can be used in view as follow: echo $this->data; I am wondering how can i implement this association. I want to remove c...

UML - Object Method Returns a Collection

How can I indicate that a method will return a collection of objects in UML? Is there a better way to explain the relationship than to have a collection class as a return type? ...

Entity References with Services and Repositories

Hi, I am trying to get myself accustomed with TDD, DI and Pattern-based Development. I am by far not new to Application Development, but since I plan to start a (big) new Project in a few months I want to be prepared and do it right from the start ;). The current architecture is based on a WCF-based AppServer, a MS SQL Database and WPF/...

Git: ignoring everything except directories

Hi, I have read this manual: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html As I am working with gitosis, I rather use a .gitignore than explicit git commands. Thus says the manual: Of course, not tracking files with git is just a matter of not calling git add on them. But it quickly becomes annoying to hav...

Simple but good pattern for EJB

What would you suggest as a good and practical but simple pattern for a soloution with: HTML + JSP (as a view/presentation) SERVLETS (controller, request, session-handling) EJB (persistence, businesslogic) MySQL DB And is it necessary to use an own layer of DAO for persistence? I use JPA to persist objects to my DB. Should I with...

Java. Correct pattern for implementing listeners.

Very typically I have a situation where a given object will need to have many listeners. For instance, I might have class Elephant { public void addListener( ElephantListener listener ) { ... } } but I'll have many such situations. That is, I'll also have a Tiger object that'll have TigerListeners. Now, TigerListeners and Elephan...

"Circuit breaker" for net.msmq?

Hi, The Circuit Breaker pattern, from the book Release It!, protects a service from requests while it is failing (or recovering). The net.msmq binding used with transactions give us nice retry and poison message capabilities. But I am missing the implementation of such a "Circuit breaker" pattern. A service is put under even heavier loa...

Any one can tell me the disadvantages of the INTERFACES patterns.

Hi everybody I have been reading documents during the last two days about the advantages that you have using INTERFACES PATTERNS (no design patterns), but I can catch the disadvantages especially when the analysis involves the comparison with guidelines. Thank you very much in advance for all your comments. Daniel ...

which design choose? - pros and cons

Which of these 3 approches would choose and why? // This is the one I would choose class Car { } class FeeCalculator { public double calculateFee(Car car) { return 0; } } // in that case the problem might be when we use ORM framework and we try to invoke save with parameter Car class Car { private FeeCalcu...

Is there a standard pattern for updating android views?

I'm currently building an android application with quite a few different connected activities. In each activity I've got a private updateView() method to update all the textViews and stuff on that screen. This gets called in the onResume() method so that each time the activity comes to the front it's views will be updated. Is this the r...