You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by Greg Brown <gk...@mac.com> on 2010/07/30 02:19:11 UTC

DesktopApplicationContext.main()

Hi all,

Given that we now have a plugin that makes it easy to launch Pivot applications within Eclipse via a context menu, I'm wondering if we still need the DesktopApplicationContext.main(Class<? extends Application>, String[]) method. As I recall, the primary reason this method was created was to support this use case. It was a great suggestion (care of Noel) and it has worked quite well - I'm just wondering if it is worth preserving in Pivot 2.0.

Let me know what you think.

Greg


Re: DesktopApplicationContext.main()

Posted by Todd Volkert <tv...@gmail.com>.
FWIW, I kinda like it even outside an IDE context -- I use it to run
my apps at the command line with more brevity.

-T

On Sun, Aug 8, 2010 at 8:21 AM, Greg Brown <gk...@mac.com> wrote:
> The alternative is to use the other DesktopApplicationContext.main() method (the one that just takes an array of String) and pass the name of the Pivot application class as the first argument. The overloaded version that takes a class and a string array is just a convenience method that delegates to this one. It is used primarily for launching Pivot applications from within an IDE - however, as I mentioned, if you are using Eclipse, this shortcut is no longer necessary, since you can now use the Pivot plugin to launch a Pivot application class directly. You can also use the plugin to launch BXML files directly via the ScriptApplication launcher.
>
> G
>
> On Aug 8, 2010, at 1:24 AM, Michael Allman wrote:
>
>> I use it to launch my Pivot app so I'd rather it stay, but I can't say I'd be upset to see it go.  BTW, what is the preferred or suggested way for running a Pivot app?
>>
>> Also, if it does "go" I think marking it @deprecated first with a pointer to the alternative would be the smoothest way.  Subsequently, the method would be removed altogether.
>>
>> Michael
>>
>>
>> On Thu, 29 Jul 2010, Greg Brown wrote:
>>
>>> Hi all,
>>>
>>> Given that we now have a plugin that makes it easy to launch Pivot applications within Eclipse via a context menu, I'm wondering if we still need the DesktopApplicationContext.main(Class<? extends Application>, String[]) method. As I recall, the primary reason this method was created was to support this use case. It was a great suggestion (care of Noel) and it has worked quite well - I'm just wondering if it is worth preserving in Pivot 2.0.
>>>
>>> Let me know what you think.
>>>
>>> Greg
>>>
>
>

Re: DesktopApplicationContext.main()

Posted by Greg Brown <gk...@mac.com>.
The alternative is to use the other DesktopApplicationContext.main() method (the one that just takes an array of String) and pass the name of the Pivot application class as the first argument. The overloaded version that takes a class and a string array is just a convenience method that delegates to this one. It is used primarily for launching Pivot applications from within an IDE - however, as I mentioned, if you are using Eclipse, this shortcut is no longer necessary, since you can now use the Pivot plugin to launch a Pivot application class directly. You can also use the plugin to launch BXML files directly via the ScriptApplication launcher.

G

On Aug 8, 2010, at 1:24 AM, Michael Allman wrote:

> I use it to launch my Pivot app so I'd rather it stay, but I can't say I'd be upset to see it go.  BTW, what is the preferred or suggested way for running a Pivot app?
> 
> Also, if it does "go" I think marking it @deprecated first with a pointer to the alternative would be the smoothest way.  Subsequently, the method would be removed altogether.
> 
> Michael
> 
> 
> On Thu, 29 Jul 2010, Greg Brown wrote:
> 
>> Hi all,
>> 
>> Given that we now have a plugin that makes it easy to launch Pivot applications within Eclipse via a context menu, I'm wondering if we still need the DesktopApplicationContext.main(Class<? extends Application>, String[]) method. As I recall, the primary reason this method was created was to support this use case. It was a great suggestion (care of Noel) and it has worked quite well - I'm just wondering if it is worth preserving in Pivot 2.0.
>> 
>> Let me know what you think.
>> 
>> Greg
>> 


Re: DesktopApplicationContext.main()

Posted by Michael Allman <ms...@allman.ms>.
I use it to launch my Pivot app so I'd rather it stay, but I can't say I'd 
be upset to see it go.  BTW, what is the preferred or suggested way for 
running a Pivot app?

Also, if it does "go" I think marking it @deprecated first with a pointer 
to the alternative would be the smoothest way.  Subsequently, the method 
would be removed altogether.

Michael


On Thu, 29 Jul 2010, Greg Brown wrote:

> Hi all,
>
> Given that we now have a plugin that makes it easy to launch Pivot 
> applications within Eclipse via a context menu, I'm wondering if we 
> still need the DesktopApplicationContext.main(Class<? extends 
> Application>, String[]) method. As I recall, the primary reason this 
> method was created was to support this use case. It was a great 
> suggestion (care of Noel) and it has worked quite well - I'm just 
> wondering if it is worth preserving in Pivot 2.0.
>
> Let me know what you think.
>
> Greg
>

Re: DesktopApplicationContext.main()

Posted by Sandro Martini <sa...@gmail.com>.
Hi,
for the same reasons of Chris I'd prefer to keep it.

Bye,
Sandro

-- 
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/DesktopApplicationContext-main-tp1007543p1008632.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: DesktopApplicationContext.main()

Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
I agree with you from a maintenance point of view ... but for anyone that
wants to run Pivot applications in a simple way inside an IDE (maybe not
eclipse) or outside (for example with existing scripts) should also change
them ... and this is one of small things that could give confusion/small
troubles to users in my opinion.

At least, what do you think to keep in 2.0 as deprecated and remove in 2.1 ?

Bye,
Sandro

-- 
View this message in context: http://apache-pivot-developers.417237.n3.nabble.com/DesktopApplicationContext-main-tp1007543p1008762.html
Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Re: DesktopApplicationContext.main()

Posted by Greg Brown <gk...@mac.com>.
The reason I prefer to remove code that is no longer recommended is maintenance. If the recommendation is to use the new approach (the plugin, in this case), then we should remove examples from the demo and tutorial projects that use the old approach so there is no confusion. We then end up with code that is no longer called by the platform or examples and stops getting tested.

In this case, leaving the code as-is is not a big deal because it is fairly trivial. However, my feeling in general is that there's not much value in preserving unrecommended APIs, especially across a major version change.

G

On Jul 30, 2010, at 12:31 AM, Chris Bartlett wrote:

> The introduction of this method came before I discovered Pivot so I can't
> comment on use cases, but seeing as it works I would prefer not to remove it
> unless doing so provides a benefit such reducing complexity within the code
> base.
> 
> Updated Pivot & javadocs can point users to whatever preferred/recommended
> launch methods exist and allow them to choose, but removing it seems a
> little fastidious IMHO.
> 
> Chris
> 
> On Fri, Jul 30, 2010 at 7:19 AM, Greg Brown <gk...@mac.com> wrote:
> 
>> Hi all,
>> 
>> Given that we now have a plugin that makes it easy to launch Pivot
>> applications within Eclipse via a context menu, I'm wondering if we still
>> need the DesktopApplicationContext.main(Class<? extends Application>,
>> String[]) method. As I recall, the primary reason this method was created
>> was to support this use case. It was a great suggestion (care of Noel) and
>> it has worked quite well - I'm just wondering if it is worth preserving in
>> Pivot 2.0.
>> 
>> Let me know what you think.
>> 
>> Greg
>> 
>> 


Re: DesktopApplicationContext.main()

Posted by Chris Bartlett <cb...@gmail.com>.
The introduction of this method came before I discovered Pivot so I can't
comment on use cases, but seeing as it works I would prefer not to remove it
unless doing so provides a benefit such reducing complexity within the code
base.

Updated Pivot & javadocs can point users to whatever preferred/recommended
launch methods exist and allow them to choose, but removing it seems a
little fastidious IMHO.

Chris

On Fri, Jul 30, 2010 at 7:19 AM, Greg Brown <gk...@mac.com> wrote:

> Hi all,
>
> Given that we now have a plugin that makes it easy to launch Pivot
> applications within Eclipse via a context menu, I'm wondering if we still
> need the DesktopApplicationContext.main(Class<? extends Application>,
> String[]) method. As I recall, the primary reason this method was created
> was to support this use case. It was a great suggestion (care of Noel) and
> it has worked quite well - I'm just wondering if it is worth preserving in
> Pivot 2.0.
>
> Let me know what you think.
>
> Greg
>
>