By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,258 Members | 1,247 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,258 IT Pros & Developers. It's quick & easy.

Resource file vs. regular Xml file

P: n/a
TS
i have a need to possibly enable mutli language support. What benefit do i
get by using a resource file instead of a custom xml solution?

thanks!
Nov 14 '07 #1
Share this Question
Share on Google+
12 Replies


P: n/a
TS wrote:
i have a need to possibly enable mutli language support. What benefit do i
get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either need a multi languages or not, you should use Resource Feature in
your ASP.NET.
Nov 14 '07 #2

P: n/a
TS
yes.

do you know of the actual benefits of resource file instead of regular xml
file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
TS wrote:
>i have a need to possibly enable mutli language support. What benefit do
i get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you either
need a multi languages or not, you should use Resource Feature in your
ASP.NET.

Nov 14 '07 #3

P: n/a
Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file. Also,
..net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular xml
file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
>TS wrote:
>>i have a need to possibly enable mutli language support. What benefit
do
>>i get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
>need a multi languages or not, you should use Resource Feature in your
ASP.NET.


Nov 15 '07 #4

P: n/a
do you know of the actual benefits of resource file instead of regular xml
file?
First, what is the benefit of your own XML files?
The standard resources are, well, standard.
Most translation tools will know about them, some translators might know
about them, and so on.
Many people used them successfully, so it is a tried solution, working,
with some known problems and known work-arounds.
Which is probably not the case with a proprietary format.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Nov 15 '07 #5

P: n/a
TS
thank you.

One concern i never asked was caching. currently i am caching my custom xml
files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there was a
spelling mistake, I imaging we could manually update the resource file? In
this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl...
Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular xml
file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
>>TS wrote:
i have a need to possibly enable mutli language support. What benefit
do
>>>i get by using a resource file instead of a custom xml solution?

thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a regular
xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
>>need a multi languages or not, you should use Resource Feature in your
ASP.NET.



Nov 15 '07 #6

P: n/a
Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in assembly),
then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component, maybe
you can havea look at the following article which introducing extending the
.NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
>
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
>files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there was
a
>spelling mistake, I imaging we could manually update the resource file? In
this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl...
>Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>>Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular
xml
>>>file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl...
TS wrote:
i have a need to possibly enable mutli language support. What benefit
do
>>>>i get by using a resource file instead of a custom xml solution?
>
thanks!

I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a
regular
>>>xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
>>>need a multi languages or not, you should use Resource Feature in your
ASP.NET.


Nov 16 '07 #7

P: n/a
TS
steven, are resource files 1 per application or can they be split up to have
many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in assembly),
then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component, maybe
you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
>>
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
>>files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there was
a
>>spelling mistake, I imaging we could manually update the resource file? In
this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax support.
For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use raw
XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
Subject: Re: Resource file vs. regular Xml file
Date: Wed, 14 Nov 2007 12:00:41 -0600

yes.

do you know of the actual benefits of resource file instead of regular
xml
>>>>file?

"Duy Lam" <du**********@gmail.comwrote in message
news:eA**************@TK2MSFTNGP05.phx.gbl.. .
TS wrote:
>i have a need to possibly enable mutli language support. What benefit
do
>i get by using a resource file instead of a custom xml solution?
>>
>thanks!
>
I don't know what your "customer xml solution" is ? You store all
information of controls such as text, color value (#aabbcc) in a
regular
>>>>xml file, doesn't you ?
As far as I know, ASP.NET support resource file very well. So you
either
need a multi languages or not, you should use Resource Feature in your
ASP.NET.




Nov 19 '07 #8

P: n/a
Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different kind
of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated functionality.
You can provide a local resource file for each aspx page or serveral global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl...
>Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>>From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>>>Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
>>>
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
>>>files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there
was
>a
>>>spelling mistake, I imaging we could manually update the resource file?
In
>>>this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl. ..
Hi TS,

I think the main advantage of using .NET resource file(or resx file) is
that you can make full use of the built-in API or coding syntax
support.
>>>For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using custom
xml solution, you'll need to define your own xml file format and use
raw
>>>XML API to manipulate them. How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
>Date: Wed, 14 Nov 2007 12:00:41 -0600
>
>yes.
>
>do you know of the actual benefits of resource file instead of regular
xml
>>>>>file?
>
>"Duy Lam" <du**********@gmail.comwrote in message
>news:eA**************@TK2MSFTNGP05.phx.gbl. ..
>TS wrote:
>>i have a need to possibly enable mutli language support. What
benefit
>>>do
>>i get by using a resource file instead of a custom xml solution?
>>>
>>thanks!
>>
>I don't know what your "customer xml solution" is ? You store all
>information of controls such as text, color value (#aabbcc) in a
regular
>>>>>xml file, doesn't you ?
>As far as I know, ASP.NET support resource file very well. So you
either
>need a multi languages or not, you should use Resource Feature in
your
>>>>>ASP.NET.
>
>
>



Nov 20 '07 #9

P: n/a
TS
thanks steven

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different kind
of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there
was
>>a
spelling mistake, I imaging we could manually update the resource file?
In
>>>>this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl.. .
Hi TS,
>
I think the main advantage of using .NET resource file(or resx file)
is
that you can make full use of the built-in API or coding syntax
support.
>>>>For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using
custom
xml solution, you'll need to define your own xml file format and use
raw
>>>>XML API to manipulate them. How do you think?
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
--------------------
>>From: "TS" <ma**********@nospam.nospam>
>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>
>>yes.
>>
>>do you know of the actual benefits of resource file instead of regular
xml
>>file?
>>
>>"Duy Lam" <du**********@gmail.comwrote in message
>>news:eA**************@TK2MSFTNGP05.phx.gbl.. .
>>TS wrote:
>>>i have a need to possibly enable mutli language support. What
benefit
>>>>do
>>>i get by using a resource file instead of a custom xml solution?
>>>>
>>>thanks!
>>>
>>I don't know what your "customer xml solution" is ? You store all
>>information of controls such as text, color value (#aabbcc) in a
regular
>>xml file, doesn't you ?
>>As far as I know, ASP.NET support resource file very well. So you
either
>>need a multi languages or not, you should use Resource Feature in
your
>>>>>>ASP.NET.
>>
>>
>>
>




Nov 20 '07 #10

P: n/a
TS
i see that you can add resources to a resource file at runtime. My question
is, is that persisted to the file system or only in memory in which case a
server reboot would flush?

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl...
Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different kind
of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be loaded
into memory after it is used, just like it load the required assemblies.
Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "TS" <ma**********@nospam.nospam>
References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
Subject: Re: Resource file vs. regular Xml file
Date: Thu, 15 Nov 2007 08:15:57 -0600
thank you.

One concern i never asked was caching. currently i am caching my custom
xml
files. Do resource files get cached or need caching?

If for example my application was deployed and then we found out there
was
>>a
spelling mistake, I imaging we could manually update the resource file?
In
>>>>this scenario, how does caching play in?

thanks~!
"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:ZR**************@TK2MSFTNGHUB02.phx.gbl.. .
Hi TS,
>
I think the main advantage of using .NET resource file(or resx file)
is
that you can make full use of the built-in API or coding syntax
support.
>>>>For example, .NET provide "ResourceManager Class" to help you
programmatically load resource keys from resource file or resx file.
Also,
net resource file can be embeded into assembly. If you're using
custom
xml solution, you'll need to define your own xml file format and use
raw
>>>>XML API to manipulate them. How do you think?
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
--------------------
>>From: "TS" <ma**********@nospam.nospam>
>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>
>>yes.
>>
>>do you know of the actual benefits of resource file instead of regular
xml
>>file?
>>
>>"Duy Lam" <du**********@gmail.comwrote in message
>>news:eA**************@TK2MSFTNGP05.phx.gbl.. .
>>TS wrote:
>>>i have a need to possibly enable mutli language support. What
benefit
>>>>do
>>>i get by using a resource file instead of a custom xml solution?
>>>>
>>>thanks!
>>>
>>I don't know what your "customer xml solution" is ? You store all
>>information of controls such as text, color value (#aabbcc) in a
regular
>>xml file, doesn't you ?
>>As far as I know, ASP.NET support resource file very well. So you
either
>>need a multi languages or not, you should use Resource Feature in
your
>>>>>>ASP.NET.
>>
>>
>>
>




Nov 20 '07 #11

P: n/a
Hi TS,

For the following things you mentioned:

==========
i see that you can add resources to a resource file at runtime.
=========

do you mean use "ResourceWriter" class to programmatically add resource
into existing resource file(resx or .resource...)? If so, the modification
only reflect on the resource file on disk and won't make the runtime to
automatically reload the updated resource.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Tue, 20 Nov 2007 10:24:45 -0600
>i see that you can add resources to a resource file at runtime. My
question
>is, is that persisted to the file system or only in memory in which case a
server reboot would flush?

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl...
>Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different
kind
>of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
>n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
>>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
>>>many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl. ..
Thanks for your followup TS,

If you're using .net resource model(resource file or embeded in
assembly),
>>>then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be
loaded
>>>into memory after it is used, just like it load the required
assemblies.
>>>Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.

BTW, if you want to implement your own resource model and component,
maybe
>>>you can havea look at the following article which introducing extending
the
NET resource provider:

#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>From: "TS" <ma**********@nospam.nospam>
>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>Subject: Re: Resource file vs. regular Xml file
>Date: Thu, 15 Nov 2007 08:15:57 -0600

>
>thank you.
>
>One concern i never asked was caching. currently i am caching my custom
xml
>files. Do resource files get cached or need caching?
>
>If for example my application was deployed and then we found out there
was
>>>a
>spelling mistake, I imaging we could manually update the resource file?
In
>>>>>this scenario, how does caching play in?
>
>thanks~!
>
>
>"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
>news:ZR**************@TK2MSFTNGHUB02.phx.gbl. ..
>Hi TS,
>>
>I think the main advantage of using .NET resource file(or resx file)
>is
>that you can make full use of the built-in API or coding syntax
support.
>>>>>For example, .NET provide "ResourceManager Class" to help you
>programmatically load resource keys from resource file or resx file.
>Also,
>net resource file can be embeded into assembly. If you're using
>custom
>xml solution, you'll need to define your own xml file format and use
raw
>>>>>XML API to manipulate them. How do you think?
>>
>Sincerely,
>>
>Steven Cheng
>>
>Microsoft MSDN Online Support Lead
>>
>>
>This posting is provided "AS IS" with no warranties, and confers no
>rights.
>>
>>
>--------------------
>>>From: "TS" <ma**********@nospam.nospam>
>>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
><eA**************@TK2MSFTNGP05.phx.gbl>
>>>Subject: Re: Resource file vs. regular Xml file
>>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>>
>>>yes.
>>>
>>>do you know of the actual benefits of resource file instead of
regular
>>>xml
>>>file?
>>>
>>>"Duy Lam" <du**********@gmail.comwrote in message
>>>news:eA**************@TK2MSFTNGP05.phx.gbl. ..
>>>TS wrote:
>>>>i have a need to possibly enable mutli language support. What
benefit
>>>>>do
>>>>i get by using a resource file instead of a custom xml solution?
>>>>>
>>>>thanks!
>>>>
>>>I don't know what your "customer xml solution" is ? You store all
>>>information of controls such as text, color value (#aabbcc) in a
regular
>>>xml file, doesn't you ?
>>>As far as I know, ASP.NET support resource file very well. So you
>either
>>>need a multi languages or not, you should use Resource Feature in
your
>>>>>>>ASP.NET.
>>>
>>>
>>>
>>
>
>
>



Nov 21 '07 #12

P: n/a
TS
yes you are correct, thanks!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:tn***************@TK2MSFTNGHUB02.phx.gbl...
Hi TS,

For the following things you mentioned:

==========
i see that you can add resources to a resource file at runtime.
=========

do you mean use "ResourceWriter" class to programmatically add resource
into existing resource file(resx or .resource...)? If so, the modification
only reflect on the resource file on disk and won't make the runtime to
automatically reload the updated resource.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
>>From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Tue, 20 Nov 2007 10:24:45 -0600
>>i see that you can add resources to a resource file at runtime. My
question
>>is, is that persisted to the file system or only in memory in which case a
server reboot would flush?

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:YO**************@TK2MSFTNGHUB02.phx.gbl.. .
>>Thanks for your reply TS,

For resource file, normally you will add them into project through the
following means:

** You add a resource xml file(resx file) which can contain different
kind
>>of resource objects(string, image, file .....). So you can add multiple
such resx files in a project. When you build the project, they will be
compiled(as embeded resource) into your assembly(or separate satellite
assemlies that contains resource for specific cultures).

For these kinds of resource, you'll use API to get resource item from
it(from assembly).

#Introduction to Resources and Localization
http://msdn2.microsoft.com/en-us/lib...93(VS.71).aspx

#Resources in Applications
http://msdn2.microsoft.com/en-us/lib...5x(vs.71).aspx
** For ASP.NET application, it has some further encapsulated
functionality.
You can provide a local resource file for each aspx page or serveral
global
resource files for the entire application. These resource items are
easy
to reference in your aspx page(both through declarative syntax or
programatic code):

#using localization resource in ASP.NET:
http://quickstarts.asp.net/QuickStar...on/localizatio
>>n.aspx
Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

This posting is provided "AS IS" with no warranties, and confers no
rights.

--------------------
From: "TS" <ma**********@nospam.nospam>
Subject: Re: Resource file vs. regular Xml file
Date: Mon, 19 Nov 2007 16:42:09 -0600

steven, are resource files 1 per application or can they be split up to
have
many, say 1 per 10 pages of an application. IF so is there any reason to
do/not do this?

thanks!!!!

"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
news:J2**************@TK2MSFTNGHUB02.phx.gbl.. .
Thanks for your followup TS,
>
If you're using .net resource model(resource file or embeded in
assembly),
then, you should not change them frequently or dynamically at runtime.
Because when .net application running, the resource items will be
loaded
>>>>into memory after it is used, just like it load the required
assemblies.
>>>>Therefore, it won't let you to flexibly update and refresh it
immediately
if you changed them when the application is running.
>
BTW, if you want to implement your own resource model and component,
maybe
you can havea look at the following article which introducing
extending
the
NET resource provider:
>
#Extending the ASP.NET 2.0 Resource-Provider Model
http://msdn2.microsoft.com/en-us/library/aa905797.aspx
>
Sincerely,
>
Steven Cheng
>
Microsoft MSDN Online Support Lead
>
>
This posting is provided "AS IS" with no warranties, and confers no
rights.
>
>
--------------------
>>From: "TS" <ma**********@nospam.nospam>
>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
<eA**************@TK2MSFTNGP05.phx.gbl>
<uU**************@TK2MSFTNGP02.phx.gbl>
<ZR**************@TK2MSFTNGHUB02.phx.gbl>
>>Subject: Re: Resource file vs. regular Xml file
>>Date: Thu, 15 Nov 2007 08:15:57 -0600
>
>>
>>thank you.
>>
>>One concern i never asked was caching. currently i am caching my
>>custom
xml
>>files. Do resource files get cached or need caching?
>>
>>If for example my application was deployed and then we found out there
was
a
>>spelling mistake, I imaging we could manually update the resource
>>file?
In
>>this scenario, how does caching play in?
>>
>>thanks~!
>>
>>
>>"Steven Cheng[MSFT]" <st*****@online.microsoft.comwrote in message
>>news:ZR**************@TK2MSFTNGHUB02.phx.gbl ...
>>Hi TS,
>>>
>>I think the main advantage of using .NET resource file(or resx file)
>>is
>>that you can make full use of the built-in API or coding syntax
support.
>>For example, .NET provide "ResourceManager Class" to help you
>>programmatically load resource keys from resource file or resx file.
>>Also,
>>net resource file can be embeded into assembly. If you're using
>>custom
>>xml solution, you'll need to define your own xml file format and use
raw
>>XML API to manipulate them. How do you think?
>>>
>>Sincerely,
>>>
>>Steven Cheng
>>>
>>Microsoft MSDN Online Support Lead
>>>
>>>
>>This posting is provided "AS IS" with no warranties, and confers no
>>rights.
>>>
>>>
>>--------------------
>>>>From: "TS" <ma**********@nospam.nospam>
>>>>References: <OL**************@TK2MSFTNGP03.phx.gbl>
>><eA**************@TK2MSFTNGP05.phx.gbl>
>>>>Subject: Re: Resource file vs. regular Xml file
>>>>Date: Wed, 14 Nov 2007 12:00:41 -0600
>>>>
>>>>yes.
>>>>
>>>>do you know of the actual benefits of resource file instead of
regular
>>>>xml
>>>>file?
>>>>
>>>>"Duy Lam" <du**********@gmail.comwrote in message
>>>>news:eA**************@TK2MSFTNGP05.phx.gbl ...
>>>>TS wrote:
>>>>>i have a need to possibly enable mutli language support. What
benefit
>>do
>>>>>i get by using a resource file instead of a custom xml solution?
>>>>>>
>>>>>thanks!
>>>>>
>>>>I don't know what your "customer xml solution" is ? You store all
>>>>information of controls such as text, color value (#aabbcc) in a
regular
>>>>xml file, doesn't you ?
>>>>As far as I know, ASP.NET support resource file very well. So you
>>either
>>>>need a multi languages or not, you should use Resource Feature in
your
>>>>ASP.NET.
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>




Nov 21 '07 #13

This discussion thread is closed

Replies have been disabled for this discussion.