Trioxera
03-06-2008, 09:04 PM
Where do you store the custom preferences for your applications?
I mean constants for urls, paths, colors and other values that are hard coded and used in many places.
In my first works with Flex (I am still learning OOP) I made a class called Preferences, to retrieve the desired values usint getters, but everytime I need it I must import the .as, instantiate the class and get the values.
Yesterday I "discovered" <mx:Script source/>, so I can make an .as file with all the constants and call it easily.
I would like to know from more experienced developers if this can be considered a bad practice in OOP, and why…
Regards:
Jeremy
I mean constants for urls, paths, colors and other values that are hard coded and used in many places.
In my first works with Flex (I am still learning OOP) I made a class called Preferences, to retrieve the desired values usint getters, but everytime I need it I must import the .as, instantiate the class and get the values.
Yesterday I "discovered" <mx:Script source/>, so I can make an .as file with all the constants and call it easily.
I would like to know from more experienced developers if this can be considered a bad practice in OOP, and why…
Regards:
Jeremy