Re: A few simple questions...

From: Chuck Hill (chil..lobal-village.net)
Date: Sat Jun 09 2007 - 11:57:03 EDT

  • Next message: Chuck Hill: "Re: A few simple questions..."

    Hi Riccardo,

    On Jun 9, 2007, at 6:19 AM, Riccardo De Menna wrote:

    > Hello all,
    >
    > I just moved to eclipse from xcode

    Smart move! :-)

    > and I'm looking around a bit. One positive thing for sure is that
    > wolips has given me about 600 errors and warnings on my models,
    > sources, bindings etc... My stuff is so polished after following
    > all the suggestions that it shines :-)

    It is amazing what dirt you can find in code that you thought was good!

    > You wouldn't want to know the absurd number of dangling bindings I
    > had in my wod files :)
    >
    > The IDE is nice. I dislike the ui and the "let's put everything in
    > the same window" attitude, but the rest is nice and it's clearly a
    > better place for java apps to live.
    >
    > One word for the WOLips stuff... Awesome. I still wonder how do you
    > guys find the time to also reply on these lists.

    I just reply, I don't write the tools. Mike... he never sleeps.

    > So now down to earth I wanted to forward a few questions to you
    > all... feel free to point me out your approach.
    >
    > 1. I want to arrange my sources in some folders somehow. Mostly
    > because I want EOGenerator classes and subclasses to be placed in
    > specific folders (one of my models has like 30 entities and
    > scrolling through 30 + 30 + the rest classes is clumsy). I made
    > some additional "source folders" but now I wonder: do I also have
    > to manually add them to the "compile" target of the build.xml ant
    > file or is there another way I'm missing to keep some "order" on
    > the desktop?

    I do this. I have three "top level" source folders, src, Testing,
    and GeneratedEOs. This works fine in Eclipse as long as you
    configure them as source folders on the Build Path. For the compile
    step in build.xml do you need to make some changes. I define a path
    like this:

         <path id="project.source.path">
             <dirset dir=".">
                 <include name="src"/>
                 <include name="Tests"/>
                 <include name="GeneratedEOs"/>
             </dirset>
         </path>

    This is used in my compile step like this:

         <!-- Distribution WOProject compilation -->
         <target name="compile" depends="setProps">
             <wocompile destdir="bin"
                         debug="${wocompile.debug.flag}"
                         optimize="${wocompile.optimize.flag}"
                         deprecation="on">
                 <src refid="${project.source.path}"/>
                 <classpath refid="project.classpath"/>
             </wocompile>
         </target>

    > 2. The binding validation (omg validating ognl is so cool) is
    > fantastic but what if I have some bindings that are not strong
    > typed? Let's say for example a binding that points to
    > parent.someCustomMethod. The validator claims parent has no such
    > method but I know it does since at runtime it will. Can I inform
    > the validator to skip that entry? Or can I cast it via ognl into
    > the correct type to calm down the validator? The specific case of
    > parent can be fixed by adding an pattern in the preferences to skip
    > anything starting with "parent." but I came across other issues of
    > the same problem on custom code.
    > Same applies to some warnings about "collection" objects or even
    > the..ount operator I use often. I know it's only a warning but can
    > I still get warnings and disable them one by one? (This wod
    > validation is so addictive I can't tolerate the idea of turning it
    > off :-).

    I see that you have found // VALID. Also have a look at the
    preferences under WOLips - Binding Validation. You can put in regex
    expressions there to selectivly avoid validation. e.g.
    .* ^session\.localizer\..*

    > 3. Last thing I swear :-) Where's the "syncronizeWithSchema"
    > function of EOModeler? Don't tell me I have to update things
    > manually via command line as I'm sure I would destroy my data. If
    > it's not included in wolips, how do you usually update your models
    > without loosing data when the issue arises? Some custom app?

    Not sure about that. I always change the model then create a script
    to update the database. There is a set of very nice classes in
    Wonder to automatically update schemas for you. I don't recall the
    name at the moment...

    Chuck

    -- 
    

    Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects



    This archive was generated by hypermail 2.0.0 : Sat Jun 09 2007 - 11:57:52 EDT