0% found this document useful (0 votes)
5 views

Beginning iPhone and iPad Web Apps Scripting with HTML5 CSS3 and JavaScript 1st Edition Chris Apers - The ebook with rich content is ready for you to download

The document provides information about various eBooks available for download on ebookname.com, focusing on topics such as web app development, HTML5, CSS3, and JavaScript. It includes links to specific titles, authors, and details about the content covered in each book. Additionally, it outlines the copyright information and the structure of the book 'Beginning iPhone and iPad Web Apps Scripting with HTML5, CSS3, and JavaScript' by Chris Apers.

Uploaded by

dawbzeyad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Beginning iPhone and iPad Web Apps Scripting with HTML5 CSS3 and JavaScript 1st Edition Chris Apers - The ebook with rich content is ready for you to download

The document provides information about various eBooks available for download on ebookname.com, focusing on topics such as web app development, HTML5, CSS3, and JavaScript. It includes links to specific titles, authors, and details about the content covered in each book. Additionally, it outlines the copyright information and the structure of the book 'Beginning iPhone and iPad Web Apps Scripting with HTML5, CSS3, and JavaScript' by Chris Apers.

Uploaded by

dawbzeyad
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Endless Ebook, One Click Away – Start Downloading at ebookname.

com

Beginning iPhone and iPad Web Apps Scripting with


HTML5 CSS3 and JavaScript 1st Edition Chris Apers

https://ebookname.com/product/beginning-iphone-and-ipad-web-
apps-scripting-with-html5-css3-and-javascript-1st-edition-
chris-apers/

OR CLICK HERE

DOWLOAD EBOOK

Browse and Get More Ebook Downloads Instantly at https://ebookname.com


Click here to visit ebookname.com and download ebook now
Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Learn HTML5 and JavaScript for iOS Web Standards based


Apps for iPhone iPad and iPod touch 1st Edition Scott
Preston

https://ebookname.com/product/learn-html5-and-javascript-for-ios-
web-standards-based-apps-for-iphone-ipad-and-ipod-touch-1st-
edition-scott-preston/

Metro Revealed Building Windows 8 apps with HTML5 and


JavaScript 1st Edition Adam Freeman

https://ebookname.com/product/metro-revealed-building-
windows-8-apps-with-html5-and-javascript-1st-edition-adam-
freeman/

Client Server Web Apps with JavaScript and Java 1st


Edition Casimir Saternos

https://ebookname.com/product/client-server-web-apps-with-
javascript-and-java-1st-edition-casimir-saternos/

The Complete Book of Woodworking An Illustrated Guide


to Tools and Techniques Declan O'Donoghue

https://ebookname.com/product/the-complete-book-of-woodworking-
an-illustrated-guide-to-tools-and-techniques-declan-odonoghue/
Understanding Clinical Papers 2nd Edition David Bowers

https://ebookname.com/product/understanding-clinical-papers-2nd-
edition-david-bowers/

World Film Locations Glasgow 1st Edition Nicola Balkind

https://ebookname.com/product/world-film-locations-glasgow-1st-
edition-nicola-balkind/

Irrigation and Water Power Engineering 16th Edition


Punmia

https://ebookname.com/product/irrigation-and-water-power-
engineering-16th-edition-punmia/

Rethinking Risk Assessment The MacArthur Study of


Mental Disorder and Violence 1st Edition John Monahan

https://ebookname.com/product/rethinking-risk-assessment-the-
macarthur-study-of-mental-disorder-and-violence-1st-edition-john-
monahan/

Out in Africa LGBT Organizing in Namibia and South


Africa Social Movements Protest and Contention 1st
Edition Ashley Currier

https://ebookname.com/product/out-in-africa-lgbt-organizing-in-
namibia-and-south-africa-social-movements-protest-and-
contention-1st-edition-ashley-currier/
Tradition Book Cult of Ecstasy Mage The Ascension Lynn
Davis

https://ebookname.com/product/tradition-book-cult-of-ecstasy-
mage-the-ascension-lynn-davis/
Beginning iPhone and iPad Web Apps: Scripting with HTML5, CSS3, and JavaScript
Copyright © 2010 by Chris Apers and Daniel Paterson
All rights reserved. No part of this work may be reproduced or transmitted in any form or by
any means, electronic or mechanical, including photocopying, recording, or by any
information storage or retrieval system, without the prior written permission of the
copyright owner and the publisher.
ISBN-13 (pbk): 978-1-4302-3045-8
ISBN-13 (electronic): 978-1-4302-3046-5
Printed and bound in the United States of America 9 8 7 6 5 4 3 2 1
Trademarked names, logos, and images may appear in this book. Rather than use a
trademark symbol with every occurrence of a trademarked name, logo, or image we use the
names, logos, and images only in an editorial fashion and to the benefit of the trademark
owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms,
even if they are not identified as such, is not to be taken as an expression of opinion as to
whether or not they are subject to proprietary rights.
President and Publisher: Paul Manning
Lead Editor: Steve Anglin
Technical Reviewer: Paul Haine
Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Jonathan
Gennick, Jonathan Hassell, Michelle Lowman, Matthew Moodie, Duncan Parkes,
Jeffrey Pepper, Frank Pohlmann, Douglas Pundick, Ben Renow-Clarke, Dominic
Shakeshaft, Matt Wade, Tom Welsh
Coordinating Editor: Adam Heath
Copy Editor: Kim Wimpsett
Compositor: MacPS, LLC
Indexer: BIM Indexing & Proofreading Services
Cover Designer: Anna Ishchenko
Distributed to the book trade worldwide by Springer Science+Business Media, LLC., 233
Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505,
e-mail orders-ny@springer-sbm.com, or visit www.springeronline.com.
For information on translations, please e-mail rights@apress.com, or visit www.apress.com.
Apress and friends of ED books may be purchased in bulk for academic, corporate, or
promotional use. eBook versions and licenses are also available for most titles. For more
information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/
info/bulksales.
The information in this book is distributed on an “as is” basis, without warranty. Although
every precaution has been taken in the preparation of this work, neither the author(s) nor
Apress shall have any liability to any person or entity with respect to any loss or damage
caused or alleged to be caused directly or indirectly by the information contained in this
work.
The source code for this book is available to readers at www.apress.com.
Contents at a Glance

■Contents .......................................................................................................... v
■About the Authors ..........................................................................................xv
■About the Technical Reviewer.......................................................................xvi
■Acknowledgments........................................................................................xvii
■Introduction.................................................................................................xviii
Part I: Getting Started with Web App Development ............................................ 1
■Chapter 1: Development Tools......................................................................... 3
■Chapter 2: Development Environment ........................................................... 13
■Chapter 3: Introducing Developer and Debugging Tools ............................... 29
Part II: Web App Design with HTML5 and CSS3 ................................................ 65
■Chapter 4: The Anatomy of a Web Application .............................................. 67
■Chapter 5: User Experience and Interface Guidelines ................................... 89
■Chapter 6: Interesting CSS Features for Your Web Application
User Interface ............................................................................ 117
■Chapter 7: Bitmap and Vector Graphics and Downloadable Fonts
with Canvas and SVG................................................................. 165
■Chapter 8: Embedding Audio and Video Content in
Your Web Application ................................................................ 219
■Chapter 9: Handling Transformations, Animations,
and Special Effects with CSS ..................................................... 257
Part III: Going Futher with JavaScript and Web Standards ............................ 299
■Chapter 10: An Object-Oriented JavaScript Programming Primer.............. 301
■Chapter 11: Cross-Document Communication ............................................ 321
■Chapter 12: Ajax and Dynamic Content ....................................................... 343
■Chapter 13: Using Touch and Gesture Events.............................................. 367
■Chapter 14: Location-Aware Web Applications ........................................... 397
■Chapter 15: A Better Handling of Client-Side Data Storage......................... 431
■Index............................................................................................................ 467
iv
Contents

■Contents at a Glance....................................................................................... iv
■About the Authors ..........................................................................................xv
■About the Technical Reviewer.......................................................................xvi
■Acknowledgments........................................................................................xvii
■Introduction.................................................................................................xviii

Part I: Getting Started with Web App Development ............................................ 1


■Chapter 1: Development Tools......................................................................... 3
The Source Editor ...................................................................................................................................................3
Varanus Komodoensis .......................................................................................................................................3
Make Yourself Comfortable ...............................................................................................................................4
What About Dashcode?...........................................................................................................................................5
Using the Right Browser .........................................................................................................................................6
The WebKit.........................................................................................................................................................6
The Gecko and the Fox ......................................................................................................................................7
Opera .................................................................................................................................................................7
Internet Explorer, Lost at Sea ............................................................................................................................7
Developing Web-Wise.............................................................................................................................................8
Acid...Acid...Acid ................................................................................................................................................8
HTML5 Conformance .........................................................................................................................................8
A Satellite in Your Browser ................................................................................................................................8
Developing for iOS ..................................................................................................................................................9
Using the iPhone and iPad Simulator.................................................................................................................9
Using a Real Device Anyway............................................................................................................................10
The ADC Is Your Friend ....................................................................................................................................10
Summary ..............................................................................................................................................................11
■Chapter 2: Development Environment ........................................................... 13
Serving the Web Application.................................................................................................................................13
Mac OS, Making Things Easy................................................................................................................................14

v
■ CONTENTS

An Apache in Your Mac....................................................................................................................................14


The Script Engine.............................................................................................................................................15
Windows, Choose Your Weapons..........................................................................................................................16
An All-in-One Installation Process ...................................................................................................................17
Security Settings..............................................................................................................................................20
Linux, Take Control ...............................................................................................................................................22
Handling Multiple Hosts........................................................................................................................................23
Unix-Based System..........................................................................................................................................23
Windows-Based System ..................................................................................................................................24
Configuring Multiple Web Sites.............................................................................................................................24
Apache 2: Get Carried Away ............................................................................................................................24
The Windows Case...........................................................................................................................................26
Have You Made It? ................................................................................................................................................27
Bet You Have! .......................................................................................................................................................28
■Chapter 3: Introducing Developer and Debugging Tools ............................... 29
Making Friends with WebKit’s Developer Tools....................................................................................................29
Enabling the Develop Menu .............................................................................................................................30
The Develop Menu Exposed.............................................................................................................................30
Developing on Mobile Safari ............................................................................................................................32
Overview of the Web Inspector .............................................................................................................................34
The Developer Tools Window...........................................................................................................................35
Error Notifications............................................................................................................................................36
Master Your Code .................................................................................................................................................37
Make the Document Yours...............................................................................................................................37
Dig Your Style ..................................................................................................................................................38
Editing Styles ...................................................................................................................................................40
Metrics.............................................................................................................................................................40
Advanced Search .............................................................................................................................................43
The Resources Viewer ..........................................................................................................................................44
Debugging JavaScript...........................................................................................................................................46
Logging to the Console ....................................................................................................................................46
Using the Interactive Shell ...............................................................................................................................48
Let the Debugger Do the Job ...........................................................................................................................49
The Life Cycle of Your Page ..................................................................................................................................55
Profiling Your Scripts ............................................................................................................................................57
Understanding the Profiles ..............................................................................................................................58
Filtering with the Search Field.........................................................................................................................59
Client-Side Data Storage ......................................................................................................................................60
Database Storage ............................................................................................................................................61
Cookies ............................................................................................................................................................61
Other Storage Features....................................................................................................................................61
Auditing Your Page ...............................................................................................................................................61
Still Unsure?..........................................................................................................................................................63
Summary ..............................................................................................................................................................63
Part II: Web App Design with HTML5 and CSS3 ................................................ 65
■Chapter 4: The Anatomy of a Web Application .............................................. 67
The iPhone Revolution ..........................................................................................................................................67

vi
■ CONTENTS

Belief in Web Apps...........................................................................................................................................68


But What is a Web App Exactly? ......................................................................................................................70
Planet of the Apps: Who Rules..............................................................................................................................71
Cross-Platform Master.....................................................................................................................................71
Hardware Access Is No Forbidden Weapon Anymore......................................................................................72
Free Your Content ............................................................................................................................................72
Release Model .................................................................................................................................................73
Web Apps: Not the Little Brother Anymore ......................................................................................................73
Web Apps on Mobile Safari...................................................................................................................................73
Master the Browser .........................................................................................................................................73
Browser Metrics...............................................................................................................................................74
Think “Web App” .............................................................................................................................................75
Configuring the Viewport ......................................................................................................................................75
Seriously Appy: Using Stand-Alone Mode.............................................................................................................77
Showcasing a Proper Icon ...............................................................................................................................77
Running Your Application Full-Screen .............................................................................................................79
An Awesome Startup .......................................................................................................................................79
Tweaking the Status Bar..................................................................................................................................80
Staying in Stand-Alone Mode ..........................................................................................................................80
Build Your First Web App Base Project .................................................................................................................81
Your Document Template in Komodo Edit .......................................................................................................82
Hiding Mobile Safari’s Address Bar .................................................................................................................85
Handling Screen Orientation Changes .............................................................................................................86
Final Touch ......................................................................................................................................................87
Ready to Go...........................................................................................................................................................88
■Chapter 5: User Experience and Interface Guidelines ................................... 89
From the Web on the Desktop to the Mobile Web ................................................................................................90
Forget the Desktop ..........................................................................................................................................91
Change Navigation Habits................................................................................................................................91
Show Ads Thoughtfully ....................................................................................................................................92
Let Users Decide by Themselves .....................................................................................................................95
Simplicity and Ease of Use ...................................................................................................................................96
Avoid Clutter ....................................................................................................................................................96
User Interface ..................................................................................................................................................97
Avoid Unnecessary Interaction .............................................................................................................................99
Make Use of New Input Types Capabilities....................................................................................................100
Ponder Upon User-Supplied Information .......................................................................................................101
Avoid Multiplying Steps .................................................................................................................................102
The Spirit: Be Focused........................................................................................................................................102
Make Things Responsive ....................................................................................................................................103
Make Your Web App Responsive ...................................................................................................................103
Make Your Web App Reactive........................................................................................................................105
iOS Interface Design Good Practices ..................................................................................................................105
Adaptability ....................................................................................................................................................105
List vs. Icon Approach....................................................................................................................................106
Considering UI Alternatives.................................................................................................................................109
Mimicking the iOS UI......................................................................................................................................109

vii
■ CONTENTS

Building the iPad Experience .........................................................................................................................110


Be Creative and Innovative .................................................................................................................................115
Summary ............................................................................................................................................................116
■Chapter 6: Interesting CSS Features for Your Web Application
User Interface ............................................................................ 117
Improving the User Experience with CSS ...........................................................................................................117
User Feedback ...............................................................................................................................................118
Disabling Copy/Paste Functionalities.............................................................................................................119
Control Over Callout .......................................................................................................................................120
Selectors.............................................................................................................................................................121
Overview of Available CSS Selectors .............................................................................................................121
Position in Suite Selectors: Structural Pseudoclasses...................................................................................122
Advanced Handling of Backgrounds ...................................................................................................................124
Origin of the Background ...............................................................................................................................125
Global Background Clipping...........................................................................................................................126
Text-Based Background Clipping...................................................................................................................128
Sizing the Background...................................................................................................................................128
Developing a Photos-Like Gallery ..................................................................................................................130
Multilayer Backgrounds .................................................................................................................................134
Colors..................................................................................................................................................................135
The Alpha Channel .........................................................................................................................................135
New Color Definitions ....................................................................................................................................136
Using Gradients...................................................................................................................................................137
Basic Syntax ..................................................................................................................................................137
Changing the Size of the Gradient .................................................................................................................139
Complete Gradient Syntax .............................................................................................................................139
Advanced Color Handling...............................................................................................................................140
Boxes and Borders..............................................................................................................................................142
Box Sizing ......................................................................................................................................................142
Rounded Box Corners ....................................................................................................................................143
Borders Drawn with Images ..........................................................................................................................145
Shadows .............................................................................................................................................................147
Box Shadows .................................................................................................................................................148
Text Shadows ................................................................................................................................................149
Text Effect with Shadows and Outline ...........................................................................................................150
Adding a Button to Your Header..........................................................................................................................150
Columns Layout ..................................................................................................................................................152
CSS Column Properties..................................................................................................................................152
Porting Press Content to the Web ..................................................................................................................155
The Flexible Box Model.......................................................................................................................................158
A Clean and Flexible Way to Handle Column Layouts ....................................................................................158
Ordering Boxes ..............................................................................................................................................159
Flexibility........................................................................................................................................................160
Packing and Alignment ..................................................................................................................................161
Targeting WebKit Specifically .............................................................................................................................162
Summary ............................................................................................................................................................163

viii
■ CONTENTS

■Chapter 7: Bitmap and Vector Graphics and Downloadable Fonts


with Canvas and SVG................................................................. 165
Working with the Canvas Area............................................................................................................................165
The Drawing Context......................................................................................................................................167
Drawing Simple Shapes.................................................................................................................................172
Colors, Gradients, and Patterns .....................................................................................................................174
More Complex Shapes with Paths .................................................................................................................175
Applying Transformations..............................................................................................................................181
Simplifying Drawing State Modifications.......................................................................................................183
Using Text ......................................................................................................................................................183
Shadows ........................................................................................................................................................187
Clipping and Compositing ..............................................................................................................................188
Working with Canvas Pixels...........................................................................................................................191
Using Vector Graphics.........................................................................................................................................195
Inserting SVG into Your Documents ...............................................................................................................196
Understanding the Coordinates System.........................................................................................................196
Drawing Shapes.............................................................................................................................................200
Interoperability...............................................................................................................................................201
Communication..............................................................................................................................................205
Animation with and Without Scripting ...........................................................................................................207
Coping with Temporary Bugs.........................................................................................................................210
Preinstalled and Downloadable Fonts.................................................................................................................211
Summary ............................................................................................................................................................218
■Chapter 8: Embedding Audio and Video Content in
Your Web Application ................................................................ 219
Embedding Video Content...................................................................................................................................220
Getting Information About the Video..............................................................................................................221
The Video Placeholder ...................................................................................................................................222
Playing the Video ...........................................................................................................................................223
Embedding Audio Content ..................................................................................................................................224
Keep Things Reasonable.....................................................................................................................................225
Take Control Over Your Content..........................................................................................................................226
Understanding and Using Ranges..................................................................................................................227
A Number of Supported Events......................................................................................................................232
Adding Subtitles and Chapters to Your Media ....................................................................................................233
Creating Your Own Custom Subtitles.............................................................................................................234
Easier Media Browsing with Chapters...........................................................................................................243
Workarounds...Let’s Go.......................................................................................................................................247
Media Content for the iPhone and iPad ..............................................................................................................248
Understanding Video Formats........................................................................................................................248
Dealing with Supported Audio Formats .........................................................................................................250
Encoding for the Web.....................................................................................................................................251
Summary ............................................................................................................................................................256
■Chapter 9: Handling Transformations, Animations,
and Special Effects with CSS ..................................................... 257
Transform Your Elements ...................................................................................................................................257
Checking Transform Support .........................................................................................................................258
ix
■ CONTENTS

Applying Rotations . .......................................................................................................................................259


Translating Element Coordinates. .................................................................................................................260
Scaling Page Contents . .................................................................................................................................260
Distorting Elements........................................................................................................................................261
Custom Transformations with Matrices. .......................................................................................................261
The Origin of the Transformation . .................................................................................................................262
Working in a Three-Dimensional Environment . .................................................................................................262
New Transform Functions. ............................................................................................................................263
Setting the Perspective. ................................................................................................................................263
Preserving the 3D Aspect . ............................................................................................................................265
Back Face Visibility........................................................................................................................................266
Combining Styles with JavaScript . ....................................................................................................................268
Accessing Current Styles . .............................................................................................................................268
A Native Object to Compute Matrices . ..........................................................................................................268
Transitions . ........................................................................................................................................................270
The transition CSS Property. .........................................................................................................................271
Initiating a Transition .....................................................................................................................................271
Timing Function Curve . .................................................................................................................................272
Telling When the Transition Is Completed . ...................................................................................................274
Getting Ready for a Cover Flow–Like Experience . .............................................................................................274
The Main Document. .....................................................................................................................................275
The Cover Flow Animation . ...........................................................................................................................278
Flipping the Current Cover . ...........................................................................................................................280
Final Touch to the Animation . .......................................................................................................................280
Double-Check: Preventing Unexpected Behavior . ........................................................................................281
Advanced Animations and Key Frames...............................................................................................................282
Key Frames ....................................................................................................................................................282
Starting and Timing the Animation . ..............................................................................................................283
Animation Properties . ...................................................................................................................................283
The Evolution Curve . .....................................................................................................................................284
Working with Events . ....................................................................................................................................285
Special Effects with CSS.....................................................................................................................................285
Creating Reflections.......................................................................................................................................286
Using Real Masks . ........................................................................................................................................287
Create an iOS-Like Tab Bar Using Masks . .........................................................................................................288
Getting the Initial Tab Bar Ready . .................................................................................................................289
A Placeholder for Icons . ................................................................................................................................291
Icons Management . ......................................................................................................................................292
Creating Icons ................................................................................................................................................294
Custom Icons Using an Image . .....................................................................................................................297
Summary . ..........................................................................................................................................................298
Part III: Going Futher with JavaScript and Web Standards ............................ 299
■Chapter 10: An Object-Oriented JavaScript Programming Primer. ............ 301
From the Procedural Model... . ...........................................................................................................................301
...to Object-Oriented Programming. ...................................................................................................................302
A First Custom Object . ..................................................................................................................................302
Using a Proper Constructor. ..........................................................................................................................303

x
■ CONTENTS

Better Performance with Prototype ...............................................................................................................304


Implementing Inheritance...................................................................................................................................305
Prototype-Based Inheritance .........................................................................................................................305
Shared Properties ..........................................................................................................................................306
The Prototype Chain.......................................................................................................................................307
The Execution Context ........................................................................................................................................308
Using the call() and apply() Methods .............................................................................................................308
Taking Care of the Execution Context............................................................................................................310
Setting the Proper Context with Handlers and Callbacks ..............................................................................310
Accessing Properties and Methods ....................................................................................................................312
Defining Getters and Setters...............................................................................................................................313
Code Isolation and Libraries ...............................................................................................................................314
Isolating Your Code ........................................................................................................................................315
Creating a Library ..........................................................................................................................................316
Enhancing Your Spinner Animation ....................................................................................................................317
Summary ............................................................................................................................................................318
■Chapter 11: Cross-Document Communication ............................................ 321
Cross-Document Communication Limitations ....................................................................................................322
Communication, the HTML5 Way........................................................................................................................323
The Cross-Document Messaging API.............................................................................................................323
Data Type Support and Handling ...................................................................................................................324
Security Considerations .................................................................................................................................325
Case Study ..........................................................................................................................................................325
The Main Document.......................................................................................................................................325
The Hosted Document....................................................................................................................................327
Let’s Send a Message....................................................................................................................................328
Handling the Response ..................................................................................................................................329
Specific Mobile Safari Behavior with <iframe>..................................................................................................330
Working with Proper Windows............................................................................................................................332
Notify the Page Is Loaded ..............................................................................................................................333
Properties of the Window Object ...................................................................................................................334
Encapsulating the API to Ease Communication ..................................................................................................335
An Object for the Host Document...................................................................................................................335
An Object for the Widget................................................................................................................................337
The Host Document and the Widgets.............................................................................................................338
Relaxing Subdomain Communication .................................................................................................................340
Changing the Domain.....................................................................................................................................340
Security..........................................................................................................................................................341
The Last Message...............................................................................................................................................341
■Chapter 12: Ajax and Dynamic Content ....................................................... 343
Building an HTTP Request...................................................................................................................................343
Requests Using the XMLHttpRequest Object .................................................................................................344
The open() Method.........................................................................................................................................344
Sending Requests Using GET or POST ...........................................................................................................344
Handling the Request State ...........................................................................................................................345
Handling Progress Events ..............................................................................................................................346
Checking the Response .................................................................................................................................347

xi
■ CONTENTS

Handling Return Formats ....................................................................................................................................348


Most Common Return Formats ......................................................................................................................348
Parsing XML for Use in HTML Documents .....................................................................................................349
Specificities When Parsing JSON...................................................................................................................352
JSON Security Considerations .......................................................................................................................353
Client-Side Rendering Using Returned Data .......................................................................................................354
Handling Template Variables .........................................................................................................................354
Formatting Variables......................................................................................................................................355
Cross-Origin Communication ..............................................................................................................................356
Using Proxies .................................................................................................................................................356
The JSONP Way .............................................................................................................................................357
The Cross-Origin Resource Sharing...............................................................................................................359
Real-Life Example: Display Twitter Trends .........................................................................................................360
The Twitter Trends Feed ................................................................................................................................360
Fetching and Rendering Data ........................................................................................................................360
Be Kind to the Waiting User ................................................................................................................................363
Adding Visual Feedback.................................................................................................................................363
Handling Excessive Waiting Times ................................................................................................................364
Summary ............................................................................................................................................................365
■Chapter 13: Using Touch and Gesture Events.............................................. 367
How to Handle Events.........................................................................................................................................367
Calling Priority of Handlers ............................................................................................................................367
The Capture Stage .........................................................................................................................................369
Control Over Event Propagation .....................................................................................................................370
Preventing Default Behavior ..........................................................................................................................370
Handlers and Object Methods........................................................................................................................371
Classic Events with Mobile Safari.......................................................................................................................372
Behavior of Mouse Events .............................................................................................................................372
Scrolling Information .....................................................................................................................................372
Multi-Touch Events .............................................................................................................................................373
New Interaction Processes ............................................................................................................................373
Handling Multi-Touch Events.........................................................................................................................373
Unlimited Touch Points ..................................................................................................................................374
Cancelled Touch Events.................................................................................................................................376
A Page View Built with Touch and Transform.....................................................................................................377
What We Are Going to Do...............................................................................................................................377
The Container.................................................................................................................................................378
Bring Elements and Interaction .....................................................................................................................379
Creating Custom Events.................................................................................................................................382
Handling Custom Events ................................................................................................................................384
Working with Precomputed Gestures .................................................................................................................385
Create Your Own Gestures..................................................................................................................................387
One Code, Many Strokes................................................................................................................................387
The Bounding Box Object...............................................................................................................................389
Registering User Strokes ...............................................................................................................................390
Using the Recognizer Object..........................................................................................................................392
Improve Accuracy ..........................................................................................................................................394

xii
■ CONTENTS

Summary ............................................................................................................................................................395
■Chapter 14: Location-Aware Web Applications ........................................... 397
The Geolocation API ............................................................................................................................................398
Privacy Considerations ..................................................................................................................................398
Setup Considerations.....................................................................................................................................398
Getting the Current Position................................................................................................................................399
Longitude, Latitude, and More .......................................................................................................................399
Handling Errors from Requests......................................................................................................................401
Accuracy, Timeout, and Cached Location......................................................................................................402
Putting the User on a Map with Google Maps.....................................................................................................403
Showing the Map...........................................................................................................................................403
Centering the Map on the Location of the User .............................................................................................405
Marking the Position of the User ...................................................................................................................407
Showing Accuracy .........................................................................................................................................409
Tracking the User’s Position ...............................................................................................................................410
Registering for Updates .................................................................................................................................410
Specific Behavior of the Watcher...................................................................................................................411
Watching Position on Google Maps................................................................................................................412
From Data to Math ..............................................................................................................................................413
Distance Between Two Points .......................................................................................................................413
Sharper Distance Between Two Points..........................................................................................................414
The Direction to Take.....................................................................................................................................415
Building a Compass Web App .............................................................................................................................416
Create the Mobile Elements...........................................................................................................................416
The Graduations.............................................................................................................................................418
The Needles ...................................................................................................................................................420
The Dial Shine................................................................................................................................................421
Render the Compass......................................................................................................................................422
Add Elements to the Document .....................................................................................................................424
Prepare the Document to Receive Location Data ..........................................................................................425
Use Location Data ..........................................................................................................................................426
Animate the Compass....................................................................................................................................427
Prevent Staggering Needles ..........................................................................................................................429
Summary ............................................................................................................................................................430
■Chapter 15: A Better Handling of Client-Side Data Storage......................... 431
Different Storage Areas ......................................................................................................................................431
How to Use New Storage Capabilities............................................................................................................432
Specific Behavior of sessionStorage .............................................................................................................433
Being Notified of Storage Area Modification..................................................................................................434
Security and Privacy Considerations .............................................................................................................435
Caching Ajax Requests ..................................................................................................................................435
Sending Client Data to the Server..................................................................................................................441
SQL Local Database ............................................................................................................................................442
Opening the Database....................................................................................................................................443
Creating Tables..............................................................................................................................................444
Adding Data to Tables....................................................................................................................................446
Querying Data from the Tables ......................................................................................................................448

xiii
■ CONTENTS

Updating Data ................................................................................................................................................449


Using Database in Place of Storage...............................................................................................................451
Handling Transaction and Query Errors .........................................................................................................452
Maintaining Coherent Access with Versioning ..............................................................................................454
Deleting the Database....................................................................................................................................456
Security Again................................................................................................................................................457
Offline Web Application Cache............................................................................................................................458
How Does It Work?.........................................................................................................................................458
The Manifest File ...........................................................................................................................................459
Controlling the Cache with JavaScript...........................................................................................................462
Reacting to Events Sent by the Application Cache ........................................................................................464
Deleting Cache...............................................................................................................................................465
Is the User Online?.........................................................................................................................................466
Summary ............................................................................................................................................................466
■Index............................................................................................................ 467

xiv
About the Authors

Chris Apers has more than 13 years experience in web technologies and
mobile development, including the PalmOS, webOS, and iPhone. He is a
technical manager and architect at Newsweb/Lagardère Active and
participates in open source projects such as porting development libraries
and software to mobile devices. With the creation of the open source
framework WebApp.Net, he provides an easy way to create mobile content
targeting WebKit browsers. For more, visit www.webapp-net.com and
www.chrilith.com.

Daniel Paterson has a master’s degree in comparative literature, and he penned a memoir on
integrating literary theory into fictional works, taking novels by Umberto Eco, Milan Kundera,
and David Lodge as examples. After his university years, Daniel entered web development and
joined Newsweb/Lagardère Active in April 2009. Passionate about the Web as about many other
things, he enjoys every opportunity to work on interesting projects and to develop his skills.

xv
Other documents randomly have
different content
En otro tiempo, sin duda por la proximidad al primitivismo de Rousseau,
presumían los vascos de ser un pueblo nuevo, un pueblo joven, que
modernamente comenzaba a vivir. Hoy no podemos recostarnos en esa
teoría de la juventud. Todo indica, al revés, que los vascos deben inscribirse
entre los pueblos que han vivido mucho.

En otra ocasión[1] me aventuré a expresar la posibilidad de que en la


mayor parte de Europa existan dos grandes razas fundamentales: la raza
noble y la plebeya. Ahora me importa insistir en ese punto de la duplicidad
racial, cuyos elementos se formaron sin duda en períodos ignorados de la
Historia. Esta duplicidad no excluye la intromisión posterior de otros
componentes raciales, venidos en tiempos históricos; germanos, franceses,
castellanos, tal vez romanos, quizás algunos judíos, y después la
inmigración lenta por los puertos de mar.
[1] Véase En la Vorágine
Si examinamos los dos tipos principales que pueblan el Cantábrico,
veremos pronto un hombre macizo, propenso a engordar, de cabeza
redonda, facciones poco delicadas, temple reposado y espíritu práctico. Es
un individuo sano, robusto y ecuánime, exento de inútiles fantasías y nada
apto para perder el tiempo en fugas imaginativas. Es el ejemplar del buen
ciudadano, el que ahorra, come, engorda y ríe. Es ese asturiano forzudo y
leal que todos conocemos, buen servidor, con aptitudes de tendero y de
contratista; es ese vasco ciclópeo que vive a ras de tierra y que, en la
emigración, pasa pronto a la categoría de «indiano». Las características de
este ejemplar son semejantes al «hombre alpino» de los antropólogos, el
famoso «marchand de marrons».
El otro ejemplar está ahí, en todas partes, destacándose por su cuerpo
musculoso, su cuello largo, su espalda algo encorvada, su cráneo estrecho,
su nariz
Elías Salaverría, pint.
exageradamente larga, sus ojos oscuros, su mentón agudo, su dentadura
frágil, su temperamento nervioso y su aire fino. Es el que da carácter
diferencial a la raza.
¿Cuál de los dos ejemplares tiene derecho a llamarse aborigen? Yo me
inclinaría a optar por el tipo ecuánime, macizo y de cabeza redonda; ese
hombre pirenaico o cantábrico que sería pariente del hombre alpino, base de
donde mana la gran raza plebeya del centro de Europa. El otro tipo
nervioso, dolicocéfalo, fino y de ojos oscuros, es una repetición de los
hombres de origen mediterráneo que habitan en Castilla y en Andalucía.
Entre un vasco o santanderino de perfil agudo y ojos negros, y un hidalgo
de Ávila o un fino ganadero de Córdoba, no suele haber más diferencias
que las puramente externas de vestido o acento idiomático.
Este hombre aguileño y nervioso, noble y fino, forma parte de una raza
muy vieja que acaso invadió el Cantábrico, y que en el mismo resto de
España sería intrusa; es imposible conjeturar la fecha de la invasión, ni si
trajo al país el idioma éuscaro o lo encontró ya en uso entre la gente
primitiva del tipo basto. Únicamente podemos confirmar por la propia
observación la naturaleza macerada, vieja y en cierto modo decadente de
esa sección racial del país cantábrico.
La tuberculosis causa en ella sensibles estragos; las dentaduras se
desmoronan pronto; le persigue la neurosis, las manías, las ideas fijas, la
misantropía, la timidez enfermiza, los «tics» nerviosos, las pasiones
vehementes, los sectarismos hondos y morbosos llevados a la política y a la
religión; en fin, el alcoholismo, cuya influencia arruinadora apenas daña al
tipo sano que anotamos en primer lugar, pero que hace estragos en el
hombre aguileño, por su incapacidad fisiológica de reacción.
Si examinamos ahora el desgaste, nos encontraremos con una raza que,
después de ser vieja, todavía tiene el peligro de la incontinencia y del clima
deprimente. Favorece, pues, el desgaste de la raza esa propensión al abuso,
que no es ninguna temeridad exponer como cierta y resaltante. Abuso en el
trabajo, abuso en la ambición, abuso en la sensualidad. No se trata de
individuos continentes, como esos levantinos que se embriagan hablando y
beben mucha más agua que vino; todos sabemos a qué grado de
intemperancia llega el vasco, como todo cántabro, cuando se decide a
comer y beber, a trasnochar, a bailar, a jugar. Un delirio báquico, una
extremosidad vehemente y frenética es lo usual en esas fiestas, en esos
juegos, banquetes y bailes del país. Las mujeres sobre todo abusan de su
laboriosidad, a la que se entregan con verdadera intemperancia y por la que
envejecen relativamente pronto.
El clima del Cantábrico es favorable a los desequilibrios neuróticos, por
su humedad pastosa, por sus cambios bruscos y continuos, por sus cielos
bajos, por sus nublados interminables, por la cortedad de los horizontes. En
esos cielos bajos, que no tienen la compensación de la llanura como en
Francia y Alemania, las ideas fijas son una especie de carcoma en un
sistema nervioso desgastado. Y los aires reinantes son tan antagónicos, tan
incongruentes, que el temperamento humano necesita pasar en pocos días
desde el viento ágil del Norte al viento caliginoso del Noroeste, pesado y
como tropical, y en seguida al viento del Sur, excitante y seco. El clima
mantiene al hombre del Cantábrico en una intranquilidad constante. Y los
cielos bajos, oprimentes, hacen en los nervios su faena.
La codicia de beber es una pasión que ataca a casi todos los pueblos
húmedos, nubosos, frescos o fríos. El hombre ama la luz y el calor; los
necesita para el alma tanto como para el cuerpo. Cuando el cielo no presta
la luz y el calor, el hombre pide el complementario, la compensación, el
fuego y la luz del vino. Todas las Sociedades de Temperancia de Inglaterra
son impotentes para dar al inglés un sustitutivo del alcohol, en aquella tierra
húmeda donde, frente a un sol inútil como una oblea difuminada, el alma
que se aburre encuentra que la vida carece de sabor.
En Francia asistimos claramente al espectáculo de unas regiones alegres,
tibias y luminosas como las del Mediodía, en que el alcoholismo es
moderado, y esas otras regiones del Norte, como Normandía, donde las
familias destilan en las propias casas el aguardiente de frutas, que devoran
todos, viejos y niños; en algún puerto normando se ha dado el caso de tener
que interrumpirse a media tarde la descarga de buques, porque los obreros
estaban embriagados.
El meridional, particularmente el mediterráneo, tiene por el vino un
amor casi lírico; lo bebe con temperancia, y es para él una cosa clara,
alegre, sin culpa; es un elemento histórico y social de la fiesta en familia o
al aire libre, la herencia de Baco, la exaltación poética de las vendimias. En
los climas nubosos tiene el vino un sentido como trágico y culpable.
XXI

DIFERENCIACIONES Y PARECIDOS

V. de Zubiaurre, pint.
N INGÚN trozo geográfico o antropológico del mundo se halla bastante
aislado para que pueda suponérsele único, virgen de todo contacto y
libre de comunicaciones reales. El territorio vasco, por su pequeñez y
por la posición que ocupa precisamente en el gran camino de las
migraciones, no es el que más se ha librado de las influencias externas. Nos
atreveríamos a decir que los vascos, semejantes en esto a los ingleses,
admitieron siempre todo lo que llegaba del exterior. Por tanto, en el
contenido del país hay mucho de mosaico, cuyas piezas múltiples es fácil
hoy mismo separar con un mediano espíritu de observación. En el país
vasco han ido posándose los residuos de las civilizaciones circulantes, sobre
todo y casi exclusivamente las civilizaciones hispano-castellanas. En el
propio idioma éuscaro se descubren numerosos vocablos de origen
medioeval, y hasta del tiempo oscuro en que el bajo latín se convertía en
rudo romance castellano. No es necesario resaltar ahora cómo la legislación
foral hispano-castellana va dejando en las leyes vascongadas sus distintos y
sucesivos aspectos. En cuanto a la arquitectura, el país vasco acoge las
formas que llegan de la meseta central, hasta las formas de origen
mahometano; en Azpeitia y Azcoitia, efectivamente, se ven casas abolengas
donde el ladrillo está trabajado según la manera mudéjar.
Las agrupaciones humanas son como círculos concéntricos, que varían
por su dimensión y jerarquía, pero no por sus caracteres específicos. Una
simple aldea reúne ya todo lo esencial de una gran nación: atomismo, celos
de barrio, luchas de castas, diferencias de terreno y de clima. Una región es
un círculo también, semejante a un círculo nacional del tipo moderno.
Si observamos, pues, la región vascongada la veremos dividida, lo
mismo que un gran Estado, en partes desiguales y aun antagónicas.
Geográficamente tiene zonas cálidas, mediterráneas, esteparias, meseteñas,
de llanura; otras son húmedas, cantábricas, tibias y de valles estrechos; otras
son de alta montaña, frías y boscosas.
La flora recorre toda la gama mediterráneo-alpina, desde los castaños y
helechos de los climas brumosos, hasta el tomillo de las tierras esteparias y
los olivares de los llanos calientes.
El tono de la raza, ¡qué distinto aparece también! Hacia el lado
cantábrico, la gente presenta una piel más blanca y rosa; hacia el lado
opuesto, en la vertiente del Mediterráneo, la piel se quema y tiende a ser
cobriza o amarilla. Los del lado del mar son hombres de aspecto físico más
voluminoso, de cuerpos grandes que propenden a la obesidad; los del otro
lado de la divisoria son más pequeños, enjutos, violentos y vivaces.
El tipo del cráneo varía igualmente, aunque pueda señalarse una forma
general, como la más frecuente: la forma dolicocefálica, común a casi todos
los pueblos meridionales. No es tan uniforme el color del pelo y de los ojos.
Mientras unos vascos se significan por el tono oscuro del cabello y ojos,
otros se nos presentan francamente rubios y de ojos muy claros. Los ojos de
color intermedio abundan notablemente, tal vez tanto como en Italia; hay
pocos ojos de matiz germano puro, como en Francia, pero son incontables
los matices ambiguos: azulados grises, azulados verdosos, grises verdosos.
Añadiremos todavía que a lo largo de la región es fácil descubrir zonas
más o menos importantes en donde prepondera el color claro de los ojos y
el pelo. Parecen manchas antropológicas caídas allí al azar, pero que
obedecen a causas o inmigraciones prehistóricas. En la parte pirenaica de
Navarra abundan mucho estas zonas o manchas de color claro; en los valles
elevados, y en la misma cuenca de Pamplona, se ven con sorpresa cráneos
redondeados y cabellos rubios, que recuerdan bastante a los del mediodía de
Francia del tipo gascón y bearnés.
Contra lo que parecería natural, el tipo de ojos y pelo moreno abunda
mucho más en la vertiente cantábrica. Por un efecto de ilusión, mirando
sólo al matiz general de las personas, suele creerse que el vasco del lado del
Cantábrico es un hombre blanco, claro, casi rubio en oposición al hombre
de la meseta.
Lo cierto es, sin embargo, que en la meseta central española no abundan
los tipos puramente morenos tanto como en Marquina o Andoaín. En el
centro de España se da con más frecuencia el tipo castaño; para encontrar
ojos y cabellos francamente morenos es preciso retirarse a las costas, sean
de Cataluña, de Murcia, de Andalucía o del Cantábrico. La ilusión de
«morenez» del centro de España tiene su origen en el cutis seco, tostado y
amarillento, producto nada más que del clima; tan pronto como el centro de
España deja de ser meseta y desciende de nivel, como ocurre en
Extremadura, pierde la piel ese matiz uniforme y seco y cobra color vivo.

Aunque los ríos del país vascongado, como todos los de la región
cantábrica, sean tan minúsculos que apenas merecen más que el nombre de
arroyos, tienen, sin embargo, una positiva fuerza de diferenciación
etnográfica.
Los ríos son pequeños, es verdad, pero ni en ellos mismos fracasa esa ley
de Geografía que hace de las cuencas hidrográficas las más naturales y
primarias expresiones regionales. En efecto, y refiriéndonos a un río
famoso, todos saben que las gentes que pueblan las riberas del Ebro, desde
Miranda a Tortosa, tienen puntos psicológicos y temperamentos comunes,
de modo que un riojano, un navarro ribereño y un aragonés coinciden en las
costumbres, en los cantos; en el tono del lenguaje y en los sentimientos.
Así también ha herido siempre mi curiosidad esa extraña filiación que se
observa en los habitantes de los distintos ríos vascongados. Para conocer las
diferenciaciones de lenguaje, de costumbre y hasta de matices raciales en el
país vasco, necesariamente y casi exclusivamente debemos recurrir a la
hidrografía. Las cuencas hidrográficas son de veras las que unen a los
hombres y los diferencian de sus vecinos.
Refiriéndome a la provincia de Guipúzcoa, que es la que más conozco,
diré que las tres grandes separaciones dialectales y costumbristas de esa
provincia se sujetan a las tres cuencas hidrográficas importantes: el río
Deva, el Oria y el Bidasoa. Los otros ríos, de curso más insignificante,
como el Urola, el Urumea y el Oyarzun, aunque positivamente tienen fuerza
diferenciadora, ésta no es tan notable como la de los otros ríos; sus matices
diferenciadores son de índole muy sutil y no vale la pena de anotarlos.
El tono de la voz y el dialecto que hablan las gentes de Irún y
Fuenterrabía, son mucho más semejantes a los de Hendaya, Vera y Echalar,
que a los de Villabona, Tolosa y Beasaín. En cuanto al dialecto y las formas
costumbristas de las gentes del Deva, se separan bastante
considerablemente de las del río Oria. Esta diferencia de dialecto, usos y
hasta tipo de raza entre las gentes del Oria y del Deva es tan notable, que
parecen dos provincias diversas.
Desde Oñate y Mondragón, hasta Mendaro y Deva, el idioma adquiere
rasgos vizcaínos, como son, principalmente, las terminaciones en «u» y el
uso de la jota con sonido suave, como la «ch» francesa. Veremos también
que en la cuenca del Deva tienen las villas un aire más señorial, y que su
arquitectura, más aristocrática que la del Oria, es por tanto más fina y
elegante; las casas fuertes de Oñate y Vergara, por ejemplo, indican con
facilidad que en esta parte de la provincia existió mayor preocupación
hidalguesca, y que fueron aquí los señores banderizos mucho más soberbios
e influyentes que en la región del Oria. En fin, la raza se diferencia también;
un espíritu medianamente sagaz comprende pronto que la gente de Eibar y
Vergara es de tipo más moreno, acaso más fino y «decadente», menos
vigoroso, más aguileño, que los ejemplares de Asteasu, Amezqueta y
Tolosa.
Para mí, la verdadera Guipúzcoa se halla enclavada en la región
hidrográfica del Oria, la cual se extiende a un lado y otro abarcando en
cierta manera la cuenca del Urola, del Urumea y el país semillano que va
hacia el bajo Bidasoa. La cuenca del Deva es una provincia aparte que
abraza las comarcas afines de Marquina, Ermúa y Elorrio, hasta el llano de
Durango.
Después señalaremos la diferencia bien honda entre la gente pescadora y
la labriega, entre «costarras» y «goyerritarras». Y ensanchando el espacio
de las comparaciones, encontraremos que, en términos generales y en
mayores síntesis, Guipúzcoa es más suave y atemperada que Vizcaya;
Vizcaya es más dura, más terca e irascible, y se parece al tono genérico
español; Álava, prescindiendo de los apéndices de Ayala y Aramayona,
tiene el aire modesto, el aire de llanura como «virtuosa» y económica, de la
tierra de Burgos.
En Navarra hay porciones guipuzcoanas; otras, como el Baztán,
recuerdan al país vasco-francés; otras zonas son alto-pirenaicas, y otras, por
fin, tienen el tono impulsivo y cálido de la Rioja y de Aragón.
La provincia de Vizcaya, a causa de cierta arbitrariedad de sus ríos, es
casi tan heterogénea y está diferenciada como Navarra. Esa cuenca del
Nervión es un verdadero remolino de procedencias dispares; el vascuence y
el castellano se encuentran y unen allí; afluyen las influencias del alto
Ibaizábal, se unen a las de Orozco, llegan las de Álava, y reciben por último
las del Cadagua. Esto explica que la zona propiamente bilbaína, desde
Achuri a Portugalete, sea lo más violento, turbio y heterogéneo del país
vasco y de la propia región cantábrica.
XXII

IDEAS FINALES

V. de Zubiaurre, pint.

H AY en nosotros una íntima resistencia frente al cambio: no queremos


que las cosas varíen alrededor nuestro, porque además de la pereza que
sentimos por todo cambio de postura, nos parece, tal vez con razón,
que al desaparecer las costumbres a las que estábamos conformados,
nosotros mismos debemos desaparecer con ellas.
Constantemente nos gritan con alarma que los usos y costumbres
vascongados están desapareciendo. No hay duda que muchas formas
costumbristas desaparecen. Pero la alarma sería fundada si esas costumbres
desaparecieran en seco, sin ser sustituídas por otras costumbres, tan típicas
como las anteriores.
Hoy pasan las formas y se cambian las modalidades con mucha más
rapidez que antaño; esto ocurre en todo el mundo, y el país vasco no podría
substraerse a la ley universal. Mueren las costumbres, es verdad, pero otras
nuevas nacen. Y en este punto deberemos insistir un poco, porque es
esencial.
Instintivamente nos sentimos dispuestos a considerar lo típico como algo
que ha llegado a un país por efectos milagrosos: una costumbre, en cuanto
reúne ciertas cualidades generales y permanentes, se nos figura que brota de
las entrañas del país por verdadera germinación espontánea y al estilo de los
hongos; nos basta reflexionar brevemente para comprender que no es así, y
que lo que llamamos costumbres características son cosas que los pueblos
se transmiten de uno a otro y sin cesar. Lo que hace cada país, con distinta
fuerza, es imprimir su propio cuño a esas costumbres, absorbiéndolas
profundamente hasta lograr que parezcan diferentes y originales.
El país vasco es quizá uno de los que mejor y más habitualmente recurre
a la recepción o absorción de formas costumbristas ajenas. El país vasco es
poco original en el sentido creador. No ha creado formas esenciales de vida,
o no ha transfigurado las esencias adquiridas hasta exaltarlas profunda y
densamente, al modo de los pueblos que consideramos fundadores de
civilización (Grecia, por ejemplo). Tampoco se puede decir que el país
vasco haya creado verdaderos estilos, porque, con frecuencia, las formas
que adquiere del exterior las conserva casi en el mismo estado en que las
recibe. Tal ocurre con el juego de pelota, con el tamboril, con las danzas de
las espadas, con las regatas de traineras y con otros muchos usos llamados
típicos.
Contribuye a que estos usos se llamen típicos un fenómeno de simple
exclusión: son costumbres y modalidades que en otras provincias han
perdido auge y difusión, y que al conservarse entre los vascongados con
fuerza, producen el efecto de ser propiamente vascongadas. Así ocurre con
el tamboril, que sólo en raras comarcas del resto de la Península se conserva
en vigor. Los andaluces lo usan en la célebre y pintoresca romería del
Rocío; lo emplean también algunos pueblos de León. Antiguamente era
común a muchas comarcas españolas, sobre todo las de raíz castellana.
El caso del juego de pelota es sumamente curioso. Se le llama sport
vasco, y es una diversión que ha sido adoptada de los castellanos
probablemente en fecha bastante próxima. Digamos desde luego que la
pelota es un útil de diversión tan antiguo como el hombre, y común a todos
los hombres del mundo. Es un juguete universal, puesto que es lógico. Los
relieves griegos nos presentan ya a las mujeres jugando a la pelota.
Que el juego de la pelota, en la forma actual, fué adquirido de Castilla,
es indudable, porque todas, pero todas las palabras que intervienen en el
juego, son castellanas. Respecto a la relativa modernidad de la adquisición,
nos ayudará a la conjetura el examen, siquiera ligero, de esas palabras:
efectivamente, carecen de un aire demasiado arcaico. Son voces del siglo
XVI, o quizá de tiempos más recientes. Hoy se usan en el lenguaje corriente
de Castilla.
Lo cierto es que nuestros pelotaris dicen «frontón», «pelota», «pared»,
«raya», «guante», «pala», «cesta»; califican las jugadas de «a largo», «a
remonte», «a volea», «a punta», «a sotamano»; dicen «falta», «tanto»,
«quince»... Todo indica, pues, que el juego de la pelota tiene en el país
vasco una fecha de adopción muy poco antigua.
Como ese juego ha sido adoptado, otros nuevos vendrán a sustituír a los
que se pierdan. Porque los vascos se vieran con el gusto o la necesidad de
tomar la costumbre de la pelota a los castellanos, a nadie se le ocurrió
proferir dramáticas lamentaciones. El carácter de un pueblo no se cifra en
algunas maneras externas y formales: hay algo más penetrante que ayuda a
mantener el tono diferencial de un país. Aunque el «ariñ-ariñ», el
«fandango» y la «purrusalda» no son más que el baile suelto que se baila en
casi todas las regiones españolas, sabemos, sin embargo, que algún matiz,
cierto aire diferencial existe en la danza suelta de los vascos.
Este mismo fenómeno, si lo aplicamos a las palabras, nos concederá no
menos interesantes motivos de observación. En efecto, tan pronto como nos
sumergimos en la lectura de las obras castellanas de la Edad Media,
encontramos vocablos e interjecciones que en el siglo XIII eran de uso
vulgar en Castilla y que hoy no se emplean ni se conocen si no es por los
eruditos; pues bien, esos vocablos e interjecciones que el tiempo borró para
siempre de los países propiamente castizos, se conservan en el país
vascongado y toman en lenguaje éuscaro un franco carácter de
frecuentación. De tal modo, que los mismos vascongados creen que se trata
de términos absolutamente indígenas.
Para quien conoce el vascuence, resulta, pues, en extremo curiosa la
lectura del poema de Mío Cid, y da ocasión a conmovedoras sorpresas. El
aire rudo, masculino, honrado y marcial de esos versos rudimentarios nos
arroja desde luego al alma un perfume antiguo, un saber de naturaleza que
se compagina bien con el tono de la gente vascongada. El Cid, Antolínez,
Muño Gustioz, Jimena, son personas bravas y simples que dan a las cosas
su nombre exacto, su valor real. Pasa por todo el poema una emoción y un
brío varoniles, y nada nos cuesta imaginar que aquellos seres de la vieja
Castilla son vascos romanizados, o sencillamente vascos que han pasado a
través de las villas y las ciudades.
De pronto tropezamos con una palabra: «asmar». El comentador del
libro hace una llamada y cree indispensable dar al pie de la página una
explicación de ese verbo arcaico. Nosotros, ante la explicación erudita,
vemos con asombro que el verbo «asmar» tiene hoy en vascuence el mismo
sentido que tenía entre los castellanos del siglo XIII. Lo mismo ocurre con
la palabra «alcandora», que es de origen árabe, y se usa en el vascuence de
una parte de Guipúzcoa para expresar la camisa. «Cayola» (jaula) es otra
palabra que desaparece del castellano corriente y perdura en éuscaro.
«Copa», en la acepción de cesto o concavidad, se usa en vascuence para
significar el serón de los albañiles. «Copeta», que en éuscaro significa
frente, es el «copete» arcaico. A veces salta una palabra que ha llegado del
italiano al vascuence por vías ignoradas; por ejemplo, «gona», que en
toscano y en el vascuence vulgar significa saya, basquiña. Es posible que se
usara en castellano alguna vez, y haya desaparecido sin dejar rastro
literario.
También nos detenemos con curiosidad cuando oímos exclamar al Cid
Campeador, el de la barba vellida:

Ia, Alvar Fáñez, bivades muchos días;


más valedes que nos, ¡tan buena mandadería!

O cuando el mismo Cid se dirige a su esposa y prorrumpe entre suspiros:

Ia, doña Ximena, la mi mujer tan cumplida,


como a la míe alma yo tanto vos quería...

El comentador hace aquí otra llamada y explica el sentido de ese «ia»;


era una exclamación actualmente en desuso, o sustituída, a nuestro parecer,
por su semejante ¡ea! ¿Pero necesitábamos nosotros ninguna ayuda
aclaratoria? La exclamación «ia», tan frecuente en Mío Cid, está viva y se
emplea corrientemente por los que hoy hablan el éuscaro en tierras de
Guipúzcoa. De este modo: «Ia, Manubel, etorrizaitez.» O en tono de
imprecación y de coraje. «¡Ya, mutillac, guacen aurrerá!...»
Estos que a primera vista parecen detalles nos demuestran cómo los
hombres se comunicaron en la antigüedad más frecuentemente de lo que ha
supuesto una opinión pseudo-culta. Los pueblos no vivían separados como
islas en los siglos medios, sino que, todo al revés, se frecuentaban, se
copiaban entre sí, y esto quizá con más eficacia que ahora mismo. Los
idiomas eran entonces cosas blandas, maleables, amorfas, a causa de la
constante y viva comunicación. El francés se diferencia poco del provenzal,
y el castellano está lleno de palabras lemosinas, italianas, gallegas y
francesas.
En contacto frecuente, y viviendo la misma vida social, comercial,
política y guerrera, es entonces cuando castellanos y vascongados se
fundieron en un cuerpo armónico. De entonces data sin duda la aceptación
por parte del vascuence de esa infinidad de voces y giros, que tomados de
un castellano primitivo, nos suenan hoy tan densamente.
INDICE
Páginas.
La inmensidad verde 5
El ceremonioso tamboril 13
Día de fiesta en un pueblo vasco 21
Junto a la carretera 29
Cataliñ 37
Los remeros olímpicos 43
Elogio de mar Cantábrico 53
El río dinámico 59
Elogio de los campanarios 67
El viento del sur 73
Los bebedores de sidra 83
Los versolaris 91
El humor anacreóntico de los vascos 99
Visión de pueblo antiguo 109
Camino de las montañas 121
La patria de los pastores 129
Meditación en la cumbre 141
La timidez de los vascos 149
La preocupación de la hidalguía 159
El problema de los nervios 167
Diferenciaciones y parecidos 181
Ideas finales 191
*** END OF THE PROJECT GUTENBERG EBOOK ALMA VASCA ***

Updated editions will replace the previous one—the old editions will
be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States copyright in
these works, so the Foundation (and you!) can copy and distribute it
in the United States without permission and without paying
copyright royalties. Special rules, set forth in the General Terms of
Use part of this license, apply to copying and distributing Project
Gutenberg™ electronic works to protect the PROJECT GUTENBERG™
concept and trademark. Project Gutenberg is a registered trademark,
and may not be used if you charge for an eBook, except by following
the terms of the trademark license, including paying royalties for use
of the Project Gutenberg trademark. If you do not charge anything
for copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such as
creation of derivative works, reports, performances and research.
Project Gutenberg eBooks may be modified and printed and given
away—you may do practically ANYTHING in the United States with
eBooks not protected by U.S. copyright law. Redistribution is subject
to the trademark license, especially commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the free


distribution of electronic works, by using or distributing this work (or
any other work associated in any way with the phrase “Project
Gutenberg”), you agree to comply with all the terms of the Full
Project Gutenberg™ License available with this file or online at
www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand, agree
to and accept all the terms of this license and intellectual property
(trademark/copyright) agreement. If you do not agree to abide by all
the terms of this agreement, you must cease using and return or
destroy all copies of Project Gutenberg™ electronic works in your
possession. If you paid a fee for obtaining a copy of or access to a
Project Gutenberg™ electronic work and you do not agree to be
bound by the terms of this agreement, you may obtain a refund
from the person or entity to whom you paid the fee as set forth in
paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only be


used on or associated in any way with an electronic work by people
who agree to be bound by the terms of this agreement. There are a
few things that you can do with most Project Gutenberg™ electronic
works even without complying with the full terms of this agreement.
See paragraph 1.C below. There are a lot of things you can do with
Project Gutenberg™ electronic works if you follow the terms of this
agreement and help preserve free future access to Project
Gutenberg™ electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright law
in the United States and you are located in the United States, we do
not claim a right to prevent you from copying, distributing,
performing, displaying or creating derivative works based on the
work as long as all references to Project Gutenberg are removed. Of
course, we hope that you will support the Project Gutenberg™
mission of promoting free access to electronic works by freely
sharing Project Gutenberg™ works in compliance with the terms of
this agreement for keeping the Project Gutenberg™ name associated
with the work. You can easily comply with the terms of this
agreement by keeping this work in the same format with its attached
full Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.

1.E. Unless you have removed all references to Project Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project Gutenberg™
work (any work on which the phrase “Project Gutenberg” appears,
or with which the phrase “Project Gutenberg” is associated) is
accessed, displayed, performed, viewed, copied or distributed:
This eBook is for the use of anyone anywhere in the United
States and most other parts of the world at no cost and with
almost no restrictions whatsoever. You may copy it, give it away
or re-use it under the terms of the Project Gutenberg License
included with this eBook or online at www.gutenberg.org. If you
are not located in the United States, you will have to check the
laws of the country where you are located before using this
eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is derived


from texts not protected by U.S. copyright law (does not contain a
notice indicating that it is posted with permission of the copyright
holder), the work can be copied and distributed to anyone in the
United States without paying any fees or charges. If you are
redistributing or providing access to a work with the phrase “Project
Gutenberg” associated with or appearing on the work, you must
comply either with the requirements of paragraphs 1.E.1 through
1.E.7 or obtain permission for the use of the work and the Project
Gutenberg™ trademark as set forth in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is posted


with the permission of the copyright holder, your use and distribution
must comply with both paragraphs 1.E.1 through 1.E.7 and any
additional terms imposed by the copyright holder. Additional terms
will be linked to the Project Gutenberg™ License for all works posted
with the permission of the copyright holder found at the beginning
of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files containing a
part of this work or any other work associated with Project
Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute this


electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the Project
Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™ works
unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or providing


access to or distributing Project Gutenberg™ electronic works
provided that:

• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of receipt
that s/he does not agree to the terms of the full Project
Gutenberg™ License. You must require such a user to return or
destroy all copies of the works possessed in a physical medium
and discontinue all use of and all access to other copies of
Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full refund of


any money paid for a work or a replacement copy, if a defect in
the electronic work is discovered and reported to you within 90
days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project Gutenberg™


electronic work or group of works on different terms than are set
forth in this agreement, you must obtain permission in writing from
the Project Gutenberg Literary Archive Foundation, the manager of
the Project Gutenberg™ trademark. Contact the Foundation as set
forth in Section 3 below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on, transcribe
and proofread works not protected by U.S. copyright law in creating
the Project Gutenberg™ collection. Despite these efforts, Project
Gutenberg™ electronic works, and the medium on which they may
be stored, may contain “Defects,” such as, but not limited to,
incomplete, inaccurate or corrupt data, transcription errors, a
copyright or other intellectual property infringement, a defective or
damaged disk or other medium, a computer virus, or computer
codes that damage or cannot be read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except for


the “Right of Replacement or Refund” described in paragraph 1.F.3,
the Project Gutenberg Literary Archive Foundation, the owner of the
Project Gutenberg™ trademark, and any other party distributing a
Project Gutenberg™ electronic work under this agreement, disclaim
all liability to you for damages, costs and expenses, including legal
fees. YOU AGREE THAT YOU HAVE NO REMEDIES FOR
NEGLIGENCE, STRICT LIABILITY, BREACH OF WARRANTY OR
BREACH OF CONTRACT EXCEPT THOSE PROVIDED IN PARAGRAPH
1.F.3. YOU AGREE THAT THE FOUNDATION, THE TRADEMARK
OWNER, AND ANY DISTRIBUTOR UNDER THIS AGREEMENT WILL
NOT BE LIABLE TO YOU FOR ACTUAL, DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE OR INCIDENTAL DAMAGES EVEN IF
YOU GIVE NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of receiving
it, you can receive a refund of the money (if any) you paid for it by
sending a written explanation to the person you received the work
from. If you received the work on a physical medium, you must
return the medium with your written explanation. The person or
entity that provided you with the defective work may elect to provide
a replacement copy in lieu of a refund. If you received the work
electronically, the person or entity providing it to you may choose to
give you a second opportunity to receive the work electronically in
lieu of a refund. If the second copy is also defective, you may
demand a refund in writing without further opportunities to fix the
problem.

1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of damages.
If any disclaimer or limitation set forth in this agreement violates the
law of the state applicable to this agreement, the agreement shall be
interpreted to make the maximum disclaimer or limitation permitted
by the applicable state law. The invalidity or unenforceability of any
provision of this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the Foundation,


the trademark owner, any agent or employee of the Foundation,
anyone providing copies of Project Gutenberg™ electronic works in
accordance with this agreement, and any volunteers associated with
the production, promotion and distribution of Project Gutenberg™
electronic works, harmless from all liability, costs and expenses,
including legal fees, that arise directly or indirectly from any of the
following which you do or cause to occur: (a) distribution of this or
any Project Gutenberg™ work, (b) alteration, modification, or
additions or deletions to any Project Gutenberg™ work, and (c) any
Defect you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new computers.
It exists because of the efforts of hundreds of volunteers and
donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project Gutenberg™’s
goals and ensuring that the Project Gutenberg™ collection will
remain freely available for generations to come. In 2001, the Project
Gutenberg Literary Archive Foundation was created to provide a
secure and permanent future for Project Gutenberg™ and future
generations. To learn more about the Project Gutenberg Literary
Archive Foundation and how your efforts and donations can help,
see Sections 3 and 4 and the Foundation information page at
www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-profit
501(c)(3) educational corporation organized under the laws of the
state of Mississippi and granted tax exempt status by the Internal
Revenue Service. The Foundation’s EIN or federal tax identification
number is 64-6221541. Contributions to the Project Gutenberg
Literary Archive Foundation are tax deductible to the full extent
permitted by U.S. federal laws and your state’s laws.

The Foundation’s business office is located at 809 North 1500 West,


Salt Lake City, UT 84116, (801) 596-1887. Email contact links and up
to date contact information can be found at the Foundation’s website
and official page at www.gutenberg.org/contact

Section 4. Information about Donations to


the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission of
increasing the number of public domain and licensed works that can
be freely distributed in machine-readable form accessible by the
widest array of equipment including outdated equipment. Many
small donations ($1 to $5,000) are particularly important to
maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws regulating


charities and charitable donations in all 50 states of the United
States. Compliance requirements are not uniform and it takes a
considerable effort, much paperwork and many fees to meet and
keep up with these requirements. We do not solicit donations in
locations where we have not received written confirmation of
compliance. To SEND DONATIONS or determine the status of
compliance for any particular state visit www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states where


we have not met the solicitation requirements, we know of no
prohibition against accepting unsolicited donations from donors in
such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot make


any statements concerning tax treatment of donations received from
outside the United States. U.S. laws alone swamp our small staff.

Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.

Section 5. General Information About


Project Gutenberg™ electronic works
Professor Michael S. Hart was the originator of the Project
Gutenberg™ concept of a library of electronic works that could be
freely shared with anyone. For forty years, he produced and
distributed Project Gutenberg™ eBooks with only a loose network of
volunteer support.
Project Gutenberg™ eBooks are often created from several printed
editions, all of which are confirmed as not protected by copyright in
the U.S. unless a copyright notice is included. Thus, we do not
necessarily keep eBooks in compliance with any particular paper
edition.

Most people start at our website which has the main PG search
facility: www.gutenberg.org.

This website includes information about Project Gutenberg™,


including how to make donations to the Project Gutenberg Literary
Archive Foundation, how to help produce our new eBooks, and how
to subscribe to our email newsletter to hear about new eBooks.
back
back
back
back
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like