Menu

Developer questions

General
Anonymous
2012-02-14
2012-07-18
  • Anonymous

    Anonymous - 2012-02-14

    First congratulations on the great program!

    I'm a Java developer that prefers NetBeans, I respect your selection and don't
    intent to change them. I would like to implement something like your code but
    in a more generic manner (on NetBeans platform of course) Just want to know
    the following:

    1) How tied to Eclipse is the code? (Are there jars I can reuse anywhere?)

    2) Is there documentation on how to use the MTG database?

    I want to use the system with MTG as a template for a more generic application
    which would allow to show custom games, cards, etc. I would like to use it for
    another project of mine: https://sourceforge.net/projects/jwrestling/?source=
    directory

    BTW: you guys need to add forums for different things like Help, Developers,
    etc...

     
  • Alena Laskavaia

    Alena Laskavaia - 2012-02-15

    I had developers forum but I closed it due to lack of developers :) Actually I
    did a bit re factoring recently to separate ui and core components, ui is tied
    to eclipse but core almost separate now (tried to port it to android). I
    personally would start from the scratch rather than try to use somebody's
    code, but it is your choice. Code is under EPL so you can copy it and use
    however you like. Core component include database loading (xml in memory),
    image caching, card and deck models and internet connection tools (such as
    parsers for gatherer and card price providers)

     
  • Anonymous

    Anonymous - 2012-02-15

    Are those changes available in CVS? Everything I saw was really Eclipse tied.
    I would like to re-use your current work (Specially MTG database, update,
    etc). I'm aware I;ll need to recreate the UI parts on the new platform but it
    doesn't hurt to have a reference implementation.

    I thought about wrapping your code as libraries so is easier to upgrade to any
    changes you make. I don't have that much time to create everything from
    scratch.

    Can you point me to packages for the components you mention: database loading
    (xml in memory), image caching, card and deck models and internet connection
    tools (such as parsers for gatherer and card price providers)

     
  • Anonymous

    Anonymous - 2012-02-16

    I was able to make work price checking and stuff, but I'm struggling to find
    where the gatherer is queried to download the database initially. Any hints?

     
  • Alena Laskavaia

    Alena Laskavaia - 2012-02-17

    Initially it loads cards from the text file which I ship with the tool, it is
    in magiccards.db. After loading this file you can incremental update to sets,
    etc. Parsing of gatherer is in core.sync package

     
  • Anonymous

    Anonymous - 2012-02-17

    Can you provide a code example on how to get everything from gatherer? Do you
    refer to UpdateFromWeb? How do you add a new found set? I just would lie to
    see the actual code behind update database action.

     
  • Alena Laskavaia

    Alena Laskavaia - 2012-02-22

    I refactored plugin to completely get rid of eclipse dependencies, so they all
    gone now. This is example of how to load internal databased bundled with code

    ICardHandler cardHandler = DataManager.getCardHandler();

    cardHandler.loadInitialIfNot(ICoreProgressMonitor.NONE);

    IFilteredCardStore fstore = cardHandler.getMagicDBFilteredStore();

    fstore.update(new MagicCardFilter());

    System.err.println("Loaded " + fstore.getSize() + " cards");

    You can also run this code from command line like this

    java -cp "com.reflexit.magiccards.core/bin;com.reflexit.magiccards.db/bin;co

    m.reflexit.magiccards.db/resources;com.reflexit.magiccards.core.xml/bin;com.re

    flexit.magiccards.core/lib/xstream-1.4.2.jar;com.reflexit.magiccards.core/lib/

    xpp3_min-1.1.4c.jar;com.reflexit.magiccards.core/lib/xmlpull-1.1.3.1.jar" com.

    reflexit.magiccards.core.FileUtils

    If you looking for web updates you can look at core.test package where there
    is bunch of example on how to use these classes (in core.sync package)

     
  • Anonymous

    Anonymous - 2012-02-22

    Are this changes on CVS already? I still see dependencies to Eclipse on the
    projects used from the command line.

     
  • Alena Laskavaia

    Alena Laskavaia - 2012-02-22

    Yes, I commit it yesterday. What error do you have?

     
  • Anonymous

    Anonymous - 2012-02-22

    For example com.reflexit.magiccards.core.Activator still has eclipse
    dependencies:

    import org.eclipse.core.runtime.IStatus;

    import org.eclipse.core.runtime.Plugin;

    import org.eclipse.core.runtime.Status;

     
  • Anonymous

    Anonymous - 2012-02-22

    For me to be able to use yours a libraries at least the projects needed to run
    the command line command you describe will need to be free of Eclipse
    dependencies. Just as plain Java projects.

     
  • Anonymous

    Anonymous - 2012-02-25

    I've generalized most of the core to adjust to multiple games (like mine). I
    introduced and implemented the Data Base design for it.

    Interface here: https://sourceforge.net/projects/cardgamelib/

    The Application (NetBeans based): https://bitbucket.org/javydreamercsw/deck-
    manager/src

    I don't want to be competing against your application, I would love to share
    the base code. I would love to work this out.

     
  • Anonymous

    Anonymous - 2012-03-02

    Any feedback? I would have no problem changing the package names to what they
    were originally.

     
  • Alena Laskavaia

    Alena Laskavaia - 2012-03-02

    I did not have a chance look at it. Under EPL you can use code however you
    like keeping the license header. If you want

    to contribute code back you would have to send me a patch

     
  • Anonymous

    Anonymous - 2012-03-02

    I can do that without issues but the question is will you use it? I had to do
    the following:

    1) Refactor code into a stand alone interface library

    2) Implement a DatabaseStorage (using JPA and my DB design which allows more
    than one game in the database)

    3) Refactor code specific to MTG to their own project (to be used as a library
    /plug-in

    If you are not willing to incorporate this kind of changes it makes no sense
    to create a patch.

     
  • Anonymous

    Anonymous - 2012-03-18

    Any thoughts about this? I'm already done with 75% of my port. Just missing
    the deck part (dragging pages into your deck, graphs, etc)

    This is my last attempt to join efforts.

     
  • Alena Laskavaia

    Alena Laskavaia - 2012-03-19

    Sorry I don't have time to work on that, if you want to use this code as
    library I will accept your patches, otherwise just clone it

     
  • Anonymous

    Anonymous - 2012-03-22

    Is sad but I understand, I don't have much time myself. It would be a big
    patch since much of the code would need to be refactored in and out of your
    current core module and my experience on Eclipse RCP is non existent. I would
    like to keep some kind of partnership anyway.

     

Anonymous
Anonymous

Add attachments
Cancel