You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Anthony Eden <ae...@signaturedomains.com> on 2001/10/19 20:13:59 UTC

Optional init

Would it be possible to have an init method in Velocity which will only
initialize Velocity if it is not already initialized?  I would like to have
libraries which need Velocity be able to use a method like this to
initialize Velocity if the application which uses the library does not.

Sincerely,
Anthony Eden


Re: EdenCRM Powered by Velocity

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 10/24/01 3:42 PM, "Anthony Eden" <ae...@signaturedomains.com> wrote:

> Sounds fine with me.  At what point does an app cross over from 'in
> progress' to 'powered by'?
> 

It's on the powered-by page.  I put it in the misc/in-progress section.  I
figured since it's version 0.4.1 or something, that it's not done.

That's your call though...  Let us know.

Geir


> Sincerely,
> Anthony Eden
> 
> On Sun, 21 Oct 2001, Geir Magnusson Jr. wrote:
> 
>> 
>> Is the description 'in progress'  apt?
>> 
>> I think that for the powered-by page, we should have a section of things in
>> progress that use Velocity, as having that list could be useful for those
>> looking to see what's happening w/o suggesting that they are yet complete.
>> 
>> Anyone have a problem with that, and anything to be added to that category?
>> 
>> On 10/21/01 9:06 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
>> 
>>> Greetings all,
>>> 
>>> I recently released version 0.4.1 of the EdenCRM application (
>>> http://edencrm.sf.net ). EdenCRM is
>>> an open source java application for Customer Relationship Management which
>>> is designed specifically for small businesses.  It runs on the desktop
>>> and does not require any server software (unless you want to have
>>> multiple users use a shared database for tickets and history entries).
>>> 
>>> It uses Velocity for a couple different purposes:
>>> 
>>> 1.) for dynamic message templates, which are used in composing standard
>>> messages to customers
>>> 
>>> 2.) configuration files are passed through Velocity to substitute common
>>> variables like $home.
>>> 
>>> The more I use Velocity, the more I think that everything text should be
>>> passed through it first.  :-)
>>> 
>>> Sincerely,
>>> Anthony Eden
>>> 
>>> 
>> 
>> -- 
>> Geir Magnusson Jr.     geirm@optonline.net
>> System and Software Consulting
>> "Whoever would overthrow the liberty of a nation must begin by subduing the
>> freeness of speech." - Benjamin Franklin
>> 
>> 
> 

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



Re: EdenCRM Powered by Velocity

Posted by Anthony Eden <ae...@signaturedomains.com>.
Sounds fine with me.  At what point does an app cross over from 'in
progress' to 'powered by'?

Sincerely,
Anthony Eden

On Sun, 21 Oct 2001, Geir Magnusson Jr. wrote:

> 
> Is the description 'in progress'  apt?
> 
> I think that for the powered-by page, we should have a section of things in
> progress that use Velocity, as having that list could be useful for those
> looking to see what's happening w/o suggesting that they are yet complete.
> 
> Anyone have a problem with that, and anything to be added to that category?
> 
> On 10/21/01 9:06 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
> 
> > Greetings all,
> > 
> > I recently released version 0.4.1 of the EdenCRM application (
> > http://edencrm.sf.net ). EdenCRM is
> > an open source java application for Customer Relationship Management which
> > is designed specifically for small businesses.  It runs on the desktop
> > and does not require any server software (unless you want to have
> > multiple users use a shared database for tickets and history entries).
> > 
> > It uses Velocity for a couple different purposes:
> > 
> > 1.) for dynamic message templates, which are used in composing standard
> > messages to customers
> > 
> > 2.) configuration files are passed through Velocity to substitute common
> > variables like $home.
> > 
> > The more I use Velocity, the more I think that everything text should be
> > passed through it first.  :-)
> > 
> > Sincerely,
> > Anthony Eden
> > 
> > 
> 
> -- 
> Geir Magnusson Jr.     geirm@optonline.net
> System and Software Consulting
> "Whoever would overthrow the liberty of a nation must begin by subduing the
> freeness of speech." - Benjamin Franklin
> 
> 


Re: EdenCRM Powered by Velocity

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Is the description 'in progress'  apt?

I think that for the powered-by page, we should have a section of things in
progress that use Velocity, as having that list could be useful for those
looking to see what's happening w/o suggesting that they are yet complete.

Anyone have a problem with that, and anything to be added to that category?

On 10/21/01 9:06 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:

> Greetings all,
> 
> I recently released version 0.4.1 of the EdenCRM application (
> http://edencrm.sf.net ). EdenCRM is
> an open source java application for Customer Relationship Management which
> is designed specifically for small businesses.  It runs on the desktop
> and does not require any server software (unless you want to have
> multiple users use a shared database for tickets and history entries).
> 
> It uses Velocity for a couple different purposes:
> 
> 1.) for dynamic message templates, which are used in composing standard
> messages to customers
> 
> 2.) configuration files are passed through Velocity to substitute common
> variables like $home.
> 
> The more I use Velocity, the more I think that everything text should be
> passed through it first.  :-)
> 
> Sincerely,
> Anthony Eden
> 
> 

-- 
Geir Magnusson Jr.     geirm@optonline.net
System and Software Consulting
"Whoever would overthrow the liberty of a nation must begin by subduing the
freeness of speech." - Benjamin Franklin



EdenCRM Powered by Velocity

Posted by Anthony Eden <ae...@signaturedomains.com>.
Greetings all,

I recently released version 0.4.1 of the EdenCRM application (
http://edencrm.sf.net ). EdenCRM is
an open source java application for Customer Relationship Management which
is designed specifically for small businesses.  It runs on the desktop
and does not require any server software (unless you want to have
multiple users use a shared database for tickets and history entries).

It uses Velocity for a couple different purposes:

1.) for dynamic message templates, which are used in composing standard
messages to customers

2.) configuration files are passed through Velocity to substitute common
variables like $home.

The more I use Velocity, the more I think that everything text should be
passed through it first.  :-)

Sincerely,
Anthony Eden



Re: Optional init

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 10/21/01 9:02 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:

> Any suggestions then on how to handle this issue properly?  I suppose that
> libs which require Velocity can have their own init() method somewhere
> which is designed to be called once by the enclosing application.  Any
> other suggested patterns?

I guess it depends on the app.  Loosely, you could have your lib return to
the app a list of properties that it wants, and let the app set the
properties and call init().

Otherwise, if the hosting app does it, the library's property sets will have
no effect.

Worse, if you have multiple libraries, then you will have a 'first one wins'
type of thing, which might lead to problems when you invoke/init things in
different orders.

So you might formalize it - for any library that needs velocity, it can
either call into the hosting app to register properties, or have the hosting
app call into the library to get them.  I like the latter "don't call us,
we'll call you" approach, as you then are safer from a badly written lib.

Either way, what you have now is safe - you own't corrupt velocity or
anything.  You might not get what you want if the lib wants to set
properties though.

Geir

> 
> Sincerely,
> Anthony Eden
> 
> On Sun, 21 Oct 2001, Geir Magnusson Jr. wrote:
> 
>> On 10/20/01 12:54 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
>> 
>>> Thanks, that is good to know.  You might want to clarify that in the docs
>>> because they state that you should only do this once.
>>> 
>> 
>> Right - will note something.
>> 
>> <unsolicited opinion>
>> 
>> I guess my feeling is that you should try to design this deterministically
>> so that the responsibility for getting things setup is clearly defined.  You
>> will get away with being able to call it repeatedly w/o harm, but this I
>> think is unconventional - you will most likely get burned elsewhere (some
>> other tool, package, lib...) with this pattern.
>> 
>> </unsolicited opinion>
>> 
>> 
>> geir
>> 
>>> Sincerely,
>>> Anthony Eden
>>> 
>>> On Fri, 19 Oct 2001, Geir Magnusson Jr. wrote:
>>> 
>>>> On 10/19/01 2:13 PM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
>>>> 
>>>>> Would it be possible to have an init method in Velocity which will only
>>>>> initialize Velocity if it is not already initialized?  I would like to
>>>>> have
>>>>> libraries which need Velocity be able to use a method like this to
>>>>> initialize Velocity if the application which uses the library does not.
>>>>> 
>>>> 
>>>> You can call init() over and over - only the first call takes - there is no
>>>> harm.
>>>> 
>>>> 
>>>> -- 
>>>> Geir Magnusson Jr.                       geirm@optonline.net
>>>> System and Software Consulting
>>>> You're going to end up getting pissed at your software
>>>> anyway, so you might as well not pay for it. Try Open Source.
>>>> 
>>>> 
>>> 
>> 
>> -- 
>> Geir Magnusson Jr.                       geirm@optonline.net
>> System and Software Consulting
>> You're going to end up getting pissed at your software
>> anyway, so you might as well not pay for it. Try Open Source.
>> 
>> 
> 

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



Re: Optional init

Posted by Anthony Eden <ae...@signaturedomains.com>.
Any suggestions then on how to handle this issue properly?  I suppose that
libs which require Velocity can have their own init() method somewhere
which is designed to be called once by the enclosing application.  Any
other suggested patterns?

Sincerely,
Anthony Eden

On Sun, 21 Oct 2001, Geir Magnusson Jr. wrote:

> On 10/20/01 12:54 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
> 
> > Thanks, that is good to know.  You might want to clarify that in the docs
> > because they state that you should only do this once.
> > 
> 
> Right - will note something.
> 
> <unsolicited opinion>
> 
> I guess my feeling is that you should try to design this deterministically
> so that the responsibility for getting things setup is clearly defined.  You
> will get away with being able to call it repeatedly w/o harm, but this I
> think is unconventional - you will most likely get burned elsewhere (some
> other tool, package, lib...) with this pattern.
> 
> </unsolicited opinion>
> 
> 
> geir
> 
> > Sincerely,
> > Anthony Eden
> > 
> > On Fri, 19 Oct 2001, Geir Magnusson Jr. wrote:
> > 
> >> On 10/19/01 2:13 PM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
> >> 
> >>> Would it be possible to have an init method in Velocity which will only
> >>> initialize Velocity if it is not already initialized?  I would like to have
> >>> libraries which need Velocity be able to use a method like this to
> >>> initialize Velocity if the application which uses the library does not.
> >>> 
> >> 
> >> You can call init() over and over - only the first call takes - there is no
> >> harm.
> >> 
> >> 
> >> -- 
> >> Geir Magnusson Jr.                       geirm@optonline.net
> >> System and Software Consulting
> >> You're going to end up getting pissed at your software
> >> anyway, so you might as well not pay for it. Try Open Source.
> >> 
> >> 
> > 
> 
> -- 
> Geir Magnusson Jr.                       geirm@optonline.net
> System and Software Consulting
> You're going to end up getting pissed at your software
> anyway, so you might as well not pay for it. Try Open Source.
> 
> 


Re: Optional init

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 10/20/01 12:54 AM, "Anthony Eden" <ae...@signaturedomains.com> wrote:

> Thanks, that is good to know.  You might want to clarify that in the docs
> because they state that you should only do this once.
> 

Right - will note something.

<unsolicited opinion>

I guess my feeling is that you should try to design this deterministically
so that the responsibility for getting things setup is clearly defined.  You
will get away with being able to call it repeatedly w/o harm, but this I
think is unconventional - you will most likely get burned elsewhere (some
other tool, package, lib...) with this pattern.

</unsolicited opinion>


geir

> Sincerely,
> Anthony Eden
> 
> On Fri, 19 Oct 2001, Geir Magnusson Jr. wrote:
> 
>> On 10/19/01 2:13 PM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
>> 
>>> Would it be possible to have an init method in Velocity which will only
>>> initialize Velocity if it is not already initialized?  I would like to have
>>> libraries which need Velocity be able to use a method like this to
>>> initialize Velocity if the application which uses the library does not.
>>> 
>> 
>> You can call init() over and over - only the first call takes - there is no
>> harm.
>> 
>> 
>> -- 
>> Geir Magnusson Jr.                       geirm@optonline.net
>> System and Software Consulting
>> You're going to end up getting pissed at your software
>> anyway, so you might as well not pay for it. Try Open Source.
>> 
>> 
> 

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



Re: Optional init

Posted by Anthony Eden <ae...@signaturedomains.com>.
Thanks, that is good to know.  You might want to clarify that in the docs
because they state that you should only do this once.

Sincerely,
Anthony Eden

On Fri, 19 Oct 2001, Geir Magnusson Jr. wrote:

> On 10/19/01 2:13 PM, "Anthony Eden" <ae...@signaturedomains.com> wrote:
> 
> > Would it be possible to have an init method in Velocity which will only
> > initialize Velocity if it is not already initialized?  I would like to have
> > libraries which need Velocity be able to use a method like this to
> > initialize Velocity if the application which uses the library does not.
> > 
> 
> You can call init() over and over - only the first call takes - there is no
> harm.
> 
> 
> -- 
> Geir Magnusson Jr.                       geirm@optonline.net
> System and Software Consulting
> You're going to end up getting pissed at your software
> anyway, so you might as well not pay for it. Try Open Source.
> 
> 


Re: Optional init

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 10/19/01 2:13 PM, "Anthony Eden" <ae...@signaturedomains.com> wrote:

> Would it be possible to have an init method in Velocity which will only
> initialize Velocity if it is not already initialized?  I would like to have
> libraries which need Velocity be able to use a method like this to
> initialize Velocity if the application which uses the library does not.
> 

You can call init() over and over - only the first call takes - there is no
harm.


-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.