Evgeniy Khramtsov wrote:
> Fredrik Thulin wrote:
>> Because it doesn't let the application perform validation, 
>> normalization etc. on the configuration data and it is unknown if 
>> entering something looking sensible (uhh) e.g. :
>>   {ssl, [{protocol_versions, sslv3}]}
>> will have any effect at all, or there was in fact a typo in there 
>> somewhere.
>> Also it is hard for most people to use (most people = all people not 
>> used to programming Erlang).
> I didn't get it :) Why do you need a validation of an app-file? I guess 
> app-files must be created by developers and not end users, no? BTW, 
> app-files are created once and it is much simplier to make an error when 
> writing a hook than adding 1 string to an app-file :)

Generally configuration data isn't best put in the app-file for the very 
reason you state above.

I guess maybe you can put application:get_env data in the app-file 
(never tried), but you can also put it in .config files and pass -config 
to 'erl' (or even have them on the command line to 'erl' as -Application 
Par Val). This is where validation is needed.

Also, normalization on load of configuration can be a huge performance 
improver. Lots of configuration parameters take SIP URLs as arguments - 
these are all parsed once when YXA loads it's configuration. 
sipurl:parse/1 is rather expensive. Not possible with OTP application 

Yxa-devel mailing list

Reply via email to