Backbone.Js on Rails

Total Page:16

File Type:pdf, Size:1020Kb

Backbone.Js on Rails 1 Build snappier, more interactive apps with cleaner code and better tests in less time Backbone.js on Rails thoughtbot Jason Morrison Chad Pytel Nick Quaranto Harold Giménez Joshua Clayton Gabe Berke-Williams Chad Mazzola May 24, 2013 Contents 1 Introduction 7 The shift to client-side web applications ................. 7 Goals for this book ............................ 9 Alternatives to Backbone ......................... 9 The example application ......................... 10 Framework and library choice in the example application .... 10 Conventions used in this book ...................... 11 2 Getting up to speed 12 Backbone online resources ....................... 12 JavaScript resources ........................... 13 3 Organization 14 Backbone and MVC ............................ 14 What goes where ............................. 15 Namespacing your application ...................... 17 Mixins ................................... 18 1 CONTENTS 2 4 Rails Integration 20 Organizing your Backbone code in a Rails app ............. 20 Rails 3.0 and prior ............................. 20 Jammit and a JST naming gotcha ................. 22 Rails 3.1 and above ............................ 23 An overview of the stack: connecting Rails and Backbone ....... 25 Setting up models .......................... 26 Setting up Rails controllers ..................... 27 Setting Up Views .......................... 30 Customizing your Rails-generated JSON ................ 32 ActiveRecord::Base.include_root_in_json ............. 34 Converting an existing page/view area to use Backbone ........ 36 Breaking out the TaskView ..................... 39 Using Rails URL helpers from Backbone ................. 43 5 Routers, Views, and Templates 47 View explanation ............................. 47 Initialization ............................. 48 The View’s element ......................... 49 Customizing the View’s Element .................. 49 Rendering .............................. 50 Events ................................ 51 Templating strategy ............................ 51 Choosing a strategy ............................ 53 Adding Backbone to existing Rails views ............. 54 Writing new Backbone functionality from scratch ......... 54 CONTENTS 3 Routers .................................. 56 Example router ........................... 57 The routes hash ........................... 58 Initializing a router .......................... 59 Event binding ............................... 59 Binding to DOM events within the view element ......... 60 Events observed by your view ................... 62 Events your view publishes ..................... 63 Cleaning up: unbinding .......................... 66 Why unbind events? ......................... 66 Unbinding DOM events ....................... 70 Backbone’s listentTo and stopListening .............. 70 Unbinding model and collection events .............. 71 Keep track of on() calls to unbind more easily ........... 72 Unbinding view-triggered events .................. 73 Establish a convention for consistent and correct unbinding ... 74 Swapping router ............................. 74 SwappingRouter and Backbone internals ............. 76 Composite views ............................. 79 Refactoring from a large view .................... 79 Cleaning up views properly ..................... 88 Forms ................................... 88 Building markup ........................... 89 Serializing forms ........................... 90 A Backbone forms library ...................... 91 Display server errors ........................ 91 Internationalization ............................ 94 CONTENTS 4 6 Models and collections 96 Filters and sorting ............................. 96 Modifying collections in-place ...................... 96 Filtering .................................. 97 Propagating collection changes ..................... 100 A note on event bindings and reference leaks .......... 101 Sorting ................................... 103 Validations ................................. 107 Model relationships ............................ 114 Backbone-relational plugin ........................ 115 Relations in the task app ......................... 115 Deciding how to deliver data to the client ................ 115 Designing the HTTP JSON API ...................... 116 Implementing the API: presenting the JSON ............... 118 Parsing the JSON and instantiating client-side models ......... 119 When to fetch deferred data ....................... 121 Complex nested models ......................... 122 Composite models ............................ 122 accepts_nested_attributes_for ...................... 123 Example for accepts_nested_attributes_for ............... 127 Duplicating business logic across the client and server ......... 127 An example: model validations ................... 127 Kinds of logic you duplicate .................... 130 Validations .............................. 131 Querying ............................... 132 Callbacks .............................. 132 CONTENTS 5 Algorithms .............................. 132 Synchronizing between clients ...................... 133 The moving parts .......................... 134 Putting it together: A look at the life cycle of a change ...... 134 Implementation: Step 1, Faye server ................ 136 Implementing it: Step 2, ActiveRecord observers ......... 137 Implementing it: Step 3, In-browser subscribers .......... 140 Testing synchronization ....................... 142 Further reading ........................... 144 Uploading attachments .......................... 145 Saving files along with attributes .................. 145 Separating file upload and model persistence ........... 146 Example, Step 1: Upload interface ................. 146 Example, Step 2: Accept and persist uploads in Rails ....... 150 Example, Step 3: Display Uploaded Files ............. 151 7 Testing 156 Full-stack integration testing ....................... 156 Introduction ............................. 156 Capybara .............................. 157 Cucumber .............................. 158 Drivers ................................ 159 Isolated unit testing ............................ 160 Isolation testing in JavaScript .................... 161 What to test? ............................ 161 Helpful Tools ............................. 163 CONTENTS 6 Example: Test-driving a task application ................. 163 Setup ................................ 163 Step by step ............................. 164 8 Security 178 Encoding data when bootstrapping JSON data ............. 178 9 Application Structure 180 Structuring larger Backbone applications ................ 180 Chapter 1 Introduction The shift to client-side web applications Modern web applications have become increasingly rich, shifting their com- plexity onto the client side. While there are very well-understood approaches embodied in mature frameworks to organize server-side code, frameworks for organizing your client-side code are newer and generally still emerging. Back- bone is one such library that provides a set of structures to help you organize your JavaScript code. Libraries like jQuery have done a great deal to help abstract inconsistencies across browsers and provide a high-level API for making AJAX requests and performing DOM manipulation, but larger and richer client-side applications that lack decoupled and modular organizational structures often fall victim to the same few kinds of technical debt. These apps are often highly asynchronous and the “path of least resistance” implementation is often to have deeply nested callbacks to describe asyn- chronous behavior, with nested Ajax calls and success/failure conditional concerns going several layers deep. Rich client-side applications almost always involve a layer of state and logic on the client side. One way to implement this is to store domain objects or busi- ness logic state in the DOM. However, storing state in the DOM, stashing your 7 CHAPTER 1. INTRODUCTION 8 application’s data in hidden <div> elements that you clone, graft, and toggle into and out of view, or reading and writing to lengthy sets of HTML data-* attributes can quickly get cumbersome and confusing. A third common feature in rich client-side apps is the presentation of multiple views on a single domain object. Consider a web conferencing application with multiple views on the members of your contact list - each contact is rendered in brief inside a list view, and in more specificity in a detail view. Additionally, your conference call history includes information about the people who participated. Each time an individual contact’s information changes, this information needs to cascade to all the view representations. This often leads to a tight coupling of persistence and presentation: invoking $.ajax to save a user’s update and then updating several specific DOM ele- ments upon success. By separating business logic, persistence, and presentation concerns, and pro- viding a decoupled, event-driven way to cascade changes through a system of observers, each module of code is more well-encapsulated and expresses a cohesive set of responsibilities without being coupled to outside concerns. Your application code becomes easier to test, modify, and extend, and you can better manage its complexity while its feature set grows. Granted, you can thoughtfully organize your code in a clean, coherent man- ner without using an external library. However, using a library like Backbone helps you get started
Recommended publications
  • THE FUTURE of SCREENS from James Stanton a Little Bit About Me
    THE FUTURE OF SCREENS From james stanton A little bit about me. Hi I am James (Mckenzie) Stanton Thinker / Designer / Engineer / Director / Executive / Artist / Human / Practitioner / Gardner / Builder / and much more... Born in Essex, United Kingdom and survived a few hair raising moments and learnt digital from the ground up. Ok enough of the pleasantries I have been working in the design field since 1999 from the Falmouth School of Art and onwards to the RCA, and many companies. Ok. less about me and more about what I have seen… Today we are going to cover - SCREENS CONCEPTS - DIGITAL TRANSFORMATION - WHY ASSETS LIBRARIES - CODE LIBRARIES - COST EFFECTIVE SOLUTION FOR IMPLEMENTATION I know, I know, I know. That's all good and well, but what does this all mean to a company like mine? We are about to see a massive change in consumer behavior so let's get ready. DIGITAL TRANSFORMATION AS A USP Getting this correct will change your company forever. DIGITAL TRANSFORMATION USP-01 Digital transformation (DT) – the use of technology to radically improve performance or reach of enterprises – is becoming a hot topic for companies across the globe. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-02 Companies face common pressures from customers, employees and competitors to begin or speed up their digital transformation. However they are transforming at different paces with different results. VERY DIGITAL CHANGING NOT VERY DIGITAL DIGITAL TRANSFORMATION USP-03 Successful digital transformation comes not from implementing new technologies but from transforming your organisation to take advantage of the possibilities that new technologies provide.
    [Show full text]
  • IADIS Conference Template
    www.seipub.org/ie Information Engineering (IE) Volume 3, 2014 Performance and Quality Evaluation of jQuery Javascript Framework Andreas Gizas, Sotiris P. Christodoulou, Tzanetos Pomonis HPCLab, Computer Engineering & Informatics Dept., University of Patras Rion, Patras Received Jun 10, 2013; Revised Jun 21, 2013; Accepted Mar 12, 2014; Published Jun 12, 2014 © 2014 Science and Engineering Publishing Company Abstract devices. Mobile web is the name of this new field of The scope of this work is to provide a thorough web applications and JavaScript is expected to play a methodology for quality and performance evaluation of the major role in its development with the evolution of most popular JavaScript framework, the jQuery Framework, new devices and standards (ex. iPhone, Android) or as by taking into account well established software quality the heart of cross platform applications (like factors and performance tests. The JavaScript programming phonegap.com). There are also proposals for language is widely used for web programming and employing JavaScript in server-side applications increasingly, for general purpose of computing. Since the (Server-Side JavaScript Reference v1.2). growth of its popularity and the beginning of web 2.0 era, many JavaScript frameworks have become available for Due to the plethora of applications that JavaScript programming rich client-side interactions in web serves and the variety of programming needs, applications. The jQuery project and its community serve frameworks have been created in order to help both today as a major part of web programmers. The main programmers and end-users. These frameworks aim to outcome of this work is to highlight the pros and cons of be a useful tool for simplifying JavaScript code jQuery in various areas of interest and signify which and development and repeat blocks of code by using just a where the weak points of its code are.
    [Show full text]
  • Learning Javascript Design Patterns
    Learning JavaScript Design Patterns Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Learning JavaScript Design Patterns by Addy Osmani Copyright © 2012 Addy Osmani. All rights reserved. Revision History for the : 2012-05-01 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449331818 for release details. ISBN: 978-1-449-33181-8 1335906805 Table of Contents Preface ..................................................................... ix 1. Introduction ........................................................... 1 2. What is a Pattern? ...................................................... 3 We already use patterns everyday 4 3. 'Pattern'-ity Testing, Proto-Patterns & The Rule Of Three ...................... 7 4. The Structure Of A Design Pattern ......................................... 9 5. Writing Design Patterns ................................................. 11 6. Anti-Patterns ......................................................... 13 7. Categories Of Design Pattern ............................................ 15 Creational Design Patterns 15 Structural Design Patterns 16 Behavioral Design Patterns 16 8. Design Pattern Categorization ........................................... 17 A brief note on classes 17 9. JavaScript Design Patterns .............................................. 21 The Creational Pattern 22 The Constructor Pattern 23 Basic Constructors 23 Constructors With Prototypes 24 The Singleton Pattern 24 The Module Pattern 27 iii Modules 27 Object Literals 27 The Module Pattern
    [Show full text]
  • Web Development India
    WEB DEVELOPMENT INDIA Similar sites like www.tutorialspoint.com www.w3schools.com www.java2s.com www.tizag.com www.mkyong.com www.codecademy.com www.roseindia.net docs.oracle.com/javase/tutorial/ www.stackoverflow.com tutorials.jenkov.com imp……………………………………………….. http://www.xislegraphix.com/website-types.html http://orthodoxdaily.com/types-of-websites/ http://webstyleguide.com/wsg3/1-process/6-types-of-sites.html http://www.virtualmv.com/wiki/index.php?title=Internet:Types_of_Website http://www.marketingcharts.com/wp/online/which-types-of-websites-do-most-americans-visit- frequently-37970/ http://www.2createawebsite.com/prebuild/website-needs.html http://www.tomakewebsite.com/types-of-websites.html http://one-blog-wonder.tumblr.com/post/29818346464/what-types-of-websites-are-there http://www.roseindia.net/services/webdesigning/corporatewebsitedesign/Different-Kinds-of- Website.shtml http://www.marketingprofs.com/charts/2013/12083/which-types-of-websites-are-visited-most- frequently http://webdesignpeeps.com/types-of-websites/ http://www.webdesignerdepot.com/2011/11/navigation-patterns-for-ten-common-types-of- websites/ http://www.teach-ict.com/gcse_new/software/web_design/miniweb/pg2.htm http://www.methodandclass.com/article/what-are-the-different-types-of-web-site http://www.webmasterview.com/2013/03/three-types-of-website/ http://www.chinkin.com/Web-Design/Types-of-Website http://www.designer-daily.com/8-types-of-sites-you-can-build-with-drupal-13924 http://www.mediatopia.co.uk/types-of-websites .................................................................................WEB
    [Show full text]
  • Appendix a the Ten Commandments for Websites
    Appendix A The Ten Commandments for Websites Welcome to the appendixes! At this stage in your learning, you should have all the basic skills you require to build a high-quality website with insightful consideration given to aspects such as accessibility, search engine optimization, usability, and all the other concepts that web designers and developers think about on a daily basis. Hopefully with all the different elements covered in this book, you now have a solid understanding as to what goes into building a website (much more than code!). The main thing you should take from this book is that you don’t need to be an expert at everything but ensuring that you take the time to notice what’s out there and deciding what will best help your site are among the most important elements of the process. As you leave this book and go on to updating your website over time and perhaps learning new skills, always remember to be brave, take risks (through trial and error), and never feel that things are getting too hard. If you choose to learn skills that were only briefly mentioned in this book, like scripting, or to get involved in using content management systems and web software, go at a pace that you feel comfortable with. With that in mind, let’s go over the 10 most important messages I would personally recommend. After that, I’ll give you some useful resources like important websites for people learning to create for the Internet and handy software. Advice is something many professional designers and developers give out in spades after learning some harsh lessons from what their own bitter experiences.
    [Show full text]
  • Using Hierarchical Folders and Tags for File Management
    Using Hierarchical Folders and Tags for File Management A Thesis Submitted to the Faculty of Drexel University by Shanshan Ma in partial fulfillment of the requirement for the degree of Doctor of Philosophy March 2010 © Copyright 2010 Shanshan Ma. All Rights Reserved. ii Dedications This dissertation is dedicated to my mother. iii Acknowledgments I would like to express my sincerest gratitude to my advisor Dr. Susan Wiedenbeck. She encouraged me when I had struggles. She inspired me when I had doubts. The dissertation is nowhere to be found if it had not been for our weekly meetings and numerous discussions. I’m in great debts to all the time and effort that she spent with me in this journey. Thank you to my dissertation committee members, Dr. Michael Atwood, Dr. Xia Lin, Dr. Denise Agosto, and Dr. Deborah Barreau, who have guided me and supported me in the research. The insights and critiques from the committee are invaluable in the writing of this dissertation. I am grateful to my family who love me unconditionally. Thank you my mother for teaching me to be a strong person. Thank you my father and my brother for always being there for me. I would like to thank the iSchool at Drexel University for your generosity in supporting my study and research, for your faculty and staff members who I always had fun to work with, and for the alumni garden that is beautiful all year round. Thank you my friends in Philadelphia and my peer Ph.D. students in the iSchool at Drexel University.
    [Show full text]
  • Mobile HTML5: Implementing a Responsive Cross-Platform Application
    Aalto University School of Science Degree Programme of Computer Science and Engineering Kimmo Puputti Mobile HTML5: Implementing a Responsive Cross-Platform Application Master's Thesis Kirkkonummi, May 15, 2012 Supervisor: Professor Petri Vuorimaa, Aalto University Instructor: Risto Sarvas D.Sc.(Tech.) Aalto University School of Science ABSTRACT OF Degree Programme of Computer Science and Engineering MASTER'S THESIS Author: Kimmo Puputti Title: Mobile HTML5: Implementing a Responsive Cross-Platform Application Date: May 15, 2012 Pages: ix + 70 Professorship: Media Technology Code: T-111 Supervisor: Professor Petri Vuorimaa Instructor: Risto Sarvas D.Sc.(Tech.) In twenty years, the Web has become an integral part of our everyday lives. The rapid growth of the smartphone market has brought the Web from our home desks to anywhere we are, and enabled us to access this vast source of information at any time. However, the proliferation of mobile devices and platforms has raised new prob- lems for application development. The growing amount of different platforms and their distinct native technologies make it hard to develop applications that can be accessed with all these devices. The only combining factor in all these platforms is the browser, and it is be- coming the universal application platform. We cannot afford anymore to build applications for the silos and walled gardens of single platforms, and building cross-platform applications is essential in the modern mobile market. In this work, I introduce the HTML5 (HyperText Markup Language version 5) specification as well as several related specifications or specification drafts for modern web development. I also present several tools and libraries for mobile web development.
    [Show full text]
  • Software Architecture Document
    SOFTWARE ARCHITECTURE DOCUMENT Author: Gerard Mundo Bosch Content Owner: SVT Analytics REVISION HISTORY DOCUMENT NUMBER: RELEASE/REVISION: RELEASE/REVISION DATE: 1 v0.5 Monday, May 6 Page | 1 TABLE OF CONTENTS 1. Introduction .............................................................................................................................................. 3 1.1 Purpose ............................................................................................................................................... 3 1.1.1 Problem definition ....................................................................................................................... 3 1.1.2 Objectives ..................................................................................................................................... 4 1. 2 Scope .................................................................................................................................................. 4 1. 3 Glossary and acronym list .................................................................................................................. 5 1. 4 Stakeholders ....................................................................................................................................... 5 1.5 Non-functional requirements ............................................................................................................. 8 2. Architecture overview ..............................................................................................................................
    [Show full text]
  • Developing Backbone.Js Applications
    www.it-ebooks.info Developing Backbone.js Applications Addy Osmani Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo www.it-ebooks.info Developing Backbone.js Applications by Addy Osmani Revision History for the : 2012-04-19 Early release revision 1 See http://oreilly.com/catalog/errata.csp?isbn=9781449328252 for release details. ISBN: 978-1-449-32825-2 1335306849 www.it-ebooks.info Table of Contents Prelude .................................................................... vii 1. Introduction ........................................................... 1 Fundamentals 2 MVC, MVP & Backbone.js 2 MVC 2 Smalltalk-80 MVC 2 MVC As We Know It 3 Models 4 Views 5 Controllers 8 Controllers in Spine.js vs Backbone.js 8 What does MVC give us? 10 Delving deeper 10 Summary 11 MVP 11 Models, Views & Presenters 11 MVP or MVC? 12 MVC, MVP and Backbone.js 13 Fast facts 15 Backbone.js 15 2. The Basics ............................................................ 17 What is Backbone? 17 Why should you consider using it? 17 The Basics 17 Models 18 Views 21 Creating new views 21 What is el? 22 Collections 23 iii www.it-ebooks.info Underscore utility functions 25 Routers 25 Backbone.history 27 Namespacing 27 What is namespacing? 28 Additional Tips 31 Automated Backbone Scaffolding 31 Is there a limit to the number of routers I should be using? 32 Is Backbone too small for my application’s needs? 32 3. RESTful Applications .................................................... 33 Building RESTful applications with Backbone 33 Stack 1: Building A Backbone App With Node.js, Express, Mongoose and MongoDB 33 Reviewing the stack 33 Practical 34 Practical Setup 40 Building Backbone.js Apps With Ruby, Sinatra, MongoDB and Haml 42 Introduction 42 What Is Sinatra? 42 Getting Started With Sinatra 43 Templating And HAML 45 MongoDB Ruby Driver 47 Getting started 47 Practical 48 Installing The Prerequisites 48 Tutorial 50 Conclusions 57 4.
    [Show full text]
  • Tom Elliott CV.Pdf
    Tom Elliott MA (Cantab.) MEng 90A Cromford Road, London, SW18 1NY, United Kingdom +44 (0)77 2929 0896 [email protected] http://telliott.net Summary An experienced technical lead and program manager with 5 years experience working in the mobile communications sector. I have been working for a fast-paced, dynamic and hugely successful technology startup, delivering highly available, scalable messaging and telephony platforms along with cutting-edge front end development and worldwide developer-facing APIs. As a business/customer facing developer and technical lead at one of the most successful UK tech startups of the last decade I’ve been exposed to the full stack of software development, delivery and maintenance. Working alongside companies such as The BBC, News International, Freeview & The Number (118118) has sharpened by business acumen. As a senior member of technical staff I have had input on product direction, long term strategy, recruitment & staffing and team leadership. Working for a startup has required me to deliver projects under pressure and adapt to a continuously changing landscape. Employment History OpenMarket, 389 Chiswick High Road, W4 4AL. www.openmarket.com MX Telecom, 389 Chiswick High Road, W4 4AL. www.mxtelecom.com OpenMarket is a US based technology startup offering a ‘global mobile transaction hub’. MX Telecom was a world-leading aggregator for SMS, MMS and mobile payments. Founded in 2000 as a bootstrapped startup, the company grew organically to 100 staff across three continents before being acquired by OpenMarket in March 2010. Positions Held: Development Program Manager (OpenMarket) - April 2010 - Present Project Manager (MX Telecom) - June 2008 - April 2010 Technical Account Manager (MX Telecom) - September 2005 - June 2008 Projects & Responsibilities: WebChat (Q4 2005 - Present) Initially a developer and technical account manager I later became the technical owner of this project.
    [Show full text]
  • Adrian Kosmaczewski
    Introduction to iOS Software Development Adrian Kosmaczewski - akosma software QCon 2011 - London Adrian Kosmaczewski http://www.flickr.com/photos/gi/164281467/ http://www.flickr.com/photos/jm3/379494322/ http://www.flickr.com/photos/21025851@N00/2168398185/ http://www.flickr.com/photos/emiliagarassino/2146648332/ akosma software akosma.com @akosma github.com/akosma linkedin.com/in/akosma formspring.me/akosma slideshare.com/akosma friendfeed.com/akosma iOS http://www.flickr.com/photos/oskay/365607662/ http://www.flickr.com/photos/oskay/365607591/ http://www.flickr.com/photos/blakespot/2379207825/ http://www.flickr.com/photos/justdrew1985/4348527596/ Some questions Veteran NeXT or Mac OS X developers in the room? iOS devices in the room? Program History The App Store Objective-C & Cocoa Design Tools Books Web vs. Native Apps Q&A History “Good design survives” Erich Gamma OOP 2011 Keynote born in the 80s Objective-C The “real” inspiration for Java: http://cs.gmu.edu/~sean/stuff/java-objc.html "Thin layer around C" Message-dispatch runtime built in C: obj_msgSend() Static and dynamic (a piacere) Single inheritance + interfaces (“@protocols”) Fields protected by default All methods are public, virtual and overridable Methods can be added to existing classes "categories" Full introspection / reflection Messages can be intercepted and forwarded "à la AOP" Objective-C Java / C# @interface (.h) & class (1 file) @implementation (.m) @protocol interface #import // files! import // classes! categories n/a (C#, “class extensions”) n/a (generics?) id "void*"
    [Show full text]
  • Programming Windows Store Apps with HTML, CSS, and Javascript
    spine = 2.07” Programming Windows Sixth Edition Writing Windows 8 Apps with C# and XAML Windows Programming Writing Windows 8 Apps with C# and XAML About the Sixth Edition Like Windows itself, this classic book has been reimagined for • Completely rewritten for Windows 8 Programming a new world of programming and user experiences. Guided • Focuses on creating apps using C#, XAML, and the Windows Runtime by developer legend Charles Petzold, Programming Windows, Sixth Edition teaches how to use your existing C# skills with • Expertly teaches essential skills in Part 1: Elementals XAML and the Windows Runtime to create full-screen, touch Rounds out your Windows 8 education apps for Windows 8. • Windows Store in Part 2: Specialties • Provides code samples in both C# Master the elementals and C++ • Create and initialize objects with code or XAML • Handle user-input events such as taps Apps with HTML, • Manage and experiment with dynamic layout • Visually redefine a control’s appearance • Create Windows Runtime libraries • Use MVVM for data binding and commanding • Work with asynchronous methods; write your own About the Author CSS, and JavaScript • Animate transitions and create 2D and 3D effects Charles Petzold has been writing • Manage resolution, scaling, and navigation about Windows programming for 25 years. A Windows Pioneer Extend your skills and apps Award winner, Petzold is author Second Edition of the classic Programming Windows, the • Handle pointer, manipulation, tap, and hold events widely acclaimed Code: The Hidden • Manipulate bitmaps and rich text Language of Computer Hardware and • Work with GPS and orientation sensors Software, Programming Windows Phone 7, and more than a dozen other books.
    [Show full text]