patterns

Patterns for Safety Critical Systems

What are good resources describing process, architecture, and design patterns for developing safety-critical systems? ...

What are some advantages to using an interface in C#?

I was forced into a software project at work a few years ago, and was forced to learn C# quickly. My programming background is weak (Classic ASP). I've learned quite a bit over the years, but due to the forced nature of how I learned C#, there are a lot of basic concepts I am unclear on. Specifically, an interface. I understand the b...

hint for audit log approach

Hello! I'm currently developing an ASP.NET Human Resources System. I'm using a layered architecture with Web Client Software Factory, which is based on MVP pattern. ORM is NHibernate. And I need to implement an Audit Log module. I've read a lot about different approaches. Most of them describe how to track date, timastamp and identity of...

Patterns for Server Side Authentication for mobile RIA

I'm writing a simple iphone application that brings a particular website experience onto the rich world of the iphone. The website currently doesn't talk to any clients other than browsers, so it doesn't have an API. I'm trying to design an API for consumption by my iphone app as well as other rich clients. With REST and Xml/Json form...

What can I learn from Grails?

If I know Rails, what new ideas/patterns would I learn if I looked at Grails? I have no intention to move to Grails and no need for a Java stack, but if there are neat ideas I could learn from Grails I'd like to learn them. ...

How to modules in Prism (CAL) communicate with each other?

I've got a WPF application which uses the MVVM pattern throughout, no code-behind, the ViewModels communicate with each other through the MainViewModel which gets injected into each of them. Eventually, this application needs to be incorporated into an application which uses Composite Application Library, Unity, etc. Looking through the...

Finding events in a transaction file where more than 5 serial numbers appear in sequence within 100 transactions.

I've had an unusual client request in regard to fraud detection in an online raffle which I'm trying to build as efficently as possible by pushing as much of the task into SQL as possible. The structure is thus: table: codes raffle_code | ticket_type | sequence A00000001 Red 1 A00000002 Red 2 ... A0000...

Workflow pattern, how to go back step by step up in a flow?

Hi, I am facing a design issue regarding the use of a workflow engine (jbpm in my case). We have some flows, with tasks, fork/joins and decision nodes, But our users want to go up 'go back' up in the flows (use case: I think the previous person in the team did a mistake, I will send my project back to him). The particularities of our...

How does the industry refer to storing mulitple boolean value state in one integer?

Here is an easy question. How does the industry refer to storing mulitple boolean value state in one integer? The SetWindowPos api is an example. SWP_NOSIZE DEFINE 1 SWP_NOMOVE DEFINE 2 SWP_NOZORDER DEFINE 4 SWP_NOREDRAW DEFINE 8 SWP_NOACTIVATE DEFINE 16 If the integer is 11 then 1, 2 and 8 (SWP_NOSI...

Enforcing code execution sequence

Sometimes you just have a list of operations that need to be performed in a set order, like when implementing a sequence diagram. What are the best ways to enforce code execution order, to prevent refactoring introducing subtle bugs through a change of sequence? Let's assume that existing unit tests would not catch any problems caused b...

Where can I find more details of the Enabler pattern popularized by Ken Auer?

In his book Extreme Programming Applied, Ken Auer casually mentions an Enabler pattern. Kent Beck also mentions it (at the very least in an email dated November 08, 2004), but I haven't been able to find any details in the usual places (Google, the wiki at c2.com, etc.) Where can I find out more? ...

New alternative to the Gof design pattern book for uml MDD with C++

Hello everybody, I am using lately a tool i.e. Rhapsody for MDD with C++ and I have difficulties on coding the classes by beginning with the uml diagram. Simultaneously I am trying to integrate some of the Gof book examples in the UML diagram and somehow it confuses me.... Is there any book that 1) is quite new (gof is 1994..) 2) ...

Model-View-Controller Pros and Cons

What's the pros and cons of using a Model-View-Controller model in building your application? ...

how to use shell script search directory pattern remotely

I need to use scp update some directory at another server. It is similar to for i in /usr/some/???/unknown/dir do cp /usr/some/file $i done so how can i do the search while the destination directories are on other server? thank you ...

Using Bridge for this scenario?

Hello, I'd like to ask your opinion whether it's good to use Bridge pattern in scenario or not. The scenario is that we need to develop one generic search UI that can accept the different search parameters and based on those parameters, we need to call the different services. For example: If the parameters is FIN number and Name of Pers...

Pattern Matching with Lua's string module

I'm trying to use string.find in Lua to parse the contents of a user-entered string. There are up to three different parameters I am trying to find (if the user enters them), but sometimes only one. The input string in its longer form looks like: local userInput = "x|y|z" where x, y, and z can be any character or nothing (empty str...

What is the best way to make a single instance application in .net?

Possible Duplicates: What is the correct way to create a single instance application? Prevent multiple instances of a given app in .NET? Do I check whether another process with the same name exists? (What if the user doesn't have permission to do that?) Write a file to disk and delete it before exiting? (what about abnormal t...

Fat Domain Models => Inefficient?

Looking at DDD, we abstract the database into the various models which we operate on and look at it as a repository where our models live. Then we add the Data Layers and the Service/Business layers on top of it. My question is, in doing so, are we creating inefficiencies in data transfer by building fat models? For example, say we ha...

I’m not sure whether lazy load pattern is useful here

Hello, I’m currently reading a book on website programming and author mentions that he will code DLL objects to use lazy load pattern. I think that conceptually I somewhat understand lazy load pattern, but I’m not sure if I understand its usefulness in the way author implemented it BTW - Here I’m not asking for usefulness of lazy loa...

If SqlDatareader fetches one record at a time, and not one field at a time, then lazy load pattern wasn’t…

Hello, Does SqlDataReader fetch one record at a time from DB or one field at a time? Assume the following query returns a single row: select columns_1, column_2, column_3 from some_Table and suppose readerS ( readerS is an instance returned by SqlCommand.ExecuteReader() )only reads *column_3* before closing the connection: ...