| |
| |
| |
|
|
|
Introduction to Python and Django |
|
Duration:
3 Days |
|
|
This course is for developers who have a background in web application programming and
want to learn about Python and the Django web application framework.
| |
Attendees must be proficient in web application programming in order to do the labs.
Attendess must also be proficient with C/C++ programming to do the Python extension labs.
|
|
|
Description
|
Python is a scripting programming language that is suitable for many different types
of applications. Python comes with an extensive set of libraries, supporting system programming,
GUI programming, client- and server-side internet programming, and database programming, among
others. Python also integrates well with other programming languages and tools, such as C, C++,
and Java.
Django is a web framework for Python that encourages rapid development and clean, pragmatic
design. Similar to Ruby on Rails, Django follows the "Don't Repeat Yourself" (DRY) principle and
provides the web developer with a faithful implementation of the Model-View Controller paradigm.
Among Django's main features are database mappings, a complete and automatically generated
administration framework, generation of RSS and Atom feeds, and even support for backend caching
systems.
This course is designed to teach experienced programmers about Python and Django. No experience
with either Python or Django is necessary for this course, though a basic familiarity with building
web applications will be helpful.
The coverage of Python includes a comprehensive treatment of the language constructs, enabling
an experienced programmer to write applications in Python. The course also covers advanced
aspects of Python, such as interfacing with the file system, interprocess communication, client-side
scripting, server-side scripting, and working with databases.
The coverage of Django includes typical web applications issues, such as interacting with a
database, handling user inputs and sessions, and generating dynamic content. The course
features an in-depth discussion of the major Django components: models, views, and templates.
|
|
Objectives
|
Upon completion of this course, attendees will be able to:
- Write a program in Python
- Understand method calls in Python
- Understand Python objects and modules
- Use advanced control flow techniques in Python, such as exceptions
- Access the file system from Python
- Interact with other processes from Python
- Extend Python by writing C modules
- Integrate Python into a C or C++ program
- Understand the MVC design pattern
- Use the MVC design pattern to develop web applications in Django
- Understand the structure of a Django application
- Master the Django components
- Apply best practices and design patterns
|
|
Course Outline
|
Introduction to Python
- Why use Python?
- What is Python good for?
- Who uses Python?
- A bit of history
Python Bootcamp
- The Python programming environment
- Builtin types and operators
- Basic statements
- Control flow in Python
- Functions
- Modules
- Classes
- Exceptions
- Debugging and profiling Python programs
Systems Programming in Python
- Handling arguments
- File and directory interface
- Working with multiple processes
- Interprocess communication
Working with Databases
- Persistence of objects
- Python SQL API
- Object relational mappings
Internet Client-side Scripting
- Network I/O in Python
- Writing client side scripts
- Reading and writing XML
| |
Internet Server-side Scripting
- Python Web Frameworks
- Overview of Django
- O/R mappings in Django
- Django controllers
- Django templates
- A complete Django web application
Extending Python in C/C++
- Building C/C++ extensions
- Converting data between Python and C/C++
- Using SWIG
Embedding Python in C/C++
- Overview of embedding
- Python method invocation from C/C++
- Accessing C/C++ variables in Python
Introduction to Jython
- What is Jython?
- Why use Jython?
- Using Python objects from Java
- Accessing Java objects from Python
|
|
|
|