How we did it:
For any feedback, any questions, any notes or just for chat - feel free to follow us on social networks
Chad Pytel, Tammer Saleh
How to avoid the most common code and design mistakes in Ruby on Rails applications - and refactor away problems that already exist • •A unique guide to improving Rails code quality, performance, reliability, stability, scalability, and maintainability. •Practical, proven techniques for ensuring that every new Rails application reflects today's best practices. •Highly realistic: reflects Rails mistakes and bad habits the authors have repeatedly seen 'in the wild' As millions of web developers have turned to the Ruby on Rails framework, many have fallen victim to the same mistakes, misconceptions, and bad habits. These errors can significantly reduce code quality, performance, reliability, stability, scalability, and maintainability. In some cases, they can even derail a project. In this book, these common Rails code and design problems are compiled into a complete set of AntiPatterns: what they look like, why they happen, why they're bad - and what to do instead. Every AntiPattern is illuminated with real world code, as well as specific guidance for refactoring existing bad code or design to reflect sound Object Oriented principles and established Ruby on Rails best practices. This 'cookbook' is organized into short, concise, easy-to-use chapters - each outlining a single common AntiPattern and offering detailed solutions. Until now, this information was difficult to find - and much of it wasn't available at all. Using Rails AntiPatterns, developers can dramatically improve the quality of both new and existing Rails applications; avoid future bad practices; and establish more effective Rails coding standards throughout the development organization.
Code generation has the potential to revolutionize application development. Rather than handcrafting each piece of code, developers are increasingly turning to code generation based on templates and applications of business logic to automatically perform a variety of tasks. This book teaches the technical details of code generation in .NET through a coherent series of steps that will help you to incorporate code generation into your own development efforts. Veteran author Kathleen Dollard teaches code generation as a scripted repeatable process using templates you control, so you're not tied to a particular framework or style. Because you can regenerate code at any time, you can incorporate changes, including database changes, throughout the life of your application. The templates are flexible and designed to work smoothly with the handcrafted code youll use to customize your application. The underlying fundamentals are explained along with three specific techniques: outputting code to a stream, using the Code DOM, and using XSLT-based code generation. In addition to the text, the tools in the book (downloadable in both VB .NET and C#) include a mechanism to extract information from SQL Server; a tool for editing and running code-generation scripts; a simple, flexible ORM tool that relates your database structure to your runtime class model; and a set of templates you can use as the starting point for your adventures in code generation. Generating repetitive sections of code frees you to focus on the features that make your application unique. Code generation will turbo-charge your development cycles by offering speed, reusability, agility, and consistency. Go forth and generate!