Details

Professional Heroku Programming


Professional Heroku Programming


1. Aufl.

von: Chris Kemp, Brad Gyger

25,99 €

Verlag: Wiley
Format: PDF
Veröffentl.: 17.01.2013
ISBN/EAN: 9781118509012
Sprache: englisch
Anzahl Seiten: 528

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<p><b>A complete guide to building and deploying web apps with Heroku</b></p> <p>A cloud application platform, Heroku is currently the only approved platform for creating apps within Facebook, and its number of users is growing at rapid pace. However, there are very few books on the market that offer professional-level coverage of this platform, until now. The author duo begins with an introduction to the Heroku platform and its associated core concepts and then goes on to explain how writing for this platform differs from that of traditional development systems. Example applications, additional resources, and advice for your next steps round out this resource, making it a thorough, indispensable guide.</p> <ul> <li>Features information not found anywhere else, as both authors work for Heroku</li> <li>Explains the inner workings of Heroku with special emphasis placed on building web and mobile applications</li> <li>Introduces GIT-based development workflow and the process model within the Heroku platform</li> <li>Details coding, building, deploying, and scaling effectively using the Heroku tool base</li> </ul> <p>Providing you with fully functional code and downloadable code examples, <i>Professional Heroku Programming</i> is your complete guide to mastering this platform.</p>
<p><b>INTRODUCTION xxv</b></p> <p><b>PART I: AN OVERVIEW OF HEROKU</b></p> <p><b>CHAPTER 1: HOW HEROKU WORKS 3</b></p> <p>How the Stacks Stack Up 4</p> <p>Understanding Dynos and the Dyno Manifold 6</p> <p>Understanding Dyno Isolation 8</p> <p>Exploring the Process Model 8</p> <p>Understanding Erosion Resistance 10</p> <p>Managing Version Control 11</p> <p>Understanding the Slug Compiler 12</p> <p>Routing HTTP Requests 13</p> <p>Summary 15</p> <p><b>CHAPTER 2: ARCHITECTURAL CONSIDERATIONS 17</b></p> <p>Building Twelve-Factor Applications 18</p> <p>Managing Your Application Portfolio with Pace Layering 21</p> <p>Systems of Record 21</p> <p>Systems of Differentiation 21</p> <p>Systems of Innovation 22</p> <p>Classification 22</p> <p>Security and Reliability 22</p> <p>Governance 23</p> <p>Application Portfolio Management 23</p> <p>Ensuring Security and Compliance 25</p> <p>Physical Security and Safeguards 25</p> <p>Network Security 25</p> <p>Dyno- and Stack-Layer Security 26</p> <p>Data Retention 27</p> <p>Dealing with Security Issues 27</p> <p>Certifications, Accreditations, and Compliance 27</p> <p>Understanding Redundancy and Reliability 28</p> <p>Disaster Recovery and Availability Zones 28</p> <p>Availability and Transparency 29</p> <p>Securing Your Heroku Application 31</p> <p>Use a Strong Password for Your Heroku Account 31</p> <p>Encrypt All Data in Transit 32</p> <p>Encrypt Sensitive Data at Rest 32</p> <p>Use Best Practices for Secure Development 32</p> <p>Don’t Reinvent the Wheel 32</p> <p>Verify Security and Compliance Needs with</p> <p>Third-Party Providers 32</p> <p>Monitor Your Application’s Logs 33</p> <p>Encrypting Communications with SSL 33</p> <p>Piggybacking on Heroku’s SSL Certificate 33</p> <p>Using SSL Endpoint 34</p> <p>Storing Static Assets and Using CDNs 36</p> <p>Storing Static Assets on Amazon S3 36</p> <p>Speeding Up International Applications with Amazon CloudFront 41</p> <p>Summary 43</p> <p><b>CHAPTER 3: PORTING YOUR APPLICATIONS TO HEROKU 45</b></p> <p>Understanding Differences from Traditional Filesystems 46</p> <p>Ephemeral Filesystems 47</p> <p>Multi-Dyno Applications 47</p> <p>Considerations for Porting Existing Applications 47</p> <p>Choosing a Data Store 48</p> <p>Using Heroku Postgres as a Data Store 48</p> <p>Using Database.com as a Data Store 49</p> <p>Using Add-On Data Stores 50</p> <p>Using a Third-Party Data-as-a-Service Provider 50</p> <p>Using Multiple Data Stores 51</p> <p>Considerations for Porting Existing Applications 51</p> <p>Managing Sessions 51</p> <p>Understanding Caching 52</p> <p>Storing Static Assets 54</p> <p>Managing Configuration Variables 54</p> <p>Replacing Web Servers and Containers 55</p> <p>Managing Dependencies 56</p> <p>E-Mailing from Your Application 57</p> <p>Running Cron Jobs 57</p> <p>Understanding Logging 59</p> <p>Relying on External Programs 61</p> <p>Scaling Up versus Scaling Out 62</p> <p>Binding to Ports 62</p> <p>Managing Long-Running Processes 63</p> <p>Shutting Down Gracefully 65</p> <p>Moving Your Domain 66</p> <p>HTTPS over SSL 66</p> <p>Considerations for Porting Existing Applications 67</p> <p>Summary 68</p> <p><b>PART II: CREATING AND MANAGING HEROKU APPLICATIONS</b></p> <p><b>CHAPTER 4: DEPLOYING YOUR APPLICATIONS TO HEROKU 73</b></p> <p>Installing the Heroku Toolbelt 73</p> <p>Git 74</p> <p>Foreman 75</p> <p>The Heroku Client 76</p> <p>Interacting with Heroku via the Command-Line Interface 77</p> <p>The Magic of git push 79</p> <p>Post Deploy Hooks 80</p> <p>Navigating the Heroku Dashboard 80</p> <p>Changing Your Application’s Name 82</p> <p>Adding Custom Domains 83</p> <p>Adding Custom Collaborators 83</p> <p>Scaling Resources 84</p> <p>Summary 87</p> <p><b>CHAPTER 5: MANAGING RELEASES WITH HEROKU 89</b></p> <p>Managing Multiple Environments 90</p> <p>Managing Configuration Variables 94</p> <p>Securing Development Environments 97</p> <p>Versioning and Rolling Back Releases 100</p> <p>Using Deploy Hooks 102</p> <p>Managing Planned Downtime and Custom Error Pages 103</p> <p>Implementing Continuous Integration 107</p> <p>Summary 114</p> <p><b>CHAPTER 6: WORKING WITH ADD-ONS 115</b></p> <p>The Heroku Add-On Ecosystem 116</p> <p>Architectural Considerations 117</p> <p>Exploring Popular Add-Ons 117</p> <p>SQL-Based Data Stores 118</p> <p>NoSQL-Based Data Stores 118</p> <p>Search 119</p> <p>Logging and Monitoring 120</p> <p>Installing Add-Ons 121</p> <p>Installing Add-Ons from the Heroku Dashboard 122</p> <p>Installing Add-Ons from the Command-Line Interface 125</p> <p>Creating Add-Ons 127</p> <p>Summary 131</p> <p><b>CHAPTER 7: MANAGING, MONITORING, AND SCALING YOUR HEROKU APPLICATIONS 133</b></p> <p>Adding Custom Domains 133</p> <p>Viewing Logs and Associated Tools 136</p> <p>Managing and Tuning Performance 140</p> <p>Performance Management with New Relic 141</p> <p>Performance Tuning Guidelines 145</p> <p>Leveraging the Heroku API 145</p> <p>Administration Options 146</p> <p>Mobile 146</p> <p>Multi-Accounts 149</p> <p>Heroku Manager 150</p> <p>Summary 153</p> <p><b>PART III: USING A DATA STORE WITH YOUR HEROKU APPLICATIONS</b></p> <p><b>CHAPTER 8: USING HEROKU POSTGRES AS A DATA STORE FOR YOUR HEROKU APPLICATIONS 157</b></p> <p>Getting Started with Heroku Postgres 159</p> <p>Understanding Continuous Protection 159</p> <p>Understanding Automated Health Checks 160</p> <p>Creating a Higher-Availability Database Architecture 160</p> <p>Creating Databases 161</p> <p>Forking Databases 164</p> <p>Creating Database Followers 164</p> <p>Managing Databases 166</p> <p>Monitoring Databases 166</p> <p>Choosing the Right Plan 167</p> <p>Deleting Databases 168</p> <p>Backing Up Data 169</p> <p>Importing Data 171</p> <p>Using Advanced Features 173</p> <p>Sharing Information with Data Clips 173</p> <p>Using hstore for Schema-Free Data Storage 174</p> <p>Cancelling Queries 176</p> <p>Creating a Sample App 176</p> <p>Summary 179</p> <p><b>CHAPTER 9: USING DATABASE.COM AS A DATA STORE FOR YOUR HEROKU APPLICATIONS 181</b></p> <p>Getting Started with Database.com 182</p> <p>Creating a Database 183</p> <p>Importing and Exporting Data 188</p> <p>Managing Your Database 191</p> <p>Creating a Sample Application 193</p> <p>Managing Users 198</p> <p>Authenticating Users 198</p> <p>Using Advanced Features 199</p> <p>Understanding Profiles and Sharing 199</p> <p>Enforcing Data Integrity with Validation Rules 200</p> <p>Automating with Workflow Rules 201</p> <p>Managing Change with Test Databases 202</p> <p>Storing Files 203</p> <p>Automating with Apex Triggers 203</p> <p>Leveraging Social Graphs 204</p> <p>Summary 204</p> <p><b>CHAPTER 10: USING THIRD-PARTY DATA STORES FOR YOUR HEROKU APPLICATIONS 207</b></p> <p>SQL-Based Options 207</p> <p>MySQL 208</p> <p>Alternative Postgres — JustOneDB 215</p> <p>NoSQL-Based Options 217</p> <p>MongoDB 218</p> <p>Redis 220</p> <p>Apache Cassandra 222</p> <p>Apache CouchDB 224</p> <p>Attaching Existing Data Stores 226</p> <p>Summary 229</p> <p><b>PART IV: PROGRAMMING ON HEROKU’S POLYGLOT PLATFORM</b></p> <p><b>CHAPTER 11: DEVELOPING WITH RUBY 233</b></p> <p>Understanding Ruby 234</p> <p>Installing Ruby on Your Local Workstation 234</p> <p>Managing Dependencies 235</p> <p>Creating an Application with the Rails Framework 238</p> <p>Writing the Application 238</p> <p>Signing Up for a Twilio Account 244</p> <p>Deploying the Application to Heroku 244</p> <p>Testing the Application 247</p> <p>Creating an Application with the Sinatra Framework 248</p> <p>Writing the Application 248</p> <p>Deploying the Application to Heroku 251</p> <p>Testing the Application 253</p> <p>Using Delayed Job for Background Jobs 253</p> <p>Setting Up Delayed Job 255</p> <p>Deploying the Application to Heroku 257</p> <p>Testing Delayed Job 258</p> <p>Caching with Ruby 261</p> <p>Porting Ruby Applications to Heroku 263</p> <p>Summary 265</p> <p><b>CHAPTER 12: DEVELOPING WITH JAVA 267</b></p> <p>Understanding Java 268</p> <p>Writing Enterprise Applications on Heroku 268</p> <p>Installing the Java Development Kit 271</p> <p>Installing on Windows 271</p> <p>Installing on Mac OS X 272</p> <p>Installing on Linux 272</p> <p>Managing Dependencies 272</p> <p>Writing a Containerless Application with Embedded Jetty 275</p> <p>Writing an Application with the Spring Framework</p> <p>and Hibernate on Tomcat 281</p> <p>Writing an Application with the Play Framework 286</p> <p>Deploying a WAR File Directly to Heroku 294</p> <p>Additional Considerations 295</p> <p>Porting Java Applications to Heroku 296</p> <p>Session Management and Caching 297</p> <p>Memory Management 298</p> <p>Continuous Integration 298</p> <p>Summary 298</p> <p><b>CHAPTER 13: DEVELOPING WITH OTHER SUPPORTED LANGUAGES 301</b></p> <p>Developing with Python 302</p> <p>Additional Considerations 309</p> <p>Developing with Node.js 311</p> <p>Additional Considerations 317</p> <p>Developing with Clojure 319</p> <p>Additional Considerations 326</p> <p>Developing with Scala 328</p> <p>Additional Considerations 334</p> <p>Developing with Groovy Using the Grails Framework 336</p> <p>Additional Considerations 341</p> <p>Developing Non-Facebook Applications on PHP 343</p> <p>Additional Considerations 346</p> <p>Summary 349</p> <p><b>CHAPTER 14: UNDERSTANDING BUILDPACKS 351</b></p> <p>How Buildpacks Work 352</p> <p>bin/detect 353</p> <p>bin/compile 353</p> <p>bin/release 358</p> <p>Developing .NET Applications on Heroku 359</p> <p>Developing Perl Applications on Heroku 362</p> <p>Packaging Binary Buildpack Dependencies 366</p> <p>Creating Custom Buildpacks 370</p> <p>Building the Blassic Binary on Vulcan 370</p> <p>Creating the Build Scripts 373</p> <p>Pushing Your Buildpack to a Public Git Repository 376</p> <p>Creating and Deploying Your Application to Heroku 377</p> <p>Summary 380</p> <p><b>PART V: CREATING A NEW GENERATION OF HEROKU APPLICATIONS</b></p> <p><b>CHAPTER 15: BUILDING MOBILE APPLICATIONS WITH HEROKU 383</b></p> <p>Understanding Mobile Development Architectures 384</p> <p>Native Mobile Applications 384</p> <p>HTML5 Mobile Applications 386</p> <p>Hybrid Mobile Applications 387</p> <p>Using a Central Data Repository for Mobile Applications 388</p> <p>Writing an HTML5 Mobile Application 389</p> <p>Creating the Back End 390</p> <p>Creating the Front End 394</p> <p>Using Toolkits and Add-Ons for Mobile Application Development 405</p> <p>StackMob 405</p> <p>Parse 406</p> <p>RhoConnect 407</p> <p>PubNub 409</p> <p>BoxCar 409</p> <p>Summary 409</p> <p><b>CHAPTER 16: BUILDING SOCIAL APPLICATIONS WITH HEROKU 411</b></p> <p>Writing Facebook Applications with PHP 412</p> <p>Creating a Facebook Canvas Application 412</p> <p>Writing the Contest App Code 416</p> <p>Deploying the Application to Heroku 424</p> <p>Making Heroku Applications Social with the Chatter API 429</p> <p>Creating a Shadow Object in Database.com 430</p> <p>Summary 444</p> <p><b>APPENDIX: ADDITIONAL RESOURCES 445</b></p> <p>The Heroku Website 445</p> <p>The Heroku Dev Center 446</p> <p>Professional Heroku Programming’s GitHub Repository 447</p> <p>Log a Ticket with Heroku Support 447</p> <p>Heroku Ninja 448</p> <p>Heroku Java 449</p> <p>Stack Overfl ow 450</p> <p>Heroku Community Google Group 451</p> <p>Heroku IRC Channel 451</p> <p>Heroku’s Twitter Accounts 452</p> <p>Heroku’s Offi cial Blog 453</p> <p>Heroku News 454</p> <p>Heroku on Facebook 455</p> <p>Heroku Status 455</p> <p>Heroku Postgres 456</p> <p>Heroku Add-Ons 457</p> <p>Heroku Add-On Provider Site 458</p> <p>Database.com User Guide 459</p> <p>Developer Force Integration 460</p> <p>Force.com Discussion Boards 461</p> <p>Heroku API Documentation 462</p> <p>Heroku Partners 463</p> <p>Heroku Beta Program Sign-Up 464</p> <p>Heroku Success Stories 464</p> <p>Heroku on Vimeo 465</p> <p>Heroku Waza 466</p> <p>The Twelve-Factor App 467</p> <p>James Ward’s Blog 468</p> <p><b>INDEX 469</b></p>
<p><b>Chris Kemp</b> is on the Salesforce.com Advanced Technical Solutions team. He is the global leader of the Heroku expert group and is generally acknowledged to be one of the leading Heroku experts at Salesforce.com.</p> <p><b>Brad Gyger</b> is the Manager of the Customer Advocacy Team at Heroku. He and his team are tasked with ensuring that all users are able to optimize their experience on the Heroku platform.</p>
<p>Your total guide to building and deploying brilliant web and mobile apps with Heroku</p> <p>Want to gain a deep understanding of the Heroku platform as a service (PaaS) and what makes it tick? Looking for insider tips and expert guidance on how to structure your apps to take utmost advantage of the Heroku platform? Do you need an accessible, totally practical guide to quickly mastering the skills needed to create brilliant apps with the world's number-one cloud PaaS? If the answer to any or all of these questions is "Yes," you've come to the right place.</p> <p>Written by two gurus at Heroku and its parent company, Salesforce.com, this book quickly gets you up to speed on core Heroku concepts and then cuts to the chase with detailed step-by-step tutorials on Heroku programming. In no time you'll get a handle on architecting, developing, deploying, and scaling outstanding apps using the Heroku platform.</p> <p>Clearly explaining the key differences between developing in Heroku versus traditional platforms and emphasizing web and mobile app development, <i>Professional Heroku Programming</i> delivers:</p> <ul> <li> <p>Insider information and progrtamming tips you won't find anywhere else</p> </li> <li> <p>Coverage of Git-based development workflow and the process model for Heroku</p> </li> <li> <p>Language-specific programming patterns</p> </li> <li> <p>Example apps for Ruby®, Java®, Node.js®, Scala®, Python® and other Heroku-supported languages</p> </li> <li> <p>Details of the Heroku add-on ecosystem to extend your app and add functionality</p> </li> <li> <p>Pointers on getting the most out of Heroku's data and asset store options</p> </li> <li> <p>Tons of downloadable sample code</p> </li> <li> <p>Resources for taking your Heroku development skills to the next level</p> </li> </ul> <p><i>Professional Heroku Programming</i> is a must-have tool of the trade for system architects and web developers who want to get the most of out the world's leading cloud PaaS.</p> <p>wrox.com Programmer Forums</p> <p>Join our Programmer to Programmer forums to ask and answer programming questions about this book, join discussions on the hottest topics in the industry, and connect with fellow programmers from around the world.</p> <p>Code Downloads</p> <p>Take advantage of free code samples from this book, as well as code samples from hundreds of other books, all ready to use.</p> <p>Read More</p> <p>Find articles, ebooks, sample chapters, and tables of contents for hundreds of books, and more reference resources on programming topics that matter to you.</p>

Diese Produkte könnten Sie auch interessieren:

Domain Architectures
Domain Architectures
von: Daniel J. Duffy
PDF ebook
31,99 €