The document provides an overview and updates to the system requirements models for a web application called 'Birdie' that manages sales leads. It includes an updated event table removing one use case and making another singular. It also includes an updated domain model class diagram with some changes like additional report classes. The software design approach section describes the model-template-view framework used with Django including details on each layer. It includes package and sequence diagrams to illustrate the design.
GPQS Eclipse An Introduction - Brochure published in 2005.
This brochure was designed to take the user through the basics of navigation of the product. The volume and complexity of forecast financial data required deep knowledge of data capture, data cleaning, and data delivery. The delivery methods demonstrated in the brochure reflected 15+ years of using tagged financial statements and turning those into business and investment insights.
The same techniques are being used today by the author and his colleagues to explore Compliance & regulatory analysis and advanced analytics towards business performance of filing companies.
• Uncover insights in large volumes of enterprise and big data.
• Use real-time dashboards that provide instantaneous feedback.
• Quickly interpret results and determine the most effective response.
• Give analysts more time to focus on value-added analysis.
GPQS Eclipse An Introduction - Brochure published in 2005.
This brochure was designed to take the user through the basics of navigation of the product. The volume and complexity of forecast financial data required deep knowledge of data capture, data cleaning, and data delivery. The delivery methods demonstrated in the brochure reflected 15+ years of using tagged financial statements and turning those into business and investment insights.
The same techniques are being used today by the author and his colleagues to explore Compliance & regulatory analysis and advanced analytics towards business performance of filing companies.
• Uncover insights in large volumes of enterprise and big data.
• Use real-time dashboards that provide instantaneous feedback.
• Quickly interpret results and determine the most effective response.
• Give analysts more time to focus on value-added analysis.
Here's a presentation I gave for ETC at Missouri State University. It's for Mac users on campus — it can be difficult to connect to campus resources or to get all the resources you need to run a Mac on campus. This presentation takes a few steps to help remedy that.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Birdie Design Report
1. CIS 591 Design / Final Report: ‘Birdie’
http://birdie.kreegerstudios.com/
Benjamin Kreeger
(816) 806-7096
kreeger545@missouristate.edu
2. Table of Contents
Part I: Requirements Models Update
........................................................4
Written Overview
4
Updated Event Table
4
Updated Domain Model Class Diagram
6
Part II: Software Design Approach
............................................................7
Model-template-view framework
7
Model layer
7
Template layer
7
View layer
7
Package diagram
8
Sequence diagrams
9
Part III: Database Design
..........................................................................11
Written Overview
11
Relationship View
12
List of Tables
13
List of Referential Integrity Constraints
15
Sample Data for Each Table
17
Part IV: System Controls Design
..............................................................23
Input controls and validation
23
Security controls
24
Database integrity controls
25
Backup and recovery
25
Error trapping
25
Other
26
Part V: Dialog Design
................................................................................27
List of use cases and dialogs
27
Other dialogs
27
Storyboards
27
Create new lead
28
Change lead status
31
Generate marketer report
33
2
CIS591: Design / Final Report
3. Table of Contents
Part VI: Test Cases and Test Results
.......................................................36
Authentication
36
Logging in
36
Leads
36
Adding a new lead
36
Changing lead status
37
Assigning leads to business unit
38
Company Management
39
Adding a company
39
Editing a company
40
Adding a promotion
40
Adding a division
41
Editing a division
42
Adding a team
43
Editing a team
43
Customer Management
44
Adding a customer
44
Editing a customer
46
Reports
48
Adding a report
48
Editing a report
50
Deleting a report
50
Part VII: Summary of Incomplete Components
......................................51
Part VIII: Installation and Evaluators Instructions
..................................53
List of preset test user accounts
53
Original source code
54
Pre-built Ubuntu virtual machine
54
On the Internet
54
Part IX: Progress Reporting
.....................................................................56
3
CIS591: Design / Final Report
4. Part I: System Requirements Models
Part I: Requirements Models Update
Written Overview
Some of my requirements have changed since my analysis report. In particular, I’ve
eliminated the define campaign use case, as it was somewhat redundant (and too closely
related to the define promotion use case). I’ve had to move the order/product use cases to
the back burner to finish up the core functionality of the application (the management and
tracking of sales leads), and I’ve done the same for some of the more minor aspects of leads
management (including mass import/export). I have plans in place for how those should be
implemented, and they are in the initial stages of being implemented, but I’ve had to wrap up
the project for the semester before their completion. More on those can be found in Section
VII.
I’ve added a subset of report classes; I’ve decided that there was enough information in each
report (and more planned) that it could be worthwhile for users to save the reports they create
in the system. Thus, a report class was made with four subclasses (each according to a
certain kind of report).
Updated Event Table
As stated above, I’ve removed the define campaign use case. The updated event table is
shown below. Those not yet implemented are shown in italics. See section VII for more
details. I’ve also made singular the assign lead path use case; the ability to batch assign
them should come in a later version.
Event Trigger Source Use Case Response Destination
Processing wants to Management
New lead source Processing rep Define lead source Lead source
create a lead source Processing
Processing wants to Management
enter a lead in New lead Processing rep Create new lead Lead Processing
manually Marketers
Processing wants to Management
import a batch of Batch lead import Processing rep Import external leads Leads Processing
leads Marketers
Processing wants to Management
New promotion Processing rep Define promotion Promotion
create a promotion Processing
Processing wants to
Assign lead to lead Management
classify leads to a Assign lead path Processing rep Categorized lead
path Marketers
path
Processing chooses Sales company
Distribute leads to Leads assigned to
sales company to Assign leads Processing rep management
sales company sales company
receive leads Marketers
Sales company
management wants Sales company Distribute leads to Leads assigned to Division management
Assign leads
to distribute leads to management division division Marketers
divisions
Division management
Distribute leads to Leads assigned to Sales teams
wants to distribute Assign leads Division management
sales team sales team Marketers
leads to teams
4
CIS591: Design / Final Report
5. Part I: Requirements Models Update
Event Trigger Source Use Case Response Destination
Sales teamleaders
want to assign leads Assign leads to Leads assigned to
Assign leads Sales teamleaders Marketers
to individual marketers marketers
marketers
Marketer follows up Upgrade/downgrade Lead with changed Marketers
Lead properties Marketer
on lead lead status status Sales teamleaders
Time to archive Updated archived
‘End of day’ Archive inactive leads
inactive leads leads list
Any level of
Management (any Customized lead Management (any
management wants a Report request Generate lead report
level) report level)
lead report
Any level of
management wants a Management (any Generate marketer Customized marketer Management (any
Report request
report on certain level) report performance report level)
marketer(s)
Sales company
management wants a Sales company Generate overall Master performance Sales company
Report request
report on overall management report report management
performance
Processing needs a
Export leads Processing rep Export lead list Exported lead data Processing rep
master list of leads
Processing needs to Marketers
add or change a Edit customer Processing rep Define customer Modified customer Management (any
customer’s details level)
CIS591: Design / Final Report
5
6. Part I: System Requirements Models
Updated Domain Model Class Diagram
Domain Class Diagram Benjamin Kreeger
LeadSource
1 companyName Product
address productName
city 1 * productSource
*
state productPrice
Promotion zip productDescription
promotionName country productPicture
promotionSource phone
0..1 OrderDetails
1..*
0..1
orderID
productID
* * qty
Lead *
createDate Order
SalesCompany expireDate orderDate
companyName customerID orderCustomerID
address sourceID orderTotal
city promotionID orderPaymentMethod
1 state 0..1 * pipeline orderDueDate
zip salesCompanyID orderPayDate
1 country divisionID
phone teamID *
*
isInternal marketerID
managerID status
1 change_date
1 detail 0..1
*
* * *
Division Person
Team
divisionName firstName
divisionID
companyID 0..1 lastName
teamLeaderID
managerID address
* 1 1 1 city
1 1 1 state
zip
country
phone
ExtendUser
0..1 1
userID Customer
age
0..1 0..1 maritalStatus
numChildren
1 assets
0..1 *
liabilities
Manager Team Leader Marketer ProcessingRep
managerType commissionRate commissionRate managerID
1 teamID salesCompanyID
1 * *
Report
name
description
createdAt
createdBy
startDate
endDate
0..* 0..* 0..*
0..*
CompanyReport DivisionReport TeamReport MarketerReport
salesCompanyID divisionID teamID marketerID
Changes made are shaded (including the report subsystem, a new attribute and a changed
attribute for Lead, and the relationship between Team/TeamLeader).
6
CIS591: Design / Final Report
7. Part II: Software Design Approach
Part II: Software Design Approach
Model-template-view framework
My web application was written using a three-layer object-oriented design. The Django
framework utilizes a slightly altered rendition of the Model-View-Controller framework it calls
the Model-Template-View framework. The Controller layer (the ‘URLconf’ file) is mostly
behind the scenes, and manages URL routing using regular expression pattern matching.
Model layer
The Model layer defines the data structure of the application using built-in field types. Each
model class becomes a table in the database, and extra tables are added in the case of
many-to-many relationships between models. Data layer abstraction is handled by the
framework using object-relational mapping. Django’s ORM system supports MySQL,
SQLite3, PostgreSQL, and Oracle, as well as other custom database backends.
Template layer
The Template layer consists of HTML files marked up with variables in double-curly-brace
sets, {{ like so }}. When a template is rendered, it is passed a context (a Python dictionary) of
variables which it inserts into the curly-brace sets. Various other template layer functions and
constructs are available such as if/else and for blocks. Custom functions, such as those that
can format text or expand abbreviated values, can be written and stored in another Python
module, and loaded at the start of each template. Template inheritance is also allowed, so
master templates can be specified.
View layer
The view layer takes data from the model layer, processes it, packages it, and passes it to the
template layer to be rendered. Each ‘view’ is really a Python function that takes a request
object, and any additional objects passed to it from the controller. These functions can
access the model layer using Django’s model API functions, which can return objects,
querysets, and more. Each function has access to all the Python modules the programmer
can import.
Another aspect of the view layer is Django’s forms API, which can abstract field information
about the model layer and provide form display and validation with just a few lines of code on
the programmer’s end.
CIS591: Design / Final Report
7
8. Part II: Software Design Approach
Package diagram
Package Diagram Benjamin Kreeger
Templates (*.html)
Companies Reports
companies
Leads
detail
Customers Orders reports
edit
Admin detail add
new
(mostly detail new orders edit
division_detail
generated by edit leads detail delete
division_edit
framework) new to_division edit company
division_new
customers to_marketers new division
team_detail
to_sales marketer
team_edit
team
team_new
Extras: birdie_tags: capitalize, money, buyer, ifnone, intext
Controllers (urls.py)
urls.py (URLconf)
Views (views.py / forms.py)
Companies
company_detail
Reports
edit Customers Orders
Leads
new
reports
div_add customers orders
leads add
div_detail customer_detail detail
lead_detail report_detail
div_edit edit edit
new report_edit
team_add add new
report_delete
team_detail
team_edit
Forms: LeadSourceForm, SalesCompanyForm, DivisionForm, NewDivisionForm, TeamForm, NewTeamForm, CustomerForm,
LeadDetailForm, NewLeadForm, MarketerReportForm, TeamReportForm, DivisionReportForm, CompanyReportForm
Models (models.py)
Leads Reports
Person Customer LeadSource Promotion Report
CompanyReport
ExtendUser Manager Teamleader ProcessingRep
DivisionReport
Marketer SalesCompany Division Team
TeamReport
Lead Product Order OrderDetail
MarketerReport
Those templates and views in italics have not yet been implemented. More on those in
Section VII.
8
CIS591: Design / Final Report
9. Sequence Diagram: Change lead status Benjamin Kreeger
Controller View Model Django model
Web browser Template layer
(/urls.py) (/leads/views.py) (/leads/models.py) API / Database
Marketer
Open active leads page (/leads/) /leads/ birdie.leads.views.leads()
a_user := Marketer.objects.get(user=request.user) Marketer.objects.get(user=request.user)
Sequence diagrams
a_user Marketer
leads := Lead.objects.get(marketer=a_user) Lead.objects.get(marketer=a_user)
render_to_response
('/leads/leads.html', context) leads QuerySet
/leads/leads.html
Click a lead (/leads/777) /leads/(?P<leadid>)/ birdie.leads.views.lead_detail(777) lead := get_object_or_404(Lead, id=777) get_object_or_404(Lead, id=777)
CIS591: Design / Final Report
render_to_response lead Lead
('/leads/lead_detail.html',
context)
/leads/lead_detail.html View / Form
Fill out lead detail form (/leads/forms.py)
Click submit (/leads/777/) /leads/(?P<leadid>)/ birdie.leads.views.lead_detail(777, method.POST)
lead := get_object_or_404(Lead, id=777) get_object_or_404(Lead, id=777)
lead Lead
form := LeadForm(POST)
form
lead = form.cleaned_data
lead.save() lead.save()
render_to_response
/leads/leads.html ('/leads/leads.html', context)
HttpResponseRedirect(birdie.leads.views.leads())
Part II: Software Design Approach
9
10. 10
Sequence Diagram: Define lead source Benjamin Kreeger
View
Controller Model Django model
Web browser Template layer (/companies/
(/urls.py) (/leads/models.py) API / Database
views.py)
View / Form
(/companies/
Marketer forms.py)
Open external companies page /companies/
(/companies/external) (?P<company_type>w+)/ birdie.companies.views.companies(external)
companies := LeadSource.objects.all() LeadSource.objects.all()
render_to_response
('/companies/companies.html', companies QuerySet
/companies/companies.html context)
Part II: Software Design Approach
leads := Lead.objects.get(marketer=a_user) Lead.objects.get(marketer=a_user)
Click 'add a company' /companies
(/companies/external/add) (?P<company_type>w+)/ birdie.companies.views.new(external) form :=
render_to_response LeadSourceForm()
('/companies/company_add.html', form
/companies/company_add.html context)
Fill out add company form
/companies
Click submit (/companies/external/add) (?P<company_type>w+)/ birdie.leads.views.new(external, method.POST)
company = LeadSource()
company
form :=
LeadSourceForm(POST)
form
company.save() company.save()
HttpResponseRedirect(birdie.companies.views.companies(external))
render_to_response
('/companies/companies.html',
/companies/companies.html context)
CIS591: Design / Final Report
11. Part III: Database Design
Part III: Database Design
Written Overview
For my development environment, I’ve been using SQLite3. A production environment would
make use of MySQL. To switch between the two, I’ve implemented a PROD Boolean flag in the
Django settings file. As long as PROD is set to False, the environment is considered a
development one, and SQLite3 is used. Otherwise, it’s production, and MySQL comes into
the picture. My settings.py file accounts for that here:
# Switch the following to False for production environment.
PROD = True
if PROD == False:
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = SITE_ROOT + '/sqlite.db'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
else:
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'birdie'
DATABASE_USER = 'birdie'
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
SQLite3 is good for a development environment because it’s stored locally in a quickly-
accessible file. For the minor magnitude in which I’m developing the program, this file-based
DMBS is ideal. I’ve chosen MySQL as a production database for its balance of efficiency in a
larger-scale environment, cost, and available support options.
CIS591: Design / Final Report
11
12. 12
Entity Relationship Diagram Benjamin Kreeger
leads_leadsource
id INT(11) leads_product auth_user_user_permissions auth_permission auth_group_permissions
company_name VARCHAR(100) id INT(11) id INT(11) id INT(11) id INT(11)
address VARCHAR(100) name VARCHAR(100) user_id INT(11) name VARCHAR(50) group_id INT(11)
city VARCHAR(60) source_id INT(11) permission_id INT(11) content_type_id INT(11) permission_id INT(11)
leads_promotion state VARCHAR(2) price DECIMAL(12,2) codename VARCHAR(100)
id INT(11) zip_code VARCHAR(10) description LONGTEXT
name VARCHAR(100) country VARCHAR(50) picture VARCHAR(100)
source_id INT(11) phone VARCHAR(20)
leads_orderdetails
id INT(11)
order_id INT(11) auth_user auth_user_groups auth_group
product_id INT(11) id INT(11) id INT(11) id INT(11)
Part III: Database Design
quantity DECIMAL(12,2) username VARCHAR(30) user_id INT(11) name VARCHAR(80)
Relationship View
first_name VARCHAR(30) group_id INT(11)
last_name VARCHAR(30)
email VARCHAR(75)
password VARCHAR(128)
leads_lead is_staff TINYINT(1)
id INT(11) leads_order is_active TINYINT(1)
leads_salescompany create_date DATETIME id INT(11) is_superuser TINYINT(1) auth_message
id INT(11) expire_date DATETIME date DATETIME last_login DATETIME id INT(11)
company_name VARCHAR(100) customer_id INT(11) customer_id INT(11) date_joined DATETIME user_id INT(11)
address VARCHAR(100) source_id INT(11) total DECIMAL(12,2) message LONGTEXT
city VARCHAR(60) promotion_id INT(11) payment_method VARCHAR(10)
state VARCHAR(2) pipeline VARCHAR(2) due_date DATETIME
zip_code VARCHAR(10) sales_company_id INT(11) django.auth
pay_date DATETIME
country VARCHAR(50) division_id INT(11)
phone VARCHAR(20) team_id INT(11)
is_internal TINYINT(1) marketer_id INT(11)
manager_id INT(11) status VARCHAR(8)
change_date DATETIME
detail LONGTEXT
other django django_content_type django_admin_log
leads_person id INT(11) id INT(11)
id INT(11) framework name VARCHAR(100) action_time DATETIME
leads_division
id INT(11) first_name VARCHAR(50) tables app_label VARCHAR(100) user_id INT(11)
name VARCHAR(50) leads_team last_name VARCHAR(50) model VARCHAR(100) content_type_id INT(11)
company_id INT(11) id INT(11) address VARCHAR(100) object_id LONGTEXT
manager_id INT(11) division_id INT(11) city VARCHAR(60) object_repr VARCHAR(200)
teamleader_id INT(11) state VARCHAR(2) action_flag SMALLINT(5)
zip_code VARCHAR(10) django_site django_session change_message LONGTEXT
country VARCHAR(50) id INT(11) session_key VARCHAR(40)
phone VARCHAR(20) domain VARCHAR(100) session_data LONGTEXT
name VARCHAR(50) expire_date DATETIME
leads_extenduser
person_ptr_id INT(11) leads_customer
user_id INT(11) person_ptr_id INT(11)
age INT(11)
marital_status VARCHAR(20)
num_children INT(11)
assets DECIMAL(12,2)
See attached Tabloid-sized diagram for a larger ERD diagram.
liabilities DECIMAL(12,2)
leads_manager leads_teamleader leads_marketer leads_processingrep
extenduser_ptr_id INT(11) extenduser_ptr_id INT(11) extenduser_ptr_id INT(11) extenduser_ptr_id INT(11)
manager_type VARCHAR(50) commission_rate DECIMAL(5,2) commission_rate DECIMAL(5,2) manager_id INT(11)
team_id INT(11) sales_company_id INT(11)
reports_report birdie.reports
id INT(11)
name VARCHAR(255)
description LONGTEXT
created_at DATETIME
created_by_id INT(11)
start_date DATE
end_date DATE
CIS591: Design / Final Report
reports_companyreport reports_divisionreport reports_teamreport reports_marketerreport
report_ptr_id INT(11) report_ptr_id INT(11) report_ptr_id INT(11) report_ptr_id INT(11)
sales_company_id INT(11) division_id INT(11) team_id INT(11) marketer_id INT(11)
13. Part III: Database Design
List of Tables
The list of tables in my database is below. Those beginning with auth_ and django_ are
created by the framework; the only ones I use heavily out of those would be auth_user, and
I’m still working on implementing auth_group and auth_permission. Primary keys are
underlined, and foreign keys are denoted by a following [fk=related_table] notation.
auth_permission (id, name, content_type_id [fk=django_content_type],
codename)
auth_group (id, name)
auth_user (id, username, first_name, last_name, email, password, is_staff,
is_active, is_superuser, last_login, date_joined)
auth_message (id, user_id [fk=auth_user], message)
auth_group_permissions (id, group_id [fk=auth_group], permission_id
[fk=auth_permission])
auth_user_groups (id, user_id [fk=auth_user], group_id [fk=auth_group])
auth_user_user_permissions (id, user_id [fk=auth_user], permission_id
[fk=auth_permission])
django_admin_log (id, action_time, user_id [fk=auth_user], content_type_id
[fk=django_content_type], object_id, object_repr, action_flag,
change_message)
django_content_type (id, name, app_label, model)
django_session (session_key, session_data, expire_date)
django_site (id, domain, name)
leads_person (id, first_name, last_name, address, city, state, zip_code,
country, phone)
leads_customer (person_ptr_id [fk=leads_person], age, marital_status,
num_children, assets, liabilities)
leads_extenduser (person_ptr_id [fk=leads_person], user_id [fk=auth_user])
leads_manager (extenduser_ptr_id [fk=leads_extenduser], manager_type)
leads_teamleader (extenduser_ptr_id [fk=leads_extenduser], commission_rate)
CIS591: Design / Final Report
13
15. Part III: Database Design
[fk=leads_salescompany])
List of Referential Integrity Constraints
Below is a list of the referential integrity constraints in the Birdie database. Primary keys in
the database are auto_incremented and are not allowed to be changed.
auth_permission:
content_type_id (foreign key to django_content_type)
auth_group: none
auth_user: none
auth_message:
user_id (foreign key to auth_user)
auth_group_permissions:
group_id (foreign key to auth_group)
permission_id (foreign key to auth_permission)
auth_user_groups:
user_id (foreign key to auth_user)
group_id (foreign key to auth_group)
auth_user_user_permissions:
user_id (foreign key to auth_user)
permission_id (foreign key to auth_permission)
django_admin_log:
user_id (foreign key to auth_user)
content_type_id (foreign key to django_content_type)
django_content_type: none
django_session: none
django_site: none
leads_person: none
leads_customer:
person_ptr_id (foreign key to leads_person)
leads_extenduser:
CIS591: Design / Final Report
15
16. Part III: Database Design
person_ptr_id (foreign key to leads_person)
user_id (foreign key to auth_user)
leads_manager:
extenduser_ptr_id (foreign key to leads_extenduser)
leads_teamleader:
extenduser_ptr_id (foreign key to leads_extenduser)
leads_leadsource: none
leads_promotion:
source_id (foreign key to leads_leadsource)
leads_salescompany:
manager_id (foreign key to leads_manager)
leads_division:
company_id (foreign key to leads_salescompany)
manager_id (foreign key to leads_manager)
leads_team:
division_id (foreign key to leads_division)
teamleader_id (foreign key to leads_teamleader)
leads_processingrep:
extenduser_ptr_id (foreign key to leads_extenduser)
manager_id (foreign key to leads_manager)
sales_company_id (foreign key to leads_salescompany)
leads_marketer:
extenduser_ptr_id (foreign key to leads_extenduser)
team_id (foreign key to leads_team)
leads_lead:
customer_id (foreign key to leads_customer)
source_id (foreign key to leads_leadsource)
promotion_id (foreign key to leads_promotion)
sales_company_id (foreign key to leads_salescompany)
division_id (foreign key to leads_division)
team_id (foreign key to leads_team)
marketer_id (foreign key to leads_marketer)
leads_product:
source_id (foreign key to leads_leadsource)
leads_order:
customer_id (foreign key to leads_customer)
16
CIS591: Design / Final Report
17. Part III: Database Design
leads_orderdetail:
order_id (foreign key to leads_order)
product_id (foreign key to leads_product)
reports_report:
created_by_id (foreign key to auth_user)
reports_marketerreport:
report_ptr_id (foreign key to reports_report)
marketer_id (foreign key to leads_marketer)
reports_teamreport:
report_ptr_id (foreign key to reports_report)
team_id (foreign key to leads_team)
reports_divisionreport:
report_ptr_id (foreign key to reports_report)
division_id (foreign key to leads_division)
reports_companyreport:
report_ptr_id (foreign key to reports_report)
sales_company_id (foreign key to leads_salescompany)
Sample Data for Each Table
The following is data in each table separated by table by alphabetical order. Certain tables,
like the django_* tables and the auth_* tables (except auth_user) have been omitted as they’re
filled with mostly auto-generated content by the framework.
auth_user
id username first_name last_nam email passwor is_staff is_active is_superulast_login date_join
e d ser ed
1 bkreeger Benjamin Kreeger benjamink sha1$94855$e
94ff387e576e8
1 1 12009-04- Apr 13, 2009 12:31 PM
reeger@g d06d888ef5ce 25
mail.com be18e815ed8a
ad 19:38:09.
986259
sha1$10db2$8
2 danderson a05e486a21a8
0 1 0 Apr 14, 2009 10:06 2009 12:37 PM
Apr 13, PM
b2e9296edb97
ea678e7c89e0
024
sha1$94a1c
3 afreestone $a4f5c643379
0 1 0 Apr 13, 2009 12:38 2009 12:38 PM
Apr 13, PM
92b464cd9f0ff
8a79ce6876d3
0d88
sha1$c1c0f
4 dahmu $c9675360a14
0 1 0 2009-04- 2009-04-
20db33d81bbd 13 13
d733762868e9
cd68c 12:38:36. 12:38:36.
086690 086701
CIS591: Design / Final Report
17
20. Part III: Database Design
2 6
3 7
4 1
17 9
18 8
20 10
21 11
22 5
23 12
leads_leadsource
id company_name address city state zip_code country phone
1 BidFrog, LLC 629 E. 730th St. American Fork UT 84003 USA 827-363-6383
2 Real Estate Millionaire, Inc 928 Reader Rd American Fork UT 80023 USA 846-454-8494
3 eBay Wealth System, LLC 837 Receipt Dr Salt Lake City UT 84022 USA 836-455-7958
4 Risktakers, Inc. 363 Cliff Blvd Los Angeles CA 90002 USA 837-464-5474
5 World Profit Center 1 Business Way New York NY 23930 USA 455-335-4337
leads_manager
extenduser_ptr_id manager_type
2 company
3 division
17 division
20 company
21 processing
leads_marketer
extenduser_ptr_id commission_rate team_id
4 0.05 1
23 0.05 3
leads_person
id first_name last_name address city state zip_code country phone
1 Daniel Anderson 555 Main St Kearney MO 64060 USA 816-628-5555
2 Boyd Kanenwisher 555 Main St Kearney MO 64060 USA 816-628-5555
3 Rod Wolfley 555 Main St Kearney MO 64060 USA 816-628-5555
4 Benjamin Kreeger 826 S Fort Ave Springfield MO 65806 USA 816-806-7096
5 Eddie James 555 Main St Margaritaville AL 77766 USA 555-555-5555
6 David Caravella 555 Main St Kearney MO 64060 USA 816-903-5555
7 Brandi Carlisle 555 Main St Kearney MO 64060 USA 816-903-5555
8 James Hendrix 555 Main St Kearney MO 64060 USA 816-628-5555
9 James Page 555 Main St Kearney MO 64060 USA 816-628-5555
10 Jim Morrison 555 Main St Kearney MO 64060 USA 816-903-5555
11 Peter Frampton 555 Main St Kearney MO 64060 USA 816-628-5555
12 Ozzy Ozbourne 555 Main St Kearney MO 64060 USA 816-628-5555
13 Robert Plant 555 Main St Kearney MO 64060 USA 816-628-5555
20
CIS591: Design / Final Report
21. Part III: Database Design
14 Stevie Nicks 555 Main St Kearney MO 64060 USA 816-628-5555
15 Frederick Mercury 123 Hello Blvd Hollywood CA 90021 USA 555-555-5555
16 Peter Townshend 123 Hello Blvd Hollywood CA 90021 USA 555-555-5555
17 Jeff Lucas 555 Gerard Way Kansas City MO 64151 USA 816-555-5555
18 Laura Kreeger 826 S Fort Ave Springfield MO 65806 USA 816-806-9656
19 Edward Van Halen 555 Wiley St Miami FL 9142 USA 555-555-5555
20 Leonard Page 555 Wary Way Tulsa OK 72526 USA 555-555-5555
21 Ryan Ellefsen 444 Noname Dr Kearney MO 64060 USA 555-555-5555
22 Eric Taylor 555 Blah Dr American Fork UT 27632 USA 555-555-5555
23 Derrick Wheeler 735 Happy Ln American Fork UT 83752 USA 555-555-5555
leads_processingrep
extenduser_ptr_id manager_id sales_company_id
18 17 1
leads_product
id name source price description pict
_id ure
1 Bidfrog 1 99.99 BidFrog gives you powerful information that will:
• Teach you how to apply a few simple Internet Marketing techniques to explode
your income online!
• Give you the freedom you have always wanted from an Internet income.
• Help you build your Internet business into a source of long-term security.
• And give you creative marketing tips and ideas to turn your online business into a
full-time venture so you can kiss your boss goodbye!
2 Be a Real 2 24.95 BE A REAL ESTATE MILLIONAIRE teaches you Dean Graziosi’s personal strategies for
Estate turning real estate losers into winners. Discover the seven keys to unlocking hidden
Millionaire real estate values.
3 eBay 3 9.95 Keep track of all your eBay auctions. Sell like a pro!
Watcher
4 How to Take 4 59.99 Improve your life and deepen your pockets by taking risks. This book will show you
Risks: A how!
Guide
leads_promotion
id name source_id
1 Bidfrog Online Ads 1
2 REM Online Ads 2
3 eBay Wealth Infomercial 3
4 Risktakers Mass Mailing 4
5 REM Mass Mailing 2
leads_salescompany
id company_name address city stat zip_cod countr phone is_intern manager_
e e y al id
1 National Marketing Resources, 351 W Kearney MO 64060 USA 816-903-61 1 2
LLC Washington 00
CIS591: Design / Final Report
21
22. Part III: Database Design
2 My eBiz 735 E Wilder American UT 80023 USA 555-555-55 1 20
Way Fork 55
leads_team
id division_id teamleader_id
1 1 1
3 3 22
leads_teamleader
extenduser_ptr_id commission_rate
1 0.05
22 0.05
reports_companyreport
report_ptr_id sales_company_id
4 1
reports_divisionreport
report_ptr_id division_id
3 1
reports_marketerreport
report_ptr_id marketer_id
1 4
reports_report
id name description created_at created_by_id start_date end_date
1 Benjamin Kreeger report on Benjamin Kreeger's progress for the firstApr 1, 2009 Apr 24, 2009
A report 2009-04-23 22:00:48.544827 8 half of April.
2 Team Anderson Performance 2009-04-23 22:03:25.693368 8 Apr 1, 2009 Apr 25, 2009
3 Division report ANothing here! 2009-04-25 20:19:44.609280 8 Apr 11, 2009 Apr 25, 2009
4 Company test report
Test! 2009-04-25 20:26:49.119675 8 Apr 1, 2009 Apr 25, 2009
reports_teamreport
report_ptr_id team_id
2 1
22
CIS591: Design / Final Report
23. Part IV: System Controls Design
Part IV: System Controls Design
Input controls and validation
All data validation on forms in the system is handled by Django’s forms API. A class is made
that abstracts specific information about the fields in a database and ensures that the data
entered into a web form meets those specifications (such as max length, numbers only, etc).
All zip code fields, phone number fields, age fields, and monetary fields are specifically
designed to allow numbers as data. If any other data is encountered, an exception is raised
and the user is returned to the form, showing them why their form was rejected and steps to
take to rectify the error. The ‘don’t repeat yourself’ principle of Django means you define data
validation in one place: the models.py file.
from /leads/models.py
class Customer(Person):
age = models.IntegerField(blank=True, null=True)
marital_status = models.CharField(blank=True, max_length=20,
choices=MARITAL_STATUSES)
num_children = models.IntegerField(blank=True, null=True)
assets = models.DecimalField(max_digits=12, decimal_places=2,
blank=True, null=True)
liabilities = models.DecimalField(max_digits=12, decimal_places=2,
blank=True, null=True)
When you declare a form class in Django, the best way to ensure that validation is as you
specify it is to base it on the model, like this form based on the above Customer class.
from /customers/forms.py
class CustomerForm(forms.ModelForm):
class Meta:
model = Customer
When this form is instantiated and passed in context by the view layer, it can either contain
initial data (useful for filling it with POST data and then updating or creating database rows) or
it can be empty. When it’s passed to the template layer, it can be customized in any number
of ways, including listing errors by each field after they occur.
from /templates/customers/customer_edit.html
<div id="panel_left">
<h2>{{ form.first_name }}{{ form.last_name }}
{{ form.first_name.errors }}{{ form.last_name.errors }}<span
class="right">editing</span></h2>
<ul>
CIS591: Design / Final Report
23
24. Part IV: System Controls Design
<li>{{ form.address }}{{ form.address.errors }}</li>
<li>{{ form.city }}{{ form.city.errors }}, {{ form.state }}
{{ form.state.errors }} {{ form.zip_code }}{{ form.zip_code.errors }}</li>
<li>{{ form.country }}{{ form.country.errors }}</li>
<li>{{ form.phone }}{{ form.phone.errors }}</li>
...
Security controls
The web application is currently being hosted at WebFaction (http://webfaction.com/), which
houses its servers stateside in Texas. The app is only accessible via secure HTTP (HTTPS) —
a redirect occurs when a user visits the http:// side of the site to the https:// version. No
information is ever sent over plain text. If hosted elsewhere, this could easily be re-
implemented in Apache’s .conf configuration files.
Users must log in to the system with their credentials to access anything other than the main
Welcome page. A user’s account can be deactivated only by somebody with staff privileges
(equivalent to having master access). Django’s optional auth framework (which I’ve chosen to
utilize for this project) handles user, group, and permission management. So far, I’ve
implemented users as well as basic groups and permissions, but site access is currently open
to all authenticated users until I can further implement permissions and groups per view. The
only exception to this is the admin site, which I’ve locked down to only those who have staff
privileges.
Ensuring only those that are logged in are those that can view web pages is the following
Python decorator before each view (underlined):
@login_required
def new(request):
...
The rest is handled by Django’s auth framework.
The production server, managed by WebFaction, is hosted in The Planet’s Datacenter in
Houston. The following is a rundown from WebFaction’s website on server security:
We've been in business for over 6 years and we use some of the top datacenters
in the world (from The Planet). The datacenter features redundant UPS systems,
generator backup, VESPA detection systems, closed circuit monitoring of all
areas and entrances, 24 hour guard manned security, redundant a/c systems,
and fiber from 5 separate providers.
24
CIS591: Design / Final Report