Pro JavaScript Techniques2nd Edition John Resig -
Downloadable PDF 2025
https://ebookfinal.com/download/pro-javascript-techniques-2nd-edition-
john-resig/
Visit ebookfinal.com today to download the complete set of
ebooks or textbooks
2.
Here are somerecommended products that we believe you will be
interested in. You can click the link to download.
Pro JavaScript Design Patterns 1st Edition Ross Harmes
https://ebookfinal.com/download/pro-javascript-design-patterns-1st-
edition-ross-harmes/
JavaScript A Beginner s Guide Third Edition John Pollock
https://ebookfinal.com/download/javascript-a-beginner-s-guide-third-
edition-john-pollock/
Learning JavaScript 2nd Edition Shelley Powers
https://ebookfinal.com/download/learning-javascript-2nd-edition-
shelley-powers/
Object Oriented JavaScript 2nd Edition Stoyan Stefanov
https://ebookfinal.com/download/object-oriented-javascript-2nd-
edition-stoyan-stefanov/
3.
Advanced Javascript 2E2nd Edition Chuck Easttom
https://ebookfinal.com/download/advanced-javascript-2e-2nd-edition-
chuck-easttom/
Pro Puppet 2nd Edition Spencer Krum
https://ebookfinal.com/download/pro-puppet-2nd-edition-spencer-krum/
Jasmine JavaScript Testing 2nd Edition Test your
JavaScript applications efficiently using Jasmine and
React js Paulo Ragonha
https://ebookfinal.com/download/jasmine-javascript-testing-2nd-
edition-test-your-javascript-applications-efficiently-using-jasmine-
and-react-js-paulo-ragonha/
The Musician s Guide to Pro Tools 1st Edition John Keane
https://ebookfinal.com/download/the-musician-s-guide-to-pro-tools-1st-
edition-john-keane/
Learning jQuery 4th Edition Better interaction design and
web development with simple JavaScript techniques Jonathan
Chaffer
https://ebookfinal.com/download/learning-jquery-4th-edition-better-
interaction-design-and-web-development-with-simple-javascript-
techniques-jonathan-chaffer/
5.
Pro JavaScript Techniques2nd Edition John Resig
Digital Instant Download
Author(s): John Resig, Russ Ferguson, John Paxton
ISBN(s): 9781430263913, 1430263911
File Details: PDF, 3.66 MB
Year: 2015
Language: english
For your convenienceApress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
www.it-ebooks.info
8.
v
Contents at aGlance
About the Authors�������������������������������������������������������������������������������������������������� xiii
About the Technical Reviewers�������������������������������������������������������������������������������xv
Acknowledgments�������������������������������������������������������������������������������������������������xvii
■
■Chapter 1: Professional JavaScript Techniques���������������������������������������������������� 1
■
■Chapter 2: Features, Functions, and Objects��������������������������������������������������������� 7
■
■Chapter 3: Creating Reusable Code��������������������������������������������������������������������� 23
■
■Chapter 4: Debugging JavaScript Code��������������������������������������������������������������� 39
■
■Chapter 5: The Document Object Model�������������������������������������������������������������� 49
■
■Chapter 6: Events������������������������������������������������������������������������������������������������ 73
■
■Chapter 7: JavaScript and Form Validation��������������������������������������������������������� 95
■
■Chapter 8: Introduction to Ajax������������������������������������������������������������������������� 107
■
■Chapter 9: Web Production Tools����������������������������������������������������������������������� 117
■
■Chapter 10: AngularJS and Testing������������������������������������������������������������������� 125
■
■Chapter 11: The Future of JavaScript���������������������������������������������������������������� 141
■
■Appendix A: DOM Reference������������������������������������������������������������������������������ 161
Index��������������������������������������������������������������������������������������������������������������������� 177
www.it-ebooks.info
9.
1
Chapter 1
Professional JavaScriptTechniques
Welcome to Pro JavaScript Techniques. This book provides an overview of the current state of JavaScript,
particularly as it applies to the professional programmer. Who is the professional programmer? Someone
who has a firm grasp of the basics of JavaScript (and probably several other languages). You are interested
in the breadth and depth of JavaScript. You want to look at the typical features like the Document Object
Model (DOM), but also learn about what’s going on with all this talk of Model-View-Controller (MVC) on the
client side. Updated APIs, new features and functionality, and creative applications of code are what you are
looking for here.
This is the second edition of this book. Much has changed since the first edition came out in 2006.
At that time, JavaScript was going through a somewhat painful transition from being a toy scripting language
to being a language that was useful and effective for several different tasks. It was, if you will, JavaScript’s
adolescence. Now, JavaScript is at the end of another transition: to continue the metaphor, from adolescence
to adulthood. JavaScript usage is nearly ubiquitous, with anywhere from 85 to 95 percent of websites,
depending on whose statistics you believe, having some JavaScript on their main page. Many people speak
of JavaScript as the most popular programming language in the world (in the number of people who use it
on a regular basis). But more important than mere usage are effectiveness and capability.
JavaScript has transitioned from a toy language (image rollovers! status bar text manipulations!) to
an effective, if limited tool (think of client-side form validation), to its current position as a broad-featured
programming language no longer limited to mere browsers. Programmers are writing JavaScript tools that
provide MVC functionality, which was long the domain of the server, as well as complex data visualizations,
template libraries, and more. The list goes on and on. Where in the past, designers would have relied on a
.NET or Java Swing client to provide a full-featured, rich interface to server-side data, we can now realize that
application in JavaScript with a browser. And, using Node.js, we have JavaScript’s own version of a virtual
machine, an executable that can run any number of different applications, all written in JavaScript and none
requiring a browser.
This chapter will describe how we got here and where we are going. It will look at the various
improvements in browser technology (and popularity) that have abetted the JavaScript Revolution. The state
of JavaScript itself needs inspection, as we want to know where we are before we look at where we are going.
Then, as we examine the chapters to come, you will see what the professional JavaScript programmer needs
to know to live up to his or her title.
How Did We Get Here?
As of the first edition of the book, Google Chrome and Mozilla Firefox were relatively new kids on the block.
Internet Explorer 6 and 7 ruled the roost, with version 8 gaining some popularity. Several factors combined
to jump-start JavaScript development.
For most of its life, JavaScript was dependent upon the browser. The browser is the runtime
environment for JavaScript, and a programmer’s access to JavaScript functionality was highly dependent
www.it-ebooks.info
10.
Chapter 1 ■Professional JavaScript Techniques
2
upon the make, model, and version of browser visiting said programmer’s website. By the mid-2000s, the
browser wars of the 90s had been easily won by Internet Explorer, and browser development stagnated.
Two browsers challenged this state of affairs: Mozilla Firefox and Google Chrome. Firefox was the
descendant of Netscape, one of the earliest web browsers. Chrome had Google’s backing, more than
enough to make it an instant player on the scene.
But both of these browsers made a few design decisions that facilitated the JavaScript revolution.
The first decision was to support the World Wide Web consortium’s implementation of various standards.
Whether dealing with the DOM, event handling, or Ajax, Chrome and Firefox generally followed the spec
and implemented it as well as possible. For programmers, this meant that we didn’t have to write separate
code for Firefox and Chrome. We were already used to writing separate code for IE and something else, so
having branching code in itself was not new. But making sure that the branching was not overly complex was
a welcome relief.
Speaking of standards, Firefox and Chrome also put in a lot of work with the European Computer
Manufacturer’s Association (ECMA, now styled Ecma). Ecma is the standards body that oversees JavaScript.
(To be technical, Ecma oversees the ECMAScript standard, since JavaScript is a trademark of Oracle and…
well, we don’t really care about those details, do we? We will use JavaScript to refer to the language and
ECMAScript to refer to the specification to which a JavaScript implementation adheres.) ECMAScript
standards had languished in much the same way as IE development. With the rise of real browser
competition, the ECMAScript standard was taken up again. ECMAScript version 5 (2009) codified many of
the changes that had been made in the ten years (!) since the previous version of the standard. The group
itself was also energized, with version 5.1 coming out in 2011. The future is provided for, with significant
work currently being done on both versions 6 and 7 of the standard.
To give credit where credit is due, Chrome pushed the updating of JavaScript as well. The Chrome
JavaScript engine, called V8, was a very important part of Chrome’s debut in 2008. The Chrome team built
an engine that was much faster than most JavaScript engines, and it has kept that goal at the top of the list
for subsequent versions. In fact, the V8 engine was so impressive that it became the core of Node.js, a
browser-independent JavaScript interpreter. Originally intended as a server that would use JavaScript
as its main application language, Node has become a flexible platform for running any number of
JavaScript-based applications.
Back to Chrome: the other major innovation Google introduced to the land of browsers was the concept
of the evergreen application. Instead of having to download a separate browser install for updates, Chrome’s
default is to automatically update the browser for you. While this approach is sometimes a pain in the
corporate world, it is a great boon to the noncorporate consumer surfer (also known as a person!). If you use
Chrome (and, for the last few years, Firefox), your browser is up-to-date, without your having to make any
effort. While Microsoft has done this for a long time in pushing security updates via Windows Update, it
does not introduce new features to Internet Explorer unless they are coupled to a new version of Windows.
To put it another way, updates to IE are slow in coming. Chrome and Firefox always have the latest and
greatest features, as well as being quite secure.
As Google pressed on with Chrome’s features, the other browser makers played catch-up. Sometimes
this came in sillier ways, such as when Firefox adapted Chrome’s version numbering. But it also resulted in
Mozilla and Microsoft taking a cold, hard look at JavaScript engines. Both browser makers have significantly
overhauled their JS engines over the last few years, and Chrome’s lead, while formidable, is no longer
insurmountable.
Finally, Microsoft has (mostly) thrown in the towel on its classic “embrace and extend” philosophy, at
least when it comes to JavaScript. With IE version 9, Microsoft implemented World Wide Web Consortium
(W3C) event handling and standardized its DOM interfaces as well as its Ajax API. For most of the standard
features of JavaScript, we no longer have to implement two versions of the same code! (Legacy code for
legacy browsers is still a bit of an issue, of course…)
It seems almost a panacea. JavaScript is faster than ever before. It is easier to write code for a variety
of different browsers. Standards documents both describe the real world and provide a useful roadmap to
features to come. And most of our browsers are fully up-to-date. So what do we need to worry about now,
and where are we going in the future?
www.it-ebooks.info
11.
Chapter 1 ■Professional JavaScript Techniques
3
Modern JavaScript
It has never been easier to develop serious applications with JavaScript. We have a clear, clean break with
the bad old days of separate code for multiple browsers, poor standards poorly implemented, and slow
JavaScript engines that were often an afterthought. Let’s take a look at the state of the modern JavaScript
environment. Specifically, we will look at two areas: the modern browser and the modern toolkit.
Modern JavaScript depends on the idea of the modern browser. What is the modern browser? Different
organizations describe it in different ways. Google says that their applications support the current and
previous major versions of browsers. (Fascinating, as Gmail still works on IE9, as far as we can tell!) In an
interesting article, the people behind the British Broadcasting Company (BBC) website revealed that they
define a modern browser as one that supports the following capabilities:
1. document.querySelector() / document.querySelectorAll()
2. window.addEventListener()
3. The Storage API (localStorage and sessionStorage)
jQuery, probably the most popular JavaScript library on the web, split its versions into the 1.x line,
which supports IE 6 and later, and the 2.x line, which supports “modern” browsers like IE 9 and later. And
make no mistake, IE is the dividing line between the modern and the ancient. The other two major browsers
are evergreen. And while Safari and Opera are not evergreen, they update on a faster schedule than IE and
don’t have nearly the market share it does.
So where is the borderline for the modern browser? Alas, the border seems to wander between Internet
Explorer versions 9 through 11. But IE 8 is definitely on the far side of browser history. It does not support
most of the features of ECMAScript 5. It does not include the API for W3C event handling. The list goes on
and on. So when we discuss modern browsers, we will refer to at least Internet Explorer 9. And our coverage
will not endeavor to support ancient browsers. Where relevant and simple, we will point out polyfills for
older versions of IE, but in general, our floor is Internet Explorer 9.
The Rise of Libraries
In addition to the modern browser, there is another important aspect of the current environment for
JavaScript we need to discuss: libraries. Over the past 8 years, there has been an explosion in the number
and variety of JavaScript libraries. There are more than 800,000 GitHub repositories for JavaScript; of these,
almost 900 have more than 1,000 stars. From its humble beginnings as collections of utility functions, the
JavaScript library ecosystem has evolved (somewhat chaotically) into a vast landscape of possibilities.
How does this affect us as JavaScript developers? Well, of course, there is the model of “library as
expansion,” where a library provides additional functionality. Think of the MVC libraries like Backbone
and Angular (which we will be looking at in a later chapter), or the data visualization libraries like d3 or
Highcharts. But JavaScript is in an interesting position, as libraries can also provide a level interface to
features that are standard on some browsers but not on others.
For a long time, the standard example of a variably implemented feature in JavaScript was event
handling. Internet Explorer had its own event-handling API. Other browsers generally followed the W3C’s
API. Various libraries provided unified implementations for event handling, including the best of both
worlds. Some of these libraries stood alone, but the successful ones also normalized functionality for Ajax,
the DOM, and a number of other features that were differently implemented across browsers.
The most popular of these libraries has been jQuery. Since its inception, jQuery has been the go-to
library for using new JavaScript features without worrying about the browser’s support for those features.
So instead of using IE’s event handling or the W3C’s, you could simply use jQuery’s .on() function, which
wrapped around the variance, providing a unified interface. Several other libraries provided similar
functionality: Dojo, Ext JS, Prototype, YUI, MooTools, and so on. These toolkit libraries aimed to standardize
APIs for developers.
www.it-ebooks.info
12.
Chapter 1 ■Professional JavaScript Techniques
4
The standardization goes further than providing simple branching code. These libraries often
ameliorate buggy implementations. The official API for a function may not change much between versions,
but there will be bugs; sometimes those bugs will be fixed, sometimes not, and sometimes the fixes will
introduce new bugs. Where libraries could fix or work around these bugs, they did. For example, jQuery 1.11
contains more than a half-dozen fixes for problems with the event-handling API.
Some libraries (jQuery in particular) also provided new or different interpretations of certain
capabilities. The jQuery selector function, the core of the library, predates the now-standard
querySelector() and querySelectorAll() functions, and it was a driver for including those functions in
JavaScript. Other libraries provide access to functionality despite very different underlying implementations.
Later in the book, we will look at Ajax’s new Cross Origin Resource Sharing (CORS) protocol, which allows
for Ajax requests to servers other than the one that originally served the page. Some libraries have already
implemented a version of this that uses CORS but falls back to JSON with padding (JSON-P) where needed.
Because of their utility, some libraries have become part of a professional JavaScript programmer’s
standard development toolkit. Their features may not be standardized into JavaScript (yet), but they are an
accumulation of knowledge and functionality that simply makes it easier to realize designs quickly. In recent
years, though, you could get quite a few hits to your blog by asking whether jQuery (or another library) was
really necessary for development on a modern browser. Consider the BBC’s requirements; you can certainly
realize a large degree of jQuery-like functionality if you have those three methods available to you. But
jQuery also includes a simplified yet expanded DOM interface, it handles bugs for a variety of different edge
cases, and if you need support for IE 8 or earlier, jQuery is your major option. Accordingly, the professional
JavaScript programmer must look at the requirements for a project and consider whether it pays to risk
reinventing the wheel that jQuery (or another similar library) provides.
More Than a Note about Mobile
In older JavaScript and web development books, you would reliably see a section, maybe a whole chapter,
on what to do about mobile browsing. Mobile browsing was a small enough share of total browsing, and the
market was so fractured, that it seemed only specialists would be interested in mobile development. That’s
not the case anymore. Since the first edition of this book, mobile web browsing has exploded, and it is a
very different beast from desktop development. Consider some statistics: according to a variety of sources,
mobile browsing represents between 20 and 30 percent of all browsing. By the time you are reading this, it
may well represent more, as it has consistently increased since the debut of the iPhone. Speaking of which,
well over 40 percent of mobile browsing is done with iOS Safari, although Android’s browser and Chrome for
Android are gaining ground (and may have overtaken Safari, depending on whose stats you believe). Safari
on iOS is not the same as Safari on the desktop, and the same goes for Android Chrome vs. desktop Chrome
and mobile Firefox vs. desktop Firefox. Mobile is mainstream.
The browsers on mobile devices provide a new set of challenges and opportunities. Mobile devices are
often more limited than desktops (though that’s another gap that is rapidly closing). Conversely, mobile
devices offer new features (swipe events, more accurate geolocation, and so on) and new interaction idioms
(using the hand instead of the mouse, swiping for scrolling). Depending on your development requirements,
you may have to build an app that looks good on mobile as well as the desktop, or reimplement existing
functionality for a mobile platform.
The JavaScript landscape has changed extensively over the last few years. Despite some standardization
of APIs, there are also many new challenges. How will this affect us as professional JavaScript programmers?
www.it-ebooks.info
13.
Chapter 1 ■Professional JavaScript Techniques
5
Where Do We Go from Here?
We should set down some standards for ourselves. We have already set one: IE9 as the floor of the modern
browser experience. The other browsers are evergreen, and not to worry about. What about mobile, then?
While the issue is complex, iOS 6 and Android 4.1 (Jelly Bean) will, in general, serve as our floors. Mobile
computing updates faster and more frequently than desktops do, so we are confident in using these more
recent versions of mobile operating systems.
That said, let us digress for a moment to discuss not browser versions, operating systems, or platforms,
but your audience. While we can quote statistics all day long, the valuable statistics tell you about your
audience, not the audience in general. Perhaps you are designing for your employer, who has standardized
on IE 10. Or maybe your idea for an application depends heavily on features that only Chrome provides.
Or maybe there isn’t even a desktop version, but you’re aiming for a roll-out to iPads and Android tablets.
Consider your target audience. This book is written to be broadly applicable, and your application may be as
well. But it would be folly to spend time worrying about bugs in IE9 for that previously mentioned tablet-
only application, wouldn’t it? Now, back to our standards.
For screenshots and testing, this book will generally prefer Google Chrome. Occasionally, we will
demonstrate code on Firefox or Internet Explorer where it is relevant. Chrome, for developers, is the gold
standard—not necessarily in user-friendliness, but certainly in the information exposed to the programmer.
In a later chapter, we will look at the various developer tools available, scrutinizing not only Chrome, but
Firefox (with and without Firebug) and IE as well.
As a standard library, we will refer to jQuery. There are many alternatives, of course, but jQuery wins for
two reasons: first, it is the most popular general-use JavaScript library on the web. Second, at least one of the
authors (John Resig) has a little bit of history with jQuery, which predisposed the other author (John Paxton)
to concede the point of working with it. In updating this book, we have replaced many of the techniques
from the previous version with jQuery’s library of functionality. In these cases, we are disinclined to reinvent
the wheel. As needed, we will refer to the appropriate jQuery functionality. We will, of course, discuss new
and exciting techniques, as well!
JavaScript IDEs have updated significantly in the last few years, driven by JavaScript’s own rise. The
possibilities are too numerous to list here, but there are a few applications of note. John Resig uses a highly
customized version of vim for his development environment. John Paxton is a little bit lazier, and has elected
to use JetBrains’ excellent WebStorm (http://www.jetbrains.com/webstorm/) as his IDE. Adobe offers the
open source, free Brackets IDE (http://brackets.io/), currently at version 1.3. Eclipse is also available, and
many people have reported positive results by customizing SublimeText or Emacs to do their bidding. As
always, use what you feel most comfortable with.
There are other tools that can assist in JavaScript development. Rather than list them here, we will
dedicate a chapter to them later in the book. Which means it’s a good time to give an outline of what’s
to come.
Coming Up Next
Starting with Chapter 2, we will look at the latest and greatest in the JavaScript language. This means looking
at new features like those available through the Object type, but also reexamining some older concepts like
references, functions, scope, and closures. We will lump all of this under the heading of Features, Functions,
and Objects, but it covers a bit more than that.
Chapter 3 discusses Creating Reusable Code. Chapter 2 skips over one of the biggest new features of
JavaScript, the Object.create() method, and its implications for object-oriented JavaScript code. So in this
chapter we will spend time with Object.create(), functional constructors, prototypes, and object-oriented
concepts as implemented in JavaScript.
Having spent two chapters developing code, we should start thinking about how to manage it. Chapter 4
shows you tools for Debugging JavaScript Code. We start by examining browsers and their developer tools.
www.it-ebooks.info
14.
Chapter 1 ■Professional JavaScript Techniques
6
Chapter 5 begins a sequence discussing some high-usage areas of JavaScript functionality. Here we look
at the Document Object Model. The DOM API has increased in complexity and has not really become more
straightforward since the last edition. But there are new features that we should familiarize ourselves with.
In Chapter 6, we attempt to master Events. The big news here is the standardization of the events API
along the lines of the W3C style. This provides us the opportunity to move away from utility libraries and
finally go deep into the events API without worrying about large variations between browsers.
One of the first non-toy applications for JavaScript was client-side form validation. Amazingly, it took
browser makers over a decade to think about adding functionality to form validation beyond capturing the
submit event. When looking in Chapter 7 at JavaScript and Form Validation, we will discover that there is a
whole new set of functionality for form validation provided by both HTML and JavaScript.
Everyone who develops with JavaScript has spent some time Introduction to Ajax. With the
introduction of Cross-Origin Resource Sharing (CORS), Ajax functionality has finally moved past the silliest
of its restrictions.
Command line tools like Yeoman, Bower, Git and Grunt are covered in Web Production Tools.
These tools will show us how to quickly add all the files and folders needed. This way we can focus on
development.
Chapter 10 covers AngularJS and Testing. Using the knowledge gained in the previous chapter, we now
start to look at what makes Angular work and how to implement both unit and end to end testing.
Last, Chapter 11 discusses the Future of JavaScript. ECMAScript 6 will be settled, more or less, by the
time this book goes to press. ECMAScript 7 is in active development. Beyond the basics of where JavaScript
is going, we will look at what features you can use right now.
Summary
We spent a lot of this chapter on everything around JavaScript: the platform(s), the history, the IDEs, and so on.
We believe that history informs the present. We wanted to explain where we were, and how we got here, to
help you understand why JavaScript is where it is, and is what it is, today. Of course, we plan to spend the
bulk of this book talking about how JavaScript works, particularly for the professional programmer. We feel
quite strongly that this book covers the techniques and APIs that every professional JavaScript programmer
should be familiar with. So without further ado…
www.it-ebooks.info
15.
7
Chapter 2
Features, Functions,and Objects
Objects are the fundamental units of JavaScript. Virtually everything in JavaScript is an object and interacts
on an object-oriented level. To build up this solid object-oriented language, JavaScript includes an arsenal of
features that make it unique in both its foundation and its capabilities.
This chapter covers some of the most important aspects of the JavaScript language, such as references,
scope, closures, and context. These are not necessarily the cornerstones of the language, but the elegant
arches, which both support and refine JavaScript. We will delve into the tools available for working with
objects as data structures. A dive into the nature of object-oriented JavaScript follows, including a discussion
of classes vs. prototypes. Finally, the chapter explores the use of object-oriented JavaScript, including exactly
how objects behave and how to create new ones. This is quite possibly the most important chapter in this
book if taken to heart, as it will completely change the way you look at JavaScript as a language.
Language Features
JavaScript has a number of features that are fundamental to making the language what it is. There are very
few other languages like it. We find the combination of features to fit just right, contributing to a deceptively
powerful language.
References and Values
JavaScript variables hold data in one of two ways: by copies and references. Anything that is a primitive value
is copied into a variable. Primitives are strings, numbers, Booleans, null, and undefined. The most important
characteristic of primitives is that they are assigned, copied, and passed to and returned from functions
by value.
The rest of JavaScript relies on references. Any variable that does not hold one of the aforementioned
primitive values holds a reference to an object. A reference is a pointer to the location in memory of
an object (or array, or date, or what-have-you). The actual object (array, date, or whatever) is called the
referent. This is an incredibly powerful feature, present in many languages. It allows for certain efficiencies:
two (or more!) variables do not have their own copies of an object; they simply refer to the same object.
Updates to the referent made via one reference are reflected in the other reference. By maintaining sets of
references to objects, JavaScript affords you much more flexibility. An example of this is shown in Listing 2-1,
where two variables point to the same object, and the modification of the object’s contents via one reference
is reflected in the other reference.
www.it-ebooks.info
16.
Chapter 2 ■Features, Functions, and Objects
8
Listing 2-1. Example of Multiple Variables Referring to a Single Object
// Set obj to an empty object
// (Using {} is shorter than 'new Object()')
var obj = {};
// objRef now refers to the other object
var refToObj = obj;
// Modify a property in the original object
obj.oneProperty = true;
// We now see that the change is represented in both variables
// (Since they both refer to the same object)
console.log( obj.oneProperty === refToObj.oneProperty );
// This change goes both ways, since obj and refToObj are both references
refToObj.anotherProperty = 1;
console.log( obj.anotherProperty === refToObj.anotherProperty );
Objects have two features: properties and methods. These are often referred to collectively as the
members of an object. Properties contain the data of an object. Properties can be primitives or objects
themselves. Methods are functions that act upon the data of an object. In some discussions of JavaScript,
methods are included in the set of properties. But the distinction is often useful.
Self-modifying objects are very rare in JavaScript. Let’s look at one popular instance where this occurs.
The Array object is able to add additional items to itself using the push method. Since, at the core of an Array
object, the values are stored as object properties, the result is a situation similar to that shown in Listing 2-1,
where an object becomes globally modified (resulting in multiple variables’ contents being simultaneously
changed). An example of this situation can be found in Listing 2-2.
Listing 2-2. Example of a Self-Modifying Object
// Create an array of items
// (Similar to 2-1, using [] is shorter than 'new Array()')
var items = [ 'one', 'two', 'three' ];
// Create a reference to the array of items
var itemsRef = items;
// Add an item to the original array
items.push( 'four' );
// The length of each array should be the same,
// since they both point to the same array object
console.log( items.length == itemsRef.length );
It’s important to remember that references point only to the referent object, not to another reference.
In Perl, for example, it’s possible to have a reference point to another variable that also is a reference. In
JavaScript, however, it traverses down the reference chain and only points to the core object. An example of
this situation can be seen in Listing 2-3, where the physical object is changed but the reference continues to
point back to the old object.
www.it-ebooks.info
17.
Chapter 2 ■Features, Functions, and Objects
9
Listing 2-3. Changing the Reference of an Object While Maintaining Integrity
// Set items to an array (object) of strings
var items = [ 'one', 'two', 'three' ];
// Set itemsRef to a reference to items
var itemsRef = items;
// Set items to equal a new object
items = [ 'new', 'array' ];
// items and itemsRef now point to different objects.
// items points to [ 'new', 'array' ]
// itemsRef points to [ 'one', 'two', 'three' ]
console.log( items !== itemsRef );
Finally, let’s look at a strange instance that you might think would involve references but does not.
When performing string concatenation, the result is always a new string object rather than a modified
version of the original string. Because strings (like numbers and Booleans) are primitives, they are not
actually referents, and the variables that contain them are not references. This can be seen in Listing 2-4.
Listing 2-4. Example of Object Modification Resulting in a New Object, Not a Self-Modified Object
// Set item equal to a new string object
var item = 'test';
// itemRef now refers to the same string object
var itemRef = item;
// Concatenate some new text onto the string object
// NOTE: This creates a new object and does not modify
// the original object.
item += 'ing';
// The values of item and itemRef are NOT equal, as a whole
// new string object has been created
console.log( item != itemRef );
Strings are often particularly confusing because they act like objects. You can create instances of strings
via a call to new String. Strings have properties like length. Strings also have methods like indexOf and
toUpperCase. But when interacting with variables or functions, strings are very much primitives.
References can be a tricky subject to wrap your mind around, if you are new to them. Nonetheless,
understanding how references work is paramount to writing good, clean JavaScript code. In the next couple
of sections we’re going to look at features that aren’t necessarily new or exciting but are important for writing
good, clean code.
Scope
Scope is a tricky feature of JavaScript. Most programming languages have some form of scope; the
differences lie in the duration of that scope. There are only two scopes in JavaScript: functional scope and
global scope. This is deceptively simple. Functions have their own scope, but blocks (such as while, if, and
for statements) do not. This may seem strange if you are coming from a block-scoped language. Listing 2-5
shows an example of the implications of function-scoped code.
www.it-ebooks.info
18.
Chapter 2 ■Features, Functions, and Objects
10
Listing 2-5. Example of How the Variable Scope in JavaScript Works
// Set a global variable, foo, equal to test
var foo = 'test';
// Within an if block
if ( true ) {
// Set foo equal to 'new test'
// NOTE: This still belongs to the global scope!
var foo = 'new test';
}
// As we can see here, as foo is now equal to 'new test'
console.log( foo === 'new test' );
// Create a function that will modify the variable foo
function test() {
var foo = 'old test';
}
// However, when called, 'foo' remains within the scope
// of the function
test();
// Which is confirmed, as foo is still equal to 'new test'
console.log( foo === 'new test' );
You’ll notice that in Listing 2-5, the variables are within the global scope. All globally scoped variables
are actually visible as properties of the window object in browser-based JavaScript. In other environments,
there will be a global context to which all globally-scoped variables belong.
In Listing 2-6 a value is assigned to a variable, foo, within the scope of the test() function. However,
nowhere in Listing 2-6 is the scope of the variable actually declared (using var foo). When the foo variable
isn’t explicitly scoped, it will become defined globally, even though it is only intended to be used within the
context of the function.
Listing 2-6. Example of Implicit Globally Scoped Variable Declaration
// A function in which the value of foo is set
function test() {
foo = 'test';
}
// Call the function to set the value of foo
test();
// We see that foo is now globally scoped
console.log( window.foo === 'test' );
www.it-ebooks.info
19.
Chapter 2 ■Features, Functions, and Objects
11
JavaScript’s scoping is often a source of confusion. If you are coming from a block-scoped language, this
confusion can lead to accidentally global variables, as shown here. Often, this confusion is compounded
by imprecise usage of the var keyword. For simplicity’s sake, the pro JavaScript programmer should always
initialize variables with var, regardless of scope. This way, your variables will have the scope you expected,
and you can avoid accidental globals.
When declaring variables within a function, be aware of the issue of hoisting. Any variable declared
within a function has its declaration (not the value it is initialized with) hoisted to the top of the scope.
JavaScript does this to ensure that the variable’s name is available throughout the scope.
Especially when we combine scope with the concept of context and closures, discussed in the next two
sections, JavaScript reveals itself as a powerful scripting language.
Context
Your code will always have some form of context (a scope within which the code is operating). Context can
be a powerful tool and is essential for object-oriented code. It is a common feature of other languages, but
JavaScript, as is often the case, has a subtly different take on it.
You access context through the variable this, which will always refer to the context that the code is running
inside. Recall that global objects are actually properties of the window object. This means that even in a global
context, this will still refer to an object. Listing 2-7 shows some simple examples of working with context.
Listing 2-7. Examples of Using Functions Within Context and Then Switching Context to Another Variable
function setFoo(fooInput) {
this.foo = fooInput;
}
var foo = 5;
console.log( 'foo at the window level is set to: ' + foo );
var obj = {
foo : 10
};
console.log( 'foo inside of obj is set to: ' + obj.foo );
// This will change window-level foo
setFoo( 15 );
console.log( 'foo at the window level is now set to: ' + foo );
// This will change the foo inside the object
obj.setFoo = setFoo;
obj.setFoo( 20 );
console.log( 'foo inside of obj is now set to: ' + obj.foo );
In Listing 2-7, our setFoo function looks a bit odd. We do not typically use this inside a generic utility
function. Knowing that we were eventually going to attach setFoo to obj, we used this so we could access
the context of obj. However, this approach is not strictly necessary. JavaScript has two methods that allow
you to run a function in an arbitrary, specified context. Listing 2-8 shows the two methods, call and apply,
that can be used to achieve just that.
www.it-ebooks.info
20.
Chapter 2 ■Features, Functions, and Objects
12
Listing 2-8. Examples of Changing the Context of Functions
// A simple function that sets the color style of its context
function changeColor( color ) {
this.style.color = color;
}
// Calling it on the window object, which fails, since it doesn't
// have a style object
changeColor('white' );
// Create a new div element, which will have a style object
var main = document.createElement('div');
// Set its color to black, using the call method
// The call method sets the context with the first argument
// and passes all the other arguments as arguments to the function
changeColor.call( main, 'black' );
//Check results using console.log
//The output should say 'black'
console.log(main.style.color);
// A function that sets the color on the body element
function setBodyColor() {
// The apply method sets the context to the body element
// with the first argument, and the second argument is an array
// of arguments that gets passed to the function
changeColor.apply( document.body, arguments );
}
// Set the background color of the body to black
setBodyColor('black' );
While the usefulness of context may not be immediately apparent, it will become clearer when we look
at object orientation soon.
Closures
Closures are a means through which an inner function can refer to the variables present in its outer
enclosing function after its parent functions have already terminated. That’s the technical definition,
anyway. Perhaps it is more useful to think of closures tied to contexts. Up to this point, when we have
defined an object literal, that object was open for modification. We have seen that we can add properties and
functions to the object at any time. But what if we wanted a context that was locked? A context that “saved”
values as defaults. What about a context that could not be accessed without the API we provide? This is what
a closure provides: a context that is accessible only in the manner we choose.
This topic can be very powerful and very complex. We highly recommend referring to the sites
mentioned at the end of this section, as they have some excellent information about closures.
Let’s begin by looking at two simple examples of closures, shown in Listing 2-9.
www.it-ebooks.info
21.
Chapter 2 ■Features, Functions, and Objects
13
Listing 2-9. Two Examples of How Closures Can Improve the Clarity of Your Code
// Find the element with an ID of 'main'
var obj = document.getElementById('main');
// Change its border styling
obj.style.border = '1px solid red';
// Initialize a callback that will occur in one second
setTimeout(function(){
// Which will hide the object
obj.style.display = 'none';
}, 1000);
// A generic function for displaying a delayed alert message
function delayedAlert( msg, time ) {
// Initialize an enclosed callback
setTimeout(function(){
// Which utilizes the msg passed in from the enclosing function
console.log( msg );
}, time );
}
// Call the delayedAlert function with two arguments
delayedAlert('Welcome!', 2000 );
The first function call to setTimeout shows an instance where new JavaScript developers often have
problems. It’s not uncommon to see code like this in a new developer’s program:
setTimeout('otherFunction()', 1000);
or even...
setTimeout('otherFunction(' + num + ',' + num2 + ')', 1000);
In both examples, the functions being called are expressed as strings. This can cause problems with the
minification process when you are about to move your code into production. By using closures, you can call
functions, use variables, and pass parameters as originally intended.
Using the concept of closures, it’s entirely possible to circumnavigate this mess of code. The first
example in Listing 2-9 is simple; there is a setTimeout callback being called 1,000 milliseconds after it is first
called, but still referring to the obj variable (which is defined globally as the element with an ID of main). The
second function defined, delayedAlert, shows a solution to the setTimeout mess that occurs, along with the
ability to have closures within function scope.
You should find that when using simple closures such as these in your code, the clarity of what you’re
writing increases instead of turning into a syntactical soup.
Let’s look at a fun side effect of what’s possible with closures. In some functional programming
languages, there’s the concept of currying, a way to prefill a number of arguments to a function, creating a
new, simpler function. Listing 2-10 has a simple example of currying, creating a new function that prefills an
argument to another function.
www.it-ebooks.info
22.
Chapter 2 ■Features, Functions, and Objects
14
Listing 2-10. Example of Function Currying Using Closures
// A function that generates a new function for adding numbers
function addGenerator( num ) {
// Return a simple function for adding two numbers
// with the first number borrowed from the generator
return function( toAdd ) {
return num + toAdd
};
}
// addFive now contains a function that takes one argument,
// adds five to it, and returns the resulting number
var addFive = addGenerator( 5 );
// We can see here that the result of the addFive function is 9,
// when passed an argument of 4
console.log( addFive( 4 ) == 9 );
There’s another common JavaScript-coding problem that closures can solve. New JavaScript developers
often accidentally leave a lot of extra variables sitting in the global scope. This is generally considered bad
practice, as those extra variables could quietly interfere with other libraries, causing confusing problems
to occur. Using a self-executing anonymous function, you can essentially hide all normally global variables
from being seen by other code, as shown in Listing 2-11.
Listing 2-11. Example of Using Anonymous Functions to Hide Variables from the Global Scope
// Create a new anonymous function, to use as a wrapper
(function(){
// The variable that would normally be global
var msg = 'Thanks for visiting! ';
// Binding a new function to a global object
window.onload = function(){
// Which uses the 'hidden' variable
console.log( msg );
};
// Close off the anonymous function and execute it
})();
Finally, let’s look at one problem that occurs with closures. Remember that a closure allows you to
reference variables that exist within the parent function. However, it does not provide the value of the variable
at the time it is created; it provides the last value of the variable within the parent function. You’ll most
commonly see this occur during a for loop. There is one variable being used as the iterator (i). Inside the
for loop, new functions are being created that utilize the closure to reference the iterator again. The problem
is that by the time the new closured functions are called, they will reference the last value of the iterator (that
is, the last position in an array), not the value that you would expect. Listing 2-12 shows an example of using
anonymous functions to induce scope, to create an instance where expected closure is possible.
www.it-ebooks.info
23.
Chapter 2 ■Features, Functions, and Objects
15
Listing 2-12. Example of Using Anonymous Functions to Induce the Scope Needed to Create Multiple
Closure-Using Functions
// An element with an ID of main
var obj = document.getElementById('main');
// An array of items to bind to
var items = ['click', 'keypress' ];
// Iterate through each of the items
for ( var i = 0; i items.length; i++ ) {
// Use a self-executed anonymous function to induce scope
(function(){
// Remember the value within this scope
// Each 'item' is unique.
//Not relying on variables created in the parent context.
var item = items[i];
// Bind a function to the element
obj['on' + item ] = function() {
// item refers to a parent variable that has been successfully
// scoped within the context of this for loop
console.log('Thanks for your ' + item );
};
})();
}
We will return to closures in our section on object-oriented code, where they will help us to implement
private properties.
The concept of closures is not a simple one to grasp; it took us a lot of time and effort to truly wrap
our minds around how powerful closures are. Luckily, there are some excellent resources explaining how
closures work in JavaScript: “JavaScript Closures” by Richard Cornford, at http://jibbering.com/faq/faq_
notes/closures.html, and another explanation at the Mozilla Developer Network, https://developer.
mozilla.org/en-US/docs/Web/JavaScript/Closures.
Function Overloading and Type-Checking
A common feature in other object-oriented languages is the ability to overload functions to perform different
behaviors depending on the type or number of arguments passed in. While this ability isn’t a language
feature in JavaScript, we can use existing capabilities to implement overloading of functions.
Our overloaded functions need to know two things: how many arguments have been passed in and
what type of arguments have been passed. Let’s start by looking at the number of arguments provided.
Inside every function in JavaScript there exists a contextual variable named arguments that acts as an
array-like object containing all the, well, arguments passed into the function. The arguments object isn’t a
true array; it does not share a prototype with Array, and it does not have array-processing functions like push
or indexOf. It does have positional array access (for example, arguments[2] returns the third argument), and
there is a length property. There are two examples of this in Listing 2-13.
www.it-ebooks.info
24.
Chapter 2 ■Features, Functions, and Objects
16
Listing 2-13. Two Examples of Function Overloading in JavaScript
// A simple function for sending a message
function sendMessage( msg, obj ) {
// If both a message and an object are provided
if ( arguments.length === 2 ) {
// Send the message to the object
// (Assumes that obj has a log property!)
obj.log( msg );
} else {
// Otherwise, assume that only a message was provided
// So just display the default error message
console.log( msg );
}
}
// Both of these function calls work
sendMessage( 'Hello, World!' );
sendMessage( 'How are you?', console );
You may wonder if there is a way to have the full functionality of an array available to the arguments
object. It is not possible with arguments itself, but it is possible to create a copy of arguments that is an array.
By invoking the slice method from the Array prototype, we can quickly copy the arguments object into an
array, as in Listing 2-14.
Listing 2-14. Converting Arguments to an Array
function aFunction(x, y, z) {
var argsArray = Array.prototype.slice.call( arguments, 0 );
console.log( 'The last argument is: ' + argsArray.pop() );
}
// Will output 'The last argument is 3'.
aFunction( 1, 2, 3 );
We will learn more about the prototype property very soon. For the moment, suffice it to say that the
prototype allows us to access object methods in a static manner.
What if the message were not defined? We need to be able to check not just for the presence of an
argument, but also its absence. We can take advantage of the fact that any argument that isn’t provided has
a value of undefined. Listing 2-15 shows a simple function for displaying an error message and providing
a default message if a particular argument is not provided. (Note that we must use typeof here, because
otherwise, an argument with the literal string “undefined” would indicate an error.)
Listing 2-15. Displaying an Error Message and a Default Message
function displayError( msg ) {
// Check and make sure that msg is not undefined
if ( typeof msg === 'undefined' ) {
// If it is, set a default message
msg = 'An error occurred.';
}
www.it-ebooks.info
25.
Chapter 2 ■Features, Functions, and Objects
17
// Display the message
console.log( msg );
}
displayError();
The use of the typeof statement helps to lead us into the topic of type-checking. Because JavaScript is a
dynamically typed language, this proves to be a very useful and important topic. There are a number of ways
to check the type of a variable; we’re going to look at two that are particularly useful.
The first way of checking the type of an object is by using the obvious-sounding typeof operator. This
utility gives us a string name representing the type of the contents of a variable. An example of this method
can be seen in Listing 2-16.
Listing 2-16. Example of Using typeof to Determine the Type of an Object
var num = '50';
var arr = 'apples,oranges,pears';
// Check to see if our number is actually a string
if ( typeof num === 'string' ) {
// If it is, then parse a number out of it
num = parseInt( num );
}
// Check to see if our array is actually a string
if ( typeof arr == 'string' ) {
// If that's the case, make an array, splitting on commas
arr = arr.split( ',' );
}
The advantage of typeof is that you do not have to know what the actual type of the tested variable is.
This would be the perfect solution except that for variables of type Object or Array, or a custom object such
as User, typeof only returns “object”
, making it hard to differentiate between specific object types. The next
two ways to figure out the type of a variable require you to test against a specific existing type.
The second way to check the type of an object is to use the instanceof operator. This operator checks
the left operand against the constructor of the right operand, which may sound a bit more complex than it
actually is! Take a look at Listing 2-17, showing an example of using instanceof.
Listing 2-17. Example of Using instanceof
var today = new Date();
var re = /[a-z]+/i;
// These don't give us enough details
console.log('typeof today: ' + typeof today);
console.log('typeof re: ' + typeof re);
// Let's find out if the variables are of a more specific type
if (today instanceof Date) {
console.log('today is an instance of a Date.');
}
www.it-ebooks.info
Œuvres complètes. —Voy. Migne, Orateurs sacrés, 2e série, tome
19. BARTHE (Anatole). — Le Livre des esprits spiritualistes , réfutant
la réincarnation , ou Recueil de communications obtenues par divers
médecins et publiées par Anatole Barthe, suivi d'une réfutation du
livre de M. H. Renaud : Destinée de l'homme dans les deux mondes,
parMmeNordmann, médium. In-16. 1863. Dentu. 1 fr. 50 c. BARTHE
(l'abbé Edouard), chanoine honoraire de Rodez, ancjen professeur
de philosophie , né à Sainte -Affriquc (Aveyron), en 1802. — Appel à
la raison sur la vérité religieuse. In-8° de 26 f. 1850. Camus;
Lecoffre. — Enseignement dogmatique et pratique de la religion,
exposé à l'aide delà sainte Écriture, ou le néophyte et le parfait
chrétien. 2 vol. in-12. 1855. Lyon, Périsse frères. 4 fr. 50 c. Avec
l'abbé Ramou. — L'Esprit de la révérende mère Emilie , fondatrice
des religieuses de la Sainte-Famille à Villefranche-de-Rouergue
(diocèse de Rodez). 2 vol. in-12. 1864. Sarlit. 5 fr. 20 c. — Le Mois
de mars consacré à saint Joseph.
28.
BARTHE — BARTHELEMY157 3P édition entièrement
refondue. In -18, 248 p. 1860. Sainte-Aflrique, Maurel. — Monument
;i la gloire de Marie. Litanies de la très-sainte Vierge, illustrées,
accompagnées de méditations. Nouvelle édition. In -8° avec 58 grav.
1858. Camus. 18 fr. La lrr édition a été publiée par livraisons, en
1850. — Le Mystère de l'apparition de la Salette. In-18. 1861. Sortit.
1 fr. — Npuveau Mois de mars. 2e édition entièrement refondue, fn-
18, 286 p. 1859. Sainte- Aflïique, Maurel. La lre édition a paru à Lyon
, chez Périsse, en 1836. — Pourquoi je crois à l'apparition de la
Salette. In-12. 1858. Ibid. 1 fr. 50 c. — Souvenirs et impressions
d'un pèlerinage à la Salette. In-18. 1859. Ibid. 60 c. — La Voix de
Marie sur la sainte montagne. In-18. 1862. Sortit. 60 c. — La Voix de
Jésus , ou Nouveau mois du sacrécœur. 2e édition, revue et
corrigée. In-18. 1849. Camus. 75 c. BARTHE (Félix), ancien
professeur de belleslettres, né à Versailles, en 1800. — Histoire
abrégée de la langue et de la littérature françaises, avec un résumé
de la grammaire française et des règles de l'art d'écrire. In-8°. 1853.
Hachette. 6 fr. Une lre édition a été publiée en 1838. — Leçons de
grammaire et de littérature françaises. In-18. 1851. Ibid. — Journal
d'un voyageur. In-16. 1849. Paulin. BARTHE (J. G.), membre de
l'Institut canadien. — Le Canada reconquis parla France, suivi de
pièces justificatives. In-8° avec 6 grav. et 1 carte. 1855. Ledoyen. 7
fr. BARTHE (Nie. Th.), auteur dramatique, né à Marseille, en 1734,
mort en 1785. — Les Fausses infidélités. — Voy. * Chefs-d'œuvre
des auteurs comiques, tome VI. BARTHEL (Napoléon). — Religion
scientifique de l'humanité. In-8°. 1860. Bruxelles, chez V auteur, rue
Saint-Philippe, 33. 3 fr. BARTHÉLÉMY, pseudonyme, sous lequel M. J.
TJi. Zenker, orientaliste allemand, a publié un « Vocabulaire
phraséologique français-arabe ». — Voy. Zenker. BARTHELEMY (Aimé
François Prosper), professeur de physique au lycée de Pau, agrégé
de l'Université, docteur es sciences, lauréat de l'Académic des
sciences de Toulouse, né à Mirepoix (Ariége), en 1831. —
Recherches d'anatomie et de physiologie générales sur la classe des
lépidoptères, pour servir a l'histoire des métamorphoses. In - 4°
avec n pi. 1864. Toulouse, imprimerie. Chauvin. M. Aimé Barthélémy
29.
collabore aux •Annales des sciences Naturelles • depuis 1857.
BARTHÉLÉMY (Anatole Jean Baptiste Antoine de), archéologue et
administrateur, ancien souspréfet, correspondant du ministère de
l'instruction publique, né a Reims, en 1821. — Anciens évêchés de
Bretagne. Histoire et monuments. — Voy. Geslin de Bourgogne et
Barthélémy. — De l'Aristocratie au xixe siècle. In-18. 1859. Aubry. 1
fr. 50 c. — Armoriai de la généralité d'Alsace. Recueil officiel dressé
par les ordres de Louis XIV et publié pour la première fois (par
Anatole de Barthélémy). In-8°. 1861. [Colmar, Barth.] Aubry. — Le
Château de Corlay (Côtes-du-Nord). In-8°. 1865. [Nantes.] Aubry. 2
fr. Tiré à 150 exemplaires. — Extrait de la «Revue de Bretagne et de
Vendée ». — Essai sur l'histoire monétaire du prieuré de Souvigny
(Allier). In-8°avec 1 pi. 1846. ClermontFerrand, Péroi. — Essai sur
les monnaies des ducs de Bourgogne. In-4°. 1849. Dijon. 8 fr. —
Études sur la Révolution en Bretagne. — Voy. Geslin de Bourgogne
et Barthélémy. — La Justice sous la Terreur. In-8°, 18 p. 1862.
Nantes , imprimerie Forest et Grimaud. — Nouveau manuel complet
de numismatique ancienne. In-18 avec un atlas de 12 pi. 1851.
Horet. 5 fr. — Nouveau manuel complet de numismatique du moyen
âge et moderne. In-18 avec un atlas de 12 pi. 1852. Ibid. 5 fr.
Collection des Manuels-Roret. — Numismatique mérovingienne.
Étude sur les monnoyers, les noms de lieux et la fabrication dQ la
monnaie. In-8°. 1865. Aubry. l fr. 50 c. — Numismatique
mérovingienne. Liste des noms de lieux inscrits sur les monnaies
mérovingiennes. In-8°. 1865. Ibid 2 fr. — La Numismatique de 1859
à 1861. In-8°. 1861. Rollin. 2 fr. — La Numismatique de 1861 à
1863. In-8°. 1863. Ibid. 2 fr. — Rapport sur quelques monuments
religieux et féodaux du département de la Loire. In -8°. 1842. Caen,
Hardel. — Recherches sur la noblesse maternelle. In-8°. 1861. Ibid.
1 fr. 50 c. Extrait de la « Bibliothèque de l'École des chartes ». — Le
Temple d'Auguste et la Nationalité gauloise. Examen des dernières
publications de M. A. Bernard. In-8°, 13 p. 1864. P. Dupont. —
Tombeau de saint Dizier, évoque et martyr. In-4° avec fig. 1858.
Didron. 2 fr. M. A. de Barthélémy collabore à la • Bibliothèque de
l'Ecole des chartes », a la « Revue numismatique ». Il a donné
quelques articles à la « Correspondance littéraire » et à d'autres
É É
30.
recueils périodiques. BARTHÉLÉMY(Antoine). — Un Philosophe en
voyage. In- 12. 1864. Charpentier. 3 fr. 50 c. BARTHÉLÉMY (Auguste
Marseille), poète satirique, né à Marseille, en 1796. — A M. le baron
de Rothschild, le peuple juif. Poème. Gr. in -8° de 2 f. 1847.
Imprimerie de Lange-Lévy. — L'Art de fumer, ou la Pipe et le cigare ;
poème en trois chants, suivi de notes. In-8°. 1844. Laiton and-
Lépine. 3 fr. 50 c.
31.
158 BARTHÉLÉMY —Le même, édition in-12. 1844. Ibid.
On a publié à l'occasion de ce poëme : « la Tabatière vengée » ,
réponse riniée à l'auteur de e l'Art de fumer » par un priseur de
Brienne. In-8°. 1844. Lallemand-Lépine. l fr. — A Sa Sainteté Pie IX.
(En vers.) In-8Ô. 1846. Ibid. l fr. — Le Bois de Boulogne ; poëme en
deux chants. In-8°. 1857. G. Havard. 1 fr. — Les Deux Marseille.
1858. (Vers.) In-8°. 1858. Marseille , Camoin frères. 1 fr. —
Garibaldi, ou le Béveil du lion. (En vers.) In-8°. 1861. Chez les
principaux libraires. 50 c. — Napoléon en Egypte, Waterloo et le fils
de l'homme ; poèmes. Edition illustrée par Horace Vernet et H.
Bellangé. In-8°. 1842. Bourdin. 12 fr. Avec Méry. — La lre édition de
cet ouvrage a paru en 1828. — Némésis. 7e édition. In -8°. 1845.
Perrotin. 8 fr. La lre édition a été publiée en 1881 , en 52 livraisons
hebdomadaires. — Nouvelle Némésis; satires. In-8°. 1845.
Lallemand-Lépine. 12 fr. Publié en 24 livraisons. — Syphilis; poëme
en deux chants, avec des notes par le docteur Giraudeau de Saint-
Gervais. In-8°. 1840. Béchet jeune et Labé. 3 fr. — Le Triomphe
d'Osten-Saken, ou le Bombardement de la flotte anglo-française sur
les batteries d'Odessa; drame militaire en un acte. In-8°. 1854. Pion.
— La Vapeur; poëme. In-8°. 1845. Lange-Lévy. — Zodiaque; satires.
A M. Thiers. In-8°. 1846. Lallemand-Lépine. 50 c. M. Barthélémy est
encore auteur de quelques poésies de circonstance telles que: t
Louis Napoléon Bonaparte» (1848, in-fol. 1852 , in-8°) , • Le 2
Décembre » (1852) , « Vox populi ou le 15 Août», «l'Exposition de la
Reine Victoria» (1855), etc., etc. ; il a traduit « l'Enéide » , de
Virgile, en vers français. BARTHÉLÉMY (Charles), archéologue, né a
Paris en 1825, membre de l'Académie de la religion catholique de
Borne, et de la Société des antiquaires de Picardie. — Annales
hagiologiques de la France. Les Vies des saints de France depuis le
premier siècle du christianisme jusqu'à nos jours, traduites des actes
les plus anciens et des auteurs contemporains, complétées par un
grand nombre de notes historiques sous la direction de Gh.
Barthélémy. i»e série. 5 vol. gr. in-8°. 1860-1864. Versailles, chez
Fauteur, rue de l'Orient, 1. Chaque vol. 8 fr. — Le même, 2e série,
tome I. Gr. in-8°. 1865. Ibid. — Erreurs et mensonges historiques. In
32.
- 12. 1863.Blériot. 2 fr. — Le même. 2e série. In-12. 1864. Ibid. 2 fr.
— L'Esprit du comte Joseph de Maistre, précédé d'un essai sur sa vie
et ses écrits par Charles Barthélémy, complété par un grand nombre
de notes. In-12. 1859. Gaume frères. 3 fr. 50 c. Édition in-8°, 6 fr. —
Études sur quelques hagiologues du xvne et du xviii0 siècle:
Godescard, Baillet, Tillemont, Launoy. In-8°. 1862. Blériot. 60 c. —
Études historiques, littéraires et artistiques sur le vne siècle. Vie de
saint Éloi, évoque de Noyon (588-659), par saint Ouen, cvêque
deBouen, traduite par Ch. Barthélémy, précédée d'une introduction
et suivie d'un grand nombre de notes historiques. ire partie. In-8°,
477 p. 1847. Chez l'auteur, rue Mazarine, 11. — Histoire de la
Bretagne ancienne et moderne. In-8° avec 4 grav. 1854. Tours,
Marne. 3 fr. 50 c. — Histoire du village de Chàtenay-lez-Bagneux et
du hameau d'Aulnay, dépendant de Châtenay; avec une lettre de M.
le curé de Châtenay à l'auteur. In-8°. 1847. Chez Fauteur, rue
duFour-SaintGermain, 43. 3 fr. — Histoire de la Normandie ancienne
et moderne. In-8°. 1857. Tours, Marne et Cit!. — Histoire de Bussie,
depuis les temps les plus reculés jusqu'à nos jours. In-8°. 1856.
Tours, Ibid. — Histoire de Turquie, depuis les temps les plus reculés
jusqu'à nos jours. In-8°. 1856. Tours, Ibid. — Notice d'une collection
de vases et de coupes antiques en terre peinte , provenant du feu
prince de Canino (Lucien Bonaparte). In - 8°. 1848. Rue Neuve-des-
Capucines , 8. 50 c. Tiré à petit nombre. M. Ch. Barthélémy a publié
une traduction française du - Rational de Guillaume Durand » ,
accompagné de notes et suivi d'une bibliographie liturgique.
BARTHÉLÉMY (Edouard Marie de) , frère d'Anatole de Barthélémy
(voy. ci-dessus), archéologue, auditeur au Conseil d'État, né à
Angers, en 1830. — Les Amis de la marquise de Sablé, recueil de
lettres des principaux habitués de son salon, annotées et précédées
d'une introduction historique sur la société précieuse au xvne siècle,
par Edouard de Barthélémy. In -8°. 1865. Dentu. 6 fr. — Armoriai
général de la généralité de Châlonssur-Marne , publié pour la
première fois , d'après le manuscrit original conservé à la
bibliothèque impériale, et annoté par Edouard de Barthélémy. I.
Elections de Chàlons, Sainte-Menehould, Épernay, Sézanne et Vitry-
le-François. In-12. 1862. [Châlons.] Aubry. 3 fr. 80 c. Tiré à 100
É
33.
exemplaires. — Cartulairesde l'évêché et du chapitre SaintÉtienne
de Châlons-sur-Marne. Histoire et documents. In-12. 1853. [Châlons,
Boniez- Lambert.] Didron. 2 fr. 25 c. — Catalogues des
gentilshommes qui ont pris part ou envoyé leur procuration aux
assemblées de la noblesse pour l'élection des députés aux États
généraux de 1789. — Voy. La Roque et Barthélémy. — Châlons
pendant l'invasion anglaise. 13381453. In-8° avec 1 pi. 1852.
Châlons, Martin. — Du Conseil d'État en 1859. In-8°. 1859. Aubry. l
fr. — Correspondance inédite des rois de France avec le conseil de
ville de Châlons-sur-Marne , d'après des lettres existantes aux
archives municipales de cette ville. In-12 de 2y3f. 1855. Châlons-sur-
Marne , Laurent. — La Cour de Louis XIV, jugée par un
contemporain. In -8°. 1863. [Amiens, Caron.] Aubry. 2 fr. 50 c. —
Critique contemporaine. Deux années de quinzaines littéraires. î™
série. In-8°. 1863. De/du. 3 fr. — Diocèse ancien de Châlons-sur-
Marne, his
34.
BARTHELEMY 159 toireet monuments; suivi des eartulaires
inédits de la commanderie de laNeuville-au-Temple, des abbayes de
Toussaints, de Moustiers et du prieuré de Vinetz. 2 vol. in-8° avec
carte et 8 grav. 1861. [Chaumont, Cavaniol.] Aubry. 13 fr. — Essai
historique sur la réforme et la ligue à Châlons-sur-Marne (1561-
1610.) In - 8° de l «/. f. 1851. Châlons, Martin. — Essai historique
sur les comtes de Champagne. In-8° avec 1 tableau. 1853. Ibid. Tiré
à petit nombre. — Étude sur les établissements monastiques du
Houssillon. (Diocèse d'Édène, Roussillon.) In-8°. 1857. Aubry. 2 fr. 50
c. Tiré à petit nombre. — Étude sur la vie de Jeanne Françoise
Fréînyot, baronne de Rabutin-Chantal, dame de Bourbilly, fondatrice
de l'ordre de la Visitation Sainte-Marie. In-8°. 1860. Lecoffre et Cie.
2 fr. — Études biographiques sur les hommes célèbres nés dans le
département de la Marne. In-12. 1853. Châlons, Boniez- Lambert. —
Études biographiques sur Claude d'Épense , David Blondel et Perrot
d'Ablancourt. In-8°. 1853. Châlons, Martin. — Étude historique sur le
règne de François II (1559-1560). In-8°. 1860. Aubry. l fr. — Étude
sur la vie de Madame de Beauharnais de Méramion. In-8°. 1861.
Ibid. — Histoire de la ville de Châlons-sur-Marne et de ses
institutions, depuis son origine jusqu'en 1789. In-8°. 1854. Châlons,
Laurent. 6 fr. — Les Livres nouveaux , essais critiques sur la
littérature contemporaine. In -8°. 1859. Didier et O. 5 fr. — Le
môme. 2e série. In-8°. 1862. Ibid. 5 fr. — Madame la comtesse de
Maure , sa vie et sa correspondance, suivies des Maximes de Mme
de Sablé et d'une Étude sur la vie de MUe de Vandy. In-12. 1863.
Gay. 5 fr. — Mémoire sur l'élection à l'empire d'Allemagne de
François Etienne, duc de Lorraine, 17201745. In-8°. 1851. Châlons,
Martin. — De la Noblesse au xixe siècle et du rétablissement des
dispositions pénales applicables à l'usurpation des titres. In-12.
1857. Dentu. 1 fr. 5o c. — La Noblesse en France, avant et depuis
1789. In-12. 1858. Librairie nouvelle. 2 fr. — Notice historique et
archéologique sur les communes du canton de Ville-sur-Tourbe
(Marne). In-8°. 1865. Aubry. Tiré à 60 exemplaires numérotés. —
Philippe de Courcillon, marquis de Dangeau, sa vie, son journal et la
cour de Louis XIV. In-8°, 20 p. 1863. Ibid. — Pierres tombales du
35.
moyen âge. —Voy. Mu*art et Barthélémy. — Les Princes de la
maison royale de Savoie. In-12. 1860. Poulet- Malassis. 2 fr. —
Relation de l'entrée de Mgr. de ChoiseulBeaupré, évêque de Châlons,
dans sa ville épisi-opale. In-12. 1861. [Châlons.] Aubry. l fr. 50 c. —
Relation de l'entrée de la dauphine Marie Antoinette à Châlons, le u
mai IT70, accompagnée d'une introduction historique, de notes, et
suivie des relations des diverses entrées de souverains dans cette
ville. In-12. 1861. [Châlons.] Ibid. 1 fr. 50 c. Tiré à très-pelit nombre.
— Statistique monumentale de l'arrondissement de Sainte-
Menehould (Marne). î™ partie. 2e édition. In-8°. 1852. Caen, Hardel.
2 fr. — Les Trois conquêtes françaises du Roussillon, 1291-1493-
1642. In-8°. 1864. [Chaumont], Ibid. 1 fr. 50 c. — Variétés
historiques et archéologiques sur Châlons-sur-Marne et son diocèse
ancien. In-8°. 1864. Ibid. 5 fr. — Une Vie de chanoine au xvne
siècle. In-8°. 1853. Châlons, Martin. — Les Vitraux des églises de
Châlons-sur-Marne. Étude et description. In - 8°, 48 p. 1858.
[Reims.] Didron. M. Ed. de Barthélémy a publié: les Œuvres inédites
de La Rochefoucauld , les Lettres de la Sainte Mère de Chantai, le
Journal du baron de Gauville, les Œuvres complètes de Régnier.
(Voy. ces noms.) II collabore au •Bulletin monumental » de M. de
Caumonl. BARTHÉLÉMY (Edouard). — Notice historique sur les
établissements français des côtes occidentales d'Afrique. In-8° de 6
f. avec 1 carte. 1848. Arthus- Bertrand. BARTHÉLÉMY (J. M.),
propriétaire à Alger. — Études morales, économiques et politiques
sur l'Algérie. lrc série. Démonstration de l'incompatibilité du régime
militaire avec la formation d'un établissement colonial en Afrique. In-
8°. 1840. Ledoyen. 5 fr. BARTHÉLÉMY (l'abbé Jean Jacques),
historien et archéologue, membre de l'Académie française , né à
Cassis en 1716, mort à Paris en 1795. — Voyage du jeune
Anacharsis en Grèce , vers le milieu du ive siècle avant l'ère vulgaire.
7 vol. in-18. 1839. Limoges, Ardanl. 10 fr. Atlas de 2-t cartes et
plans. In-4°. Ibid. 5 fr. — Le même. Gr. in-8°. 1858. Didot frères. 10
fr. — Le même. 2 vol. in - 8°. 1843. Didier et Cie. 18 fr. — Le même.
2 vol. in-12. 1843. Ibid. 7 fr. — Le même. 2 vol. in-12. 1843.
Lavigne. 7 fr. — Le même. 3 vol. in-12. 1860. Hachette et Cie. 6 fr.
Atlas dressé pour cet ouvrage par J. G. Barbie de Bocage In-8°. Ibid.
36.
1 fr. 50c. — Le-méme. 3 vol. in-12. 1865. Ibid. 3 fr. La ire édition du
Voyage du jeune Anacharsis est de 1768— Voyage abrégé du jeune
Anacharsis en Grèce. Extrait de J. J. Barthélémy, par l'abbé Paul
Jouhanneaud. In - 8° avec 1 portrait et 3 grav. 1848. Limoges ,
Ardant. 3 fr. — Petit Anacharsis, ou Voyage du jeune Anacharsis en
Grèce. Abrégé de J. J. Barthélémy. Par Lemaire. In-12. 1853.
Lehuby. 2 fr. 50 c. — Le même. Nouvelle édition. In-12. 1861.
Ducrocq. l fr. 75 c. BARTHÉLÉMY (Mathieu Barthélémy Trouxk, dit),
auteur dramatique, né à Paris vers 1804. — Cantatrice et Marquise;
comédie-vaudeville en trois actes. In-8°. 1813. Breauté. 50 c. Avec
Eug. Fillot.
37.
160 BARTHÉLÉMY —Le Coiffeur des dames; comédie -
vaudeville en un acte. In-8°. 1845. Tresse. 60 c. — Un Déluge
d'inventions, revue de l'exposition de l'industrie; vaudeville en trois
actes. In-8°. 1849. Dechaume. 50 c. Avec MM. Joubaud et Bricet. —
La Faute du mari; comédie - vaudeville en deux actes. In-8°. 1846.
Beck. 50 c. Avec M. Joubaud. — Les Filles d'honneur de la reine;
comédievaudeville en un acte. In-8°. 1847. Ibid. 50 c. Avec M. Fillot.
— Le Gibier du roi; comédie-vaudeville en un acte. In-8°. 1849.
Tresse. 50 c. Avec M. Delacour. — L'Hospitalité d'une grisette;
vaudeville en un acte. In-8°. 1847. Imprimerie Dondey-Dupré. 50 c.
Avec le même. — Le Roi, la Dame etle Valet; comédie -vaudeville en
trois actes. In-8°. 1853. Mifliez. 40 c. Avec M. Fillot. — Un Voyage à
Paris ; comédie - vaudeville en trois actes. In-8°. 1845. Beck. 60 c.
Avec M. Bourdois. BARTHÉLÉMY (Prosper), ancien professeur. —
Monographie du bon élève. In-8°, 16 p. 1859. Béziers, Delpech. —
Monographie du professeur. In -12. 1858. Montpellier, Gras. —
Nouvel abrégé de la mythologie , à l'usage de la jeunesse; suivi d'un
résumé de l'Iliade, de l'Odyssée et de l'Enéide. Nouvelle édition,
revue par l'auteur et augmentée de notes. In-18. 1852. [Nancy.]
Hachette. 75 c. La ire édition est de 1829. — L'Omnibus du langage ,
ou le Régulateur des locutions vicieuses. In-32. 1839. Dijon, Lagier.
60 c. — Premiers exercices de style , à l'usage des élèves des écoles
primaires. Partie du maître. In-12. 1852. Mme Ve Maire-Nyon. 1 fr.
50 c. — Les mêmes. Partie de l'élève. In - 12. 1852. Ibid. 1 fr. —
Seconds exercices de style. Partie du maître. In-12. 1854. Ibid. 2 fr.
— Les mêmes. Partie de l'élève. In-12. 1854. Ibid. l fr. 25 c.
BARTHÉLÉMY (R. D). — A ceux qui chantent encore. Chansonnettes.
In-18. 1851. Ledoyen. 1 fr. BARTHÉLÉMY de Beauregard (l'abbé
EmmanuelJustin), vicaire à l'église de la Trinité à Pari*, chanoine
honoraire de Reims, de Périgueax et d'Orléans, membre
correspondant des académies de Nancy, de Besançon, d'Orléans et
de Reims, né en 1803, à Beauregard, commune d'Amance (Haute-
Saône). — La Comédie universelle, ou Morale en action et en
apologues. In-12. 1863. Mirecourl , Ifumbert. 1 fr. — Greffes morales
sur La Fontaine, suivies de quelques autres fables. In- 18. 1865.
38.
Laine et Havard.2 fr. -»■ Histoire de Charles V, roi de France, lu- 18.
1843. Debécourt. 3 fr. so c. — Histoire du B. P. Fourier, curé de
Mattaincourt, fondateur de la congrégation de NotreDame, etc. 2
vol. in-12. 1864. Bar-le-Duc, Contant-Laguerre et Cie. 7 fr. — Histoire
de Jeanne d'Arc, d'après les chroniques contemporaines, les
recherches des modernes et plusieurs documents nouveaux; suivie
de près de 1,200 articles indiquant tout ce qui a été publié sur cette
héroïne. 2 vol. in-8° avec 8 pi. 1847. Aubry. 10 fr. — Histoire de la
vie de N. Sv Jésus - Christ au point de vue apologétique, politique et
social. In-12. 1850. Lecoffre. 2 fr. 50 c. — Mission divine de Jeanne
d'Arc. In-8°. 1853. Orléans. 1 fr. — Morale amusante en action et en
apologues. In-12. 1865. Vaton. l fr. — Traité des fêtés mobiles et
histoire des derniers martyrs de la Chine. Gr. in-8°. 1848.
ParentDesbarres. 7 fr. Avec son frère l'abbé Célestin Barthélémy do
Beauregard , curé de Blondefontaine (Haute-Saône), né à
Beauregard , eu 1817. Forme le tome 5 de !'• Histoire de la vie des
saints i , publiée par MM. les abbés Juste et Caillau. — Vie de sainte
Geneviève, patronne de Paris, In-18. 1852. Hivert. 1 fr. .
BARTHÉLÉMY -BENOIT (le docteur Pierre Emile), chirurgien de la
marine de ire classe, né à Angoulôme, en 1822. — De la Fièvre
bilieuse hématurique observée au Sénégal. In-8°. 1865. Baillière et
fils. BARTHÉLÉMY - LAPOMMERAYE ( Christophe Jérôme), directeur
du muséum d'histoire naturelle de Marseille, correspondant du
muséum de Paris, membre des académies de Paris et de Turin, et de
plusieurs soc. étés savantes, né à Marseille, en 1797. — Richesses
ornithologiques du midi de la France. — Voy. Jaubert (J. B.), et
BarthélémyLapommeraye. BARTHÉLÉMY SAINT-HILAIRE (Jules),
philosophe, membre de l'Institut, ancien représentant du peuple,
ancien professeur de philosophie grecque et latine au Collège de
France , ne à Paris, en 1805. Attaché à la commission de l'isthme de
Suez, il a fait, en 1855, un voyage en Egypte. — Le Bouddha et sa
religion. Les Origines du bouddhisme (543 avant J.-C). — Le
Bouddhisme dans l'Inde au vne siècle de notre ère. Bouddhisme
actuel de Ceylan, 1858. In-8°. 1860. Didier et Cte. 7fr. — Le même.
Édition in- 12. 1862. Ibid. 3 fr. 50 c. — Du Bouddhisme. In-8°. 1855.
Duprat. 6 fr. — De l'École d'Alexandrie. Rapport a l'Académie des
39.
sciences morales etpolitiques ; précède d'un Passai sur la méthode
des Alexandrins et le mysticisme, et suivi d'une traduction de
morceaux choisis de Plotin. In-8°. 1845. Ladrange. 6 fr. — Lettres
sur l'Egypte. In-8°. 1856. Lévy frères. 7 fr. 50 e. — Les mêmes. I11-
J2. 1857. Ibid. 3 fr. — Lois organique»». Loi sur l'instruction
publique, avec un Commentaire et l'Analyse des exposés des motifs,
rapports et discussions parlementaires ; précédée d'une Introduction
historique. hi-12. 1650. Rue des Ma-tonsScrbonne. 13. 1 fr.
40.
BARTHELET — BARTHOLOMIN161 — Mahomet et le
Coran. Précédé d'une introduction sur les devoirs mutuels de la
philosophie et de la religion. In-8°. 1865. Didier et Cie. 7 fr. — Le
même. 2e édition. In- 12. 1865. Ibid. 3 fr. 50 c. — Œuvres
d'Aristoto. — Voy. Aristute. — Des Védas. Iu-8°. 1854. Duprat. — De
la Vraie démocratie. In-18. 1849. V.Didot. 40 c. Petits traites publiés
par l'Académie des sciences morales et politiques. Livraison 9e.
BARTHELET (Alexandre), notaire à La Cluse, ne aux Grangettes, près
Pontarlier, en 1803, mort vers 1860. — Histoire de l'ahbaye de
Montbenoit, du val de Saugeois et des anciennes seigneuries d'Arçon
et de Lièvremont, suivie d'un coup d'oeil sur le patois du Saugeois.
In-12 de 215 p. 1853. Besançon, Jacquin. — Recherches historiques
sur l'abbaye de Mont Sainte -Marie et ses possessions , et sur les
prieurés de Romain-Mouthier ou de Vaux et de Saint-Point. In-12,
250 p. 1858. Pontarlier, imprimerie Simon. M. A. Barthelet a laissé en
manuscrit une histoire de La Rivière. BÂRTHÈRE. — Questionnaire
encyclopédique à l'usage des salles d'asile, contenant des leçons
élémentaires par demandes et par réponses. In-8° avec 6 pi. 1846.
Montpellier, chez l'auteur. 6 fr. BARTHÈS (F.), docteur en médecine.
— Études sur les bains de mar. In-8«. 1858. Cette , chez fauteur. 2
fr. 50 c. — Examen de la doctrine homœopathique. In-8 1858. Ibid.
2 fr. 50 c. BARTHET (Armand), littérateur et auteur dramatique, né à
Besançon, en 1820. — Chapelle et Bachaumont; opéra-comique en
un acte. In-12. 1858. 1 fr. — Le Chemin de Corinthe; comédie en
trois actes et en vers. In-12. 1853. Giraud et Dagneau. 1 fr. — La
Fleur du panier; poésies. In-16. 1853. Dagneau. 1 fr. — Le Moineau
de Lesbie; comédie en un acte (en vers). In-16. 1849. Blosse. 1 fr. —
Nouvelles. In-12. 1852. Giraud et Dagneau. 2fr. Pierre et Paquelte.
— Henriette. — Le NkI d'hirondelles. — Les Saisons. — Théâtre
complet. Le Moineau de Lesbie. Le Chemin de Corinthe. L'Heure du
berger. In-12. 1861. Hachette et Cie. 2 fr. Voy. aussi Horace.
BARTHEZ (le docteur Antoine Charles Ernesl. de), médecin du Prince
Impérial et de l'hôpital Sainte-Eugénie, né à Narbonne, vers 1800. —
Traité clinique et pratique des maladies des enfants. 3 vol. in -8°.
1843. Germer Bailliere. 21 fr. Avec F. Rillict. — Le même. 2e éditiou,
41.
entièrement refondue »tconsidérablement augmentée. 3 vol. in -8°.
1854. Ibid. 25 fr. liu nouveau Urage de cette édition a été fait en
1861. BARTHEZ (François), docteur en médecine de la Faculté de
Paris, médecin aux eaux de Vichy, né à Lezignan (Aude), en 1801. —
Guide pratique des malades aux eaux de Vichy, comprenant
l'examen des propriétés médicales des eaux, leur mode d'action,
l'étude des maladies qui s'y rattachent, l'hygiène et le régime à
suivre pendant et après le traitement. 7e édition, revue et
augmentée, ornée de gravures sur bois, et d'un plan général de la
ville. In-12. 1865. J. B. Bailliere. 3 fr. La lre édition est de 1847. —
Des Propriétés électives des vaisseaux absorbants chez l'homme et
les animaux. Mémoire. In-8°. 1843. Ibid. l fr. 50 c. — Vichy sous
Napoléon III. In -fol. avec vignettes. 1865. Vichy, Bougarel. 25 fr.
BARTHEZ (Paul Joseph), médecin de Napoléon Ier, membre de
l'Institut, membre de la Société de médecine, etc., ne à Montpellier,
en 1734, mort en 1806. — Nouveaux éléments de la science de
l'homme. 3e édition, augmentée du discours sur le génie
d'Hippocrate, de mémoires sur les fluxions et les coliques iliaques,
sur la thérapeutique des maladies, sur l'évanouissement, l'extispice,
la fascination, le faune, la femme, la force des animaux; collationnée
et revue par le docteur E. Barthez. 2 vol. in-8°. 1858. Germer
Bailliere. 12 fr. La lre édition, 1 vol. in-8°, a paru en 1778; la 2e
édition, 2 vol. in-80, en 1806. BARTH0LMESS (Christian), membre
correspondant de l'Institut, professeur de philosophie au séminaire
protestant de Strasbourg , né à Geisselbronn (Bas-Rhin), en 1815,
mort à Strasbourg, en 1856. — Le Grand Beausobre et ses amis, ou
la Société française à Berlin, entre 1685 et 1740. In-8°. 1854.
Meyrueis. 60 c. — Histoire critique des doctrines religieuses de la
philosophie moderne. 2 vol. in-8°. 1855, Ibid. 12 fr. — Histoire
philosophique de l'Académie de Prusse, depuis Leibnitz jusqu'à
Schelling, particulièrement sous Frédéric le Grand. 2 vol. in-8°. 1851.
Ducloux. 12 fr. — Huet, évoque d'Avranches, ou le Scepticisme
théologique. In-8°. 1849. Franck. 3 fr. — Il y a sauveur et sauveur.
In-8°. 18ôi. Ducloux. 1 fr. — Jordano Bruno. 2 vol. in-8° avec 1
portrait. 1847. Ladrange. 15 fr. BARTH0L0MAEI (le général J.). —
Lettres numismatiques et archéologiques relatives,à la
42.
Transcaucasie. Gr. in-4°avec 4 pi. 1859. Sc.int-Pétersbourg. [Leipzig,
Vos».] 6 fr. BARTHOLOMIN, maitre des ballets à Lyon et à Bruxelles.
— Les Amants de Castille , ou la Fiancée fantastique; ballet-féerie en
trois actes et neuf tableaux, musique nouvelle de M. Rozet. In-8°.
1846. Lyon, Nourtier. 60 c. — Atim et Zora, ou l'Embrasement du
harem; ballet-pantomime en trois actes. In-8°. 1844. Lyon, Ibid. 30
c. — Azelia, ou l'Esclave syrienne; ballet-pantomime en un acte,
musique composée et arrangée 11
43.
The text onthis page is estimated to be only 28.53%
accurate
lf2 BARTHOLONY — BASCLE par M. Gondois. In-8°. 1844.
Lyon, imprimerie de Marie aine. — Les Deux roses, ou Une Côte
d'Andalousie; ballet, en deux actes. In-8°. 1840. Marseille, Chaix. 30
e. — Oliska; ballet- pantomime en doux actes. In-8°. I84ô. Lyon,
Nourlier. 30 c. BARTHOLONY (François), administrateur français,
fondateur de la Compagnie du chemin de 1er d'Orléans, président
du conseil d'administration de ce chemin de fer et de celui de Lyon à
Genève, né à Genève , en 1796. — Lettre à un député sur le
nouveau système de travaux publics adopté par le gouvernement
pour la construction des grandes lignes de chemins de fer. In-8°.
1842. Carilian-Gœury. 2 fr. — Deuxième Lettre à un député.
Observations sur l'exécution de la loi du il juin 1842, relativement à
l'établissement des grandes lignes de chemins de fer. In-8a de 7 f.
1843. Blondeau. — Résultats économiques des chemins de fer, ou
Observations pratiques sur la distribution des richesses créées par
ces nouvelles voies de communication et sur le meilleur système
d'application de la loi du il juin 1842. In-8° de 2 «/» f- 1844. Dupont.
Une réponse anonyme à cet écrit a été publiée la même année sons
le titre : Du système de fermage simple des chemins de fer, comparé
au système de fermage avec fournitures, et pose de rails par une
compagnie de fermage simple. In-8° de 7 f. Imprimerie de Blondeau.
— Simple exposé de quelques idées financières et industrielles. In-
8°. 1860. H. Pion. 2 fr. - BARTOLI (le Rév. JP. Daniel), écrivain
ascétique et historien italien , de la Compagnie de Jésus, né à
Ferrare, en 1608, mort en 1685. — Histoire de saint Ignace de
Loyola et de la Compagnie de Jésus, d'après les monuments
originaux. Traduite de l'italien et augmentée de nouveaux
documents. 2 vol. in-8°. 1844. Vaton. 12 fr. — Le même. Édition in-
12. 2 vol. 1848. Ibid. 7fr. — Vie de saint Stanislas Kotska, novice de
la Compagnie de Jésus. Traduction libre de la vie italienne par
Bartoli, enrichie de nouveaux documents, par le P. Pouget, de la
Compagnie de Jésus. In-12 avec 1 portrait. 1855. Toulouse, Cazaux.
2 fr. — Le même. Autre édition. In-12. 1859. Tournai, Casterman^l
44.
£r. 60 c.BARTOLINI (Mgr. Dominique), prélat de justice, protonotaire
apostolique. — Acte du martyre de la très-noble vierge romaine
sainte Agnès et du martyre des nobles Abdon et Sennen. Traduit de
l'italien par M. l'abbé E. J. Materne. In-8°. 1863. Levesque. 7 fr. 50 c.
BARTSGH (J. Adam de), dessinateur et graveur allemand, né à
Vienne, en 1757, mort en 1820. — Notices de quelques copies
trompeuses d'estampes anciennes. Extraite et traduite de l'ouvrage
intitulé : Anleitung zur Kupferstichkwide, par Bartsch. Avec des
additions par M. Ch. Le Blanc. In-8° avec 13 pi. 1849. Deflorenne
neveu. 3 fr. 50 C. — Le Peintre-graveur français; continuation. —
Voy. Robert- Dumemil, Baudicour , et Weigel. BARTSOEN ( A.
Pkters-). — Voy. Peters. BARUCH CRÉHANGE (A. Ben). — Vov.
Créhange. BARUTEL (le P. Thomas Bernard), prédicateur, né à
Toulouse, en 1720, mort à la Chartreuse de Saix, en 1792. —
Œuvres complètes. — Voy. Migne, Collection des orateurs sacrés, 1™
série, tome 61. BARZAY (le comte Gaalon de). — Voy. Gaalon de
Barzay. BASCANS (l'abbé), curé de Ciadoux (Haute-Garonne). —
Chants religieux. Nouvelle traduction poétique de tous les psaumes
de David, avec des arguments et des notes. In-8° de 25 «/.f. 185 4.
SaintGaudens, Abadie; Toulouse, Privât. BASGHET (Armand),
littérateur, chargé d'une mission scientifique à Venise; né à Blois, en
1829. — Les Années de voyage de Sainte-Adresse â Bagnères de
Luchon.- Itinéraire humoristique. In-12. 1852. Giraud et Dagneau. 1
fr. 50 c. — Les Archives de la sérénissime république de Venise.
Souvenirs d'une mission. Gr. in -8°. 1858. [Venise, Ant. Antonelli.]
Amyot. 3 fr. — La Diplomatie vénitienne. J.es princes de l'Europe au
xvie siècle. François Ier, Philippe II, Catherine de Médicis,- les papes,
les sultans, etc., d'après les rapports des ambassadeurs vénitiens.
Ouvrage enrichi de nombreux fac-similé. lu-8°. 1862. Pion. 8fr. —
Les Femmes blondes selon les peintres de l'école de Venise, par
deux Vénitiens. In -8°. 1865. Aubry. 1 2 fr. Papier vergé et papier
chamois , 25 fr. Avec M. Feuillet de Couches. — Cet ouvrage publié
sous l'anonyme a été imprimé en caractères archaïques et tiré à petit
nombre. — Les Origines de Werther , d'après des documents
authentiques. In-8°. 1855. Amyot. l fr. — Physionomies littéraires de
ce temps. Honoré de Balzac. Essai sur l'homme et sur l'œuvre. Avec
45.
notes historiques parChampfleury. In-12. 1852. Giraud et Dagneau.
2 fr. — Le Roi chez la reine, ou Histoire secrète du mariage de Louis
XIII et d'Anne d'Autriche, d'après le Journal de la santé du roi, les
dépêches du nonce et autres pièces d'État. In-8°. 1864. Aubry. 12 fr.
Tiré à petit nombre. BASCLE DE LAGRÈZE (Gustave), magistrat et
archéologue, conseiller à la cour impériale de Pau, né à Pau, en
1811. Quelques-unes de ses publications sont signées: G. B. de
Lagrèzc, ou seulement M. de Lagrèze. — Antiquités du Béarn;
manuscrit inédit de la Bibliothèque royale. — Voy. Marca (Pierre de).
— Le Château de Pau. Souvenirs historiques . son histoire et sa
description. 4e édition , revue et augmentée. In-8°. 1863. [Pau.]
Hachette. 3 fr. 50
46.
The text onthis page is estimated to be only 29.08%
accurate
BASEGGIO — BASILE 163 — La Féodalité dans les
Pyrénées, comte' de Bigorre. Me'moire lu à l'Académie des sciences
morales et politiques. In-8°. 1864. Durand. 3 Dr. Extrait du « Compte
rendu de l'Académie des sciences no* raies et politiques ». —
Histoire religieuse de la Bigorre. In-12. 1863. I Tarbes.] Hachette et
Cie. 4 l'r. — Monographie de l'Escale-Dicu. I11-80 de 7 f. 1850.
Didron. — Monographie de Saint-Pc. In-8° de 4 f*. 1853. Ibid. —
Monographie de Saint-Savin de Lavcdan. Iu-8° de 11 f. 1850. Ibid.
— Observations sur les lacunes du Gode pénal. In-8°. 1856.
[Tarbes.] Cotillon. — Les Pèlerinages des Pyrénées. Notre-Dame des
Pyrénées. Sarrance. Piétat, en Béarn. Bétharam. Poeylahun. Piétat,
en Bigorre. Héasp. Bourisp. Nestès. Médous. Garaison. In-16, ix-308
p. 1858. Tarbes, Telmon. — Rome et Naples. Simples notes. In-12.
1864. Pau , Vignancour. 3 fr. — Le Trésor de Pau. Archives du
château d'Henri IV, avec des fac-similé. In-8° avec 12 pi. 1851.
Didron. 8 fr. M. de Lagrèze a aussi traduit du suédois : Légendes et
poèmes du roi Charles XV. (Voy. Charles.) BASEGGIO (Giamb.). —
Dissertation sur l'Alcibiade fanciuilo àscuola, traduite de l'italien et
accompagnée de notes et d'une postface par un bibliophile français.
Petit in -8°. 1861. J. Gay. 3 fr. L'original italien a paru à Bassano, eu
1850, sous le titre de : • Disquisizioue intorno al rarissimo libro
intitolato Alcibiade fanciullo à scuola » ; il n'a été tiré qu'à 25 -
exemplaires. Cette traduction française est tirée à 254 exemplaires.
BASÉLY (Etienne). — Courage et résignation. In-16. 1863. Rouen,
Méijard et Cie. 75 c. *Bases de la politique positive. Manifeste de
l'école sociétaire fondée par Fourier. In-8°. 1841. Duverger. 1 fr. 50
c. BASEVI (Abramo), membre de l'Institut musical de Florence, né à
Livourne, en 1*818. — Introduction à un nouveau système
d'harmonie, traduit de l'italien par L. Delatre. In-8° avec 16 p. de
musique. 1864. Florence, Guidi. 2 fr. 50 c. BASILE (saint), surnommé
le Grand, archevêque de Césarée, né à Césarée, en Ca'ppadoce, en
329, mort en 379. — Sancti patris nostri Basilii Caesareae
Cappadocise archiepiscopi opéra omnia quse extant, operà et studio
47.
domini Juliani Garniereditio parisina altéra, emendata et aucta. 3
vol. ou 6 livraisons gr. in-8°. 1839. Gaume frères. 72 fr. Réimpression
de l'édition publiée à Paris , en 17 21 , en 8 vol. in-fol. — Elle
contient le texte grec et la traduction latine. — Opéra omnia. — Voy.
Migne, Patrologie grecque, tomes 29 à 32. — Œuvres de saint Ëasile
le Grand. Traduction complète, contenant tous les ouvrages
reconnus ou attribuas à ce père, et suivie de notes et de
dissertations nouvelles, par M. Roustan. Tomes 1 a 3. In-8°. 1847.
Périsse frères. Chaque volume, 8fr. L'édition devait avoir 19 volumes.
— Œuvres choisies de saint Basile le Grand. 2 vol. in-8°. 1846.
Vrayet de Surcy. — •Les Ascétiques, ou Traités spirituels de saint
Basile le Grand. 2 vol. in-18. 1860 et 18H2. [An'goulême.l Vives. —
Discours et morceaux choisis do saint Basile et de saint Grégoire de
Nazianze. Traduction française par M. Herrmann. In-12. 1856. Lyon,
Périsse frères. — Explication de l'ouvrage des six jours (E£afj.epov);
lettres et discours. Texte grec annoté. In-12. 1859. Garnier frères. 1
fr. 50 c. — Homélie contre les emprunteurs; texte grec avec
arguments et notes en français, par Fr. Dùbner. In-12. 1865. ./.
Lecoffre et C 50 c. — Homélie contre les usuriers, expliquée
littéralement, traduite et annotée par E. Sommer. In-12. 1853.
Hachette. 75 c. — Homélie sur le précepte : Observe -toi toimême,
expliquée littéralement, traduite en français et annotée par E.
Sommer. In-12. 1861. Ibid. 90 C. Les auteurs grecs expliqués par
deux traductions françaises. — La môme, texte grec' seul, avec
notes en français par E. Sommer. In-12. 1863. Ibid. 40 c. — Le
même; texte soigneusement revu, avec analyse et notes en français,
par M. Fr. Dûbner. In-12. 1857. Lecoffre et O. — Discours sur ce
précepte : Fais pttention a toi-même. Texte et traduction par Ath.
Auger. Nouvelle édition, revue et corrigée. In-12. 1863. Delalain. 75
c. — Homélie sur la Lecture des auteurs profanes, expliquée
littéralement, traduite en français et annotée par E. Sommer. In-12.
1857. Hachette et Cie. 1 fr. 25 c. — Le même; texte grec, avec un
argument et des notes en français, par E. Sommer. In-12. 1861.
Ibid. 50 c. — Le même ; traduit en français , par A. F. Maunoury. In-
12. 1859. Dezobry, Magdeleine et Cie. — Le même; texte grec, avec
analyse et notes par A. Mottet. In-12. 1840. Delalain. 1 fr. — Le
48.
même ; textegrec , avec une double traduction française parE.
Lefranc. In-12. 1854. Ibid. l fr. 25 c. — Le même; texte grec, avec
sommaire et notes en français par J. Genouille. In-12. 1857. Ibid. 50
c. — Le même ; texte grec , avec notice, sommaire et notes en
français , par MM. Dùbner et Lefranc. In-12. 1864. Lecoffre et O. 50
c. — Panégyrique du martyr Gordius. Édition classique , avec analyse
et notes en français, par J. Genouille. In-12. 1859. /. Delalain. 60 c.
BASILE, de Césarée, surnommé le Minime. — Opéra quae supersunt.
— Voy. Migne, Patrologie grecque, tome 111. BASILE , de Neopatras.
— Scripta qua3 supersunt. — Voy. Migne, Patrologie grecque, tome
111. BASILE Porphyrogénète. — Monologium Graecorum. — Voy.
Migne Patrologie grecque, tome u 7.
49.
164 BASILE —BASSANVILLE BASILE, archevêque de
Séleucie , mort vers 458. — Opéra. — Voy. Migne, Patrologie
grecque, toine 85. BASILIC APETRI (le P. Charles), historien
ecclésiastique du xvie siècle. — Vie de saint Charles Borromée,
archevêque de Milan, extraite du latin du P. Basilicapetri ; annotée
par l'abbé Paul Jouhannaud. In- 12. 1856. Limoges et Paris , Ardanl
frères. L'ouvrage dont cette vie est extraite a paru pour la lie fois h
Milan, en 1575, sous le litre : « Brevis historia provincial
Mediolanensis et undécim priniorum archiepiscoporuni
Mediolanensium . BASIN (Thomas), chroniqueur, évêque de
Lisieux, né à Caudebec, en 1402, mort en 1491. — Histoire des
règnes de Charles VII et de Louis XI, par Thomas Basin, évêque de
Lisieux, jusqu'ici attribuée à Amelgard, rendue à son véritable auteur
et publiée, pour la première fois, avec les autres ouvrages
historiques du même écrivain, pour la Société de l'histoire de France,
par J. Quicherat. 4 vol. in-8°. 1855-1859. Jules Renouard. 36 fr.
L'ouvrage est en latin. BASINET (l'abbé Gabriel), chanoine titulaire
de l'église Notre-Dame d'Amiens , né à Villers-auxÉrables (Somme),
en 1796, mort à Amiens, en 1861. — Cinquante conférences
spirituelles pour toutes les fêtes de l'année ecclésiastique, à l'usage
des communautés religieuses. Ouvrage utile également aux
directeurs des âmes, aumôniers et à tous les prêtres. 3e édition. 2
vol. in-12. (1er volume : partie d'hiver; 2e volume: partie d'été.)
1865. Tournai et Paris, H. Casternian. 6 fr. — Conférences spirituelles
sur les devoirs de la vie religieuse, à l'usage des communautés.
Ouvrage utile également aux directeurs des âmes , aumôniers,
prédicateurs, et à tous les prêtres. 3e édition. 4 vol. in-12. 1865.
Ibid. 12 fr. La lre édition de ces deux ouvrages a paru dans les
années 1854 et 1856 sous le titre collectif de: t Recueil de
conférences spirituelles, pour les communautés religieuses ». 6 vol.
in-12. Vrayet de Surcy. 18 fr. La 2e édition a été publiée à Amiens
chez Lenoël-Hérouart. 6 vol. in-12. 1859-1860. Cette édition était
déjà divisée en deux parties comme la troisième. BASQUE (J. B. A.),
chef de bureau à la préfecture de la Charente. — Dictionnaire des
communes, bourgs, villages, hameaux, châteaux, fermes, moulins,
50.
usines et autreslieux habités du département de la Charente. In-8°,
vm-166 p. l857.,Angoulême, Chabot. *Bas-Reliefs (les) de la
cathédrale d'Orviéto, gravés sur les dessins de Vincenzo Pontani, par
D. Asconi, B. Bartoccini et L. Graner. Gr. in-fol. oblong dans un
carton. 1858. Leipzig, F. A. Brockhaus. 12. fr. Autre édition sur
plus grand papier. 160 fr. *Bas-Reliefs du Parthénon et du temple de
Phigalie, disposés suivant l'ordre de la composition originale , et
graves par les procédés de M. Achille Collas, sous la direction de M.
P. Delaroche, de M. Henriquel Dupont et de M. Charles Lenormant.
In-4° avec 20 pi. 1841. Rittner et Goupil. 20 fr. BASSAGET (Pierre),
docteur en médecine. — Découverte médicale et physiologique sur
les facultés des sens qui, par sympathie, forment ensemble ce qu'on
appelle communément les facultés intellectuelles, par M. P. Bassaget
et. plusieurs de ses confrères, docteurs en médecine. In-8° de 12 f.
1851. Chez raideur, rue Saint-Martin, 90. — Documents scientifiques
du xix° siècle. Logique de la physique, de la physiologie, de la
cosmologie et du système planétaire des Documents scientifiques du
xixe siècle, ire livraison. Gr. in-8°, 32 p. 1861. Chez l'auteur,
boulevard de Sébastopol, 21. 2 fr. BASSANVILLE (Anaïs Lebrun,
comtesse de), élève de Mme Campan; née en 1806. Elle a dirigé
plusieurs journaux de famille. — Les Aventures d'une épingle , ou
Trois siècles de l'histoire de France. In-8°. 1860. Ducrocq. Broché, 6
fr. Relié, 9 fr. lre édition en 1845. Aubert. 4 fr. — La Chambre rouge.
In-12. 1864. Brunet. 2 fr. 50 c. — Conseils aux enfants du peuple, ou
le Bien et le mal. ïn-12. 1852. Ve Louis Janet. 50 c. — Les Contes du
bonhomme Jadis, ou les Merveilles amusantes tirées de la
mythologie. In-12. 1861. Magnin, Blanchard et Cie. 3 fr. — La
Corbeille de fleurs. In-8° avec 10 lithographies. 1848. Desesserts. 5
fr.; color. 10 fr. — Les Délassements de l'enfance. Petites nouvelles
morales. In-8° avec lithog. 1856. Ibid. 5 fr.; color. îo fr. — Les Deux
familles,, ou Bonne et mauvaise éducation. In-8° avec l grav. 1859.
Tours, Marne et Cie. 1 fr. 25 c. — De l'Éducation des femmes. Le
monde, le chez-soi, la famille; avec une préface, par M. Alfred
Nettement. In-18. 1861. Douniol. 3 fr. — L'Entrée dans le monde, ou
les Souvenirs de Germaine. Illustré par Hadamard. In-8° avec 4 grav.
1862. Vermot. 7 fr. 50 c. — Les Épis d'une glaneuse. Gr. in-8°. 1858.
51.
Lehuby. 7 fr.— Géographie amusante, ou Plaisirs des vacances. In-
8° avec 18 lithographies. 1858. Vermot. Figures noires, 5 fr. ;
coloriées, 10 fr. — Les Infortunes de Roger. In- 12. 1863. Ibid. 75 c.
— La Jeune fille chez tous les peuples. Études morales, types divers,
histoires amusantes et conseils aux jeunes personnes. In-8° avec 7
grav. et vignettes. 1861. Rigaud. Belié, 9 fr. 50 c. Avec Mmcs Julie
Fertiault et Céline d'Ornaus. — Les Mémoires d'une jeune fille. In-12.
1849. Desesserts. 1 fr. 50 c. — Le Monde et ses merveilles. — Voy.
Ribelle. et Bassanville. — Le Monde tel qu'il est. Livre des jeunes
filles. In-8°, avec 4 lithographies. 1853. Desesserts. 7 fr.; color. 10 fr.
— La Morale amusante , contenant l'histoire de ce qu'il y a dans une
boîte de joujoux et les péchés mignons d'un enfant gâté. In-8° avec
16 lithographies et vignettes. 1861. Rigaud. Brochée, 3 fr. 50 c;
reliée, 5 fr. 50 c. Avec C. de Ribelle. — Le Musée du jeune amateur.
Souvenir des
52.
Welcome to ourwebsite – 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!
ebookfinal.com