Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I just enterprised

Name: Anonymous 2009-01-23 2:46

Fuck, I think I expertly programmed this shit in ASP.Net. I might even use Enterprise Library for this, FUCK!

I have an objects that define settings for various features of the site that are editable by site admins. The settings are persisted by serializing them to an XML file. Fucking .Net, I didn't have to write any XML processing myself.

Because the settings only apply to one related set of features to the site for all users, I used a singleton to represent the settings object. Then to ensure that its thread safe and not GCed I used a factory.

How can I do this right, without Enterprise Quality solutions?

Name: Anonymous 2009-01-23 17:58

>>11

Wow, you are a stupid faggot with a high degree of nigger stupid.

You are confusing scope and lifetime like a wanna be programmer faggot who has no clue about these basic concepts.

Static variables are not the same as global variables. My settings object is private for the factory class for one thing faggot. So it isn't accessible globally. The variable is scoped for the class, it is static so it is scoped for all instances of the class. the factory class returns a pointer to the settings object. Even if the settings object was a public field, it still wouldn't be global.

It may have a lifetime similar to global, but it is not the same as a global.

You just learned some OOP 101. In our next /prog/ for beginning faggots class we will learn the difference between a property and a method.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List