1
vote
3answers
224 views

Business rules design pattern?

I'm working on an interface for implementing business rules in order to improve SOLID-ity; so I can move a lot of logic out of Web API controllers and into a business library. The Common Problem being ...
0
votes
0answers
23 views

The best implementation for fromJson factory method and json-mappings with inheritance?

I have BaseComponent (with field "type") and it's subclasses TextComponent, ListComponent, etc. Some of them has same fields. I want to create them and init their fields from json. Some of possible ...
1
vote
1answer
48 views

Decoupling the loading of data, sorting and usage

I have the following requirements: Load data from a variety of sources and fill a list with it Use a batch of data to perform some computation Some additional information: The algorithm for ...
-2
votes
0answers
50 views

How does one create a PHP page router controller?

I am making a PHP controller that should route pages on my website. It is my first attempt. Can someone revise this code and tell me if this makes sense or not. (never mind the logs array, I use it as ...
2
votes
2answers
129 views

Tag based programming

I don't know if this is a thing but here's a silly idea. Often there are cases when you have to refactor code such that you need to change code pertaining to some particular area. This may involve ...
-3
votes
0answers
23 views

How to find which module of a windows service is leaking memory [closed]

I have a windows service which host about 7 or at sub services. There are lots of periodical work going on. Threads sleep are called from 5 seconds to 3 minutes for different services. Recently what ...
2
votes
1answer
41 views

Where should view-specific data/logic be defined in a PHP MVC application?

After many hours of research and thinking I have found an understanding, then coming to question it again, I am struggling to find something concrete which I can grasp and apply to my code in a ...
-2
votes
0answers
38 views

Is it possible get JS function? [closed]

I think that when JS developer had create JavaScript, they have create some function like log(), write(), alert(). They had do something like function alert() {} and then standard it (I imagine). So, ...
1
vote
0answers
15 views

Web API to Windows Service communication via ZeroMQ

I have an ASP.NET Web API 2 web service. This is the interface customers will use to submit data. I have a Windows Service running on an internal server. I will be sending the customer's POST data to ...
1
vote
2answers
164 views

where to put which code in MVC model

I recently picked up learning PHP and MySQL and I am trying to build a small usersystem as a coding exercise. While learning to use classes and functions, I also stumbled upon the MVC model and would ...
0
votes
1answer
36 views

How to deal with automatic binding exceptions with Jersey?

It's really nice to have automatic binding with Jersey-Jackson (well, I believe it's actually MOXy the one who manages the bindings), so object serialization and deserialization is done under the hood....
0
votes
0answers
38 views

How to keep user credentials between app updates in Android app built with Xamarin?

I'm building a cross-platform app using Xamarin. When I release a new version of the app to the Play store and users download the new release, they are no longer logged in. How do I solve this issue ...
2
votes
2answers
120 views

Should I return a 204 or a 404 response when a resource is not found?

I am developing a simple RESTful service for tournaments and schedules. When a tournament is created through a POST request containing a JSON body, the tournament is inserted in a BiMap, declared as ...
-3
votes
0answers
23 views

Laravel with ReactJS

Is it possible to send collected data from a Laravel controller file and have ReactJS display it in the front end? This would be a great discovery for me personally moving forward with web ...
-2
votes
2answers
207 views

Is it normal for a graduate to be overwhelmed when looking at other's code? [closed]

I'm a recent graduate, applying for a junior programming position (.NET). I've spoken with a few companies already, some of which I met through a recruiter. I like one of them a lot, but I'm worried I ...
7
votes
3answers
199 views

Why does java.time have methods for creating objects instead of just constructors?

In the new java.time package the core classes are using the factory method of instead of a public constructor. Even though I like the cosmetics of the of method I can't see a good reason to not use a ...
7
votes
4answers
389 views

Is it bad practice to reuse method parameters?

There are times when I will need to modify a value passed into a method from within the method itself. An example would be sanitizing a string such as this method here: void SanitizeName(string Name)...
-1
votes
3answers
134 views

What do you call CRUD with soft delete?

I want to be clear when discussing an implementation that we're using soft-deletes (not immediately removing data from the database). What can I call our approach? The best I have is "CRUD with soft ...
4
votes
2answers
102 views

How to handle thousands of messages to C socket?

I currently have a setup looking like this: __________________ _________ ________ ___________ | Front end server |----| Varnish |----| NodeJS |----| C-service | ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ ...
0
votes
1answer
65 views

GitFlow, should my release branch include minor version number?

I've found it difficult to find a definitive answer to this question. Using Semantic Versioning and GitFlow should my release branch include the minor version number? I'm not referring to tags. My ...
0
votes
1answer
35 views

Should we sanitise and clean data or only display it in the expected format?

So my problem is, I have users entering their data(names, address) in a mixed form- some with first letter in caps and some without, some inserting more than necessary spaces and so forth. Also, ...
14
votes
5answers
4k views

A language based on limiting amount of arguments passed to functions

The idea is inspired by the fact operators such as +, -,%, etc. can be seen as functions with either one or two arguments passed, and no side-effects. Assuming I, or someone else, writes a language ...
0
votes
1answer
159 views

Should I force “composition over inheritance” rule to class members?

As I know, according to "composition over inheritance" rule, we should avoid reuse a method by inheritance, but how about class members? Suppose I have parent and child classes: public class Animal{ ...
-3
votes
0answers
18 views

connecting java application to mysql server 2014 [closed]

Please I want the driver name for connecting java application to mysql server 2014. This is what I am doing. I get the error class not found import java.sql.Connection; import java.sql.DriverManager;...
0
votes
0answers
51 views

Free Applicative Functor Performance

It is well known that the Free Monad has poor performance when compared to using standard mtl. However I think a Free Applicative Functor opens the doors to full static analysis. For a computation ...
59
votes
10answers
6k views

Where is the line between unit testing application logic and distrusting language constructs?

Consider a function like this: function savePeople(dataStore, people) { people.forEach(person => dataStore.savePerson(person)); } It might be used like this: myDataStore = new Store('some ...
0
votes
1answer
59 views

Divide java web app into smaller web app

I'm not sure if I should ask here or stackoverflow. Please let me know. I've a web application that consists of 3 main technologies: JSF, jax-rs and websocket. All three are coupled together with the ...
0
votes
1answer
136 views

How Common/Acceptable is it for a .NET developer to abstain from WebForms as a rule? [closed]

I work at a mostly .NET shop. A coworker has more of a background in open-source MVC (think RoR and Spring MVC). She seems to really enjoy .NET MVC, but she practically refuses to work on Web Forms, ...
0
votes
2answers
45 views

Standard for implementing GUIs for command line utilities

I wrote a command-line utility and I want to develop a GUI for it. I saw that almost every tool on linux comes command-line, and it eventually has a GUI which interacts with the command line utility ...
0
votes
0answers
19 views

Best way to handle multiple environment specific sql scripts in source control

I am maintaining an app that uses a lot of sql server 2008r2 stored procs, views etc. The problem that I have is that certain stored procedures/views have code that is specific to the environment: ...
-3
votes
0answers
25 views

What should I learn to be an authority on JDE E1 and general web application development in my new role? [closed]

This is my first post as I have gotten tired of trying to scour the internet to put together a good answer for my question. I'm 1 year out of college for MIS and have landed a job as an IT Programmer/...
0
votes
1answer
79 views

What is the difference between running two blocks of code on the same thread and running them on two synchronous threads?

Suppose I have two blocks of code, A and B. A is to be executed before B. As I understand, I can do one of two things: 1) Put B in a separate thread that is to be executed after A's thread, or 2) Put ...
6
votes
4answers
217 views

Is it too verbose to always have 'modified' time stamps on all entities within a database?

The question can be summarized as: In a database (regardless of type), would it be considered a good practice to always include updated, created (and possibly deleted) properties, for all entities,...
0
votes
1answer
25 views

Securing Amazon DynamoDB from Over-the-web attacks

I'm in the process of building out an architecture that will heavily leverage DynamoDb. My organization is considering the possibility of storing sensitive data (config info) in DynamoDb, as well as ...
8
votes
5answers
841 views

Techniques for ensuring cross-platform compatibility (C++)?

I was finishing one of my earliest C++ projects which is (according to the framework) supposed to be cross-platform. I developed the project fully in Windows and Visual Studio, thinking that since the ...
1
vote
0answers
33 views

What are the methods to accurately test the accuracy of a parts of speech tagger?

I know that most of the pos tagger algorithms measure their accuracy token wise I.e. whether the token is tagged correctly or not Some pos taggers provide sentence accuracy too. How is sentence ...
2
votes
2answers
95 views

Can a single Factory be used to create similar in purpose, but different in focus objects?

I am concerned about whether or not I am using FactoryMethod correctly. Background: I am refactoring legacy code and I have identified a pattern: there is a God Object that is created in memory,...

15 30 50 per page