Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Oct 2009
    Posts
    14
    Vote Rating
    0
    kospiotr is on a distinguished road

      0  

    Lightbulb Data persistence: Hibernate vs JDBC queries vs MyBatis

    Data persistence: Hibernate vs JDBC queries vs MyBatis


    I'm newbie with GWT/GXT and I'm looking for best persistence way for my future apps. I was considering many variants of doing that so I decided to draw a graph (see attachment).

    So my conclusions are:
    1) Hibernate is the best persistence framework but it hates cooperation with GWT and a specially with GXT
    2) JDBC it was just a joke
    3) MyBatis is really great tool for gaining data from db, but writing mappers is the worst thing ever, but its fast, efficient and has great possibilities not seen in Hibernate.
    4) Dozzer is server and user resourcess killer. You must write a lot of boiler plate code and it just copy data (sometimes a lot). Don't use it at any cost!!! Imagine server that runs 100 sessions and each bean request must use Dozzer.
    5) DTO - similar situation. It's boilerplate, and it's just transforming one data type into other. There is no serious data processing. Use server resourcess wisely.
    6) Gilead is copying hibernate beans states. It could be dangerous (just heard from few comments), hard to configure and integrate with other IoC frameworks (Guice in my case).
    6) Don't transform POJO int BeanModel on the client side. JavaScript is really slow and it slows down the whole client.
    7) Best practise for me and maybe for you: find the shortest path on the graph from DB to the BaseModel bean on the client side.
    8) MyBatis allows to map query results to the BaseModel beans (tested) so they don't need to be transformed many times and you don't have to care about it at all. The only thing is writing proper mappings.

    This is my personal opinion and remember that I'm newbie. Please explain me if I'm wrong and give cons arguments. Maybe you know another ORM or similar to MyBatis framework that could give me as short path.
    Attached Images

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    31
    Vote Rating
    0
    Agnus is on a distinguished road

      0  

    Default


    +1 for 4, 5, 6. I have worked in projects where everything was DTOed and it was madness. In general, I try to reuse entity beans vertically across application layers and use DTOs only where necessary (e.g. data projections).

    I don't do much ExtGWT development, however, I do a lot of ExtJS and plain GWT. In both cases use Hibernate + Spring on the backend with Spring MVC as a RESTful web service gateway. This way, services are completely independent from any client toolkit. The downside is that you lose the convenience of the GWT RPC mechanism.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,717
    Vote Rating
    87
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    The new GWT 2.1 feature of RequestFactory can do away with the need to create BaseModelData and subclasses as DTOs. Instead, you maintain an interface representing each server entity you want access to on the client. This must still be maintained - if it automatically gave access to any get/set available on the server, building anything resembling a secure webapp would be next to impossible. So one must use the interface as a way to describe which properties may be loaded for use on the client.

    AutoBeans (available in 2.1.1) can also provide similar functionality with a little less magic already done for you - you must implement your own mechanism to serialize data and request services. RF is implemented using AutoBeans.

    Neither of these work with GXT 2.2 and prior - we should be seeing a 2.3 release coming soon with some wrappers over these beans to make them accessible from the existing Bindings and Store code, and 3.0 (coming this spring) should allow full integration to these.

    FWIW, I am working up a GWT/GAE/Guice app to see how much trouble it really is to keep your persistence classes ignorant of the other layers in the app via RF. So far, the only detail is that each persistable instance must have an id and a version, and as of GWT2.1.1, id must be a String or a Long and the version must be an Integer - hopefully these restrictions will be looser soon. (note that the entity itself need not have the id and version, but that the server must be able to discover a unique and consistent id, and a version number which increases when changes occur). I hang out in ##gwt and #extgwt of irc.freenode.net if you have any questions about my approach.

  4. #4
    Sencha User
    Join Date
    Dec 2007
    Location
    Aubagne, France
    Posts
    347
    Vote Rating
    1
    mask_hot is on a distinguished road

      0  

    Default


    I'm using EJB 3.x with JPA 2.0 (eclipselink).
    I made DTOs but I'm waiting for the next version of GXT for removing them.

  5. #5
    Sencha User
    Join Date
    Feb 2011
    Posts
    1
    Vote Rating
    0
    skyline1241 is on a distinguished road

      0  

    Default


    Thanks you for the post.

Similar Threads

  1. GXT Persistence : How To
    By chalu in forum Community Discussion
    Replies: 1
    Last Post: 13 Feb 2010, 11:37 AM
  2. Modifiying queries to retrieve data for paging grid
    By Dr.T in forum Ext 1.x: Help & Discussion
    Replies: 4
    Last Post: 15 Jul 2009, 2:25 AM
  3. Component Persistence
    By brookd in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 28 Apr 2008, 1:54 PM
  4. Ext.data.Store with persistence
    By deitch in forum Ext 1.x: User Extensions and Plugins
    Replies: 9
    Last Post: 13 Dec 2007, 12:16 PM
  5. JDBC and Ext
    By figaro in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 5 Oct 2007, 3:59 PM

Thread Participants: 4