♥ Play Framework is an open-source web application framework for Java and Scala that follows the model-view-controller (MVC) architectural pattern. It supports dependency injection, routing, and asynchronous programming. Some key features include routing, controllers, database access using Slick, evolutions for database schema changes, and support for functional programming concepts like Option, Either, and Future.
This document discusses embracing HTTP and changing approaches to web application development. It suggests flipping dependencies so that applications are built around HTTP rather than frameworks. It also recommends taking a more stateful approach by going CQRS/ES rather than relying on CRUD and resources. The document questions common patterns and promotes thinking beyond frameworks to more fundamental concepts.
This document provides an overview of Scala-ActiveRecord, a type-safe Active Record model library for Scala. It discusses features such as being type-safe, having Rails ActiveRecord-like functionality, automatic transaction control, and support for associations and validations. The document also covers getting started, defining schemas, CRUD operations, queries, caching queries, validations, callbacks, and relationships.
Facebook uses caching at multiple levels to improve performance and scalability. Caching is implemented globally, with APC, Memcached, and browser caches. Memcached is used to cache user profiles, photos, friends lists, and other frequently accessed data. Caching is optimized through techniques like caching serialization formats, priming APC, and caching parsed user agent strings. Dirty caching ensures cached data is invalidated when the source data changes.
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディング
Xitrum is an asynchronous and clustered Scala web framework and HTTP server built on top of Netty and Akka. It is feature-rich, easy to use, and high performance. Xitrum can scale to a cluster of servers using Akka Cluster and Hazelcast. It is used in production systems in various countries. The document provides information on Xitrum's architecture, features, annotations, and examples of actions and SockJS messaging.
Immutable Deployments with AWS CloudFormation and AWS Lambda
This document describes an immutable infrastructure approach using AWS Lambda and CloudFormation. Key points:
- Infrastructure is defined as code using CloudFormation templates for reproducibility and versioning.
- Lambda functions are used to provision resources, configure settings, run tests, and clean up resources to enforce immutability.
- A pipeline handles building AMIs, deploying stacks, testing, updating DNS, and deleting old stacks in an automated and repeatable way.
The document summarizes the new features and improvements in CodeIgniter 3.0. Key highlights include increased number of commits compared to previous versions, improved database features like query builder and failover connections, new features like output minification and pagination improvements, and a focus on unit testing.
This document discusses techniques for improving caching performance at Facebook. It begins by explaining the benefits of caching for large sites and applications. It then describes the various caching layers Facebook uses, including globals caching, APC caching, memcached, and browser caching. It provides examples of how Facebook leverages these caches, such as caching parsed user agent strings, opcode caching with APC, and caching profile data in memcached. It also discusses challenges like cache invalidation between data centers and techniques for addressing them like caching proxies.
Gradle: The Build system you have been waiting for
Gradle is the build system you have been waiting for or maybe the build system that has been waiting for you. The adoption rate is incredible from being the new Google Android development tools build system to most new Java opensource projects to JavaScript based front-end and back-end projects.
This document discusses using Backbone, Backgrid, and Symfony to build a datagrid application. It covers:
1) Setting up requirements including Symfony, Backbone dependencies, and FOSRestBundle.
2) Building Backbone models, collections, and associations to retrieve and represent ticket data.
3) Implementing a Backgrid grid with columns to display the ticket data.
4) Examples of extending Backgrid with features like select editors, toggle cells, and computed fields.
5) Testing the Backbone collections and API endpoints with sample test code.
This document introduces the Flask micro web framework. It discusses that Flask provides URL routing, request and response objects, template engines and other features for web development. Flask is simple and extensible, using Werkzeug and Jinja2. It does not include an ORM or form validation, but supports extensions. The document provides examples of basic routing, using request objects, templates and the development server. It also discusses using SQLAlchemy, WTForms and common patterns like MVC with Flask projects.
This document discusses CodeIgniter PHP framework and web application security. It covers why frameworks are useful, CodeIgniter architecture and core components. It then focuses on common web security issues like exposed admin URLs, directory listings, error messages, temporary files and SQL injections. Methods to prevent each vulnerability are also provided, such as .htaccess rules, input validation and escaping. The document aims to help secure CodeIgniter applications and webservers.
Testing Web Applications with GEB provides concise summaries in 3 sentences or less:
GEB allows testing of web applications by driving browsers like Firefox using the Selenium WebDriver API. It integrates with jQuery-like content selection and supports features like page objects, modules, and JavaScript execution to simplify testing of Ajax applications. GEB uses Groovy for a more expressive and dynamic testing approach compared to other frameworks like Selenium.
This document discusses pragmatic browser automation using Geb. It introduces Geb and how it provides an elegant and expressive way to automate browsers using the power of WebDriver, jQuery style selector syntax, and page object modeling. Key features covered include navigating browsers, accessing and asserting page elements, using modules and page objects for organization, waiting capabilities, and integration with Spock for testing. Geb aims to provide the robustness of WebDriver with the simplicity of jQuery selectors and page objects for pragmatic browser automation.
The worst Ruby codes I’ve seen in my life - RubyKaigi 2015
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
“Use the right tool for the right job” is one of the first thing they teach you when you start out in these waters. I would make “Get to really know your tools” a second.
In this talk we’re going to work on the architecture of an app that showcases some common features/scenarios we all probably already have in the apps we’re working on: counters, leaderboards, queuing, timelines, caching. But this time we’ll implement them with Redis, making the apps much faster, your hardware (and you) much cooler, your boss (and the clients) much happier and hopefully your salary a bit higher.
Symfony is a PHP web framework that provides features like templating, caching, internationalization and MVC architecture out of the box. It uses the Model-View-Controller pattern and includes tools for scaffolding, routing, form generation and more. Symfony projects can be created via the command line and include an auto-generated directory structure for applications, modules and actions.
Going live with BommandBox and docker Into The Box 2018
This document discusses using CommandBox and Docker to deploy real projects. It covers background on the development workflow and environments, benefits of Docker and CommandBox, code cleanup tools like CFLint and git hooks, serving apps with CommandBox, server monitoring with Prometheus, dynamic configuration, caching, session storage, logging with Elasticsearch and Kibana, load balancing with Kubernetes, data changes, scheduled tasks, and canary/blue-green deployments. The overall message is that CommandBox and tools can provide structure and simplify transitions to help teams succeed in deploying applications.
Into The Box 2018 Going live with commandbox and docker
This document discusses using CommandBox and Docker to deploy real projects. It covers background on the development workflow and environments, benefits of Docker and CommandBox, code cleanup tools like CFLint and git hooks, serving apps with CommandBox, server monitoring with Prometheus, dynamic configuration, caching, session storage, logging with Elasticsearch and Kibana, load balancing with Kubernetes, data changes, scheduled tasks, and canary/blue-green deployments. The overall message is that CommandBox and tools can provide structure and simplify transitions to help teams succeed in deploying applications.
Slides from a presentation that David Lopez (@lopezator) and me made for the students of the University of the Basque Country (UPV/EHU) where we talk about current technologies and methodologies used in professional web development.
CSS3, jQuery, Composer, MVC, Clean Code, Git, etc. are different items we talked about.
Some examples shown in the presentation available at:
http://ojoven.es/labs/ehu2014/
This document discusses Go web development using the Gin web framework. It provides an overview of Gin's features and file structure conventions. It also describes using Orator ORM for database migrations in Go applications. Benchmark results show the json-iterator library provides better JSON performance than the standard encoding/json package in Go. The document concludes with recommendations for Nginx SSL and security header parameters.
Node.js vs Play Framework (with Japanese subtitles)
Video: http://www.nicovideo.jp/watch/1410857293
Here's the showdown you've been waiting for: Node.js vs Play Framework. Both are popular open source web frameworks that are built for developer productivity, asynchronous I/O, and the real time web. But which one is easier to learn, test, deploy, debug, and scale? Should you pick Javascript or Scala? The Google v8 engine or the JVM? NPM or Ivy? Grunt or SBT? Two frameworks enter, one framework leaves.
This version of the presentation has Japanese subtitles. For the English only version, see http://www.slideshare.net/brikis98/nodejs-vs-play-framework
Mathilde Lemée & Romain Maton
La théorie, c’est bien, la pratique … aussi !
Venez nous rejoindre pour découvrir les profondeurs de Node.js !
Nous nous servirons d’un exemple pratique pour vous permettre d’avoir une premiere experience complete autour de Node.js et de vous permettre de vous forger un avis sur ce serveur Javascript qui fait parler de lui !
http://soft-shake.ch/2011/conference/sessions/incubator/2011/09/01/hands-on-nodejs.html
Video: https://www.youtube.com/watch?v=b6yLwvNSDck
Here's the showdown you've been waiting for: Node.js vs Play Framework. Both are popular open source web frameworks that are built for developer productivity, asynchronous I/O, and the real time web. But which one is easier to learn, test, deploy, debug, and scale? Should you pick Javascript or Scala? The Google v8 engine or the JVM? NPM or Ivy? Grunt or SBT? Two frameworks enter, one framework leaves.
This is the English version of the presentation. For the version with Japanese subtitles, see http://www.slideshare.net/brikis98/nodejs-vs-play-framework-with-japanese-subtitles
This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.
This document provides an overview and introduction to Node.js. It discusses that Node.js is a platform for building scalable network applications using JavaScript and uses non-blocking I/O and event-driven architecture. It was created by Ryan Dahl in 2009 and uses Google's V8 JavaScript engine. Node.js allows building web servers, networking tools and real-time applications easily and efficiently by handling concurrent connections without threads. Some popular frameworks and modules built on Node.js are also mentioned such as Express.js, Socket.IO and over 1600 modules in the npm registry.
This document discusses ways to create lightweight Ruby solutions by simplifying frameworks and components. It suggests replacing ActiveRecord with the simpler and faster Sequel ORM. It also recommends using Zepto.js instead of jQuery for mobile apps, and Rack and Sinatra to build lightweight web apps instead of full Rails applications. Benchmarks show these lightweight approaches can significantly improve performance compared to default Rails. Tools mentioned that aid lightweight development include Pow for local web serving and rbenv for Ruby version management. The document concludes by reminding developers not to see Ruby as the only solution and to consider other languages like Erlang, Scala and C++ for certain problems.
Express is a web application framework for Node.js that provides a robust set of features for building web applications and APIs. It is designed for building scalable and fast web applications and services. Some key features include being built on Node.js for asynchronous and event-driven capabilities, a simple routing system and middleware support, and support for template engines and plugins.
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
This document discusses Netflix's API ecosystem built using Scala, Scalatra, and Swagger. It summarizes Netflix's use of these technologies to build APIs that power their consumer electronics partner portal and enable certification of Netflix ready devices. It describes how the APIs provide a single source of truth for all device data at Netflix and correlate streaming quality metrics. It then discusses aspects of the architecture including the manager layer containing business logic, HTTP layer for handling requests/responses, and use of Scala, Scalatra, Swagger, and deployment process including immutable infrastructure.
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
This document summarizes a presentation about serverless and mobile applications. It includes:
- An introduction focusing on startups, mobile apps, serverless computing, blockchain, and fintech.
- Details about AWS AppSync and its Todo data model.
- Information on request and response mapping templates in AWS Lambda.
- An overview of delta sync using AppSync, base queries, subscriptions, and delta queries.
- Notes on serverless technologies like AWS Lambda and its supported runtimes.
- Resources on serverless best practices and architectures using Lambda, API Gateway, and other AWS services.
Play 2.0 is a web framework for Java and Scala that is designed to be productive, asynchronous, and reactive. Some key features include being full stack, high-productive, asynchronous and reactive, stateless, HTTP-centric, typesafe, scalable, and open source. Play 2.0 aims to be fun and fast to develop with by enabling features like hot code reloading, browser error reporting, and easy deployment to platforms like Heroku. It also focuses on being asynchronous and reactive through support for WebSockets, Comet, HTTP streaming responses, and composable streams.
This document provides an agenda and overview of various Node.js concepts including the package manager NPM, web frameworks like Express, template engines like Jade and EJS, databases drivers for Redis and MongoDB, testing frameworks like Mocha and Nodeunit, avoiding callback hell using the async library, and debugging with Node Inspector. It discusses installing Node.js, creating HTTP servers, middleware, authentication, internationalization, and more.
This presentation shall address the web2py web framework, my favorite way to develop web apps.
web2py is a free, open-source web framework for agile development of secure database-driven web applications; it is written in Python and programmable in Python. web2py is a full-stack framework, meaning that it contains all the components you need to build fully functional web applications.
Ease of use is the primary goal for web2py. For us, this means reducing the learning and deployment time. This is why web2py is a full-stack framework without dependencies. It requires no installation and has no configuration files. Everything works out of the box, including a web server, database and a web-based IDE that gives access to all the main features.
I will show you why web2py can make you more productive by bringing the result of a reflection over the best ideas of the most popular MVC based web frameworks enforcing the best practices for a fast, scalable and secure web application with minimal effort. There will be a live demo where you can get a faster grasp on how does it work and how fun it can be.
For more: www.web2py.com
This document discusses embracing HTTP and changing approaches to web application development. It suggests flipping dependencies so that applications are built around HTTP rather than frameworks. It also recommends taking a more stateful approach by going CQRS/ES rather than relying on CRUD and resources. The document questions common patterns and promotes thinking beyond frameworks to more fundamental concepts.
This document provides an overview of Scala-ActiveRecord, a type-safe Active Record model library for Scala. It discusses features such as being type-safe, having Rails ActiveRecord-like functionality, automatic transaction control, and support for associations and validations. The document also covers getting started, defining schemas, CRUD operations, queries, caching queries, validations, callbacks, and relationships.
Facebook uses caching at multiple levels to improve performance and scalability. Caching is implemented globally, with APC, Memcached, and browser caches. Memcached is used to cache user profiles, photos, friends lists, and other frequently accessed data. Caching is optimized through techniques like caching serialization formats, priming APC, and caching parsed user agent strings. Dirty caching ensures cached data is invalidated when the source data changes.
Xitrum Web Framework Live Coding Demos / Xitrum Web Framework ライブコーディングscalaconfjp
Xitrum is an asynchronous and clustered Scala web framework and HTTP server built on top of Netty and Akka. It is feature-rich, easy to use, and high performance. Xitrum can scale to a cluster of servers using Akka Cluster and Hazelcast. It is used in production systems in various countries. The document provides information on Xitrum's architecture, features, annotations, and examples of actions and SockJS messaging.
Immutable Deployments with AWS CloudFormation and AWS LambdaAOE
This document describes an immutable infrastructure approach using AWS Lambda and CloudFormation. Key points:
- Infrastructure is defined as code using CloudFormation templates for reproducibility and versioning.
- Lambda functions are used to provision resources, configure settings, run tests, and clean up resources to enforce immutability.
- A pipeline handles building AMIs, deploying stacks, testing, updating DNS, and deleting old stacks in an automated and repeatable way.
The document summarizes the new features and improvements in CodeIgniter 3.0. Key highlights include increased number of commits compared to previous versions, improved database features like query builder and failover connections, new features like output minification and pagination improvements, and a focus on unit testing.
4069180 Caching Performance Lessons From Facebookguoqing75
This document discusses techniques for improving caching performance at Facebook. It begins by explaining the benefits of caching for large sites and applications. It then describes the various caching layers Facebook uses, including globals caching, APC caching, memcached, and browser caching. It provides examples of how Facebook leverages these caches, such as caching parsed user agent strings, opcode caching with APC, and caching profile data in memcached. It also discusses challenges like cache invalidation between data centers and techniques for addressing them like caching proxies.
Gradle is the build system you have been waiting for or maybe the build system that has been waiting for you. The adoption rate is incredible from being the new Google Android development tools build system to most new Java opensource projects to JavaScript based front-end and back-end projects.
Datagrids with Symfony 2, Backbone and Backgrideugenio pombi
This document discusses using Backbone, Backgrid, and Symfony to build a datagrid application. It covers:
1) Setting up requirements including Symfony, Backbone dependencies, and FOSRestBundle.
2) Building Backbone models, collections, and associations to retrieve and represent ticket data.
3) Implementing a Backgrid grid with columns to display the ticket data.
4) Examples of extending Backgrid with features like select editors, toggle cells, and computed fields.
5) Testing the Backbone collections and API endpoints with sample test code.
This document introduces the Flask micro web framework. It discusses that Flask provides URL routing, request and response objects, template engines and other features for web development. Flask is simple and extensible, using Werkzeug and Jinja2. It does not include an ORM or form validation, but supports extensions. The document provides examples of basic routing, using request objects, templates and the development server. It also discusses using SQLAlchemy, WTForms and common patterns like MVC with Flask projects.
You must know about CodeIgniter Popular LibraryBo-Yi Wu
This document discusses CodeIgniter PHP framework and web application security. It covers why frameworks are useful, CodeIgniter architecture and core components. It then focuses on common web security issues like exposed admin URLs, directory listings, error messages, temporary files and SQL injections. Methods to prevent each vulnerability are also provided, such as .htaccess rules, input validation and escaping. The document aims to help secure CodeIgniter applications and webservers.
Testing Web Applications with GEB provides concise summaries in 3 sentences or less:
GEB allows testing of web applications by driving browsers like Firefox using the Selenium WebDriver API. It integrates with jQuery-like content selection and supports features like page objects, modules, and JavaScript execution to simplify testing of Ajax applications. GEB uses Groovy for a more expressive and dynamic testing approach compared to other frameworks like Selenium.
Pragmatic Browser Automation with Geb - GIDS 2015Naresha K
This document discusses pragmatic browser automation using Geb. It introduces Geb and how it provides an elegant and expressive way to automate browsers using the power of WebDriver, jQuery style selector syntax, and page object modeling. Key features covered include navigating browsers, accessing and asserting page elements, using modules and page objects for organization, waiting capabilities, and integration with Spock for testing. Geb aims to provide the robustness of WebDriver with the simplicity of jQuery selectors and page objects for pragmatic browser automation.
Video presentation: https://www.youtube.com/watch?v=jLAFXQ1Av50
Most applications written in Ruby are great, but also exists evil code applying WOP techniques. There are many workarounds in several programming languages, but in Ruby, when it happens, the proportion is bigger. It's very easy to write Ruby code with collateral damage.
You will see a collection of bad Ruby codes, with a description of how these codes affected negatively their applications and the solutions to fix and avoid them. Long classes, coupling, misapplication of OO, illegible code, tangled flows, naming issues and other things you can ever imagine are examples what you'll get.
“Use the right tool for the right job” is one of the first thing they teach you when you start out in these waters. I would make “Get to really know your tools” a second.
In this talk we’re going to work on the architecture of an app that showcases some common features/scenarios we all probably already have in the apps we’re working on: counters, leaderboards, queuing, timelines, caching. But this time we’ll implement them with Redis, making the apps much faster, your hardware (and you) much cooler, your boss (and the clients) much happier and hopefully your salary a bit higher.
Symfony is a PHP web framework that provides features like templating, caching, internationalization and MVC architecture out of the box. It uses the Model-View-Controller pattern and includes tools for scaffolding, routing, form generation and more. Symfony projects can be created via the command line and include an auto-generated directory structure for applications, modules and actions.
This document discusses using CommandBox and Docker to deploy real projects. It covers background on the development workflow and environments, benefits of Docker and CommandBox, code cleanup tools like CFLint and git hooks, serving apps with CommandBox, server monitoring with Prometheus, dynamic configuration, caching, session storage, logging with Elasticsearch and Kibana, load balancing with Kubernetes, data changes, scheduled tasks, and canary/blue-green deployments. The overall message is that CommandBox and tools can provide structure and simplify transitions to help teams succeed in deploying applications.
This document discusses using CommandBox and Docker to deploy real projects. It covers background on the development workflow and environments, benefits of Docker and CommandBox, code cleanup tools like CFLint and git hooks, serving apps with CommandBox, server monitoring with Prometheus, dynamic configuration, caching, session storage, logging with Elasticsearch and Kibana, load balancing with Kubernetes, data changes, scheduled tasks, and canary/blue-green deployments. The overall message is that CommandBox and tools can provide structure and simplify transitions to help teams succeed in deploying applications.
Slides from a presentation that David Lopez (@lopezator) and me made for the students of the University of the Basque Country (UPV/EHU) where we talk about current technologies and methodologies used in professional web development.
CSS3, jQuery, Composer, MVC, Clean Code, Git, etc. are different items we talked about.
Some examples shown in the presentation available at:
http://ojoven.es/labs/ehu2014/
This document discusses Go web development using the Gin web framework. It provides an overview of Gin's features and file structure conventions. It also describes using Orator ORM for database migrations in Go applications. Benchmark results show the json-iterator library provides better JSON performance than the standard encoding/json package in Go. The document concludes with recommendations for Nginx SSL and security header parameters.
Node.js vs Play Framework (with Japanese subtitles)Yevgeniy Brikman
Video: http://www.nicovideo.jp/watch/1410857293
Here's the showdown you've been waiting for: Node.js vs Play Framework. Both are popular open source web frameworks that are built for developer productivity, asynchronous I/O, and the real time web. But which one is easier to learn, test, deploy, debug, and scale? Should you pick Javascript or Scala? The Google v8 engine or the JVM? NPM or Ivy? Grunt or SBT? Two frameworks enter, one framework leaves.
This version of the presentation has Japanese subtitles. For the English only version, see http://www.slideshare.net/brikis98/nodejs-vs-play-framework
Mathilde Lemée & Romain Maton
La théorie, c’est bien, la pratique … aussi !
Venez nous rejoindre pour découvrir les profondeurs de Node.js !
Nous nous servirons d’un exemple pratique pour vous permettre d’avoir une premiere experience complete autour de Node.js et de vous permettre de vous forger un avis sur ce serveur Javascript qui fait parler de lui !
http://soft-shake.ch/2011/conference/sessions/incubator/2011/09/01/hands-on-nodejs.html
Video: https://www.youtube.com/watch?v=b6yLwvNSDck
Here's the showdown you've been waiting for: Node.js vs Play Framework. Both are popular open source web frameworks that are built for developer productivity, asynchronous I/O, and the real time web. But which one is easier to learn, test, deploy, debug, and scale? Should you pick Javascript or Scala? The Google v8 engine or the JVM? NPM or Ivy? Grunt or SBT? Two frameworks enter, one framework leaves.
This is the English version of the presentation. For the version with Japanese subtitles, see http://www.slideshare.net/brikis98/nodejs-vs-play-framework-with-japanese-subtitles
This document provides an introduction and overview of a Node.js tutorial presented by Tom Hughes-Croucher. The tutorial covers topics such as building scalable server-side code with JavaScript using Node.js, debugging Node.js applications, using frameworks like Express.js, and best practices for deploying Node.js applications in production environments. The tutorial includes exercises for hands-on learning and demonstrates tools and techniques like Socket.io, clustering, error handling and using Redis with Node.js applications.
This document provides an overview and introduction to Node.js. It discusses that Node.js is a platform for building scalable network applications using JavaScript and uses non-blocking I/O and event-driven architecture. It was created by Ryan Dahl in 2009 and uses Google's V8 JavaScript engine. Node.js allows building web servers, networking tools and real-time applications easily and efficiently by handling concurrent connections without threads. Some popular frameworks and modules built on Node.js are also mentioned such as Express.js, Socket.IO and over 1600 modules in the npm registry.
This document discusses ways to create lightweight Ruby solutions by simplifying frameworks and components. It suggests replacing ActiveRecord with the simpler and faster Sequel ORM. It also recommends using Zepto.js instead of jQuery for mobile apps, and Rack and Sinatra to build lightweight web apps instead of full Rails applications. Benchmarks show these lightweight approaches can significantly improve performance compared to default Rails. Tools mentioned that aid lightweight development include Pow for local web serving and rbenv for Ruby version management. The document concludes by reminding developers not to see Ruby as the only solution and to consider other languages like Erlang, Scala and C++ for certain problems.
Express is a web application framework for Node.js that provides a robust set of features for building web applications and APIs. It is designed for building scalable and fast web applications and services. Some key features include being built on Node.js for asynchronous and event-driven capabilities, a simple routing system and middleware support, and support for template engines and plugins.
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixManish Pandit
This document discusses Netflix's API ecosystem built using Scala, Scalatra, and Swagger. It summarizes Netflix's use of these technologies to build APIs that power their consumer electronics partner portal and enable certification of Netflix ready devices. It describes how the APIs provide a single source of truth for all device data at Netflix and correlate streaming quality metrics. It then discusses aspects of the architecture including the manager layer containing business logic, HTTP layer for handling requests/responses, and use of Scala, Scalatra, Swagger, and deployment process including immutable infrastructure.
This document summarizes a presentation about serverless and mobile applications. It includes:
- An introduction focusing on startups, mobile apps, serverless computing, blockchain, and fintech.
- Details about AWS AppSync and its Todo data model.
- Information on request and response mapping templates in AWS Lambda.
- An overview of delta sync using AppSync, base queries, subscriptions, and delta queries.
- Notes on serverless technologies like AWS Lambda and its supported runtimes.
- Resources on serverless best practices and architectures using Lambda, API Gateway, and other AWS services.
Node.js is an asynchronous JavaScript runtime that allows for efficient handling of I/O operations. The presentation discusses developing with Node.js by using modules from NPM, debugging with node-inspector, common pitfalls like blocking loops, and best practices like avoiding large heaps and offloading intensive tasks. Key Node.js modules demonstrated include Express for web frameworks and Socket.io for real-time applications.
The document introduces the Play Framework version 2.1 and highlights its key features. It demonstrates building a sample application in Scala using Play's reactive, non-blocking architecture. Key features discussed include Play's built-in support for Scala, reactive programming, JSON APIs, routing, templates, and testing.
The document provides an overview of front-end technologies including HTML, CSS, JavaScript, Ajax and jQuery. It discusses how the front-end interacts with the user's browser and backend servers. It describes the roles of HTML, CSS and JavaScript in content, styles and behaviors. It then covers HTML tags and structures, CSS, JavaScript basics and its use in browsers with BOM and DOM APIs. The document also summarizes Ajax and how it enables asynchronous JavaScript requests, and introduces jQuery and how it simplifies DOM and Ajax operations.
Sprockets is an easy solution to managing large JavaScript codebases by letting you structure it, bundle it with related assets, and consolidate it as one single file, with pre-baked command-line tooling, CGI front and Rails plugin. It's a framework-agnostic open-source solution that makes for great serving performance while helping you structure and manage your codebase better.
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...BradNeuberg
This document discusses persistent storage options for web applications beyond cookies. It describes name/value storage, databases, static files, and how HTML5 specifications like localStorage, sessionStorage, databases, and the application cache provide similar persistent storage capabilities to older technologies like Gears and Flash. Use cases, code examples, and browser support are provided for each HTML5 storage mechanism.
These slides were presented on a Software Craftsmanship meetup @ EPAM Hungary on 26 January, 2017.
During the talk we went through the evolution of structured data analytics in Spark. We compared the RDD, the SparkSQL (DataFrame) and the DataSet APIs. We used the very latest and greatest Spark 2.1, released on December 28, went through code samples and dove deep into Spark optimizations. The code samples can be downloaded from here: https://github.com/symat/spark-api-comparison
Similar to FP - Découverte de Play Framework Scala (20)
Response & Safe AI at Summer School of AI at IIITHIIIT Hyderabad
Talk covering Guardrails , Jailbreak, What is an alignment problem? RLHF, EU AI Act, Machine & Graph unlearning, Bias, Inconsistency, Probing, Interpretability, Bias
Development of Chatbot Using AI/ML Technologiesmaisnampibarel
The rapid advancements in artificial intelligence and natural language processing have significantly transformed human-computer interactions. This thesis presents the design, development, and evaluation of an intelligent chatbot capable of engaging in natural and meaningful conversations with users. The chatbot leverages state-of-the-art deep learning techniques, including transformer-based architectures, to understand and generate human-like responses.
Key contributions of this research include the implementation of a context- aware conversational model that can maintain coherent dialogue over extended interactions. The chatbot's performance is evaluated through both automated metrics and user studies, demonstrating its effectiveness in various applications such as customer service, mental health support, and educational assistance. Additionally, ethical considerations and potential biases in chatbot responses are examined to ensure the responsible deployment of this technology.
The findings of this thesis highlight the potential of intelligent chatbots to enhance user experience and provide valuable insights for future developments in conversational AI.
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionBert Blevins
Cybersecurity breaches are a growing threat in today’s interconnected digital landscape, affecting individuals, businesses, and governments alike. These breaches compromise sensitive information and erode trust in online services and systems. Understanding the causes, consequences, and prevention strategies of cybersecurity breaches is crucial to protect against these pervasive risks.
Cybersecurity breaches refer to unauthorized access, manipulation, or destruction of digital information or systems. They can occur through various means such as malware, phishing attacks, insider threats, and vulnerabilities in software or hardware. Once a breach happens, cybercriminals can exploit the compromised data for financial gain, espionage, or sabotage. Causes of breaches include software and hardware vulnerabilities, phishing attacks, insider threats, weak passwords, and a lack of security awareness.
The consequences of cybersecurity breaches are severe. Financial loss is a significant impact, as organizations face theft of funds, legal fees, and repair costs. Breaches also damage reputations, leading to a loss of trust among customers, partners, and stakeholders. Regulatory penalties are another consequence, with hefty fines imposed for non-compliance with data protection regulations. Intellectual property theft undermines innovation and competitiveness, while disruptions of critical services like healthcare and utilities impact public safety and well-being.
Social media management system project report.pdfKamal Acharya
The project "Social Media Platform in Object-Oriented Modeling" aims to design
and model a robust and scalable social media platform using object-oriented
modeling principles. In the age of digital communication, social media platforms
have become indispensable for connecting people, sharing content, and fostering
online communities. However, their complex nature requires meticulous planning
and organization.This project addresses the challenge of creating a feature-rich and
user-friendly social media platform by applying key object-oriented modeling
concepts. It entails the identification and definition of essential objects such as
"User," "Post," "Comment," and "Notification," each encapsulating specific
attributes and behaviors. Relationships between these objects, such as friendships,
content interactions, and notifications, are meticulously established.The project
emphasizes encapsulation to maintain data integrity, inheritance for shared behaviors
among objects, and polymorphism for flexible content handling. Use case diagrams
depict user interactions, while sequence diagrams showcase the flow of interactions
during critical scenarios. Class diagrams provide an overarching view of the system's
architecture, including classes, attributes, and methods .By undertaking this project,
we aim to create a modular, maintainable, and user-centric social media platform that
adheres to best practices in object-oriented modeling. Such a platform will offer users
a seamless and secure online social experience while facilitating future enhancements
and adaptability to changing user needs.
In May 2024, globally renowned natural diamond crafting company Shree Ramkrishna Exports Pvt. Ltd. (SRK) became the first company in the world to achieve GNFZ’s final net zero certification for existing buildings, for its two two flagship crafting facilities SRK House and SRK Empire. Initially targeting 2030 to reach net zero, SRK joined forces with the Global Network for Zero (GNFZ) to accelerate its target to 2024 — a trailblazing achievement toward emissions elimination.
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...IJAEMSJORNAL
This study aimed to profile the coffee shops in Talavera, Nueva Ecija, to develop a standardized checklist for aspiring entrepreneurs. The researchers surveyed 10 coffee shop owners in the municipality of Talavera. Through surveys, the researchers delved into the Owner's Demographic, Business details, Financial Requirements, and other requirements needed to consider starting up a coffee shop. Furthermore, through accurate analysis, the data obtained from the coffee shop owners are arranged to derive key insights. By analyzing this data, the study identifies best practices associated with start-up coffee shops’ profitability in Talavera. These findings were translated into a standardized checklist outlining essential procedures including the lists of equipment needed, financial requirements, and the Traditional and Social Media Marketing techniques. This standardized checklist served as a valuable tool for aspiring and existing coffee shop owners in Talavera, streamlining operations, ensuring consistency, and contributing to business success.
2. Play Framework Nul ne sait qui nous sommes
Mélanie 2 janvier 2017
Kévin 4 décembre 2017
Développeurs Back-End
3. Play Framework Shh .. we have a plan !
La philosophie, le créateur, l’histoire
La structure d'un projet
Les configurations
Le cheminement d’une requête HTTP
Le routing
Les contrôleurs
La couche DAO avec Slick
Les tests
+ Bonus Où retrouve-t-on les
éléments du langage fonctionnel
chers à nos 💓 ?
Option / Either / Future
4. Play Framework Révisons sinon c’est la session 2
● Option
● Either
● Future
Option[T]
Some[T] None
Either[A, B]
Left[A, B] Right[A, B]
Future
6. Play Framework C’est quoi les bails ?
2007: Guillaume Bort (Zengularity SA → Fabernovel Technologies)
Play 1.0: Mai 2008 - Octobre 2009
Play 2.0: Fin 2011 - Mars 2012 (+Sadek Drobi)
Play 2.5: Mars 2016 - Akka Streams
Play 2.6: 23 Juin 2017 - Akka HTTP serveur backend par défaut + Scala 2.12 [...]
Stateless Scala I/O asynchrones
8. Play Framework Les configurations
sbt
● Outil de build
● Ajout des librairies, configuration version Scala/SBT, ajout de tâches
> run
> compile
> test
> test-only maClasseDeTesterCestDouter.scala
> testQuick <mesTestsUnitairesTasVu>
> doc
9. Play Framework Les configurations
/build.sbt
import Dependencies._
name := """poc-play"""
organization := "com.mrgueritte"
version := "1.0-SNAPSHOT"
scalaVersion := "2.12.6"
lazy val root = (project in file(".")).enablePlugins(PlayScala)
libraryDependencies += "com.typesafe.play" %% "play-slick-evolutions"
% "3.0.3"
resolvers += Repositories.sonatypeOss
10. Play Framework Les configurations
application.conf
● Paramétrage divers : BD, Filtres, Taille buffers ...
● Format clé-valeur, HOCON
● Système héritage application.conf -> production.conf
● Injecté automatiquement dans le paramétrage de Play
● Possibilité de le charger en custom
11. Play Framework Les configurations
# Database configuration
# ~~~~~
include "db.conf"
# Evolutions
# ~~~~~
play.evolutions.db.default.autoApply=true
play.evolutions.db.default.autoApplyDowns=true
# Authentication
# ~~~~~
http.secure = false
13. Play Framework Painless HTTP Routing
Route = HTTP Verb + URI → Controller Method
# Routes
# This files defines all application routes (Higher priority routes first)
# https://www.playframwork.com/documentation/latest/ScalaRouting
# ~~~~
GET /api/cat/:id controllers.CatsController.get(id: CatId)
-> / order.Routes
-> / owner.Routes
14. Play Framework Les routeurs exemples
GET /clients/:id controllers.Clients.show(id: Long)
GET /api/list-all controllers.Api.list(version: Option[String])
GET /items/$id<[0-9]+> controllers.Items.show(id: Long)
GET / controllers.Application.show(page = "home")
GET /:page controllers.Application.show(page)
GET /clients controllers.Clients.list(page: Int ?= 1)
GET /api/cat/:id controllers.CatsController.get(id: CatId) ?
18. Play Framework Dans les contrôleurs y a de l’action
play.api.mvc.Request =>
play.api.mvc.Result
val echo = Action { request =>
Ok(s"Got request [$request]")
}
19. Play Framework Dans les contrôleurs y a de l’action
Action { Ok("Hello world") }
def hello(name: String) = Action {
Ok("Hello " + name)
}
def echo = Action { request =>
Ok("Got request [" + request + "]")
}
def createHouse() = Action(parse.json[House]) {request =>
Ok(request.body)//House
}
20. Play Framework Dans les contrôleurs y a de l’action
def createHouseAsync = Action().async { request =>
for {
design <- getPlans()
wood <- getMaterial()
} yield Ok(Json.obj("House plans" -> design, "material" -> wood))
}
21. Play Framework Authentification
Support pour OAuth2
Guest
Member
OrganizationMember.(Read)
PlatformAdmin
Api(Scope)
[...]
def list() = OrganizationMember(READ)("cats.list").async { implicit request =>
catsService
.listByOrganization(request.organizationId)
.map(Ok(_))
}
=> Future[Result]
22. Play Framework Les resultats c’est pas du bois
Ok("Hello World!")
→ Content-Type header to text/plain
Ok(<message>Hello World!</message>)
→ application/xml
Ok(<h1>Hello World!</h1>)
→ application/html
Ok(Json.obj(”foo” -> “bar”)) -> application/json
val result = Ok("Hello World!").withHeaders(
CACHE_CONTROL -> "max-age=3600",
ETAG -> "xx")
28. Play Framework Les requêtes : “tout est
collection”> SELECT * FROM cats WHERE id = ?
override def getById(id: CatId): DBIO[Option[Cat]] = Schemas.cats.filter(_.id === id).headOption
> INSERT INTO cats VALUES (?,?,? …)
override def create(cat: Cat): DBIO[Unit] = Schemas.cats += cat
> SELECT c.* FROM pedigrees p JOIN cat c ON c.pedigreeId = p.id WHERE p.name = ?
override def getByPedigreeName(name: String): DBIO[Seq[Cat]] = {
for {
cat <- Schemas.cats
pedigree <- Schemas.pedigrees
if pedigree.id === cat.pedigreeId && pedigree.pedigree === name
} yield cat
}
29. Play Framework Les DBIO
override def getByPedigreeName(name: String): Future[Seq[Cat]] = {
val transaction = (for {
cat <- catsDAO.getByPedigreeName(name)
_ <- DBIO.seq(cat.map(c => catsDAO.delete(c.catId)): _*)
} yield cat).transactionally
db.run(transaction)
}
> Les compositions de requêtes & les transactions
30. Play Framework Les évolutions
● Situé dans le dossier /conf/evolutions/<dbName>/
● Chaque script est composé de deux parties :
○ Ups! : SQL d’évolution de la BD (INSERT, CREATE …)
○ Downs! : Retour arrière de l’évolution (DROP, ALTER …)
● Une table `play_evolutions` est créée sur la DB => versionnage
# --- !Ups
CREATE TABLE pedigrees(
id UUID NOT NULL,
name VARCHAR(32) NOT NULL
);
…
# --- !Downs
DROP TABLE cats;
DROP TABLE owners;
DROP TABLE pedigrees;
31. Play Framework Les évolutions, “j’ai tout casséhéhé”
● Modification du script en question
● Marquer le script comme résolu => Application du `!Downs` puis du `!Ups`
32. Play Framework Injections de dépendances
● Guice est embarqué => utilisation à spécifier build.sbt
● Auto-gestion des dépendances avec @Inject() (java !)
● Runtime
“Use another compile time dependency injection!”
33. Play Framework Injections de dépendances
ApplicationLoader
● Point entrée unique facilement customisable => `application.conf`
● Chargement de toutes les “parties” de l’application => `Components`
class PocPlayApplicationLoader extends ApplicationLoader {
override def load(context: Context): Application = {
new PocPlayComponents(context).application
}
}
play.application.loader= "di.PocPlayApplicationLoader"
34. Play Framework Injections de dépendances
Components
class PocPlayComponents(context: Context) extends
BuiltInComponentsFromContext(context)
with HttpFiltersComponents // Add defaults HTTP Filters
with SlickComponents // Add Slick API (connect play to database)
with EvolutionsComponents { // Add Evolutions system
override lazy val dbApi: DBApi = SlickDBApi(slickApi)
applicationEvolutions.start()
...
}
35. PlayFramework On a parcouru le chemin, on a tenu la distance
class CatsController( catsService: CatsService [...]
def buy(catId: CatId, ownerId: OwnerId) = Action.async { implicit request =>
catsService.buy(catId, ownerId)[...] }
class CatsServiceImpl( catsDAO: CatsDAO, db: DbExecutor [...]
override def buy(catId: CatId, ownerId: OwnerId): Future[Either[ApiError, Void]] =
[...] db.run(catsDAO.updateOwner(catId, ownerId)) [...]
case class CatsDAOSlick()(implicit ec: ExecutionContext) extends CatsDAO {
override def updateOwner(catId: CatId, ownerId: OwnerId): DBIO[Void] = [...]
36. Play Framework Injections de dépendances
Components - Add dependency injection with macwire
class PocPlayComponents(context: Context) extends
BuiltInComponentsFromContext(context)
with HttpFiltersComponents // Add defaults HTTP Filters
with SlickComponents // Add Slick API (connect play to database)
with EvolutionsComponents { // Add Evolutions system
...
lazy val db: DbExecutor =
slickApi.dbConfig[JdbcProfile](DbName("default")).db
lazy val catsDAO: CatsDAO = new CatsDAOSlick()
lazy val catsService: CatsService = wire[CatsServiceImpl]
lazy val catsController: CatsController = wire[CatsController]
}
37. Play Framework Tests
Scala Test - Flat Spec et d’autres WordSpec/FreeSpec etc.
class HelloWorldSpec extends Specification {
"The 'Hello world' string" should {
"contain 11 characters" in {
"Hello world" must have size(11)
}
"start with 'Hello'" in {
"Hello world" must startWith('Hello')
}
}
}
[info] HelloWorldSpec:
[info] The 'Hello world' string
[info] - should contain 11 characters
[info] - should start with 'Hello'
[info] ScalaTest
[info] Run completed in 2 seconds, 888 milliseconds.
[info] Total number of tests run: 2
[info] Suites: completed 1, aborted 0
[info] Tests: succeeded 2, failed 0, canceled 0,
ignored 0, pending 0
[info] All tests passed.
[info] Passed: Total 2, Failed 0, Errors 0, Passed 2
[success] Total time: 5 s, completed 3 juin 2018
22:13:54
38. Play Framework Tests
Mock API’s
import play.api.test.Helpers._
class CatsApiSpec extends PocPlayOneAppPerSuite {
…
def createCatApi(body: JsValue) = FakeRequest("POST", "/api/cats").withBody(body)
"Cats API" must {
"have a valid endpoint `create cat API`" in {
...
val Some(response) = route(app, createCatApi(catsBody))
status(response) == CREATED
val json = contentAsJson(response)
...
}
}
}
39. Play Framework Tests
Mock context
trait PocPlayOneAppPerSuite extends PlaySpec with GuiceOneAppPerSuite { self =>
override lazy val app = {
val context = ApplicationLoader.createContext(new Environment(new java.io.File("."),
ApplicationLoader.getClass.getClassLoader, Mode.Test))
new TestComponents(context).application
}
}
class TestComponents(context: Context) extends PocPlayComponents(context: Context) {
override lazy val configuration = {
val databseConfig = ConfigFactory.parseString(
"""slick.dbs.default.db.url = <database test>""".stripMargin)
context.initialConfiguration.copy(underlying = databseConfig)
}
}
40. Play Framework Fun with tests
Property-based testing - Scala Check
def catJsonGenerator: Gen[JsObject] = {
for {
name <- Gen.alphaStr.suchThat(_.size < 32)
gender <- Gen.oneOf(const(Gender.Female), const(Gender.Male))
pedigreeId <- const(PedigreeId(UUID.fromString("cc58095b-8d51-4a22-a110-7ace2d921c2c")))
ownerId <- option(const(OwnerId(UUID.fromString("76065e7d-8604-4995-a6ed-33fca30517aa"))))
dateOfBirth <- const(DateTime.now())
} yield buildCatJson(name, gender, pedigreeId, ownerId, dateOfBirth, None)
}
"have a valid endpoint `create cat API`" in {
check {
Prop.forAll(catJsonGenerator) { catsBody: JsObject =>
val Some(response) = route(app, createCatApi(catsBody))
status(response) == CREATED
}
}
}
42. Play Framework Merci d’être là, super sympa
https://github.com/kevin-margueritte/poc-playframework
Des questions ?
Vous êtes sûrs ? On va être coupés, y a un tunnel.
Editor's Notes
Support code -> https://github.com/kevin-margueritte/poc-playframework