1 2 Previous Next 20 Replies Latest reply on Nov 18, 2005 12:40 AM by sbartone Go to original post
      • 15. Re: Pure-CMP & FAQ Module revamp
        hxp

        Jae --

        Glad to see it!

        I intend to give yr chgs a good testing tomorrow on both mysql/linux and hsql/windows.

        +more to say re your last 2 msgs, but it can wait till later.

        --Howard

        • 16. Re: Pure-CMP & FAQ Module revamp
          hxp

          Hi Julien --

          As I wrote at the beginning of this thread...

          "hxp" wrote:
          I have the backends of 2 modules -- FAQ and Quotes -- revamped to a pure-CMP approach. ... I've successfully upgraded ... to pure-CMP so that it doesnt use sql/ddl anymore at all. I've recently gotten xdoclet, unknown-pk, and CMR to coexist without problems.


          The final step for this phase is making sure that this works without a hitch on both HSQL and MySQL. With the fixes Jae committed a few days ago, I'm testing and expecting things to go smoothly. (After I commit, it would be good if other people can test on postgres, oracle, etc)


          "hxp" wrote:

          If you want me to go the CVS route, I'm willing to become the maintainer of the FAQ module, and begin reworking the rest of it (some for 1.1; more for 1.2).
          ...
          I will be travelling from mid-May to early-July (and unavailable for coding), so I don't want to raise expectations too much.

          From July onwards, I would foresee revamping & enhancing the entire FAQ module, consistent with JSR-168 and whatever frontend architecture is optimal for Nukes at that point.



          Because I'm running out of time to prepare for 2 months of travel, I will commit my final contribution for 1.1 this week. It will contain only backend improvements.

          I will overhaul the frontend completely for 1.2, after my travels are over ~ mid-July... and then continue to be maintainer of the FAQ module, as offered in my original post.

          Thanks for your email and offer of help :) I'll be back to you when I need specific help, such as with any CVS hitches.

          -- Howard



          • 17. Re: Pure-CMP & FAQ Module revamp
            jae77

            howard -

            i just saw your cvs commits for the quotes code (cool stuff).

            i've got a question about the unknown primary key stuff...how exactly are you using it?

            in the news code, when i define the getter for the primary key field and add all the corresponding xdoclet code, i just state that it should be auto-incremented. i'm able to insert, etc w/o issue.

            i understand the need for the unknown-pk stuff if you are not using an integer as the pk for the database, but i'm not really sure what it gets you in this situation (and i'm worried that i may be doing something incorrect by not having it myself).

            • 18. Re: Pure-CMP: using UNKNOWN-PK in FAQ/Quotes module revamp
              hxp

              Jae --

              "jae77" wrote:
              howard -

              i just saw your cvs commits for the quotes code (cool stuff).

              :)

              "jae77" wrote:


              i've got a question about the unknown primary key stuff...how exactly are you using it?

              in the news code, when i define the getter for the primary key field and add all the corresponding xdoclet code, i just state that it should be auto-incremented. i'm able to insert, etc w/o issue.

              i understand the need for the unknown-pk stuff if you are not using an integer as the pk for the database, but i'm not really sure what it gets you in this situation (and i'm worried that i may be doing something incorrect by not having it myself).


              My earlier plan was that I was going to write 2 big long hairy Wikis on these 2 subjects you ask about --- "Why?" + "How?"

              But now all of a sudden I'm committing :) working code :), and never got around to explaining the strategy & architecture & thinking behind this whole pure-CMP architecture :-(

              Cant do it justice right now; but here're a few stabs at it:

              ------------------------------------------------------------------------------

              Correctness vs Strategy

              "jae77" wrote:
              (and i'm worried that i may be doing something incorrect by not having it myself).


              * if it works, it's not "incorrect".

              * But... just becasue 2 different code approaches produce the same immediate result doesnt mean that they are equivalently good in the bigger picture.


              Why --

              Bigger question:"Why Pure-CMP?" .... (scattered answers to this one all other the past 3 months of Forums, and I have to gather into a Wiki... )

              You know many of the reasons, but just 1 to highlight here: Abstraction makes a real difference. Clean (well architected) abstractions lead to much more successful software and systems.

              Smaller question: "Why Pure-CMP using unknown-PK?"...

              * Using unknown-pk allows you to have all the benefits you want from a PK --- unique identifier, not null, automatically incremented, automatically indexed ----- and getting all this benefit requires zero java code in the Entity EJB class! A small amount of xdoclet tagging, and a few conventions to follow in the java code that uses the PK... that's all it takes.

              * code is shorter. easier to read. easier to maintain. fewer places for bugs to hide.

              * recognizes that PK & FK are part of the workings of the DBMS layer, and should be confined to that layer.

              * lets each underlying DBMS generate and manage keys in its own optimum way.

              * When it comes to what is the optimal way for each DBMS to uniquely identify and index rows in its tables, the DBMS knows best..... but from the Java/OO/Pure-CMP perspective we dont know and we dont care.

              ergo, "unknown"-PK

              * At the Pure-CMP layer, we get what we want: fully-abstract automatic "Entity Identity" generation and management.

              --- unknown-pk gives us the "PK" side of this fully-abstract automatic "Entity Identity" generation and management

              --- CMR gives us the "FK" side of this fully-abstract automatic "Entity Identity" generation and management



              How --

              OK, to keep things sorted, the "HOW" part is over on our "nuts & bolts" pure-CMP thread ---

              MySQL & Pure-CMP --- issues w News & FAQ modules
              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=49132



              ~~~~~~~~~~~~~~~~~~~


              Now, check back to the first msg on this thread, and see where I mentioned "converging" our approaches... for now, you dont really have to do anything, but if you want to switch to the unknown-pk approach, that would be the only convergence that we need to do before 1.1.

              We can converge formatting/style later; lets focus on getting substance converged for now. (I actually like your formatting style conventions -- such as lining up all the "=" vertically -- better than what I used. The alignment makes it easier to read at a glance (back in the Fortran days, such symmetry helped make it easier to find typo-bugs, before waiting 15 minutes for the cards to compile and then finding out 8-) ))

              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

              Really tired; got a million things to do before going into travel mode for 2 months starting nxt wk, so doing Wikis fell off the bottom of the list... (for now). Hope these notes are good enuf for now.

              But still must make sure I follow thru on what I did promise, and make sure nothing i commit to cvs breaks the build on any of the platform combinations. (so let me know if you see any issues or experience any problems, before I teardown and put everything in hyberspace.)

              --- Howard


              • 19. Re: Pure-CMP & FAQ Module revamp
                hxp

                To anybody who's reading this thread ---


                The new pure-CMP Quotes and FAQ modules are now checked into CVS :)

                Please grab a copy, try em out, and post some bugs/critique/feedback.

                Thanks!


                -- Howard

                • 20. "Driver not yet registered for"
                  sbartone

                   

                  "hxp" wrote:
                  Jae --


                  "jae77" wrote:

                  are you sure you're not missing something w/ the xdoclet/ant "config/setup?"

                  No, I'm not sure. Please say more about this when you get a chance.


                  "jae77" wrote:

                  i ask b/c we are generating successful deployments for other components and mysql.


                  Careful, careful... those were not pure-CMP deployments... weren't relying on create-table....

                  I suspect we'll find something wrong with the interaction of create-table and nukes and mysql....


                  "jae77" wrote:
                  i'm curious to know what the issue w/ the entity command is and how it relates to creating the tables themselves.


                  Just a suspicion at this point; haven't had time to investigate to determine root cause.... will post more ~Sunday/Monday.

                  I have more to say on this that's relevant to News Module as well --- so I'm forking this thread, and continuing implem/debugging discussion at:

                  MySQL & Pure-CMP --- issues w News & FAQ modules

                  http://jboss.org/index.html?module=bb&op=viewtopic&t=49132

                  Bye for a few days.

                  -- Howard


                  1 2 Previous Next