Developing applications using Chromium

Slides:



Advertisements
Similar presentations
The GridBee Web Computing Framework Attila Szarvas BME IK 2012.
Advertisements

Web Applications Development Using Coldbox Platform Eddie Johnston.
Server-Side vs. Client-Side Scripting Languages
Multiple Tiers in Action
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
ECLIPSE IDE N AME : A SHOK P ADMARAJU C OURSE : T OPICS ON S OFTWARE E NGINEERING I NSTRUCTOR : D R. S ERGIU D ASCALU.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Title slide to be used at the start of a module. Developing Mobile Apps Roland Guijt
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Java Mobile Apps with GWT & PhoneGap Josh Marinacci, webOS Developer Advocate.
Introducing NativeScript [Pavel Kolev Software Telerik: a Progress company]
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
An overview of scripting languages Alexander Kanavin Teachers: Barbara Miraftabi, Jan Voracek.
Expression Web 3... now with TFS!. What is Expression Web 3? Professional web design and development tool Create standards-based Web sites faster & easier.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
FLUKA GUI Status FLUKA Meeting CERN, 10/7/2006.
1 Geospatial and Business Intelligence Jean-Sébastien Turcotte Executive VP San Francisco - April 2007 Streamlining web mapping applications.
Test Automation For Web-Based Applications Portnov Computer School Presenter: Ellie Skobel.
Eclipse 24-Apr-17.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
The way of hybrid mobile development Hybrid Mobile Applications Telerik Software Academy
Scripting Languages Client Side and Server Side. Examples of client side/server side Examples of client-side side include: JavaScript Jquery (uses a JavaScript.
Plug-in Architectures Presented by Truc Nguyen. What’s a plug-in? “a type of program that tightly integrates with a larger application to add a special.
Node.Js 1. 2 Contents About Node.Js Web requirement latest trends Introduction Simple web server creation in Node.Js Dynamic Web pages Dynamic web page.
IE Developer Tools Jonathan Seitel Program Manager.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Ori Hanegby Pixtazy Blog:
Google Web Toolkit for Mobile Applications Development INGENUITY AT ITS BEST……………….
丁建文 國立高雄應用科大資管系副教授 兼任計網中心軟體發展組組長 跨平台行動應用軟體開發技術 : HTML5 & Mobile JavaScript Framework 暨南大學.
Welcome to Open Source Technology An Overview of Software By Afroz Hippargi, CIT, YASHADA, Pune.
Introduction to Node.js® Jitendra Kumar Patel Saturday, January 31, 2015.
Application development & MHL. Developing Morphic Morphic & charger with USB cable –USB driver (download from the web) Development Environment: Visual.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
Introduction to Silverlight Development Pavel Yosifovich CTO, Matrix Global; Senior Instructor, Hi-Tech College
Arklio Studija 2007 File: / / Page 1 Automated web application testing using Selenium
Profound.js: The future of open source development on IBM i
JQuery Fundamentals Introduction Tutorial Videos
Introduction to Xamarin C# Everywhere
Top 8 Best Programming Languages To Learn
CST 1101 Problem Solving Using Computers
Setup a PHP + MySQL Development Environment
Node.Js Server Side Javascript
Pixy Python API Charlotte Weaver.
Developing and Distributing Cross-Platform Software with PyInstaller
Testing with Selenium IDE
Chapter 5 Scripting Language
Mobile App Development
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
Apache Cordova Overview
Event Driven Programming Dick Steflik
3 Things Everyone Knows About Node JS That You Don't
CE-105 Spring 2007 Engr. Faisal ur Rehman
Chapter 5 Scripting Language
PHP / MySQL Introduction
Calibration database Dmitry Romanov October 6, 2011.
Node.Js Server Side Javascript
SPA Revolution with WebAssembly and Blazor Rainer Stropek | software
Web Development Using ASP .NET
SPA Revolution with WebAssembly and Blazor Rainer Stropek | software
JQuery with ASP.NET.
JavaScript.
INTRODUCTION TO By Stepan Vardanyan.
Architecture of the web
UFCEUS-20-2 Web Programming
MOBILE PROGRAMMING Meriska Defriani, S.Komp, M.Kom Introduction
Running C# in the browser
Web Application Development Using PHP
Presentation transcript:

Developing applications using Chromium CEFPython Developing applications using Chromium Jason Jones @JasonProgrammer simpletutorials.com/cef

What is Chromium? The code behind Google’s Chrome browser. *Google has Chromium OS, but we’re talking about the browser http://www.chromium.org/Home

What is CEF? What is CEF?

Chromium Embedded Framework C/C++ wrapper around Chromium. Helps embed Chromium into applications.

What is CEFPython? What is CEF?

CEFPython CEF Chromium ...a Python wrapper for CEF. c++, cython c++

Why use it? You’re familiar with web design. You want a reponsive, cross-platform UI. You want custom UI controls. You want to provide a client with a custom browser.

What’s something I’d like to do with it?

Who uses CEF? What is CEF?

Amazon Note the responsive design (resize-friendly)

https://en.wikipedia.org/wiki/Chromium_Embedded_Framework

CEFPython Requirements Windows XP SP3+ Python 2.7 (no Python 3 packages yet) http://www.magpcss.net/cef_downloads/

What UI frameworks work with CEFPython? What is CEF?

Quite a few... Kivy - MIT License PyWin32 - Python Software Foundation license Panda3D - Modified BSD - 3D game engine (Disney) wxPython - based on wxWidgets C++ library PyGTK - LGPL PySide - LGPL PyQt - GPL, Fee for commercial use *No CEFPython examples provided for Tkinter

I chose wxPython. Open source Free for commercial use Cross-platform Based on wxWidgets (C++ library)

A great wxPython example comes with cefpython.

So does everyone who runs my application need to install Python?

py2exe We can create an executable from Python code. http://www.py2exe.org/

py2exe build script

wxpython.exe (no Python interpreter needed to run this) set PYTHONPATH=C:\Python27;C:\Python27\Lib;C:\Python27\DLLs C:\Python27\python.exe build_exe.py py2exe wxpython.exe (no Python interpreter needed to run this)

What does task manager look like?

Multiple Processes Chromium uses multiple processes and talks between those processes (IPC).

What processes are involved?

Browser Process Render process Render process wxpython.exe Render process Blink - Layout (parse HTML, CSS) V8 - Run JavaScript subprocess.exe Render process Plugin process (e.g. Flash)

When debugging, keep in mind there are multiple processes. If your breakpoint isn’t being hit, you might need to use a __debugbreak().

browser_subprocess_path A separate (lightweight) process to be used as each render process.

Message Loop Chromium uses multiple threads. Each thread has a message loop. User Interface IO File DB Safe Browsing History Proxy http://www.chromium.org/developers/design-documents/threading

-OR- To run the message loop... Call a blocking function that runs the message loops -OR- Call DoMessageLoopWork on a timer or on an idle event.

Don’t starve the message loop.

Sandbox The render process can only access: CPU Memory http://dev.chromium.org/developers/design-documents/sandbox/Sandbox-FAQ

A simple application to search the 50 states by name.

Multithreaded, production ready web server and framework (WSGI)

states.json [ "Alabama", "Alaska", "Arizona", "Arkansas", "California", "Colorado", "Connecticut", "Delaware", "District Of Columbia", "Florida", "Georgia", …(more)... ]

What about Python 3? https://code.google.com/p/cefpython/

What is Cython? Python + C data types It’s a language (superset of Python) that compiles to C++. It’s used for optimization and interfacing to C/C++ code.

Can I update CEF? What if I want the latest version of CEF/Chromium?

CEF Builds Latest nightly - Rev. 2378 Requires Visual Studio 2013 https://cefbuilds.com/

Python extensions for Windows need to be built with the same version of VC++ used to build Python.

https://docs.python.org/3/extending/windows.html

http://matthew-brett.github.io/pydagogue/python_msvc.html

Visual C++ for VS2013 is version 18 http://en.wikipedia.org/wiki/Visual_C%2B%2B

Are there Python binaries built with VS2013?

http://p-nand-q.com/python/building-python-33-with-vs2013.html

Alternatives Is it possible to use Python 3 and the CEF Nightly build?

Yes. You can write Python-C++ bindings with SWIG.

Simplified Wrapper and Interface Generator http://en.wikipedia.org/wiki/SWIG http://www.swig.org/tutorial.html http://www.wxpython.org/OSCON2008/Python%20C++%20and%20SWIG.pdf

SWIG can generate wrapper code for 23 languages: Allegro CL C# CFFI CLISP Chicken D Go Guile Java Javascript Lua Modula-3 Mzscheme OCAML Octave Perl PHP Python R Ruby Scilab Tcl UFFI

Install SWIG Download Extract Add directory to your PATH

Install VS

Interface File Helps SWIG know what to wrap

swig -c++ -python CefSwigApp.i cefswig.py CefSwigApp_wrap.cxx Our Python module: import cefswig C++ wrapper we will build with our source to produce a pyd (DLL) file

CEF C++ Solution

Thanks! Questions? @jasonprogrammer