O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Spring Essentials

Book Description

Learn to build interactive and efficient applications by leveraging 24 effective cognitive services APIs powered by Microsoft

About This Book

  • Explore the capabilities of 24 of the APIs released as part of the Cognitive Services platform
  • Build intelligent apps that combine the power of computer vision, speech recognition, and language processing
  • Give your apps human-like cognitive intelligence with this hands-on guide

Who This Book Is For

.NET developers who want to add AI capabilities to their applications will find this book useful. No knowledge of machine learning or AI is necessary to work through this book.

What You Will Learn

  • Identify a person through visual inspection and audio
  • Reduce user effort by utilizing AI-like capabilities
  • Understand how to analyze images and text in different ways
  • Find out how to analyze images using Vision APIs
  • Add video analysis to applications using Vision APIs
  • Utilize Search to find anything you want
  • Analyze text to extract information and explore text structure

In Detail

Microsoft has revamped its Project Oxford to launch the all new Cognitive Services platform-a set of 30 APIs to add speech, vision, language, and knowledge capabilities to apps.

This book will introduce you to 24 of the APIs released as part of Cognitive Services platform and show you how to leverage their capabilities. More importantly, you'll see how the power of these APIs can be combined to build real-world apps that have cognitive capabilities. The book is split into three sections: computer vision, speech recognition and language processing, and knowledge and search.

You will be taken through the vision APIs at first as this is very visual, and not too complex. The next part revolves around speech and language, which are somewhat connected. The last part is about adding real-world intelligence to apps by connecting them to Knowledge and Search APIs.

By the end of this book, you will be in a position to understand what Microsoft Cognitive Service can offer and how to use the different APIs.

Style and approach

This book takes you through essential API capabilities and shows how to utilize them to suit the needs of your application.

Table of Contents

  1. Spring Essentials
    1. Table of Contents
    2. Spring Essentials
    3. Credits
    4. About the Authors
    5. About the Reviewer
    6. www.PacktPub.com
      1. eBooks, discount offers, and more
        1. Why subscribe?
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Downloading the color images of this book
        3. Errata
        4. Piracy
        5. Questions
    8. 1. Getting Started with Spring Core
      1. The Spring landscape
        1. The Spring Framework modules
        2. Spring Tool Suite (STS)
        3. Spring subprojects
      2. Design concepts behind Spring Framework
      3. Setting up the development environment
      4. Your first Spring application
        1. Inversion of Control explained
      5. Dependency Injection
        1. The Spring IoC container
        2. Configuration metadata
          1. XML-based configuration metadata
          2. Annotation-based configuration metadata
          3. XML-based versus annotation-based configuration
          4. Component stereotype annotations
          5. Java-based configuration metadata
          6. JSR 330 standard annotations
      6. Beans in detail
        1. Bean definition
        2. Instantiating beans
          1. With constructors
          2. With a static factory-method
          3. With an instance factory-method
        3. Injecting bean dependencies
          1. Constructor-based Dependency Injection
          2. Setter-based Dependency Injection
        4. Constructor-based or setter-based DI – which is better?
        5. Cleaner bean definitions with namespace shortcuts
        6. Wiring a List as a dependency
        7. Wiring a Map as a dependency
        8. Autowiring dependencies
        9. Bean scoping
        10. Dependency Injection with scoped beans
        11. Creating a custom scope
      7. Hooking to bean life cycles
        1. Implementing InitializingBean and DisposableBean
        2. Annotating @PostConstruct and @PreDestroy on @Components
        3. The init-method and destroy-method attributes of <bean/>
      8. Container-level default-init-method and default-destroy-method
      9. Working with bean definition profiles
      10. Injecting properties into the Spring environment
      11. Externalizing properties with PropertyPlaceholderConfigurer
      12. Handling resources
      13. Spring Expression Language
        1. SpEL features
        2. SpEL annotation support
        3. The SpEL API
      14. Aspect Oriented Programming
        1. Static and dynamic AOP
        2. AOP concepts and terminology
        3. Spring AOP – definition and configuration styles
        4. XML schema-based AOP
        5. @AspectJ annotation-based AOP
        6. Declaring an @Aspect annotation
          1. Pointcuts
            1. Pointcut designators
            2. Pointcut examples
          2. Advices
            1. The @Around Advice
            2. Accessing Advice parameters
      15. Testing with Spring
        1. Mock objects
        2. Unit and integration testing utilities
      16. Summary
    9. 2. Building the Web Layer with Spring Web MVC
      1. Features of Spring MVC
      2. The Model-View-Controller pattern
      3. Your first Spring MVC application
      4. Setting up a Spring MVC application
        1. The project structure of a Spring MVC application
        2. The web.xml file – Springifying the web app
        3. ApplicationContext files in a Spring MVC application
        4. HomeController – @Controller for the home screen
        5. The home.jsp file – the landing screen
        6. Handling incoming requests
      5. The architecture and components of Spring MVC
      6. DispatcherServlet explained
        1. WebApplicationContext – ApplicationContext for the Web
        2. Beans supporting DispatcherServlet and their roles
      7. Controllers in detail
        1. Mapping request URLs with @RequestMapping
        2. URI template patterns with the @PathVariable annotation
        3. Binding parameters with the @RequestParam annotation
        4. Request handler method arguments
        5. Request handler method return types
        6. Setting Model attributes
        7. Building RESTful services for JSON and XML media
        8. Building a RESTful service with RestController
      8. Asynchronous request processing in Spring MVC
      9. Working with views
        1. Resolving views
        2. Resolving JSP views
        3. Binding Model attributes in JSP pages using JSTL
      10. Spring and Spring form tag libraries
      11. Composing a form in JSP
      12. Validating forms
      13. Handling file uploads
      14. Resolving Thymeleaf views
      15. More view technologies
      16. Summary
    10. 3. Accessing Data with Spring
      1. Configuring DataSource
      2. Using embedded databases
      3. Handling exceptions in the Spring Data layer
      4. DAO support and @Repository annotation
      5. Spring JDBC abstraction
        1. JdbcTemplate
          1. NamedParameterJdbcTemplate
        2. SimpleJdbc classes
        3. JDBC operations with Sql* classes
      6. Spring Data
        1. Spring Data Commons
        2. Spring Data repository specification
          1. Spring Data JPA
          2. Enabling Spring Data JPA
          3. JpaRepository
        3. Spring Data MongoDB
          1. Enabling Spring Data MongoDB
          2. MongoRepository
        4. Domain objects and entities
          1. Query resolution methods
          2. Using the @Query annotation
          3. Spring Data web support extensions
          4. Auditing with Spring Data
      7. Spring Transaction support
      8. Relevance of Spring Transaction
        1. Spring Transaction fundamentals
        2. Declarative transaction management
          1. Transactional modes – proxy and AspectJ
          2. Defining transactional behavior
          3. Setting rollback rules
        3. Using the @Transactional annotation
          1. Enabling transaction management for @Transactional
        4. Programmatic transaction management
      9. Summary
    11. 4. Understanding WebSocket
      1. Creating a simple WebSocket application
      2. STOMP over WebSocket and the fallback option in Spring 4
      3. Broadcasting a message to a single user in a WebSocket application
      4. Summary
    12. 5. Securing Your Applications
      1. Authentication
      2. Authorization
        1. The OAuth2 Authorization Framework
      3. Summary
    13. 6. Building a Single-Page Spring Application
      1. The motivations behind SPAs
      2. SPAs explained
        1. The architectural benefits of SPAs
        2. SPA frameworks
      3. Introducing Ember.js
      4. The anatomy of an Ember application
        1. Routers
        2. Routes or route handlers
        3. Templates
        4. Components
        5. Models
        6. Controllers
        7. Input helpers
        8. Custom helpers
        9. Initializers
        10. Services
      5. Working with Ember CLI
        1. Setting up Ember CLI
        2. Getting started with Ember CLI commands
        3. The Ember project structure
        4. Working with the POD structure
      6. Understanding the Ember object model
        1. Declaring types (classes) and instances
        2. Accessing and mutating properties
        3. Computed properties
        4. Property observers
      7. Working with collections
      8. Building UI templates using Handlebars
        1. Handlebars helpers
        2. Data binding with input helpers
        3. Using control flow helpers in Handlebars
        4. Using event helpers
      9. Handling routes
      10. Handling UI behavior using components
        1. Building a ToggleButton component step by step
      11. Persisting data with Ember Data
        1. Ember Data architecture
        2. Defining models
        3. Defining model relationships
      12. Building a Taskify application
      13. Building the API server app
        1. Setting up and configuring the project
        2. Defining the model definitions – User and Task
        3. Building API endpoints for the Taskify app
          1. UserController.java
          2. TaskController.java
      14. Building the Taskify Ember app
        1. Setting up Taskify as an Ember CLI project
        2. Setting up Ember Data
        3. Configuring application routes
        4. Building the home screen
        5. Building the user screen
        6. Building a custom helper
        7. Adding action handlers
        8. Building a custom component – modal window
          1. Building userEditModal using {{modal-window}}
        9. Building the task screen
      15. Summary
    14. 7. Integrating with Other Web Frameworks
      1. Spring's JSF integration
      2. Spring's Struts integration
      3. Summary
    15. Index