The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
73 views

Using a progress dialog and multi threading

My .NET Windows desktop application creates an HTML report, and has 3 main phases. It may create multiple reports. I show a progress bar so the user knows (estimates) how long it will take (as well ...
0
votes
3answers
440 views

How can I explain this is an anti-pattern? [closed]

I recently started at a new job. The existing system works OK but is poorly designed and hard to maintain, and they are planning to rebuild it in MVC and I fear it will be much worse. (Not because ...
0
votes
0answers
36 views

What should I do with too much interfaces needed for a dialog

Let me start by doing a small summary of the changes we did in our code in the last year. We have a software (VERY big) that is used to visualize multiples underground networks, enter data in the ...
12
votes
4answers
512 views

Is it bad practice to allow user defined fields?

Generally speaking, is it considered bad practice to allow for user created fields in a database for a webapp? For example, I am making a home inventory webapp for my wife, and she is going to want ...
0
votes
3answers
131 views

“Property Container” design-pattern in-depth definition

Could anybody, please, explain what is a Property Container or at least where can I get information about that pattern on the Internet? I've found that it exists as one of the Fundamental patterns in ...
0
votes
0answers
27 views

DSL enabling users to reference forms and records to display?

There are three main "unique" components to my system: Visual form builder (AngularJS backed); generates an id CRUD automatically available for it at /form_type/id "Aggregate page"; with a form ...
0
votes
5answers
193 views

Is it a good practice to wrap collection in Java? [closed]

I came across a snippet like this, and find it's over engineering. Is it a good practice? public class SchoolList extends ArrayList<School> { } public class School extends ...
3
votes
2answers
859 views

When is it worthwhile to replace working mature code with frameworks+patterns

I fear that frameworks in many cases have become a fashion or trend and are being abused. In many ways people are sacrificing speed just because they want to keep up with every single lib that comes ...
6
votes
1answer
100 views

Dangers when implementing features as plugins [closed]

What kind of problems have you encountered when building plugin interfaces for your application? And how did you resolve them? Background I want to refactor an application so that various features ...
0
votes
2answers
105 views

How does one design his various architecture/business models?

I'm currently learning about various application design approaches and there's one thing I can't really get my head around. Let's say I have a physical device in my network, an IP surveillance ...
2
votes
2answers
2k views

Should angularjs directive directly interact with services or is it considered an anti-pattern?

Which one is considered better: having a directive that interacts with services directly or having a directive that exposes certain hooks to which controller may bind behaviour (involving ...
2
votes
3answers
162 views

What is a good use case for native XML databases? [closed]

What would be a good use case to use a native XML database such as Apache Xindice and eXist-db? I have used XML features of SQL Server in the past and they were of great value, but there it is ...
2
votes
2answers
152 views

How to abstract transition between Views?

Our team is developing an application using WPF with MVVM. We want to make ViewModels reusable. With this intention we want to abstract the transition logic between Views (ViewModels, we use ...
5
votes
4answers
302 views

Is it normal to write all logs into a single file?

Our teamlead said that many files much worse than a single, despite of we are working on a big project. He argued that our customers could more easily send logs to us if there will be just a single ...
6
votes
4answers
564 views

Structured code vs Duplicate code. Modifiability [duplicate]

I have noticed that my classmates write unstructured code with a lot of duplication. And their solutions of the same tasks often contains more then three times more lines than my project. But when ...
-1
votes
1answer
256 views

Are verb-like classes a code smell? [closed]

I do a lot of flat-file processing to extract data. The file "formats" are very unique and each file format requires a lot of format-specific code. Sometimes, the parsing code needs to maintain a lot ...
5
votes
3answers
158 views

How to represent (enum) types in a public API

I am working on a simple API that I want to use for my own client, and to open to the public in the future. I have "Item" objects which can have different "types". The type is a C "typedef enum", for ...
1
vote
1answer
163 views

Javascript heavy page/application - best practice for handling errors

Consider an application that contains a number of pages with a relatively large amount of javascript present, or a predominantly JS powered application. The script handles a number things, such as: ...
8
votes
2answers
420 views

Is implementing an interface defined in a subpackage an anti-pattern?

Let's say I have the following: package me.my.pkg; public interface Something { /* ... couple of methods go here ... */ } and: package me.my; import me.my.pkg.Something; public class SomeClass ...
3
votes
3answers
488 views

Why is quantity in software still written as “1 result(s)”?

Lately, I've been noticing that a lot of software, be it a website, a client application, or a video game, often write a representation of quantity as follows: "1 result(s)". Now, I can understand why ...
1
vote
1answer
199 views

Unit-testing databases: test all possible permutations of read and write to table?

I am testing a resource management class that is interacting with a database or a file system, or a combination of both. I was wandering if it is the norm to test all possible permutations of read and ...
0
votes
1answer
117 views

Datastructure for a factory pattern in practice

I'm implementing what's basically an event log system for a larger system. I used Single-table inheritance to build out the table. The problem I'm having is figuring out how to build out the classes ...
3
votes
1answer
170 views

Naming a sending/receiving module. Does the pattern have a name? [closed]

I'm working on a simple piece of functionality (actually a ruby gem, but that is beside the point) which can be used to receive and persist incoming messages send and persist outgoing messages ...
3
votes
1answer
289 views

What is the pattern called when getters take responsibility for the setting?

I've been heavily using a pattern for years now, but I don't know what it's called. It looks like this.... class xzy { public function getFoo() { if ( undefined(this.foo) ) { ...
0
votes
0answers
147 views

Pattern or solution for using classes with different interface the same way

What I would like to achieve is to use classes (now two, later more) with different interface the same way, so I would like avoid using decisions based on the interface on upper levels for instance, I ...
8
votes
3answers
521 views

How to migrate my thinking from C++ to C#

I am an experienced C++ developer, I know the language in great details and have used some of its specific features intensively. Also, I know principles of OOD and design patterns. I am now learning ...
4
votes
3answers
620 views

Exceptions vs ErrorCodes when working with devices

Out team is at the cusp of a new project. One of the components at the boundary of the system is the component which interacts with a printer through an external COM component (referenced as a usual ...
2
votes
1answer
348 views

Modern practices for stored procedure-based applications

I work in a fairly large and old solution that has many entry points for different kinds of clients, with web sites for public access, web sites for internal access, some web sites and web services ...
11
votes
4answers
600 views

When and for what purposes should the const keyword be used in C for variables?

While getting my code reviewed here the issue of using the const keyword came up. I understand that it is used for implementing read-only behaviour on variables. I am confused about what are the ...
5
votes
2answers
641 views

Is sticking to one language on a particular project a good practice?

I'm developing a pipeline for processing text that will go into production. The question I keep asking myself is: should I stick to one language for the project when I'm looking for a tool to do a ...
3
votes
2answers
452 views

What is the middleware pattern?

Here's a Ruby poject that implements the middleware pattern. From the description, I have no idea what the pattern is, what it's useful for, and why other solutions wouldn't work as well. What is ...
0
votes
1answer
149 views

Truth condition testing with BOOL

BOOL myBool; myBool = YES; ... if (myBool) { doFoo(); } I have read that because there are instances where the above does not actually call the doFoo() function, it is best to instead always test ...
0
votes
1answer
115 views

Architecture for writing add-ins for closed-source software

currently I'm designing an add-in for the modelling tool Enterprise Architect. The general architecture is shown in the picture below. Basically every action where the add-in can react to is ...
8
votes
5answers
489 views

Designing a robust architecture for multiple export types?

I'm looking for patterns or architectural guidance for an upcoming feature I'm designing. Basically, it's an export feature with multiple export targets, and I'm looking to find a way to make it ...
0
votes
1answer
63 views

How to record/store edits?

In many programs and web apps (stack exchange included) the program is able to backtrack what edits where made to the piece. My issue is similar: I want to be able to store a "timeline" of edits, ...
3
votes
1answer
266 views

Reading from a file and inserting into a database, a good practice

I am making an Android application which reads several JSON files and inserts the read information into tables in my database. For instance, there are three files: countries.json { ...
5
votes
4answers
3k views

Is it a good practice to create a ClassCollection of another Class?

Lets says I have a Carclass: public class Car { public string Engine { get; set; } public string Seat { get; set; } public string Tires { get; set; } } Lets say we're making a system ...
1
vote
1answer
420 views

Which practice is the best for database connection? (PHP, etc)

Leave a open database connection throughout the execution of the aplication, or for each time a operation will be executed a new connection will be created? Open throughout the execution: Open ...
5
votes
5answers
2k views

Database connection - should they be passed as parameter?

We have a system whereby the database connection is get once using a common method, and being pass throughout the relevant class to be used. There are doubts that passing the database connection as a ...
2
votes
4answers
585 views

Best practice to sync long paths to filesystems where path length is limited?

I wrote a sync tool to synchronize folders/files from Alfresco to Windows. PROBLEM: In Alfresco, /files/can/have/very/very/very/long/filepaths/like/this.txt The Windows API prevents me from creating ...
0
votes
1answer
775 views

How to implement a hybrid role-based access control model?

I am writing an enterprise web-forms-frontend application for in-house use. It has Direct access control (DAC) masquerading as Role-based access control (RBAC). For anonymization purposes, let's ...
6
votes
3answers
183 views

Holding mutable data in a single place

Given a mutable property, it generally makes sense to only hold/store that property in a single place. When the data needs to change you only need to update a single field, and you can completely ...
5
votes
2answers
959 views

When is Efferent / Afferent coupling good or bad

I have a software patterns exam this week and one of the topics we are to study is Efferent and Afferent coupling. I understand a package has a high Ce (efferent coupling) if it depends on a number ...
43
votes
2answers
3k views

Are there any OO-principles that are practically applicable for Javascript?

Javascript is a prototype-based object oriented language but can become class-based in a variety of ways, either by: Writing the functions to be used as classes by yourself Use a nifty class system ...
0
votes
1answer
129 views

Design patterns to avoiding breaking the SRP while performing heavy data logging

A class that performs both computations and data logging seems to have at least two responsibilities. Given a system for which the specifications require heavy data logging, what kind of design ...
2
votes
3answers
189 views

Is there some software to manage a XP Project? [closed]

I was wondering if there's some software to manage a XP project. I'm starting a school project and I want to follow this methodology, but, we don't have a place to work. Each one works at home (in ...
8
votes
7answers
725 views

Is it appropriate for a class to only be a collection of information with no logic?

Say I have a class Person that has instance variables age, weight, and height, and another class Fruit that has instance variables sugarContent and texture. The Person class has no methods save ...
-2
votes
2answers
122 views

Software patterns for frameworks [closed]

I am currently doing some research about software patterns and about architectural patterns for frameworks specifically. Google is not really showing off for this topic, so I am curious which ...
2
votes
2answers
578 views

How Visual Studio could help to avoid duplicating code?

I work within a team of developers. Everyone is making their changes without carrying too much if the same thing is already implemented in the codebase. This leads to classes constantly growing and to ...
10
votes
1answer
1k views

How to choose between using a Domain Event, or letting the application layer orchestrate everything

I'm setting my first steps into domain driven design, bought the blue book and all, and I find myself seeing three ways to implement a certain solution. For the record: I'm not using CQRS or Event ...