Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Housekeeping for NetBeans
 Post subject: Housekeeping for NetBeans Post rating: 0   New post Posted: Mon 16 Dec, 2013, 11:44 

User rating: 1
Joined: Mon 02 Dec, 2013, 11:32
Posts: 27
Location: AustraliaAustralia
Hi,

I appreciate this is not really a Dukascopy issue, but I haven't found my answer on the web either.

How should I be setting up my strategies?
As per the wiki, I created a Package called My Strategies, and then I create a new java class file for each strategy. However this seems to mean that each time I am working on a strategy and then want to compile it, all the other strategies get compiled at the same time. Now I could have different versions of my strategies which would mean I could end up with 20 or more java class files.

Is that how others are doing it? Or do you create a new package for each strategy?

I just want to get an idea of the cleanest setup before I start bad habits.

thanks

Simon


Image


Attachments:
Netbeans.png [57.77 KiB]
Downloaded 341 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Housekeeping for NetBeans Post rating: 1   New post Posted: Mon 16 Dec, 2013, 12:03 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
1) NetBeans supports history feature: Menu -> View -> Editors -> History;

2) NetBeans supports more sophisticated versioning subsystems;

3) You can create different Maven projects (a project per a strategy) with the only parent pom file with jforex dependencies.


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Tue 17 Dec, 2013, 21:24 

User rating: 1
Joined: Mon 02 Dec, 2013, 11:32
Posts: 27
Location: AustraliaAustralia
thanks hebasto.

The versioning/history feature is great - used it the other day.

I think I will try to have a different project then per strategy. Unless this creates a massive system resource issue in terms of space?
Is this how you have structured your strategies?
how could I use the same pom file?


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Tue 17 Dec, 2013, 22:03 
User avatar

User rating: 96
Joined: Mon 09 Sep, 2013, 07:09
Posts: 287
Location: Ukraine, SHostka
Docs:
https://maven.apache.org/guides/introduction/introduction-to-the-pom.html
https://maven.apache.org/pom.html

To create a Maven pom-packaging parent project in NetBeans:
Menu -> File -> New Project... -> Categories: Maven -> Projects: POM Project

The necessary line in a parent POM is:
<packaging>pom</packaging>
The most important lines in children POMs are the reference to their parent, e.g.:
<parent>
        <groupId>hebasto</groupId>
        <artifactId>JForex-SDK-Parent</artifactId>
        <version>1.0</version>
</parent>


Attachments:
File comment: Child POM
pom.xml [813 Bytes]
Downloaded 154 times
File comment: Parent POM
pom.xml [2.28 KiB]
Downloaded 157 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Wed 18 Dec, 2013, 08:32 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
PhoenixProject wrote:
I think I will try to have a different project then per strategy.
Why would you need to do that?
PhoenixProject wrote:
However this seems to mean that each time I am working on a strategy and then want to compile it, all the other strategies get compiled at the same time. Now I could have different versions of my strategies which would mean I could end up with 20 or more java class files.
Are you sure about this? Did you check the folder where the .class files are?


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Wed 18 Dec, 2013, 10:19 

User rating: 1
Joined: Mon 02 Dec, 2013, 11:32
Posts: 27
Location: AustraliaAustralia
just looking for the best/neatest solution I guess.

I don't think you can compile a class file individually, so when I hit compile it compiles everything in the project folder. There could be 20 or more strategies in there. This then starts to get time consuming as it compiles each one. Or at least that seems to be what is happening in the test files i have so far.


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Wed 18 Dec, 2013, 10:37 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
PhoenixProject wrote:
This then starts to get time consuming as it compiles each one.
How do you know that each of them get compiled? Did you check the creation dates of the .class files? We don't have expertise in NetBeans, but could it be that the most of the build time is due to other events, not the compilation itself? Before you create 20 projects in your workspace maybe it is worth to check the build time difference if you have 1 or 20 strategies? In our experience we use an Eclipse JForex-SDK-based project which contains more than 500 strategies and it works without any performance issues, as the Eclipse only recompiles those files which have been changed.


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Thu 19 Dec, 2013, 09:04 

User rating: 1
Joined: Mon 02 Dec, 2013, 11:32
Posts: 27
Location: AustraliaAustralia
on further inspection you might be right. I think it was just that i had several test strategies that weren't compiled initially.


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 1   New post Posted: Thu 19 Dec, 2013, 15:18 
User avatar

User rating: 164
Joined: Mon 08 Oct, 2012, 10:35
Posts: 676
Location: NetherlandsNetherlands
I am not a Netbeans user, but I think every IDE out there have a Build, and a Build All commands.
Build only compiles files that have been edited recently (since the last Build). (This is sometimes referred as Make.)
Build All compiling every file in the package.

Does this make any sense? :)


 
 Post subject: Re: Housekeeping for NetBeans Post rating: 0   New post Posted: Sat 21 Dec, 2013, 03:06 

User rating: 1
Joined: Mon 02 Dec, 2013, 11:32
Posts: 27
Location: AustraliaAustralia
tcsabina wrote:
I am not a Netbeans user, but I think every IDE out there have a Build, and a Build All commands.
Build only compiles files that have been edited recently (since the last Build). (This is sometimes referred as Make.)
Build All compiling every file in the package.

Does this make any sense? :)


yup thanks


 

Jump to:  

cron
  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com