[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-326972-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-326972-en":131},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","refactoring-improving-the-design-of-existing-code","Refactoring: Improving the Design of Existing Code","","Refactoring: Improving the Design of Existing Code explains how to improve object-oriented software by changing internal structure without altering external behavior. It introduces refactoring principles, rationales, and testing practices, then leads readers through a detailed catalog of refactorings for simpler, maintainable class design. The book covers code “smells,” examples with Java and UML, refactoring research, and practical guidance for professional programmers.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/refactoring-improving-the-design-of-existing-code/326972/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/refactoring-improving-the-design-of-existing-code/326972.png","ImageObject",300,407,{"name":42,"@type":43},"Quinn","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-25","2026-09-21",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",12,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What does refactoring aim to change in a software system?","Question",{"text":63,"@type":64},"Refactoring changes a software system’s internal structure while preserving external behavior. The goal is to keep the code working as before but make it cleaner and easier to maintain.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"Why are tests emphasized in successful refactoring?",{"text":68,"@type":64},"Because improving code can unintentionally break behavior, testing is used to verify that everything still works after each change.",{"name":70,"@type":61,"acceptedAnswer":71},"How is the book’s core material organized?",{"text":72,"@type":64},"The heart of the book is a catalog of refactorings, grouped into chapters that cover areas such as composing methods, moving features between objects, simplifying conditional expressions, and handling generalizations.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},326972,1790497488,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,110,115,120,123,127],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":106,"doc_module":4,"doc_module_name":25,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":25,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":25,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":25,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":25,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":25,"category_name":129,"show_sort_weight":97,"slug":130},19,"General","general",{"code":4,"msg":82,"data":132},{"doc_id":79,"user_id":133,"nickname":42,"user_avatar":134,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":135,"file_id":136,"file_url":137,"file_type":138,"file_size":139,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":140,"language":141,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":142,"faqs":143,"seo_title":144,"seo_description":12,"update_tm":145,"read_time":146,"preview_page_count":147,"preview_urls":148},962075114765,"https://ap-avatar.wpscdn.com/davatar_a8503ba1806abce46bf441b54a3ca4cd","Refactoring: Improving the Design of Existing Code  \nby Martin Fowler, Kent Beck (Contributor), John Brant (Contributor), William Opdyke  , don Roberts  \nAnother stupid release 2002J  \nFor all the people which doesn’t have money to buy a good book  \nYour class library works, but could it be better? Refactoring: Improving the Design of Existing Code shows how refactoring can make object-oriented code simpler and easier to maintain. Today refactoring requires considerable design know-how, but once tools become available, all programmers should be able to improve their code using refactoring techniques.  \nBesides an introduction to refactoring, this handbook provides a catalog of dozens of tips for improving code. The best thing about Refactoring is its remarkably clear presentation, along with excellent nuts-and-bolts advice, from object expert Martin Fowler. The author is also an authority on software patterns and UML, and this experience helps make this abetter book, one that should be immediately accessible to any intermediate or advanced object-oriented developer. (Just like patterns, each refactoring tip is presented with a simple name, a \"motivation,\" and examples using Java and UML.)  \nEarly chapters stress the importance of testing in successful refactoring. (When you improve code, you have to test to verify that it still works.) After the discussion on how to detect the \"smell\" of bad code, readers get to the heart of the book, its catalog of over 70 \"refactorings\"--tips for better and simpler class design. Each tip is illustrated with\"before\" and \"after\" code, along with an explanation. Later chapters provide a quick look at refactoring research.  \nLike software patterns, refactoring may be an idea whose time has come. This groundbreaking title will surely help bring refactoring to the programming mainstream. With its clear advice on a hot new topic, Refactoring is sure to be essential reading for anyone who writes or maintains object-oriented software. --Richard Dragan  \nTopics Covered: Refactoring, improving software code, redesign, design tips, patterns, unit testing, refactoring research, and tools.  \nBook News, Inc.  \nA guide to refactoring, the process of changing a software system so that it does not alter the external behavior of the code yet improves its internal structure, for professional programmers. Early chapters cover general principles, rationales, examples, and testing. The heart of the book is a catalog of refactorings, organized in chapters on composing methods, moving features between objects, organizing data, simplifying conditional expressions, and dealing with generalizations  \nForeword ........................................................................................................................ 6  \nPreface ........................................................................................................................... 8  \nWhat Is Refactoring? ............................................................................................... 9  \nWhat's in This Book? ............................................................................................... 9  \nWho Should Read This Book? ............................................................................. 10  \nBuilding on the Foundations Laid by Others ...................................................... 10  \nAcknowledgments .................................................................................................. 11  \nChapter 1. Refactoring, a First Example ................................................................ 13  \nThe Starting Point ................................................................................................... 13  \nThe First Step in Refactoring ................................................................................ 17  \nDecomposing and Redistributing the Statement Method ................................ 18  \nReplacing the Conditional Logic on Price Code with Polymorp","cbCaiplDl3crRX7P","https://ap.wps.com/l/cbCaiplDl3crRX7P","pdf",2043008,337,"English","# Foreword\n# Preface\n# What Is Refactoring?\n# What's in This Book?\n# Who Should Read This Book?\n# Chapter 1. Refactoring, a First Example\n## The Starting Point\n## The First Step in Refactoring\n## Final Thoughts\n# Chapter 2. Principles in Refactoring\n## Defining Refactoring\n## Why Should You Refactor?\n## When Should You Refactor?\n## Refactoring and Design\n# Chapter 3. Bad Smells in Code\n## Duplicated Code\n## Long Method\n## Large Class\n## Long Parameter List","[{\"question\":\"What does refactoring aim to change in a software system?\",\"answer\":\"Refactoring changes a software system’s internal structure while preserving external behavior. The goal is to keep the code working as before but make it cleaner and easier to maintain.\"},{\"question\":\"Why are tests emphasized in successful refactoring?\",\"answer\":\"Because improving code can unintentionally break behavior, testing is used to verify that everything still works after each change.\"},{\"question\":\"How is the book’s core material organized?\",\"answer\":\"The heart of the book is a catalog of refactorings, grouped into chapters that cover areas such as composing methods, moving features between objects, simplifying conditional expressions, and handling generalizations.\"}]","Refactoring: Improving the Design of Existing Code | PDF",1789975885,849,34,[149,153,157,161,165,169,173,177,181,185,189,194,198,203,208,213,218,223,228,232,236,241,246,251,256,261,266,271,276,281,285,290,295,300],{"page_no":22,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/db0a391aaacd4cb31c64d8aeafab157a.webp",983,1272,{"page_no":26,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/05a9f90a49acc382d6c81f3412123ba8.webp",982,1270,{"page_no":30,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/2defd61d66f2de186611149b086ad6f7.webp",981,1269,{"page_no":33,"url":162,"width":163,"height":164},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ef92564650d6badf5788c485542a352a.webp",980,1268,{"page_no":97,"url":166,"width":167,"height":168},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/477dd5523db3fe128ec841d53dcf210c.webp",979,1267,{"page_no":102,"url":170,"width":171,"height":172},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/00ab6f75736b05a796f380ac36bcbce9.webp",978,1265,{"page_no":106,"url":174,"width":175,"height":176},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/b1df1602bacfc5d6aa538aacd60dbd60.webp",977,1264,{"page_no":111,"url":178,"width":179,"height":180},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e7fcf27e1346dec35796e21b56ba4b58.webp",976,1263,{"page_no":116,"url":182,"width":183,"height":184},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/a3fc18dc47d01697d634c948421520b9.webp",975,1261,{"page_no":124,"url":186,"width":187,"height":188},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e0472c0832c797dc4ce3472ed702f5bf.webp",974,1260,{"page_no":190,"url":191,"width":192,"height":193},11,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/61aa3629d7d5d4f29589f541b971fa6d.webp",973,1259,{"page_no":55,"url":195,"width":196,"height":197},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/201afe670f9d59f95ca6960a8fdb269c.webp",972,1257,{"page_no":199,"url":200,"width":201,"height":202},13,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/54301791a109931f5efa9b334fbc96fd.webp",971,1256,{"page_no":204,"url":205,"width":206,"height":207},14,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/823762ead743657df6ed5028584dcd5d.webp",970,1255,{"page_no":209,"url":210,"width":211,"height":212},15,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/82cf1a7044190b4713057476f978b700.webp",969,1254,{"page_no":214,"url":215,"width":216,"height":217},16,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/54cfe46628187b9d6c2cb483b973bdfa.webp",968,1252,{"page_no":219,"url":220,"width":221,"height":222},17,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/c02c18d440a0c9159b865cc2329d91de.webp",967,1251,{"page_no":224,"url":225,"width":226,"height":227},18,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ea191ffe7498296ee48cfaac376aa941.webp",966,1250,{"page_no":128,"url":229,"width":230,"height":231},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/f48aad867465c028a0d9008911ded138.webp",965,1248,{"page_no":118,"url":233,"width":234,"height":235},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/c7b15dfe488c29578840c58e34da9cc9.webp",964,1247,{"page_no":237,"url":238,"width":239,"height":240},21,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/ea85c3002c9d42b38efcbad895e680e8.webp",963,1246,{"page_no":242,"url":243,"width":244,"height":245},22,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/d1a90c7fc442bfa4aeaee8d5d4d2435a.webp",962,1245,{"page_no":247,"url":248,"width":249,"height":250},23,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/e92a87ab926128f869ca023709f5387d.webp",961,1243,{"page_no":252,"url":253,"width":254,"height":255},24,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/26ea8b226a4b0b48760f30ff9c6762d0.webp",960,1242,{"page_no":257,"url":258,"width":259,"height":260},25,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/670c265ba462f27bd050cc3a6a6a1f5d.webp",959,1241,{"page_no":262,"url":263,"width":264,"height":265},26,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/b53128c96689b2d313930537888fc687.webp",958,1239,{"page_no":267,"url":268,"width":269,"height":270},27,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/4f30013af7381207f11cb2bda7af2631.webp",957,1238,{"page_no":272,"url":273,"width":274,"height":275},28,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/b95351b6dad956d06eb3a220607e338c.webp",956,1237,{"page_no":277,"url":278,"width":279,"height":280},29,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/37cd842172e492a9b623a15126cffacb.webp",955,1235,{"page_no":113,"url":282,"width":283,"height":284},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/4ede94ceb5fba3cf86a20d2c956c2bb0.webp",954,1234,{"page_no":286,"url":287,"width":288,"height":289},31,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/0cba83943df3a0ca844ab26a3199eee2.webp",953,1233,{"page_no":291,"url":292,"width":293,"height":294},32,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/fb54d66270f50c89b9aa434aa3e1a534.webp",952,1232,{"page_no":296,"url":297,"width":298,"height":299},33,"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/64fa997858144f078b56e4045cd11fad.webp",951,1230,{"page_no":147,"url":301,"width":302,"height":303},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-16/a6c683472cd06051fe9c09a0e51b2a93.webp",950,1229]