The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
2answers
111 views

Using spring to Avoid Singleton pattern

Considering that Spring framework can manage pretty everything related to object creation (life cycle, object scope ..), is it longer necessary to use singleton pattern in an application using the ...
1
vote
1answer
68 views

Loading data from JSON file for one time

I have JSON file which has some hundereds of rows stored like below.. [ { "Id": "1", "Name": "A" }, { "Id": "1", "Name": "A" } ] I am trying to load this into collection of ...
1
vote
1answer
165 views

When to use trait components, objects, package objects in Scala

When I am adding dependencies in Scala, I tend to use mixin trait components for those that are inherit to the class itself. For example, DaoGenerator extends Generator However, for trait components ...
1
vote
0answers
20 views

.NET server object instance: Singleton vs Per Call vs Per Client in the context of a 2 tier architecture

Note: This is a theoretical question weighing up the pros and cons of server object instancing, the tier architecture is not the topic of the question. My question is simply whether my thoughts are ...
1
vote
0answers
180 views

Using Singletons in JS with workers

I'm building a javascript application that does continuous drawing, but relies on asynchronous scripts in the background which also need to poll for events and write to "global variables". This got me ...
0
votes
0answers
108 views

A modification of singleton pattern

"Singleton" is widely considered anti-pattern ("bad" in everyday language). What about this alternative modified singleton pattern? An object constructor for our class ensures that at any given ...
0
votes
0answers
95 views

Will this singleton style class work with accessing a session on multiple MVC controllers?

Question background: I have an e-commerce site I'm developing that requires multiple controller methods to access a single session variable. The idea: My idea was to create a singleton style class ...