edward
来源: BlogBus 原始链接: http://www.blogbus.com:80/blogbus/blog/index.php?blogid=11454 存档链接: https://web.archive.org/web/20050103200225id_/http://www.blogbus.com:80/blogbus/blog/index.php?blogid=11454
edward love coding! love life! .: ÈÕÀú :. 2005 Äê 1 Ô Sun Mon Tue Wen Thu Fri Sat 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 .: ¿ìËٵǼ :. .: Õ¾ÄÚËÑË÷ :. .: ×îºó¸üР:. maverick project¡ª¡ªÒ»¸öÇáÁ¿¼¶µÄMCV¿ò¼Ü¡£ Ò»¶Îjs´úÂ룡 hibernate in action Hibernate In Action ʵÌåÀàÓë±íÃûÖ®¼äµÄÃüÃû²ßÂÔ HibernateµÄÊôÐÔ·ÃÎʲßÂÔ Ò»¸ö½«GmailÓÊÏäÉú³ÉͼƬµÄÍøÕ¾ Hibernate In Action Hibernate In Action Hibernate in Action .:
×îÐÂÆÀÂÛ :. Tony : Keep contact wit. Tony40 : contact with me. Tony40 : How are you. .:
´æµµ :. 2004/05/01/-2004/07/11 .:
ÎÒµÄÁ´½Ó :. ĬĬÎÞÓï ÓôÒ²·ç ²¼´ü ±ùÔÆ@Blogging ͸Ã÷˼¿¼ »¨Ç®µÄÄ껪 .:
À©Õ¹¹¦ÄÜ :. :: Ê×Ò³ ĬÈÏ·ÖÀà (34) ÊÕ²Ø (3) struts (1) Ðĵà (2) linux³õѧÕß (0) ÌìÑÄÈË (3) ¶ÁÊé±Ê¼Ç (6) ·ÖÒ³: [1] [2] [3] [4] [5] maverick project¡ª¡ªÒ»¸öÇáÁ¿¼¶µÄMCV¿ò¼Ü¡£
- [ĬÈÏ·ÖÀà] http://mav.sourceforge.net/ Maverick is a Model-View-Controller (aka "Model 2") framework for web publishing using Java and J2EE. It is a minimalist framework which focuses solely on MVC logic, allowing you to generate presentation using a variety of templating and transformation technologies. In principle it combines the best features of Struts, WebWork, and Cocoon2, however: Maverick is simple to use - this is a minimalist framework that anyone can understand easily. This is not a "kitchen sink" framework that tries to provide everything you need to build a web application; there are plenty of great database connection pools, application servers, validation frameworks, templating languages, etc already out there. Maverick is simple to understand - the code is easy to understand, there's not a lot of it, and it's designed with pluggability and extendability in mind. The idea of a Controller that builds a Model that gets rendered by a View is very simple and straightforward, so the framework should be too. Maverick is agnostic about view technologies - you can use any templating engine you like with Maverick. Examples are provided for JSP (with JSTL - no need for special tag libaries), Velocity, and Domify/XSLT. The developers of Maverick actively use all three of these in their "real life" to build web applications. You can run your view output through a pipeline of transformations. Maverick-supplied transformations include XSLT, DVSL, "wrapping" layout transformations, FOP, and Perl. You can efficiently chain many transformations of various types together, and you can specify this on a per-view basis. Of course, transformation technologies are pluggable and you can easily define your own. In addition you can halt the transformation process at any point and output the intermediate content. If you're using XSLT, this is a great way to produce static XML and build your templates offline with standard tools. Your commands, controllers, views, and transforms are configured with an easy-to-understand XML sitemap. For even more flexibility, you can preprocess it with XSLT. Maverick will automagically pick from different views based on user language, browser type, or any other characteristic of the request. Of course, this behavior is pluggable. Maverick supports both Struts-style singleton Controllers (aka Actions) and Webwork-style "throwaway" Controllers. Maverick is multi-platform; it has been ported to both .NET and PHP . Depending on what templating technology you choose, you may be interested in one or more of the following features: Maverick can automatically "domify" (or "saxify") arbitrary Java objects so that XSLT can be used without the effort and processing overhead of generating and parsing text XML. XSLT can be used as a templating language directly on your model just like JSP. For text-based templating engines like JSP or Velocity, an elegant way to apply a common "look and feel" and layout to a set of views is to use the "wrapping" transformation. The output of the previous step is made available to subsequent steps as a String variable which can be placed anywhere on the page. FOP transformations allow your application to produce PDF, Postscript, PCL, and a half-dozen other document formats on-the-fly. An interesting alternative to XSLT is DVSL. This is a declarative templating language patterned after XSLT but based on Velocity. If you like Maverick, but also would like to use additional features like Webwork and Struts provide, you might want to check out Baritus . Baritus is an extension of Maverick that provides a boosted version of the FormBeanUser controller. It focusses on fine grained population, validation and error reporting, has several utilities for things like formatting output and supports the concept of interceptors. This is not a framework designed by people who build frameworks; Maverick is designed and built by people who build web applications for a living and were disappointed with the complexity and invasiveness of existing open source tools. love_java ·¢±íÓÚ 2004-10-26 08:42 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ Ò»¶Îjs´úÂ룡
- [ÊÕ²Ø] ¸Ð¾õºÜÓÐÒâ˼£¬Ò»¸ö¸ú×ÅÊó±ê¶¯Ê±ÖÓ£¡ÒýÓ㺠Öà·ÛÃæïˆ
love_java ·¢±íÓÚ 2004-10-22 10:53 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ hibernate in action
- [¶ÁÊé±Ê¼Ç] ³Ö¾Ã»¯ÉúÃüÖÜÆÚ״̬ת»»Í¼£º love_java ·¢±íÓÚ 2004-10-19 16:14 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(3) | ÒýÓÃ(trackback0) | ±à¼ Hibernate In Action
- [¶ÁÊé±Ê¼Ç] cascade="all-delete-orphan"µÄÓô¦£º 1¡¢ÈκÎÒ»¸ö¹ØÁªItem³Ö¾Ã¶ÔÏóµÄеÄBidʵÀý¶¼Òª½øÐг־û¯£¬Èç¹ûItem´ÓÊý¾Ý¿âÖÐɾ³ý£¬¹ØÁªËüµÄ×Ó¶ÔÏ󼯺ÏBids¶¼½«±»É¾³ý¡£ 2¡¢´ÓItemµÄbids¼¯ºÏÀïÃæÒÆ³ýµÄ³Ö¾Ã¶ÔÏóBid»á´ÓÊý¾Ý¿âÖÐɾ³ý¡£ love_java ·¢±íÓÚ 2004-10-19 15:50 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ ʵÌåÀàÓë±íÃûÖ®¼äµÄÃüÃû²ßÂÔ
- [ĬÈÏ·ÖÀà] 1¡¢ÔÚÓ³ÉäÎļþÖÐÊÖ¹¤Ö¸¶¨±íÃû,ÁÐÃûµÈ¡£ 2¡¢Í¨¹ý×Ô¼ºÊµÏÖnet.sf.hibernate.cfg.NamingStrategy½Ó¿Ú£¬Í³Ò»Êý¾Ý¿â±íµÄÃüÃû²ßÂÔ.NamingStrategy½Ó¿ÚÖÐÏà¹Ø·½·¨µÄÓÐЧÐÔ£º ¢ÙclassToTableName()·½·¨£ºµ±ÔÚÓ³ÉäÎļþÖеÄÓ³ÉäÖÐûÓÐÖ¸¶¨±íÃûʱ£¬Hibernate²Å»áµ÷Óø÷½·¨¡£ ¢ÚpropertyToColumnName()·½·¨£ºµ±Ó³ÉäÖÐûÓÐûÓÐÁÐÃûʱµ÷Óᣠ¢ÛtableName()ºÍcolumnName()·½·¨£ºµ±ÔÚÓ³ÉäÎļþÖж¨ÒåÁ˱íÃûºÍÁÐÃûʱµ÷ÓᣠÔÚConfigurationÖÐÉêÃ÷ÃüÃû²ßÂÔµÄʵÀý¾ÍÄÜÈÃʵÏÖÁËNamingStrategy½Ó¿ÚµÄÀàÉúЧ¡£´úÂ룺Configuration cfg = new Configuration(); cfg.setNamingStrategy(new TestNamingStrategy(); SessionFactory sessionFactory = cfg.configure().buildSessionFactory(); ×¢£ºTestNamingStrategyΪÄãʵÏÖNamingStrategy½Ó¿ÚµÄÀà(Ò²¾ÍÊÇÄã×Ô¼ºµÄÃüÃû²ßÂÔ). ÕâÑù£¬»ùÓÚÒ»¸öÓ³ÉäÎļþ¿ÉÒÔÓжà¸öSessionFactoryʵÀý£¬Ã¿¸öSessionFactoryʵÀýʹÓò»Í¬µÄNamingStrategy¡£ love_java ·¢±íÓÚ 2004-10-10 11:05 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ HibernateµÄÊôÐÔ·ÃÎʲßÂÔ
- [ĬÈÏ·ÖÀà] access="property"(ĬÈÏ) ±íʾʹÓÃset/get·½·¨·ÃÎÊÊôÐÔ¡£ access="field" ±íʾֱ½Ó·ÃÎÊ×Ö¶Î ÍÆ¼öʹÓÃproperty¡£ Ò²¿ÉÒÔ×Ô¼ºÊµÏÖnet.sf.hibernate.property.PropertyAccessor½Ó¿ÚÀ´¶¨ÒåÊôÐÔ love_java ·¢±íÓÚ 2004-10-10 10:27 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ Ò»¸ö½«GmailÓÊÏäÉú³ÉͼƬµÄÍøÕ¾
- [ĬÈÏ·ÖÀà] »¹¿ÉÒÔ½«hotmailÓëyahooµÄÓÊÏäÖÆ×÷³ÉͼƬÐÎʽ Gmail Icon Maker Ч¹ûͼ£º love_java ·¢±íÓÚ 2004-10-08 09:00 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ Hibernate In Action
- [¶ÁÊé±Ê¼Ç] The most important elements of a Hibernate configuration are the database resources (connection configuration), the transaction strategies, and, of course, the XML-based mapping metadata. love_java ·¢±íÓÚ 2004-09-29 11:03 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ Hibernate In Action
- [ĬÈÏ·ÖÀà] The basic configuration steps of hibernate£¨for non-managed environments): 1.Download and unpark the JDBC driver for your database,which is usually available from the database vendor web site.Place the JAR files in the application class path;do the same with hibernate2.jar . 2.Add Hibernate's dependencies to the classpath; the are distributed along with Hibernate in the lib/directory.See also the text file lib/README.txt for a list of required and optional librariers. 3.Choose a JDBC connection pool supported by hibernate and configure it with a properties file.Don't forget to specify the SQL Dialect. 4.Let the configuration know about these properties by placing them in a hibernate.properties file in the classpath. 5.Create an instance of the configuration in your application and load the XML mapping files using either addResource() or addClass() . 6.Build a SessionFactory from the configuration by calling buildSessionFactory(); ¼òµ¥µÄ˵¾ÍÊÇ:ÏÂÔØ²¢½âѹÄãÓ¦ÓóÌÐòʹÓõÄÊý¾Ý¿âµÄjdbcÇý¶¯°ü£¬½«Ëüͬhibernate°ü¼°hibernateËùÐèµÄ°ü·Åµ½ÄãµÄÓ¦ÓóÌÐòµÄÀà·¾¶£»Ñ¡ÔñÒ»¸öhibernateÖ§³ÖµÄÁ¬½Ó³Ø£¬Ö¸¶¨ËùʹÓÃÊý¾Ý¿âµÄ·½ÑÔ£¬²¢ÅäÖúÃÁ¬½Ó³Ø.È»ºó½«¸ÃÁ¬½Ó³ØµÄÅäÖÃÐÅÏ¢·Åµ½hibernate.propertiesÎļþÀï,²¢½«¸ÃÎļþ·Åµ½Ó¦ÓóÌÐòµÄÀà·¾¶Àï,ÕâÑù»ù±¾ÅäÖþÍokÁË.È»ºóÔÚÓ¦ÓóÌÐòÖд´½¨Ò»¸öconfigurationµÄʵÀý,¸ù¾Ý¸ÃʵÀý»ñµÃÒ»¸öSessionFactory(¶ÔÓ¦Ò»¸öÊý¾Ý¿âÓ¦Ö»ÓÐÒ»¸öSessionFactory).ÔÙͨ¹ýSessionFacotryÖлñÈ¡SessionÀ´½øÐжÔÊý¾Ý¿âµÄ²Ù×÷ love_java ·¢±íÓÚ 2004-09-27 11:19 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ Hibernate in Action
- [¶ÁÊé±Ê¼Ç] hibernateÎĵµÍƼö£º ÿ¸ö³Ö¾Ã¶ÔÏóÓ¦¸ÃÓÐ×Ô¼ºµÄµ¥¶ÀµÄÓ³ÉäÎļþ£¬²»Òª½«ËùÓÐÓ³Éäдµ½Ò»¸öÎļþÖÐÈ¥£»²¢°ÑÓ³ÉäÎļþ¸úÆäÏà¹ØµÄ³Ö¾Ã¶ÔÏóµÄÀàÎļþ·Åµ½Í¬Ò»Ä¿Â¼ÏÂÃæ¡£ love_java ·¢±íÓÚ 2004-09-24 14:35 | ÔĶÁÈ«ÎÄ | ÆÀÂÛ(0) | ÒýÓÃ(trackback0) | ±à¼ ·ÖÒ³: [1] [2] [3] [4] [5] ·ç¸ñÉè¼Æ£º someok