The presentation is based on the book 「Two scoops of Django : Best Practices for Django 1.5」by Daniel Greenfeld and Audrey Roy.
- REST (Representational State Transfer) uses HTTP requests to transfer representations of resources between clients and servers. The format of the representation is determined by the content-type header and the interaction with the resource is determined by the HTTP verb used. - The four main HTTP verbs are GET, PUT, DELETE, and POST. GET retrieves a representation of the resource and is safe, while PUT, DELETE, and POST can modify the resource's state in atomic operations. - Resources are abstract concepts acted upon by HTTP requests, while representations are the actual data transmitted in responses. The representation may or may not accurately reflect the resource's current state.
Slides for presentation C002 | jQuery for beginners in Sumofyou Technologies
The document discusses client-side JavaScript and DOM (Document Object Model) manipulation. It covers the window object, DOM programming interface, DOM element types like Node and HTML Element. Methods for accessing elements like getElementById(), getElementsByName(), and querySelector() are explained. Working with element attributes, innerHTML, and traversing the DOM using childNodes and parentNode properties are also summarized. The presentation aims to explain DOM and how JavaScript can be used to get, change, add or remove HTML elements.
This document discusses cross-site scripting (XSS) attacks and techniques for bypassing web application firewalls (WAFs) that aim to prevent XSS. It explains how XSS payloads can be embedded in XML, GIF images, and clipboard data to exploit browser parsing behaviors. The document also provides examples of encoding payloads in complex ways like JS-F**K to evade WAF signature rules.
XSS is much more than just <script>alert(1)</script>. Thousands of unique vectors can be built and more complex payloads to evade filters and WAFs. In these slides, cool techniques to bypass them are described, from HTML to javascript. See also http://brutelogic.com.br/blog
An introduction to REST and RESTful web services. You can take the course below to learn about REST & RESTful web services. https://www.udemy.com/building-php-restful-web-services/
SQLite is a C-language library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine. It is often used for local/client storage in applications. Key points: - Created by D. Richard Hipp, it provides a lightweight disk-based database that doesn't require a separate server process and allows accessing the database using SQL queries. - The entire database is stored in a single cross-platform file and can be as small as 0.5MB, making it suitable for embedded and mobile applications. - It supports common data types like NULL, INTEGER, REAL, TEXT, and BLOB and is used in standalone apps, local
The document discusses key features of ECMAScript 6 (ES6), including: - Default parameters, template literals, multi-line strings, spread operator, and enhanced object literals which add concise syntaxes. - Arrow functions which provide a shorter syntax for writing anonymous functions. - Block-scoped constructs like let and const that add block scoping to variables and constants. - Classes which provide a cleaner way to define constructor functions and objects. - Hoisting differences between function declarations and class declarations. - Using ES6 today by compiling it to ES5 using a tool like Babel.
The document provides an overview of reviewing modern JavaScript applications for security. It discusses how JavaScript is used widely, common frameworks like React and Angular, and tools for analyzing JavaScript like ESLint. It also covers real-world examples of vulnerabilities like cross-site scripting and remote code execution. The talk emphasizes embracing developer tools and best practices like code reviews and linting to identify security issues in JavaScript applications.
Node.js is a server-side JavaScript platform built on Google's V8 engine. It is non-blocking and asynchronous, making it suitable for data-intensive real-time applications. The document discusses how to install Node.js and its dependencies on Ubuntu, introduces key Node.js concepts like events and the event loop, and provides examples of popular Node.js packages and use cases.
JavaScript String: The String object lets you work with a series of characters; it wraps Javascript's string primitive data type with a number of helper methods. As JavaScript automatically converts between string primitives and String objects, you can call any of the helper methods of the String object on a string primitive. JavaScript Arrays: The Array object lets you store multiple values in a single variable. It stores a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.
This document provides an introduction and overview of jQuery. It discusses how jQuery simplifies DOM navigation and manipulation, handles browser differences, and makes JavaScript coding easier. The document covers basic jQuery concepts like selectors, the jQuery function, attributes, and events. It also provides examples of common jQuery code.
This document provides an overview of Java servlets technology, including: 1. What Java servlets are and their main purposes and advantages such as portability, power, and integration with server APIs. 2. Key aspects of servlet architecture like the servlet lifecycle, the HttpServletRequest and HttpServletResponse objects, and how different HTTP methods map to servlet methods. 3. Examples of simple servlets that process parameters, maintain a session counter, and examples of deploying servlets in Eclipse IDE.
JavaScript is a scripting language used to make web pages interactive. It was created in 1995 and standardized as ECMAScript. JavaScript can access and modify the content, structure, and style of documents. It is used to handle events, perform animations, and interact with forms on web pages. Common uses of JavaScript include form validation, navigation menus, lightboxes, and sliders on websites.
This document discusses secure session management and common session security issues. It explains that capturing a user's session allows an attacker to act as that user. Sessions need to be properly terminated on logout to prevent replay attacks. Weaknesses like cookies set before authentication, non-random session IDs, and failing to remove sessions on logout can enable session hijacking. The document provides guidelines for generating secure random session IDs, setting cookies only after authentication, removing sessions on logout, and using HTTPS to mitigate these risks.
HTML5 Web Storage is a way for web pages to store named key/value pairs locally, within the client web browser. Like cookies, this data persists even after you navigate away from the web site, close your browser tab, exit your browser, or what have you. Unlike cookies, this data is never transmitted to the remote web server (unless you go out of your way to send it manually). Unlike all previous attempts at providing persistent local storage, it is implemented natively in web browsers.
A REST API uses HTTP requests with verbs like GET, POST, PUT, and DELETE to perform CRUD (Create, Read, Update, Delete) operations on resources identified by URLs. It provides a lightweight alternative to SOAP that returns data in JSON format and HTTP response codes. Well-known codes include 200 for OK, 201 for Created, 400 for Bad Request, and 404 for Not Found. REST enables building applications and platforms that can easily integrate new interfaces over time.
This document discusses security best practices for Django web applications. It begins by introducing the author and their background in Python, Django, and computer security. It then covers common web vulnerabilities and attacks like information disclosure, input validation issues, session hijacking, and denial of service. Throughout, it provides recommendations for how to configure Django and code defensively to mitigate these risks, such as using parameterized queries, input sanitization, secure sessions, and cross-site request forgery protection. It emphasizes adopting a layered security approach and being vigilant about updates and monitoring.
There’s plenty of material (documentation, blogs, books) out there that’ll help you write a site using Django… but then what? You’ve still got to test, deploy, monitor, and tune the site; failure at deployment time means all your beautiful code is for naught. This tutorial examines how best to cope when the Real World intrudes on your carefully designed website.
A case study of security features inside the popular python-based web framework, Django. Made by Mohammed ALDOUB (@Voulnet)
The document provides 12 tips on Django best practices for development, deployment, and external tools. The tips include using virtualenv for isolated environments, managing dependencies with pip and requirements.txt, following a model-template-view framework, keeping views thin and logic in models/forms, and leveraging tools like Fabric, South, Celery, Redis, Sentry, and the Django debug toolbar. The document emphasizes following the Django philosophy and reusing existing apps when possible.
This document provides an overview of the Python programming language. It describes that Python is an object-oriented, dynamically typed language that can be used for scripting, rapid prototyping, text processing, web applications, games, databases, and more. It then demonstrates Python's built-in data types like integers, floats, strings, lists, tuples, and dictionaries. Finally, it shows Python's control structures like conditionals, loops, functions, classes and objects.
Capybara is a tool for integration testing Ruby web applications that allows automating browser interactions directly from tests. It is driver agnostic and supports RackTest, Selenium, Capybara-webkit, and other drivers, and provides a DSL for writing tests that simulate user interactions like clicks, fills, and matches against page content. Capybara tests can be written using Cucumber or RSpec and configured to run quickly using headless drivers or remotely on servers.
Cucumber is a BDD tool that aids in outside-in development by executing plain-text features/stories as automated acceptance tests. Written in conjunction with the stakeholder, these Cucumber “features” clearly articulate business value and also serve as a practical guide throughout the development process: by explicitly outlining the expected outcomes of various scenarios developers know both where to begin and when they are finished. I will present the basic usage of Cucumber, primarily in the context of web applications, which will include a survey of the common tools used for simulated and automated browser-testing. Common questions and pitfalls that arise will also be discussed.
A commonly used version control system in the ColdFusion community is Subversion -- a centralized system that relies on being connected to a central server. The next generation version control systems are “decentralized”, in that version control tasks do not rely on a central server. Decentralized version control systems are more efficient and offer a more practical way of software development. In this session, Indy takes you through the considerations in moving from Subversion to Git, a decentralized version control system. You also get to understand the pros and cons of each and hear of the practical experience of migrating projects to decentralized version control. Version control is often used in conjunction with a testing framework and continuous integration. To complete the picture, Indy walks you through how to integrate Git with a testing framework, MXUnit, and a continuous integration server, Hudson.
The document provides an introduction to the Django web framework, covering topics such as installing Django, creating projects and apps, defining models, using the admin interface, and basic views, URLs, and templates. It includes code examples for creating models, interacting with the database in the Python shell, registering models with the admin, and defining URLconfs and views. The training aims to help developers learn the fundamentals of building applications with Django.
JDK 9 即將在 2017 年 7 月正式推出,除了新的 module system 之外, JDK 9 的改變還包含封裝了大多數的內部 API ,也移除了幾個公開 API,本議程將分享 JDK 9 新功能���現有系統帶來的影響,還會介紹如何利用像是 jdeps 和 Multi-Release JAR 等工具來檢查你的系統並且順利升級到 JDK 9。
The document discusses Django, a Python web framework. It began as an internal project at a newspaper to help journalists meet deadlines. Django encourages rapid development, clean design and is database and platform neutral. It features an object relational mapper, automatic admin interface, elegant URLs and templates. Django uses a model-template-view architecture. It provides tools like manage.py to help with development.
The document provides a brief history of revision control systems including SCCS, RCS, CVS, Subversion, and distributed systems like Git, Mercurial, and Bazaar. It discusses the problems with earlier systems that motivated the creation of Git, including issues with CVS and Subversion. It describes how Linus Torvalds created Git to address these problems and support fast, distributed, and non-linear development workflows.
Showing the automation app built for MH using Python. I'm an enthusiast so I'm doing my best to demonstrate all of our abilities and coding.
The document introduces Django REST framework, which makes it easy to build web APIs. It includes serializers to convert data to and from JSON/XML, an API browser, and security features out of the box. Serializers define how models are exposed in the API. Views provide endpoints and connect models and serializers. Routers automatically generate URLs and handle requests to the views. The framework handles common tasks like validation and HTTP status codes so APIs can be built quickly.
The document provides tips and best practices for deploying Django applications. It emphasizes making deployments reproducible by standardizing infrastructure, systems, and applications. This includes using configuration management, packaging dependencies locally, separating configuration from code, and managing databases and fixtures programmatically. The document also recommends deploying via a blue-green process of backing up existing systems, updating and testing new systems, then switching production traffic over in a reversible way.
This document discusses Ansible, an open source orchestration and automation engine. It provides instructions on installing Ansible and using it to provision and configure AWS instances. Key steps include cloning the Ansible repository, installing required Python libraries, generating SSH keys, and executing playbooks to deploy and test instances. Ansible allows automating infrastructure setup and management through agentless configuration files called playbooks.
The document discusses doing more than one thing at a time in Python using threads and processes. It describes how to create threads using the threading module and processes using the multiprocessing module. While threads are easier to use, the Global Interpreter Lock (GIL) in Python prevents true parallelism. Processes can better utilize multiple CPUs but require more work for communication. Asynchronous programming is recommended for I/O-bound tasks while processes are better for CPU-bound work. The talk cautions that threading should be used carefully in Python due to the GIL.
It's no secret that python is fantastic when it comes to rapid prototyping and development. When it comes to deploying a web application, the road to glory isn't as well paved and navigating the array of techniques and tools can be daunting. This talk will address the advantages of continuous deployment, the success factors involved and the tools available, mainly focusing on experiences with Django web development.
The slides from my July Django-District presentation. It shows some of the basics of using the new fabric. I have uploaded the example fabfile.py to slideshare as well.
These slides are from Jenny Olsson's lightning talk at the PyLadies Meetup in Stockholm June 15. Jenny is a backend developer at Load Impact.
The document discusses best practices for securely implementing cryptography and discusses common cryptography algorithms and implementations such as hashing, symmetric encryption, asymmetric encryption, and password hashing. It emphasizes using proven implementations like those in Django and OpenSSL and enabling HTTPS to securely transmit data. The document also cautions that securely managing cryptographic keys is critical for encryption to provide security.
The document provides guidance on releasing open source projects. It discusses security, hosting, managing source code, package management, design patterns, testing, and resources. The key recommendations are to focus on security, use GitHub for hosting, manage versions with SemVer, use Composer for dependencies, implement common design patterns, write unit tests with at least 80% coverage, and wrap resources to allow for mocking in tests.
Test any (yes, any) website using NightwatchJS - selenium based JavaScript test runner. We will cover - prerequisites - configuration - writing tests - reading reports - continuous integration and services
This document discusses best practices for organizing configuration files in Symfony applications. It recommends structuring configuration with bundles, validating configuration with trees, and using configuration to customize services and parameters.
This document discusses best practices for configuring bundles in Symfony applications. It recommends structuring configuration with bundles, parameters, and options in a YAML file. It also emphasizes validating configuration types, values, and required fields. The document explains how to build a configuration tree and load configuration to inject dependencies and configure services.
This document discusses data encryption in Hadoop. It describes two common cases for encrypting data: using a Crypto API to encrypt/decrypt with an AES key stored in a keystore, and encrypting MapReduce outputs using a CryptoContext. It also covers the Hadoop Encryption Framework APIs, HBase encryption via HBASE-7544, and related JIRAs around Hive and Pig encryption. Key management tools like keytool and potential future improvements like Knox gateway integration are also mentioned.
This document discusses best practices for managing configuration in Symfony projects. It recommends building a configuration tree structure to define the configuration format and validate user input. The Symfony Config Component helps locate, load, and validate configuration to integrate it into the dependency injection container. Tests can validate that configuration is processed correctly.
This document summarizes blog hacking techniques from 2004 to 2011. It provides 5 hacks including using a CSS framework for layout and styling, media queries for responsive design, embedding YouTube videos, syntax highlighting for code snippets, and using pubsubhubbub for real-time updates. The document encourages continuing to blog and have fun exploring new methods.
The document discusses various web security topics such as hashing, encryption, HTTPS, SQL injection, command injection, and file upload attacks. It explains that hashing provides one-way encryption and can be used to securely store passwords. Encryption is reversible and requires keys. HTTPS uses asymmetric encryption to securely transmit symmetric keys. SQL injection occurs when unvalidated user input is inserted into SQL queries. Command injection allows execution of arbitrary system commands. File upload attacks may allow execution of uploaded code.
Go beyond the documentation and explore some of what's possible if you stretch symfony to its limits. We will look at a number of aspects of symfony 1.4 and Doctrine 1.2 and tease out some powerful functionality you may not have expected to find, but will doubtless be able to use. Topics covered will include routing, forms, the config cache and record listeners. If you're comfortable in symfony and wondering what's next, this session is for you.
PHP uses sessions and cookies to introduce state into the stateless HTTP protocol. Sessions allow servers to remember stateful information about individual users from page request to page request, while cookies store small amounts of data on the client side. The setcookie() function and $_COOKIE superglobal array are used to create and access cookies, while sessions are managed through the $_SESSION superglobal array after starting a session with session_start(). Cookies and sessions both provide methods for persistence across multiple page loads or visits.
Rails security best practices involve defending at multiple layers including the network, operating system, web server, web application, and database. The document outlines numerous vulnerabilities at the web application layer such as information leaks, session hijacking, SQL injection, mass assignment, unscoped finds, cross-site scripting (XSS), cross-site request forgery (CSRF), and denial-of-service attacks. It provides recommendations to address each vulnerability through secure coding practices and configuration in Rails.
David de Boer gave a presentation on caching and invalidation with PHP and HTTP. He explained that caching can reduce response times and server load. The key challenges are cache invalidation and efficient caching through maximizing hits and infinite TTLs. He demonstrated using Varnish and Nginx caches with FOSHttpCache for purging, invalidating by regex, tags, and routes. Tests were also shown to validate invalidation. The FOSHttpCacheBundle integrates this with Symfony through annotations.
Introduction to the new resource registries in Plone 5. A new way to manage your stylesheets and javascript.
This document discusses HTML5 security threats and defenses. It covers the history of HTML standards, new HTML5 features, and vulnerabilities like XSS, cookie/storage stealing, SQL injection, and more. It also provides tools for analyzing HTML5 threats and examples of real attacks exploiting features like WebSQL, local storage, and cross-origin requests. Defenses include input validation, avoiding sensitive data storage, and configuring CORS headers appropriately.
This document discusses resource registries and frontend development tools for Plone, including: - Defining resources as patterns and LESS files - Using Grunt, RequireJS, Bower, NPM to manage dependencies, compile assets, and run tests - Configuring bundles, resources and less variables in the registry - Developing with a console-based workflow and migrating from the old CSS/JS registries
With the latest XSS and CSRF attacks on Twitter, PayPal and Facebook, security is still obviously a very difficult thing to get right. Every 3 years, the open web application security project (OWASP) releases a new Top 10 vulnerabilities, this talk will walk you through 2013s list. I'll present you the possible attack scenarios and how you can protect against them. In addition we'll look at more security issues which are not part of the Top 10, but that you should definitely keep in mind.
Peek behind the scenes to learn about Amazon ElastiCache's design and architecture. See common design patterns of our Memcached and Redis offerings and how customers have used them for in-memory operations and achieved improved latency and throughput for applications. During this session, we review best practices, design patterns, and anti-patterns related to Amazon ElastiCache.
Nothing is as frustrated as deploying a new release of your web application to find out functionality you had doesn't work anymore. Of course you have all your unit tests in place and you run them through your CI environment, but nothing prepared you to a failing javascript error or a link that doesn't work anymore. Welcome to User Acceptance testing or UAT. Before you start putting real people in front of your application, create macros and export them as PHPUnit test classes. Then run them in an automated way just like your unit tests and hook them into your CI. In this talk I will show you how easy it is to create Selenium macros that can be converted into PHPUnit scripts and run automatically on different virtual machines (VM's) so you can test all different browsers on a diversity of operating systems.