1 2 3 4 5 Previous Next 66 Replies Latest reply on Jan 24, 2011 2:40 PM by asookazian Go to original post
      • 60. Re: Selling Weld and EE6

        Arbi Sookazian wrote on Nov 28, 2009 03:46:


        where/what exactly is serving as facade in the API? sorry, haven't detected it yet...


        The class JdbcTemplate is a Facade for the JDBC API.

        • 61. Re: Selling Weld and EE6
          asookazian

          facade equals wrapper, i see.  ok that makes sense.  well wouldn't it be nice if the actual JDBC API itself exposed a native facade so that all these frmwk writers like Spring and Seam guys don't need to reinvent the wheel?


          why would you write a JDBC API that makes it very easy to not close connections and there cause connection leaks, for example?  Seems like an oversight by now especially...

          • 62. Re: Selling Weld and EE6

            Arbi Sookazian wrote on Dec 01, 2009 18:26:


            facade equals wrapper, i see.


            No, a Facade is not a Wrapper, Wrapper equals Adapter. An Adapter is used when the wrapper must respect a particular interface and must support a polymorphic behavior. On the other hand, a facade is used when one wants an easier or simpler interface to work with. If you are interested in using the proper nomenclature, maybe you should read the GoF book ;-).



            ok that makes sense.  well wouldn't it be nice if the actual JDBC API itself exposed a native facade so that all these frmwk writers like Spring and Seam guys don't need to reinvent the wheel?


            Yes, that would be nice, but only lately JSRs have focused in ease of use. Unlike Microsoft, where easy of use it the most important thing (and good long term architecture is a secondary goal). After years, the Java Community is learning to make things easier, and the Microsoft community is learning to make things powerful and elegant... all in the same planet where NextStep created an easy to use, powerful and elegant API more than 10 years ago...



            why would you write a JDBC API that makes it very easy to not close connections and there cause connection leaks, for example?  Seems like an oversight by now especially...


            Why would you write a language that did not had annotations, closures and generics? Why would you write an API for webapplications that has all the shortcomings of Servlets, JSPs and JSF? Why the first version of windows did not have all the features on Windows 7? Why the first microprocessor did not run at 4.0Ghz? Why do you not implement feature XXXX of a system you develop? Some times is time, other money, people are hard to manage..., resources are not unlimited... it the economy game!

            • 63. Re: Selling Weld and EE6
              asookazian

              I would really appreciate it if somebody wrote a new revision of the GoF book with modern web app examples in Java.  Those weird client/server, GUI/MDI system examples are hard to digest with C/Smalltalk...

              • 64. Re: Selling Weld and EE6
                kapitanpetko

                Arbi Sookazian wrote on Dec 02, 2009 00:18:


                I would really appreciate it if somebody wrote a new revision of the GoF book with modern web app examples in Java.  Those weird client/server, GUI/MDI system examples are hard to digest with C/Smalltalk...


                You just need to grok C/C++ :) A pattern is language independent (that said, most of the 'classic' ones don't make much sense in Python/Ruby). There is lots of books Java patterns books (pretty much every one wrote one..).




                Those are maybe a little old, but they all have extensive pattern coverage with examples in Java:




                • 65. Re: Selling Weld and EE6
                  kapitanpetko

                  (we need post editing!)



                  Nikolay Elenkov wrote on Dec 02, 2009 03:48:


                  A pattern is language independent (that said, most of the 'classic' ones don't make much sense in Python/Ruby).



                  , so the language used in the examples doesn't really matter.

                  • 66. Re: Selling Weld and EE6
                    asookazian

                    revive thread.  it's funny, it's really about the JDBC type-safe API.

                    1 2 3 4 5 Previous Next