<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7972176256622835714</id><updated>2011-11-27T16:53:02.611-08:00</updated><category term='grails'/><category term='网页设计'/><category term='cmm'/><title type='text'>sword's blog</title><subtitle type='html'>I just want you in my life!</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sword-open.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sword-open.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>sword</name><uri>http://www.blogger.com/profile/09940217890140949954</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7972176256622835714.post-6777052510826520833</id><published>2009-07-12T22:00:00.000-07:00</published><updated>2009-07-12T23:11:22.342-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='网页设计'/><title type='text'>推荐大家50个非常漂亮的blogger模板</title><content type='html'>推荐大家50个非常漂亮的blogger模板。有喜欢的就赶紧用上吧。&lt;br /&gt;&lt;p&gt;&lt;a linkindex="128" href="http://www.geckoandfly.com/2006/12/19/andreas02-blogger-beta-template/"&gt;Andreas02&lt;/a&gt; – Lots of tab links above the header. You can showcase the description of each active tab on the header.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_70drrx6tct.png" alt="Andreas02" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="129" href="http://www.geckoandfly.com/2007/01/04/andreas08-blogger-beta-template/"&gt;Andreas08&lt;/a&gt; – From the same author of the one above. The header is ready to be customised with your own picture.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_69gdb3q63k.png" alt="Andreas08" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="130" href="http://blogandweb.com/2007/05/14/plantilla-blogy-agua/"&gt;Agua&lt;/a&gt; – A minimalistic clean template giving a pure white look.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_37f9qg6wg8.png" alt="Aqua" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="131" href="http://blogandweb.com/2007/05/23/plantilla-blogy-cajas/"&gt;Cajas&lt;/a&gt; – A blog tittle in a header that looks like the Blogger navbar and five menu links with multi-color backgrounds that tool the place of the traditional blog header.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_35c8kcj6cw.png" alt="Cajas" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="132" href="http://blogger-templates.blogspot.com/2007/04/colibri.html"&gt;Colibri&lt;/a&gt; – This reminds you of a garden, doesn’t it?&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_72sd9shmgf.jpg" alt="Colibri" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="133" href="http://blogandweb.com/2007/05/31/plantilla-blogy-dead/"&gt;Dead&lt;/a&gt; – This one can be described as heavy metal/rock style – sinister and dark.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_38d6w6s5g2.png" alt="Dead" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="134" href="http://blogandweb.com/2007/05/08/plantilla-blogy-eclipse/"&gt;Eclipse&lt;/a&gt; – Another dark theme that brings werewolves to mind. An enchanting template for the dark souls.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_32fgqsh8cz.png" alt="Eclipse" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="135" href="http://www.geckoandfly.com/2007/05/11/emire-blogger-xml-template/"&gt;Emire&lt;/a&gt; – Beautiful color combination but I wish there was more width for the post and the sidebar.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_67dcs2p6dt.png" alt="Emire" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="136" href="http://blogandweb.com/2007/05/10/plantilla-blogy-hada-negra/"&gt;Hada-negra&lt;/a&gt; – A beautiful template – seductive and pleasing to the eyes.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_34fvsqzkdx.png" alt="Hada negra" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="137" href="http://blogandweb.com/2007/05/13/plantilla-blogy-integral/"&gt;Integral&lt;/a&gt; – The most striking visual details on this template are its rounded header and the green and sky-blue color combination.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_36gj76jw6q.png" alt="Integral" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="138" href="http://www.jackbook.com/2007/08/iphone-template.html"&gt;iPhone&lt;/a&gt; – An elaborate Wordpress theme converted into Blogger. The large header button could probably be used better.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_42ck3mz9dd.png" alt="iPhone" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="139" href="http://www.geckoandfly.com/2006/12/10/k2-blogger-beta-template-2/"&gt;K2&lt;/a&gt; – A popular Wordpress theme cloned for Blogger.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_66c7z8dgcb.png" alt="K2" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="140" href="http://blogandweb.com/2007/06/03/plantilla-blogy-minyx/"&gt;Minyx&lt;/a&gt; – A template that looks like an invitation card. Good use of space in the header.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_39f5xxs7dk.png" alt="Minyx" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="141" href="http://www.jackbook.com/2007/08/mushblue-blogger-template-another-dark.html"&gt;Mushblue&lt;/a&gt; – Striking header color and works well with the dark background.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_49fhb5qpdp.png" alt="Mushblue" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="142" href="http://blogandweb.com/2007/05/19/plantilla-blogy-natural/"&gt;Natural&lt;/a&gt; – If you are the artistic kind, this one will be a feast for your eyes.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_40hmgr68hp.png" alt="Natural" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="143" href="http://blogandweb.com/2007/05/18/plantilla-blogy-neoneon/"&gt;Neoneon&lt;/a&gt; – This is another unique design –  rectangle  sidebar boxes and spiral main body.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_41dc9x8md9.png" alt="Neoneon" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="144" href="http://www.jackbook.com/2007/08/red-white-web-20-blogger-template.html#updates"&gt;Red-White Web 2.0&lt;/a&gt; – The buttons are nice. The search bar looks like a candy bar. The color combination is good. A template true to its name.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_43f7n3kdfq.png" alt="Red White" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="145" href="http://blogger-templates.blogspot.com/2007/04/s08.html"&gt;S08&lt;/a&gt; – A blue color body on a darker blue background – you might have thought it won’t work? But here it is.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_71gv3f42hm.jpg" alt="S08" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="146" href="http://blogandweb.com/2007/05/08/plantilla-blogy-vertical/"&gt;&lt;br /&gt;Vertical&lt;/a&gt; – As a the name suggests, this is a vertically designed clean template. You might want to throw in some more code and utilize the space below the blog title better.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_33fvbqs3fz.png" alt="Vertical" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="147" href="http://www.jackbook.com/2007/07/web-20-blogger-template-dark.html"&gt;Web 2.0&lt;/a&gt; – A black and white template with a slight touch of blue color on the blog logo and the RSS feed.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_4427k6cpn4.png" alt="Web 2.0" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;3-column templates&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a linkindex="148" href="http://www.geckoandfly.com/2007/01/04/andreas04-blogger-beta-template/"&gt;Andreas4&lt;/a&gt; – Another popular Wordpress template by Andreas cloned for Blogger. The template can be used as a bare bone structure for customization.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_18gg7p9fgn.png" alt="Andreas04" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="149" href="http://k2modify.blogspot.com/2007/08/autumn-grass.html"&gt;Autumn Grass&lt;/a&gt; – I like the color combination and the vertical menu links in the header. There is also sufficient space there for ads and videos.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_17c3sk4kfj.png" alt="Autumn grass" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="150" href="http://www.jackbook.com/2007/09/3-columns-blogger-template-clean.html"&gt;Beautiful Red Apple&lt;/a&gt; – Another nice Wordpress theme converted into a Blogger template, has a 940px width frame, lots of space and customization possibilities.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_16wd5xbjgm.png" alt="Apple" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="151" href="http://k2modify.blogspot.com/2007/07/butterfly-magic-3-column-blogger_21.html"&gt;Butterfly Magic&lt;/a&gt; – Another beautiful color combination, or shall we call it just another butterfly effect &lt;img src="http://mashable.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /&gt; &lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_21d8z5rkdm.png" alt="Butterfly" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="152" href="http://www.jackbook.com/2007/08/clean-elegant-blogger-template.html"&gt;Clean Elegant&lt;/a&gt; – Here’s one for all you Photoshop lovers, though we could do without the Adsense ad box, which spoils the whole meaning of the template.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_59fgr9htfz.png" alt="Clean" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="153" href="http://blogandweb.com/2007/05/09/plantilla-blogy-columnas/"&gt;Columnas&lt;/a&gt; – This theme’s peculiar design stands out from the rest of the templates in this list. Nice and clean.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_30fgswr8gx.png" alt="Columnas" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="154" href="http://blogandweb.com/2007/07/17/plantilla-blogy-cultivado/"&gt;&lt;br /&gt;Cultivado&lt;/a&gt; – Neat, floral, elegant – this one’s perfect for writing on life, philosophy, thoughts, poetry, love and the like.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_255nm4zdpk.png" alt="Cultivado" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="155" href="http://templates.arcsin.se/dark-ritual-blogger-template/"&gt;Dark Ritual&lt;/a&gt; – A nice theme which somehow reminds us of Adams Family.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_52ff2z8g4n.png" alt="Dark" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="156" href="http://www.geckoandfly.com/2007/06/05/erudite-blogger-template-2/"&gt;Erudite&lt;/a&gt;  – A neat three-column Blogger template with the black color header and the orange color RSS icon gelling well.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_55j6xrpwdf.png" alt="Erudite" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="157" href="http://www.jackbook.com/2007/07/fluid-solution-wordpress-theme.html"&gt;Fluid Solution&lt;/a&gt; – Another cool black and white look.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_56cmxxxt2p.png" alt="Fluid" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="158" href="http://www.jackbook.com/2007/07/fresh-blogger-template.html"&gt;Fresh Blogger Template&lt;/a&gt; – A fresh looking (it really is) green and blue theme. Great usability.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_57ggmv2pgf.png" alt="Fresh" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="159" href="http://www.jackbook.com/2007/07/garland-wordpress-theme.html"&gt;Garland&lt;/a&gt; – &lt;span class="blippr-nobr"&gt;Drupal&lt;span class="blippr-nobr"&gt;&lt;a linkindex="160" href="http://www.blippr.com/apps/392368-Drupal" target="_blank" rel="http://www.blippr.com/apps/392368-Drupal.whtml" class="blippr-inline-smiley blippr-inline-smiley-05"&gt;&lt;span&gt; (&lt;/span&gt;&lt;img class="wp-smiley" src="http://static1.blippr.com/images/inline-face_05.png?1237094634" alt="Drupal" /&gt;&lt;span&gt;)&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;’s default look copied to Blogger. Soothing to the eyes, isn’t it?&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_58dzsk5gdp.png" alt="Garland" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="161" href="http://www.jackbook.com/2007/08/red-and-dark-blogger-template-glow.html"&gt;Glow&lt;/a&gt; – If Hellboy or Flash Gordon wanted to blog, this is one template they might like.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_51hsb82vf6.png" alt="Glow" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="162" href="http://customtemplates.blogspot.com/2007/05/green-marinee-released.html"&gt;Green Marinee&lt;/a&gt; – A long time favorite of many bloggers ported to Blogger. Great use of space, and a nice color combination.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_60ft8ncg4k.png" alt="Green Marinee" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="163" href="http://tabo.aurealsys.com/templates/hemingway-template-for-blogger/"&gt;Hemingway&lt;/a&gt; – A beautiful dark template – one column for the post body and three column on the footer.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_61gqt6pzcz.png" alt="Hemingway" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="164" href="http://blogandweb.com/2007/08/10/plantilla-blogy-illacrimo/"&gt;Illacrimo&lt;/a&gt; – A beautiful clone for Blogger from the Wordpress theme Illacrimo, though I feel there should be a way to use more space currently taken by the date-display on the left of the screen.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_23fdn3kfww.png" alt="illacrimo" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="165" href="http://blogandweb.com/2007/05/08/plantilla-blogy-informativo/"&gt;Informativo&lt;/a&gt; – A similar template to the Columnas template above but with the header, for the less-unconventional bloggers who wants to stick with the proven.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_31fq8xzkdx.png" alt="Informativo" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="166" href="http://thrbrtemplates.blogspot.com/2007/02/likewise-v11.html"&gt;Likewise v1.1&lt;/a&gt; – A clean white template with one column for the post and with three column footer on a black background.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_64g9k4jtdt.png" alt="Likewise" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="167" href="http://www.jackbook.com/2007/09/magazine-style-template-red.html"&gt;Magazine-Style&lt;/a&gt; – A nice template if you have a lot of information and widgets to display up front. It has got a three columns in the main area as well as in the footer area.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_46d7cbmvcm.png" alt="Magazine" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="168" href="http://blogandweb.com/2007/05/15/plantilla-blogy-minimalistanegro/"&gt;Minimalista&lt;/a&gt; – Another great port from Wordpress to Blogger.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_29cn67rqvd.jpg" alt="Minimalista" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="169" href="http://b-themes.blogspot.com/2007/09/minyx-template-for-blogger.html"&gt;Minyx 2.0&lt;/a&gt; – A great template without pictures; good use of available space.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_62dxxjrsdm.png" alt="Minyx 2.0" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="170" href="http://www.finalsense.com/services/blog_templates/pink_flower_template.htm"&gt;Pink Flower&lt;/a&gt; – A simple and elegant template with an image of, you guessed it, a pink flower.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_63cqvkrg2s.png" alt="Pink flower" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="171" href="http://blogandweb.com/2007/05/17/plantilla-blogy-pizza/"&gt;Pizza&lt;/a&gt; – Don’t be dissuaded by the pizza theme if you are thinking of using this for a different subject blog. The template is highly customizable. The unique element in this template is the header which has been divided into two parts. You can display your blog logo or tittle on the left-side header box while using the other box for whatever you like.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_28hps8k7c6.png" alt="Pizza" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="172" href="http://blogandweb.com/2007/07/20/plantilla-blogy-pro/"&gt;Pro&lt;/a&gt; – A different-look search box, menu links above the blog title, and the graduated blue header background in a unique design makes this template unique.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_23fdn3kfww1.png" alt="Pro" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="173" href="http://blogandweb.com/2007/05/31/plantilla-blogy-puerto/"&gt;Puerto&lt;/a&gt; – Somehow this template makes the post body look grand and majestic.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_26c97w7vdp.png" alt="Puerto" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="174" href="http://beautifulbeta.blogspot.com/2007/01/new-blogger-template-hobbit.html"&gt;The Hobbit&lt;/a&gt; – If you are a fan of Tolkien, this one is for you.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_74hm8nrmdt.jpg" alt="Hobbit" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="175" href="http://hackosphere.blogspot.com/2006/12/now-available-neo-template.html"&gt;Neo&lt;/a&gt; – A 3 column template that reloads in parts allowing faster reading and surfing.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_73ff5bbzcr.png" alt="Neo" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;4-column templates&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;a linkindex="176" href="http://www.jackbook.com/2007/08/dark-blogger-template-slined-mod-20-by.html"&gt;Slined Mod 2.0&lt;/a&gt; – Somehow, this one seems to fit a music/gaming theme best.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_50f28w3qc4.png" alt="Slined" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="177" href="http://blogandweb.com/2007/05/17/plantilla-blogy-neosapien/"&gt;Neosapian&lt;/a&gt; – The contrast between black and red is striking. The second right-hand sidebar can be widen further and the red header can be used subtly for ads or to display more information. You decide whether to change the current header image or not &lt;img src="http://mashable.com/wp-includes/images/smilies/icon_smile.gif" alt=":-)" class="wp-smiley" /&gt; &lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_27gk7h8pfp.png" alt="Neosapian" /&gt;&lt;/center&gt;&lt;/ul&gt; &lt;p&gt;&lt;a linkindex="178" href="http://www.blogcrowds.com/resources/view_template.php/qwilm%21_68"&gt;Qwilm&lt;/a&gt; – A simple looking great design that can be customized to a great extent.&lt;/p&gt; &lt;ul id="contactinfo"&gt;&lt;center&gt;&lt;img src="http://ec.mashable.com/wp-content/uploads/2007/09/dd9b4wnz_65ddwd5wdx.jpg" alt="Qwilm" /&gt;&lt;/center&gt;&lt;/ul&gt;&lt;br /&gt; 原文连接: &lt;a href="http://mashable.com/2007/09/13/blogger-templates/"&gt;http://mashable.com/2007/09/13/blogger-templates/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7972176256622835714-6777052510826520833?l=sword-open.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sword-open.blogspot.com/feeds/6777052510826520833/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7972176256622835714&amp;postID=6777052510826520833' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default/6777052510826520833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default/6777052510826520833'/><link rel='alternate' type='text/html' href='http://sword-open.blogspot.com/2009/07/50blogger.html' title='推荐大家50个非常漂亮的blogger模板'/><author><name>sword</name><uri>http://www.blogger.com/profile/09940217890140949954</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7972176256622835714.post-8318768749012264579</id><published>2008-08-20T01:25:00.000-07:00</published><updated>2008-08-20T01:28:13.672-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='grails'/><title type='text'>用Acegi Security来保护Grails应用</title><content type='html'>&lt;div class="entry"&gt;      &lt;p&gt;本文论述了grails-acegi plugin与一个简单Grails应用的集成。集成使用了三个主要组件——&lt;a set="yes" linkindex="2" href="http://groovy.codehaus.org/"&gt;Groovy&lt;/a&gt;, &lt;a linkindex="3" href="http://grails.codehaus.org/"&gt;Grails&lt;/a&gt;和&lt;a linkindex="4" href="http://www.acegisecurity.org/"&gt;Acegi Security&lt;/a&gt;.&lt;/p&gt; &lt;div class="vendor-content-box-float"&gt; &lt;h3&gt;相关&lt;span class="vendor"&gt;厂商&lt;/span&gt;内容&lt;/h3&gt; &lt;p class="entrypdf"&gt;&lt;a set="yes" linkindex="5" href="http://www.infoq.com/infoq/url.action?i=239&amp;amp;t=f" target="_blank"&gt; 免费迷你书下载：深入浅出Struts 2 &lt;/a&gt;&lt;/p&gt; &lt;p class="entrypdf"&gt;&lt;a set="yes" linkindex="6" href="http://www.infoq.com/infoq/url.action?i=246&amp;amp;t=f" target="_blank"&gt; 活动：体验基于OpenSolaris的Web/企业应用（8.30 杭州） &lt;/a&gt;&lt;/p&gt; &lt;p class="entrypdf"&gt;&lt;a linkindex="7" href="http://www.infoq.com/infoq/url.action?i=241&amp;amp;t=f" target="_blank"&gt; SOY Framework：Java富客户端快速开发框架 &lt;/a&gt;&lt;/p&gt; &lt;p class="entryarticle"&gt;&lt;a linkindex="8" href="http://www.infoq.com/infoq/url.action?i=242&amp;amp;t=f" target="_blank"&gt; Hadoop中的集群配置和使用技巧 &lt;/a&gt;&lt;/p&gt; &lt;p class="entrypdf"&gt;&lt;a linkindex="9" href="http://www.infoq.com/infoq/url.action?i=243&amp;amp;t=f" target="_blank"&gt; 免费迷你书下载：Grails入门指南 &lt;/a&gt;&lt;/p&gt; &lt;h3&gt;相关赞助商&lt;/h3&gt; &lt;p&gt;&lt;a linkindex="10" href="http://www.infoq.com/infoq/url.action?i=245&amp;amp;t=f" target="_blank"&gt; &lt;img style="margin: 0pt 0pt 5px 5px;" src="http://www.infoq.com/resource/sponsorship/featuredcategory/739/Java.gif" alt="" align="right" border="0" /&gt; &lt;/a&gt;&lt;/p&gt; &lt;div class="entrysponsors"&gt;&lt;a linkindex="11" href="http://www.infoq.com/infoq/url.action?i=244&amp;amp;t=f" target="_blank"&gt;InfoQ中文站Java社区&lt;/a&gt;，关注企业Java社区的变化与创新，通过新闻、文章、视频访谈和演讲以及迷你书等为中国Java技术社区提供一流资讯。&lt;/div&gt; &lt;/div&gt; &lt;p&gt;&lt;strong&gt;Groovy&lt;/strong&gt;是一个针对Java平台的强大的高级语言，其代码最终被编译为Java字节码。在概念上，它类似于 Ruby或Python，可是它与Java平台紧密地集成在一起。这就使你既可利用强大简明的编码语法，又可继续停留在JVM上，从而保护你在已有 Java平台和相关类库上的投资。&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Grails&lt;/strong&gt;是一个用Groovy实现的全功能框架。Grails试图通过其核心技术及相关plug-in来解决Web开发中的许多难题。开箱即用的功能包括：&lt;/p&gt; &lt;ul&gt;&lt;li&gt;建立在&lt;a linkindex="12" href="http://hibernate.org/"&gt;Hibernate&lt;/a&gt;之上的对象/关系映射（ORM）层&lt;/li&gt;&lt;li&gt;被称为Groovy Server Pages（GSP）的富于表现的视图（View）技术&lt;/li&gt;&lt;li&gt;构建在&lt;a linkindex="13" href="http://www.springframework.org/"&gt;Spring&lt;/a&gt; MVC之上的控制器（controller）层&lt;/li&gt;&lt;li&gt;构建在&lt;a linkindex="14" href="http://gant.codehaus.org/"&gt;Gant&lt;/a&gt;（基于Groovy的Ant）之上的一个命令行脚本环境&lt;/li&gt;&lt;li&gt;一个内嵌Jetty容器，被配制为可实时进行资源重载&lt;/li&gt;&lt;li&gt;通过内置Spring容器支持依赖注入（dependency injection）&lt;/li&gt;&lt;li&gt;支持国际化（i18n），这一功能是使用Spring的MessageSource API来构建的&lt;/li&gt;&lt;li&gt;事务服务层，其利用了Spring的事务管理功能&lt;/li&gt;&lt;li&gt;广泛应用了领域特定语言（Domain-Specific Languages——DSLs）&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;&lt;strong&gt;Acegi Security&lt;/strong&gt;是为企业级软件提供的一个强大的、灵活的安全解决方案，尤其是那些使用了Spring的应用。Acegi提供了全面的认证、授权、基于实例的访问控制、信道安全以及人类用户检测能力。&lt;/p&gt; &lt;p&gt;本文假定你已经阅读过了Grails指南——由&lt;a linkindex="15" href="http://jasonrudolph.com/blog/"&gt;Jason Rudolph&lt;/a&gt;所编写的&lt;a linkindex="16" href="http://www.infoq.com/cn/minibooks/grails"&gt;Grails入门指南&lt;/a&gt;， 而且已经实现了其中示例的RaceTrack应用。Grails-acegi plugin将被集成进RaceTrack，为你的应用提供安全性。利用grails-acegi plugin为你免除了在应用中实现Grails拦截器所需的开支，提供了比拦截器更加灵活的解决方案，也节约了你利用Acegi重新实现自己的安全系统 所要花费的时间。&lt;/p&gt; &lt;h2 id="setup"&gt;建立RaceTrack例子应用&lt;/h2&gt; &lt;p&gt;首先，你需要下载&lt;a linkindex="17" href="http://grails.codehaus.org/Installation"&gt;Grails 1.0&lt;/a&gt;、&lt;a set="yes" linkindex="18" href="http://grails.codehaus.org/AcegiSecurity+Plugin"&gt;grails-acegi-0.2 plugin&lt;/a&gt;以及&lt;a linkindex="19" href="http://java.sun.com/javase/downloads/index.jsp"&gt;Java SE JDK 5.0&lt;/a&gt;或更新版。&lt;/p&gt; &lt;p&gt;这里，我们假定你已经实现了&lt;a set="yes" linkindex="20" href="http://www.infoq.com/cn/minibooks/grails"&gt;Grails入门指南&lt;/a&gt;中 所描述的RaceTrack应用的大部分功能。但是，为了测试grails-acegi plugin，你不必完成整个指南。测试grails-acegi plugin所需的全部东西包括：领域类（domain classes）和controller，controller的脚手架对于测试来说已经足够了。&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure1.JPG" alt="图 1 —— 创建完racetrack应用后的目录结构" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 1 —— 创建racetrack应用后的目录结构&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;你的RaceTrack应用目录看起来应该和图1显示的类似。现在，打开\grails-app\domain目录：&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure2.JPG" alt="图 2 —— 领域类目录" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 2 —— 领域类目录&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;正如你从图2中看到的，“domain”目录只包含了两个domain类：Race和Registration。现在，打开\grails-app\controllers目录，确认一下每个domain类都有一个对应的controller，如图3所示：&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure3.JPG" alt="图 3 —— Controllers目录" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 3 —— Controllers目录&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;这些controller可以是空的、脚手架（scaffold）controller，例如：&lt;/p&gt; &lt;pre&gt;  class RaceController { def scaffold = Race }&lt;br /&gt;&lt;br /&gt;class RegistrationController { def scaffold = Registration }&lt;/pre&gt; &lt;p&gt;这足以让程序跑起来了。在你开始运行RaceTrack应用之后，你将能够在如图4所示的contoller list中看到两个你所创建的controller：&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure4.JPG" alt="图 4 —— Grails-Acegi Plugin之前的首页" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 4 —— 使用Grails-Acegi Plugin之前的首页&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;h2 id="install"&gt;安装Grails Acegi plugin&lt;/h2&gt; &lt;p&gt;下一步是安装grails-acegi plugin，这样RaceTrack就可以利用该plugin所提供的基于角色的安全防护。在命令提示行中，进入到“racetrack”目录并运行如下命令：&lt;/p&gt; &lt;pre&gt;grails install-plugin [path-to]/grails-acegi-0.2.zip&lt;/pre&gt; &lt;p&gt;这一命令会在“racetrack”目录下创建一个plugins目录，如图5所示：&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure5.JPG" alt="图 5 —— 安装plugin之后所创建的plugins目录" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 5 —— 安装plugin之后所创建的plugins目录&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;h2 id="creation"&gt;创建Acegi Security组件&lt;/h2&gt; &lt;p&gt;下一步是创建代表用户帐号（Accounts）和角色（Roles）的领域类。运行如下命令开始这一过程：&lt;/p&gt; &lt;pre&gt;grails create-auth-domains AuthUser Role&lt;/pre&gt; &lt;p&gt;这一命令将创建两个领域类（AuthUser和Role）、建立AcegiConfig类、并创建Login和Logout两个 controller。AuthUser领域类代表你的用户，因此每个新用户都将在Auth_User表中创建一条新的记录。Role领域类代表每个用户 所拥有的安全角色，Role将被指派给AuthUser。所有这些类都显示在图6中。&lt;/p&gt; &lt;p&gt;AcegiConfig类（图7）定义了你的应用的安全配置。配置中包括：用户领域类的名字（本例为AuthUser）以及角色领域类的名字（本例为Role），使用动态还是静态安全Urls，怎样设置email警报（打开或关闭它们）。&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure6.JPG" alt="图 6 —— AuthUser.groovy、Role.groovy和Requestmap.groovy（在AcegiConfig中使用）" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 6 —— AuthUser.groovy、Role.groovy和Requestmap.groovy（在AcegiConfig中使用）&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure7.JPG" alt="图 7 —— 已创建的AcegiConfig.groovy" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 7 —— 已创建的AcegiConfig.groovy&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;为了创建新的AuthUser，创建新的Role并指派给AuthUser，我们还得运行两个命令。其一是产生领域类的CRUD控制：&lt;/p&gt; &lt;pre&gt;grails generate-manager&lt;/pre&gt; &lt;p&gt;第二个是为controller和domain产生registration：&lt;/p&gt; &lt;pre&gt;grails generate-registration&lt;/pre&gt; &lt;p&gt;这些命令给了用户注册并创建其用户名和口令的能力，默认的安全角色将被指派给该用户。从图8可以看到所产生的这一controller集合：&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure8.JPG" alt="图 8 —— CRUD controllers （Login和Logout controller是在AuthUser和Role被创建的时候创建的）" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 8 —— CRUD controllers （Login和Logout controller是在AuthUser和Role被创建的时候创建的）&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure9.JPG" alt="图 9 —— 安装grails-acegi-plugin之后可用的Controller" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 9 —— 安装grails-acegi-plugin之后可用的Controller&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;访问RaceTrack首页——它看上去类似于图9所示内容。&lt;/p&gt; &lt;h2 id="config"&gt;配制Acegi Security来保护应用&lt;/h2&gt; &lt;p&gt;我们现在创建一个用户角色和管理者角色——首先点击RoleController，输入角色名“user”以及角色描述（图10）。注意 RoleController将会把“user”转换成“ROLE_USER”，数据库中和Acegi的配置中将使用“ROLE_USER”。重复同样的 步骤创建一个管理者角色。&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure10.JPG" alt="图 10 —— 创建一个用户角色" /&gt;&lt;/p&gt; &lt;p&gt;&lt;small&gt;&lt;strong&gt;图 10 —— 创建一个用户角色&lt;/strong&gt;&lt;/small&gt;&lt;/p&gt; &lt;p&gt;回到首页，点击UserController。现在创建一个拥有“user”角色的用户和另一个拥有“manager”角色的用户，如图11所示：&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure11.JPG" alt="图 11 —— 创建一个标准用户，激活该帐户并为其指派“user”角色" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 11 —— 创建一个标准用户，激活该帐户并为其指派“user”角色&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;我们创建的角色和用户现在已经足够用作配置了，下一步是保护RaceTrack应用。有两种方法保护你的URLs：一种是动态，通过 RequestmapController来实现；另一种是静态的，直接编辑AcegiConfig.groovy文件。动态配置是被推荐的选项，下面我 们继续进行动态配置工作。&lt;/p&gt; &lt;p&gt;在我们保护应用之前，需要考虑一下应用需要给予怎样的访问规则。一个manager被允许读/写访问应用中的任何页面，即：&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;code&gt;/race/*&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;/registration/*&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;一个用户被允许只读访问某些页面，包括：&lt;/p&gt; &lt;ul&gt;&lt;li&gt;&lt;code&gt;/race/list/*&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;/race/show/*&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;/registration/list/*&lt;/code&gt;&lt;/li&gt;&lt;li&gt;&lt;code&gt;/registration/show/*&lt;/code&gt;&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;这些规则需要使用RequestmapController翻译成Acegi请求映射（Acegi request map）中的条目。从RaceTrack首页上点击RequestmapController，转到“create a new requestmap”页面。在URL域内填写上“/race/**”，在Role域填写为“manager”（图12）——这将创建一条规则，允许任何 拥有manager角色的用户访问/race下的所有URLs。同样的方法可以配置好registration（URL：/registration /**）。&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure12.JPG" alt="图 12 —— Manager访问规则" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 12 —— Manager访问规则&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;注意，一个好的习惯是给manager角色也授予所有用户权限。下一步将给用户角色创建访问规则——在URL域输入“/race/list /**”，在Role域输入“user, manager”（图13——注意角色之间是用逗号分隔的）。这一步骤将创建这样一个访问规则——允许user和manager角色都能访问race列表 页面。注意这两个角色你都需要指定——如果你只将该URL指派给user角色，它将覆盖前面给manager指派的规则，这样只有user角色才能访问该 页面。为前面定义的其他规则重复这一步骤——这将为race和registration页创建所有的访问规则。&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure13.JPG" alt="图 13 —— 为/race/list/**页面创建规则——准许user和manager角色访问" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 13 —— 为/race/list/**页面创建规则——准许user和manager角色访问&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;h2 id="testing"&gt;测试&lt;/h2&gt; &lt;p&gt;在RaceTrack首页上点击RaceController或RegistrationController（我们已经保护了这些 controller）。你将注意到页面自动重定向到了Login页面。如果你先以manager角色的用户登录，你就能够浏览、创建、更新和删除 race和registration页面的任何东西。&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure14.JPG" alt="图 14 —— 以一个用户身份登录" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 14 —— 以一个user身份登录&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;回到RaceTrack首页并点击LogoutController——这将使你的用户session失效并登出。再次点击LoginController，但是这次以user角色的用户登录。如果你转向/race/list的子页面（直接访问&lt;a linkindex="21" href="http://localhost:8080/racetrack/race/list"&gt;http://localhost:8080/racetrack/race/list&lt;/a&gt;或通过controller转过去），你将看到race/list视图（图15）。&lt;/p&gt; &lt;p&gt;记得么，访问规则只允许manager创建新记录，user角色只允许从List和Show页面读取数据——这意味着如果你以user角色的用户登录并点击了New Race（&lt;a set="yes" linkindex="22" href="http://localhost:8080/racetrack/race/create"&gt;http://localhost:8080/racetrack/race/create&lt;/a&gt;），Acegi将阻止你浏览该页面，它阻止了一个新记录的创建。&lt;/p&gt; &lt;p&gt;它是怎么工作的呢？回想一下，我们给manager角色授权可以访问/race/*，但是只给user角色授权访问/race/list/*和 /race/show/*。当拥有“user”角色的用户试图访问/race/create页面时，Acegi察看该用户所拥有的所有角色，发现其只有 “user”角色——因为我们的Request map说了，必须是“manager”角色才被授权访问这一页面，于是访问这一页面的许可被禁止了。&lt;/p&gt; &lt;p&gt;顺便讲一下，在一个真正的应用中，你可能想要显示一个比默认错误页（图16）更好看的错误页。&lt;/p&gt; &lt;p class="image-wide"&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure15.JPG" alt="图 15 —— Race List视图" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;图 15 —— Race List视图&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;&lt;img src="http://www.infoq.com/resource/articles/grails-acegi-integration/en/resources/figure16.JPG" alt="Figure 16 —— 访问禁止错误页" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;&lt;small&gt;Figure 16 —— 访问禁止错误页&lt;/small&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;恭喜你——现在你已经有了RaceTrack应用的一个完整的安全实例了！&lt;/p&gt; &lt;p&gt;&lt;strong&gt;查看英文原文：&lt;/strong&gt;&lt;a set="yes" linkindex="23" href="http://www.infoq.com/articles/grails-acegi-integration"&gt;Securing a Grails Application with Acegi Security&lt;/a&gt;&lt;/p&gt; &lt;p&gt;转自infog 作者    &lt;strong&gt;Fadi Shami&lt;/strong&gt;译者    &lt;strong&gt;宋玮&lt;/strong&gt;&lt;/p&gt;     &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7972176256622835714-8318768749012264579?l=sword-open.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sword-open.blogspot.com/feeds/8318768749012264579/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7972176256622835714&amp;postID=8318768749012264579' title='1 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default/8318768749012264579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default/8318768749012264579'/><link rel='alternate' type='text/html' href='http://sword-open.blogspot.com/2008/08/acegi-securitygrails.html' title='用Acegi Security来保护Grails应用'/><author><name>sword</name><uri>http://www.blogger.com/profile/09940217890140949954</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7972176256622835714.post-4268146895242530133</id><published>2007-03-18T18:55:00.001-07:00</published><updated>2007-03-18T18:55:51.206-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='cmm'/><title type='text'>CMM之道：一个愚蠢农夫和奶牛的故事</title><content type='html'>&lt;p&gt;&lt;strong&gt;Ivar Jacobson&lt;/strong&gt;博士他被认为是影响或改变了整个软件工业开发模式的几位世界级大师之一，是软件方法论的一面”旗帜”。他是组件和组件架构、用例、现代业务工程、Rational统一过程等业界主流方法或技术的创始人。 &lt;/p&gt;&lt;div&gt;&lt;span style="display: none;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;br /&gt;　　&lt;br /&gt;　　Ivar Jacobson博士认为，如果采用不良的软件过程，通过CMM/CMMI的成熟度级别越高，只会使软件企业生产不合格软件的过程更加有效率，而不是使企业开发出更好的软件。&lt;br /&gt;　　&lt;br /&gt;　 　软件外包是时下的一个热门话题，被我国不少软件企业视为一座金矿，而CMM被人们认为是进入这个市场的敲门砖，为了拿到那张代表资格的CMM认证证书， 不少企业甚至不惜投入数百万之巨。事实上，拿到CMM认证在国外并不代表企业就能提供一个合格的软件，著名的软件专家、拥有组件技术、用例技术等多项发 明、与Grady Booch、James Rumbaugh一起被称为UML之父的Ivar Jacobson博士在近期访华期间一再提醒中国的软件企业，谨防掉入CMM陷阱。&lt;p&gt; &lt;/p&gt;&lt;p&gt;&lt;strong&gt;CMM/CMMI的缺点&lt;/strong&gt;&lt;br /&gt;　　&lt;br /&gt;　　CMM/CMMI最早起源于美国国防部。为了改变在采购过程中频繁地采购到大量不合格软件的局面，美国国防部需要一种评估软件质量的方法，这就是要求软件企业进行CMM/CMMI认证。然而，CMM/CMMI真正解决这个问题了吗？&lt;br /&gt;　　&lt;br /&gt;　 　CMM/CMMI被认为是一种最成熟、最有效地提高软件工程化水平的方法和标准，用来评估和改进过程，它是一个描述在软件开发过程中有待改进的丶蛩氐 目蚣埽枋隽艘桓瞿苡媒ソ绞浇懈慕耐揪丁Ｋ砑谈慕峁┮桓龌。砑⒋右桓鱿喽岳此邓嬉狻⒉怀墒斓墓瘫涑煞浅３墒斓摹⒂泄媛傻摹⒖ 晒芾淼墓獭?lt;BR&gt;　　&lt;br /&gt;　　然而，CMM/CMMI也有一些与身俱来的缺点不容忽视。比如，CMM/CMMI的评估耗资不菲，一个 CMM2级评估就可能达到数百万之巨，而且耗时很长，过程十分复杂，常常导致效果不太理想。不少企业的认证流于形式，评估完成后就只留下一大堆文档，而真 正的软件开发过程却依然故我。而且，CMM/CMMI只告诉我们应该怎么做，而没有具体地告诉如何做。比如说，它要求必须改进需求管理，那么到底该如何做 需求管理？CMM/CMMI没有提供答案。&lt;br /&gt;　　&lt;br /&gt;　　还有最重要的一点是，不少软件企业陷入了一个误区，以为单单通过CMM/CMMI评估 就可以解决软件质量不高的问题，而忽略了软件过程这一真正改善软件质量的环节。事实上，完全有可能出现这样的情况: 软件成熟度为CMM 1级或2级的企业开发出的软件是真正好用的，而有的企业即使通过了CMM 5级认证，也无法保证它交付好的软件。最糟糕的情形是，如果采用不好的软件过程，通过CMM/CMMI的成熟度级别越高，只会使软件企业生产差劲软件的过 程变得更加有效率，而不是使企业开发出更好的软件。&lt;br /&gt;　　Ivar Jacobson认为,好的软件过程首先一定是基于组件的,在此基础之上,还要符合迭代开发、用例驱动开发和以架构为中心的这三个最佳实践。&lt;/p&gt;&lt;p&gt;&lt;strong&gt;合理的软件过程是软件质量的基础&lt;/strong&gt;&lt;br /&gt;　　&lt;br /&gt;　 　为什么会是这样呢，Ivar Jacobson举了一个非常形象的例子。这是一个农夫和他的奶牛的故事。在奶牛喝水的途中（称为”牛路”）有一片庄稼地，牛会吃掉很多庄稼。农夫看到这 种情况后，意识到必须对奶牛喝水的过程进行改进，所以他就在这条道路上铺上了沥青。结果，农夫得到了一个好的”牛路”，牛走得更快了，但是并没有真正解决 牛吃庄稼的问题。它应该有更好的方式，就是为牛喝水寻找一条全新的道路。&lt;br /&gt;&lt;br /&gt;　　软件企业利用CMM框架进行软件质量控制的过程，就像是这 个农夫为牛路铺沥青。对于软件企业来说，如果从一个错误的软件过程开始，即使你在这个上面再改进，得到的永远只是”牛路”。这里更应该考虑的是要选择一条 更好的路，也就是从一开始时，就采用能够开发出好的软件的过程。然后在这个软件过程的基础上，对这个软件进行度量，改进这个软件的过程,也就是进行 CMM/CMMI要求的改进。&lt;/p&gt;&lt;p&gt;　　Ivar Jacobson博士认为，从一个不良的软件过程出发，在此基础上进行改进，实际上会把软件开发变得更糟糕，因为你把软件开发过程固化了，使日后再想对它进行改造，变得更加困难。正确的方法是，先要有一个好的软件过程，这是不容易的，但是值得做的事情。&lt;br /&gt;&lt;br /&gt;　 　Ivar Jacobson 说，”把一个好的软件过程变得可度量非常容易，但是把一个可度量的软件过程变成一个好的软件过程却很难”。也就是说，只有把一个好的软件过程，即能够开发 出好的软件的过程变得可度量才是有益的。而把一个已经经过CMMI改进的、可度量的过程变成一个真正的能够开发出好软件的过程，这是几乎不可能的事情。&lt;br /&gt;&lt;strong&gt;那么什么是一个好的软件过程？&lt;/strong&gt;Ivar Jacobson建议从以下几个方面进行辨别:&lt;br /&gt;&lt;br /&gt;1 坏的过程关注文档上，而好的过程关注在可执行的程序或者系统上;&lt;br /&gt;2 坏的过程延误了揭露风险的时间，而好的过程一开始就把自己暴露在风险之下，并及时解决它;&lt;br /&gt;3 坏的过程在项目的最后才能够验证这个项目的质量，而好的过程其质量是每时每刻都能够得到验证的;&lt;br /&gt;4 坏的过程有一个非常复杂的跟踪关系矩阵，从需求到代码需要一个非常复杂的矩阵，而好的过程，却是一个无缝链接;&lt;br /&gt;5 在面对变更时，坏的软件很脆弱，好的软件会很健壮。&lt;br /&gt;　　&lt;br /&gt;　 　Ivar Jacobson提醒软件开发人员要做聪明的农夫，首先得到一个正确的软件过程; 然后，再考虑去度量它、定义它。因为软件项目管理的本质不是能否描述并度量软件过程以及过程到底怎么样，而是首先关注软件，你是否能很好地开发出合格软 件。重点是得到结果，通过软件过程得到这个结果，也就是交付的软件产品。&lt;/p&gt;&lt;p class="main"&gt;&lt;strong&gt;观点碰撞－敏捷开发企图终结软件危机&lt;/strong&gt;&lt;br /&gt;　　&lt;br /&gt;　 　如今在软件开发领域占绝对主流地位的传统软件工程学思想是大约在20世纪60年代伴随着”软件危机”言论的出现而诞生的。所谓软件危机是指在计算机软件 的开发和维护过程中所遇到的一系列严重问题，它包含两方面内容：一是如何开发软件，以满足不断增长、日趋复杂的需求；二是如何维护数量不断膨胀的软件产 品。的确，传统软件工程学思想的诞生，把软件开发活动按照工程化的原则和方法进行组织，并一度被认为是摆脱软件危机的一个主要出路。&lt;br /&gt;　　&lt;br /&gt;　 　但是，数十年后的今天，人们对于软件危机的”恐惧”仍没有丝毫减弱，相反随着软件系统的急速膨胀而越发不可收拾了：对软件开发成本和进度的估计常常不准 确，开发成本超出预算，实际进度比预定计划一再拖延的现象并不罕见；用户对”已完成”系统不满意的现象也经常发生；软件产品的质量往往靠不住，Bug一大 堆，补丁一个接一个；等等。于是，无论是产业界还是理论界，都开始对传统软件工程学思想产生怀疑，甚至背叛。因此，关于软件到底是”工程”还是”艺术”的 讨论一度风靡全球。而以迭代式循序渐进开发方式为主，以”人”为核心的敏捷开发方法就是在这样的背景下产生的，它背叛了传统软件工程学中以”过程”为核 心，把设计和开发尽可能分开，尽量弱化”人”在整个工程中地位的思想。&lt;br /&gt;　　&lt;br /&gt;　　近日，当世界软件开发领域最具影响力的五位大师之一、敏捷 软件开发方法的早期开拓者马丁·福勒先生来华与国内软件高手论道之际，北京大学软件学院院长阵钟老师再次将软件是”工程”还是”艺术”这一问题摆到了桌面 上。而这位软件教父似乎对这一问题早有深入思考，他认为，这一争论的核心应该在于软件设计是否要与软件开发分开，这也正是传统工程化软件开发方法与敏捷软 件开发方法的重要区别。&lt;br /&gt;　　&lt;br /&gt;　　作为敏捷软件开发方法的推动者，马丁先生认为，软件设计应该和软件开发紧密结合在一起，采用迭代式开发。 软件开发不能被认为是一个既定的过程，因为软件开发中有太多的变化出现，既定的过程设置不可能达到合适的预想结果。由于需求变化、技术更新、人员流动等问 题的存在，许多软件设计工作应该在软件开发到一定程度的时候才能进行，两者不应该在顺序上严格分开。他说:”至于从哲学的角度讲，到底软件开发活动是艺术 还是工程呢？我很难清晰地界定，也许都是或者都不是。也许我们应该把软件开发活动当做一个独立的东西来对待。”&lt;br /&gt;　　&lt;br /&gt;　　由此看来，马丁先 生既不认为软件开发活动应该是一个先进行设计，然后根据 “设计图纸”进行构建的工程化过程，也不认为软件开发应该是完全依赖于开发者头脑中随时蹦出的灵感的艺术活动，因为这两种倾向在人类数十年的软件开发实践 中已经被证明都不甚完美。而他企图在两者之间找到一个均衡点，这个均衡点也许正是真正解决”软件危机”的突破口。&lt;br /&gt;　　&lt;br /&gt;　　据了解，敏捷开 发实际上包括了许多优秀的软件开发习惯。首先，这种方法改变了软件测试的流程，在编写代码前进行测试，减少了开发风险；其次，可以对软件进行持续集成，即 每个小时都在集成，任何部件间的冲突都可以随时解决；此外，这种方法的”动态规划”和”重构”做法，意味着开发者可以对软件架构进行持续改进，可以根据用 户的需求随时进行改进，而利用传统的软件开发方法则很难对软件的架构进行调整，同时也会造成成本的大幅增加。&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7972176256622835714-4268146895242530133?l=sword-open.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sword-open.blogspot.com/feeds/4268146895242530133/comments/default' title='帖子评论'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7972176256622835714&amp;postID=4268146895242530133' title='0 条评论'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default/4268146895242530133'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7972176256622835714/posts/default/4268146895242530133'/><link rel='alternate' type='text/html' href='http://sword-open.blogspot.com/2007/03/cmm.html' title='CMM之道：一个愚蠢农夫和奶牛的故事'/><author><name>sword</name><uri>http://www.blogger.com/profile/09940217890140949954</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
