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:
Anonymous2009-01-23 2:53
Use monads.
Name:
Anonymous2009-01-23 2:54
ENTERPRISE is ALWAYS right.
Name:
Anonymous2009-01-23 3:24
ENTERPRISE IS THE BEST WAY TO DO EVERYTHING DON'T LISTEN TO THE TEENAGE FAGGOTS ON /g/
Enterprise solutions may not be optimal but they are
1.More widely supported
2.Industry standardized
3.It pays money
4.Its provides best ROI(return on investment) because companies prefer to be efficient with their money.
5.Code is designed to be edited by multiple people concurrently:
There is no Open-Source "i code in my style,and you will need to adapt to it" the process is enforced by supervising party.
>>1 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.
You should meditate on the fact that you have basically introduced a global variable by another name. Was this really what you wanted?
No, because global variables are for teenage faggots. You also don't seem to understand that a global variable wouldn't work. The settings class has no constructor, to do so would be faggotry in this case. It is a static variable, since it belongs to the settings factory class. The factory handles initialization from the state persisted as XML.
>>10
It's still global state, you moronENTERPRISE WEENIE.
Name:
Anonymous2009-01-23 16:04
(b)(spoiler)(i)(u)(sub)(quote)Enterprise-ready cost-effective scalable bussiness solution can only be delivered with BBCODE.(\b)(\spoiler)(\i)(\u)(\sub)(\quote)
Or Microsoft Silverlight.
Honestly, at least 90% of all bigger companies use MS for 90% of their IT. Why is that?
Name:
Anonymous2009-01-23 16:43
because no one wants to dick around with linux/unix. They already have computers running windows, all their apps are made for windows, and all the employees are trained to use m$ software. Oh yeah, they also don't have to dick around with a command line every time something goes slightly beyond pressing the power button.
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.
You are not as clever as you think. I know what you are trying to to, but you are wrong. Something tells me you have never written a proper multi-threaded app.
>>20,26
are you suggesting java is a decent language?
Name:
Anonymous2009-01-24 1:02
>>28
If by decent you mean conforming to the recognized standard of propriety, good taste, modesty, etc., then yes, I am.
Name:
Anonymous2009-01-24 1:53
It's not enterprise enough until you leverage core skillsets and world-class team synergy to provide clients worldwide with robust, scalable, modern turnkey implementations of flexible, personalized, cutting-edge Internet-enabled e-business application product suite e-solution architectures that accelerate response to customer and real-world market demands and reliably adapt to evolving technology needs, seamlessly and efficiently integrating and synchronizing with their existing legacy infrastructure, enhancing the e-readiness capabilities of their e-commerce production environments across the enterprise while giving them a critical competitive advantage and taking them to the next level.