EnterprisePharo
Free

EnterprisePharo

By Damien Cassou, Stéphane Ducasse, Luc Fabresse, Johan Fabry, Sven van Caekenberghe
Free
Book Description

"Enterprise Pharo is the third volume of the series, following Pharo by Example and Deep into Pharo. It covers enterprise libraries and frameworks, and in particular those useful for doing web development. The book is structured in five parts. The first part talks about simple web applications, starting with a minimal web application in chapter 1 on Teapot and then a tutorial on building a more complete web application in chapter 2. Part two deals with HTTP support in Pharo, talking about character encoding in chapter 3, about using Pharo as an HTTP Client (chapter 4) and server (chapter 5), and about using WebSockets (chapter 6). In the third part we discuss the handling of data for the application. Firstly we treat data that is in the form of comma-separated values (CSV) in chapter 7. Secondly and thirdly, we treat JSON (chapter 8) and its Smalltalk counterpart STON (chapter 9). Fourthly, serialization and deserialization of object graphs with Fuel is treated in chapter 10. Lastly, we discuss the Voyage persistence framework and persisting to MongoDB databases in chapter 11. Part four deals with the presentation layer. Chapter 12 shows how to use Mustache templates in Pharo, and chapter 13 talks about programmatic generation of CSS files. The documentation of applications could be written in Pillar, which is presented in chapter 14. How to generate PDF files from the application with Artefact is shown in chapter 15. The fifth part deals with deploying the web application. This is explained in chapter 16 that talks not only about how to build and run the application, but also other important topics like monitoring."--Open Textbook Library.

Table of Contents
  • Illustrations
  • Simple Web applications
    • Teapot
      • Getting Started
        • Differences between Teapot and other Web Frameworks
      • A REST Example, Showing some CRUD Operations
      • Route
        • Parameters in URLs
        • Using Regular Expressions
        • How are Routes Matched?
        • Aborting
      • Transforming Output from Actions
        • Response Transformers
      • Before and After Filters
      • Error Handlers
      • Serving Static Files
      • Conclusion
    • Building and Deploying a Small Web application
      • Saying Hello World
        • Debugging our Web App
      • Serving an HTML Page With an Image
        • Serving an Image
      • Allowing Users to Upload an Image
      • Live Debugging
      • Image Magic
      • Adding Tests
      • Saving Code to a Repository
        • The Monticello Browser
        • Committing to SmalltalkHub
        • Defining a Project Configuration
      • Running a Real Cloud Server
        • Create a Droplet
        • Deploy for Production
      • Have Fun Extending this Web App
        • Hint 1
        • Hint 2
        • Hint 3
        • Solution, Part 1, New Methods
        • Solution, Part 2, Changed Methods
        • Solution, Part 3, Updated Configuration
      • Conclusion
  • HTTP
    • Character Encoding and Resource Meta Description
      • Character Encoding
        • Characters and Strings use Unicode Internally
        • Encoding and Decoding
        • Converting Strings and ByteArrays
        • Converting Streams
        • ByteStrings and WideStrings are Concrete Subclasses of String
        • ByteString and ByteArray Equivalence is an Implementation Detail
        • Beware of Bogus Conversions
        • Strict and Lenient Encoding
        • Available Encoders
      • Mime-Types
        • Creating Mime-Types
        • Working with Mime-Types
      • URLs
        • Creating URLs
        • External and Internal Representation of URLs
        • Relative URLs
        • Operations on URLs
        • Odds and Ends
    • Zinc HTTP: The Client Side
      • HTTP and Zinc
      • Doing a Simple Request
        • Basic Usage
        • Simplified HTTP Requests
      • HTTP Success ?
      • Dealing with Networking Reality
      • Building URL's
      • Submitting HTML Forms
      • Basic Authentication, Cookies and Sessions
      • PUT, POST, DELETE and other HTTP Methods
        • PUT and POST Methods
        • DELETE and other Methods
      • Reusing Network Connections, Redirect Following and Checking for Newer Data
        • ZnClient Lifecycle
        • Redirects
        • If-Modified-Since
      • Content-Types, Mime-Types and the Accept Header
      • Headers
      • Entities, Content Readers and Writers
      • Downloading, Uploading and Signalling Progress
      • Client Options, Policies and Proxies
      • Conclusion
    • Zinc HTTP: The Server Side
      • Running a Simple HTTP Server
      • Server Delegate, Testing and Debugging
        • The Default Server Delegate
        • Testing and Debugging
      • Server Authenticator
      • Logging
      • Server Variants and Life Cycle
      • Static File Server
      • Dispatching
      • Character Encoding
      • Resource Protection Limits, Content and Transfer Encoding
      • Seaside Adaptor
      • Scripting a REST Web Service with Zinc
        • The Server Code
        • Using the Server
        • A Zinc Client
      • Conclusion
    • WebSockets
      • An Introduction to WebSockets
      • The WebSocket Protocol
      • Source Code
      • Using Client Side WebSockets
      • Using Server-Side WebSockets
      • Building a Pharo Statistics Web Page
      • Building a Web Chat
      • A Quick Tour of Zinc WebSocket Implementation
      • Live Demo
      • Conclusion
  • Data
    • NeoCSV
      • NeoCSV
        • An Introduction to CSV
        • Hands On NeoCSV
      • Generic Mode
      • Customizing NeoCSVWriter
        • Writing Objects
      • Customizing NeoCSVReader
        • Ignoring Fields
        • Creating Objects
        • Reading many Objects
    • NeoJSON
      • An Introduction to JSON
      • NeoJSON
      • Primitives
      • Generic Mode
        • Reading from JSON
        • Writing to JSON
      • Schemas and Mappings
      • Emitting null Values
      • Conclusion
    • STON: a Smalltalk Object Notation
      • Introduction
        • STON Features and Limitations
        • Loading STON
        • Serializing and Materializing Objects
          • Serializing a Rectangle
          • Materializing a Rectangle
          • Serialization of Maps, Lists and Class Tags
          • A Large Example: an HTTP Response
      • How Values are Encoded
        • Primitive Values
          • Numbers
          • Strings
          • Symbols
          • Booleans
          • The UndefinedObject
        • Object Values
          • Lists
          • Maps
          • Objects
          • References
      • Custom Representations of Objects
        • Default Custom Representations
          • Time
          • Date
          • Date and Time
          • Point
          • ByteArray
          • Character
          • Associations
        • Creating a Custom Representation
      • Usage
        • Simple Reading and Writing
        • Supporting Comments
        • Configuring the Writer
        • Compatibility with JSON
      • Handling CR, LF inside Strings
      • Conclusion
      • Appendix: BNF
    • Serializing Complex Objects with Fuel
      • General Information
        • Goals
        • Installation and Demo
        • Some Links
      • Getting Started
        • Basic Examples
        • FileStream
        • Compression
        • Showing a Progress Bar
      • Managing Globals
        • Default Globals
        • Duplication of Custom Globals
        • Changing the Environment
      • Customizing the Graph
        • Ignoring Instance Variables
        • Post-Materialization Action
        • Substitution on Serialization
          • Dynamically
          • Statically
        • Substitution on Materialization
          • Global References
          • Hooking into Instance Creation
        • Not Serializable Objects
      • Errors
      • Object Migration
      • Fuel Format Migration
      • Built-in Header Support
      • Conclusion
    • Persisting Objects with Voyage
      • Setup
        • Load Voyage
        • Install MongoDB
        • Create A repository
        • Singleton Mode and Instance Mode
        • Voyage API
        • Resetting or Dropping the Database Connection
      • Storing Objects
        • Basic Storage
        • Embedding Objects
        • Referencing other Roots
        • Breaking Cycles in Graphs
        • Storing Instances of Date in Mongo
      • Enhancing Storage
        • Configuring Storage
        • Custom Loading and Saving of Attributes
        • A few Words Concerning the OID
      • Querying in Voyage
        • Basic Object Retrieval using Blocks or MongoQueries
          • Quering with Elements from another Root Document
          • Using the at: Message to Access Embedded Documents
          • Using the where: Message to Perform Javascript Comparisons
        • Using JSON Queries
          • Querying for an Object by OID
          • Using dot Notation to Access Embedded Documents
          • Expressing OR Conditions in the Query
          • Going Beyond MongoQueries Features
        • Executing a Query
          • Basic Object Retrieval
          • Limiting Object Retrieval and Sorting
          • A Simple Paginator Example
      • Creating and Removing Indexes
        • Creating Indexes by using OSProcess
        • Verifying the use of an Index
      • Conclusion
  • Presentation
    • Mustache Templates for Pharo
      • Getting Started
      • Tags as Variables
      • Sections
        • With the Variable Value being a 'simple' Object
        • With the Variable Value being a Collection
        • With the Variable Value being a Block
        • Inverted Sections
      • Partial templates
      • Miscellaneous
      • Templates made Easy
    • Cascading Style Sheets with RenoirSt
      • Getting Started
      • Defining the Rules
        • Basic CSS Types
          • Lengths, Angles, Times and Frequencies
          • Colors
          • Constants
          • Several Property Values
          • URLs
        • Comments
        • Functional Notation
          • Mathematical Expressions
          • Toggling Between Values
          • Attribute References
          • Gradients
          • Box Shadows
      • Defining the selectors
        • Type Selectors
        • Combinators
        • Attribute Selectors
        • Pseudo-Classes
          • Language Pseudo-Class:
          • Negation Pseudo-Class:
          • Structural Pseudo-Classes
        • Pseudo-Elements
      • Important Rules
      • Media Queries
      • Vendor-Specific Extensions
      • Font Face Rules
      • Interaction with other Frameworks and Libraries
        • Units
        • Seaside
    • Documenting and Presenting with Pillar
      • Introduction
        • Pillar Users
      • 5 Minutes Tutorial
        • Installing and Exporting your First Document
          • Changing the output folder
        • Configuring a Document
        • Exporting a Different Content Using a Template
        • Archetype - A Pillar skeleton maker
      • Writing Pillar Documents
        • Meta-Information
        • Chapters & Sections
        • Paragraphs and Framed Paragraphs
        • Lists
          • Unordered Lists
          • Ordered Lists
          • Definition Lists
          • List Nesting
        • Formatting
        • Tables
        • Links
          • Internal Links and Anchors
          • External Links
          • Semantic Links
        • Pictures
        • Scripts
          • Script with a Label or Caption
          • Syntax Highlighting
          • Script with Line Numbers
          • Script from an External File
          • Generate a Part of your Document with a Script
        • Structures
        • Raw
        • Annotations
          • InputFile Annotation
          • Footnotes Annotation
          • Citations
          • Slide Annotation
          • Columns
        • Preformatted (less used)
        • Commented Lines
        • Escaping Characters
      • Configuring your Output
        • Configuration File
        • Configuration Parameters
        • baseDirectory
        • configurations
        • defaultExporters
        • defaultScriptLanguage
        • disabledPhases
        • headingLevelOffset
        • inputFile
        • level1
        • level2
        • level3
        • level4
        • level5
        • metadata
        • newLine
        • outputDirectory
        • outputFile
        • outputType
        • renderStructureAsSlide
        • scrambledEmailAddresses
        • separateOutputFiles
        • slideInTemplateForDeckJS
        • verbose
      • Templating
      • Command-Line Interface
      • Pillar from Pharo
        • How to Create a Pillar Document
        • How to Export a Document
      • Conclusion
    • Generate PDF Documents with Artefact
      • Overview of Artefact
        • Concepts, Key Aspects and Limits
      • Getting Started in 10 Minutes
        • Installing Artefact
        • Executing the First Demo's
        • Finally 34Hello World!34
      • Document Definition
        • Page Addition
        • Document Properties
          • Document Format and Orientation
          • Compression
          • Controling Document Opening
        • Setting Meta Information
      • Pages, Formats and Models
        • Page Creation
        • Templates
      • Elements
        • Composing and Placement
          • Element Positioning
          • Element Size
        • Simple Elements
        • Text and Images
          • Geometric Shapes
        • Composite Elements
          • Advanced Text
          • Drawing Arrows
          • Report Creation
      • Stylesheets for Newbies
        • Stylesheet Elements
          • Fonts
          • Dots
          • Colors and Shades of Gray
          • Drawing Thickness
          • Alignment
        • Abstracting a Style
          • Stylesheet Application
      • Create your own PDF Composite Elements
        • Clock Creation
        • Make the Clock Personalizable
      • Conclusion
  • Deployment
    • Deploying a Pharo Web Application in Production
      • Where to Host your Application?
      • Which Operating System?
      • Build your Image
      • Run your Application
      • Dealing with Crashes
        • Monit Dashboard
        • Email Settings
        • Monitor System Services
        • Monit Configuration to Control a Pharo Application
        • Monit Configuration for a Pharo Web Application
      • Put an HTTP server in front of your web application
        • Apache
        • Nginx
      • Conclusion
    No review for this book yet, be the first to review.
      No comment for this book yet, be the first to comment
      You May Also Like