2 - Dev Env Flashcards
What are good setting up practises of software engineering?
Version Control
Package Manager
Virtual Environment
IDE
Why use VCS?
Access older copies
Simplifies concurrent work
Merge changes
Track different versions and releases
Work is backed up
Exploratory work - branching
What are advantages to using Virtual Environments?
Use different package sets for different projects
Use different python versions for different projects
Topdown vs bottom up (topdown)
Separates the low level work from the higher level abstractions
Leads to a modular design
Development can be self- contained (tiered)
Emphasizes planning and system understanding
Coding is late, and Testing is even later
Skeleton code can show how everything integrates
Topdown vs bottom up (bottom up)
Coding begins early and so Testing can be performed early
Requires really good intuitions to determine functionality of modules
Low level design decisions can have major impact on solutions
Risks integration problems – how do components link together
Often used to add on to existing modules
What is a typical High Level System Architecture diagram?
User Client Middlware Database
Must work out what will be built and what tech goes into teach part
What is Django?
High level Python web framework for rapid development and clean pragmatic design
For perfectionists with deadlines
What is the focus of Django?
Dynamic and database driven websites
Content based websites (e.g. eBay, Guardian, Twitter)
What are some Django modules?
Administration Interface (CRUD)
Authentication Systems
Form handling
Session handling
Syndication Frameworks (RSS and Atom)
Caching
Internationalisation and Localisation
How is Model View Controller used in Django?
Models describe the database
Views determine what the user sees
Controlled is handled by Django framework, URL parser maps URLs to views
Templates describe how data is presented - MVCT
Django Internal Flow
Client
Django/Middlware { Template URLS Views Models Wrapper }
Backend
{
Database Services
}
Django - Controlling flow
Usually in urls.py
Which view should handle which URL (or part of URL) - URL patterns used to find matches and route request to view
Pattern matching means different instantiations can be used by a common pattern
Django - Defining views
Usually in views.py
Views are responsible for handling and processing specific requests, getting data from databases/external services and selecting template to use for response
Django - Providing templates
Templates mean response format (html, xml, etc.) is decoupled from data to be presented
Django - Building data models
Usually in models.py
Models specify entities and relationships in database - these provide Object Relational Mapping (ORM) to actual database tables
Framework constructs the database given the models defined