/
contents.tex
381 lines (360 loc) · 8.87 KB
/
contents.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
\include{extsize}
\documentclass[19.9pt]{beamer}
\usepackage{listings}
\usetheme{Singapore}
%\setbeamerfont{frametitle}{size=\normalsize}
%\setbeamerfont{title}{size=\normalsize}
%\useoutertheme{}
\newcommand{\txtonimg}[1]{
\begin{center}
\fcolorbox{red}{black}{
\textcolor{white}
{#1}
}
\end{center}
}
\newcommand{\img}[1]{
\begin{center}
\includegraphics[height=6cm]{images/#1}
\end{center}
}
\newcommand{\imgslide}[2]{
{\setbeamertemplate{background canvas}{
\includegraphics [width=\paperwidth,height=\paperheight]{images/#1}}
\begin{frame}[plain]
\txtonimg{#2}
\end{frame}
}
}
\newcommand{\pycode}[1]{
\lstset{language=python}
\lstinputlisting{code/#1}
}
\newcommand{\htmlcodesm}[1]{
\lstset{language=html}
\small
\lstinputlisting{code/#1}
}
\newcommand{\pycodesm}[1]{
\small
\pycode{#1}
}
\newcommand{\pycodetiny}[1]{
\tiny
\pycode{#1}
}
\title{Building Pluggable Web Applications using
}
\institute{Agiliq Solutions}
\subtitle{\includegraphics[height=1cm]{images/django.png}}
\author{Lakshman Prasad}
\date{
\includegraphics[height=1cm]{images/GIDS_Logo.jpg}\linebreak
April 21, 2010}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\section{Introduction}
\subsection{Definition}
{\setbeamertemplate{background canvas}{
\includegraphics [width=\paperwidth,height=\paperheight]{images/pony.jpg}}
\begin{frame}
{\includegraphics[height=1cm]{images/django.png}\linebreak
\includegraphics[height=1cm]{images/python-logo.png}}
\begin{itemize} \item
For building \alert{database driven} web applications \pause \item
Emphasis on Reuse, DRY and simplicity
\end{itemize}
\end{frame}
}
\subsection{A Case Study: Youtube Stars}
\begin{frame}
{Hypothetical Application}
\img{amazonscreen2.jpg}
\end{frame}
\begin{frame}[fragile]
{Install a pluggable app \alert{django-star-rating} }
\begin{verbatim}
$pip install django-star-rating
\end{verbatim}
\lstset{language=python}
\lstinputlisting{code/settings.py}
\end{frame}
\begin{frame}
{Point to an url pattern}
\lstset{language=python}
\lstinputlisting{code/urls.py}
\end{frame}
\begin{frame}
{Put the rating where you want!}
\lstset{language=html}
\lstinputlisting{code/rating.html}
\end{frame}
\begin{frame}
{Thats it!}
\img{umoja2.jpg}
\end{frame}
\begin{frame}
\tableofcontents
\end{frame}
\subsection{Overview}
\begin{frame}
{Developed at Lawrence-Journal World}
\img{core_devs.jpg}
\end{frame}
\imgslide{exponential.jpg}{~5 million hits per month}
\imgslide{600contributors.jpg}{~600 Contributors}
\imgslide{hands.jpg}{~Majority of the features community contributed}
\imgslide{5-years.jpg}{~5 years since Open Source}
\subsection{Philosophy}
\begin{frame}
{Philosophy}
\img{philosophy.jpg}
\end{frame}
\imgslide{repeat.jpg}{Automate repetitive tasks}
\imgslide{make-development-fast.jpg}{Make Development Fast}
\begin{frame}
{Convention Over Configuration}
\img{convention.jpg}
\end{frame}
\imgslide{bestpractices.jpg}{Follow Best Practices}
\section{Using django}
\subsection{MTV}
\imgslide{mtv.jpg}{Models-Templates-Views}
\imgslide{models.jpg}{Models}
\begin{frame}
{Model Syntax}
\pycodesm{models.py}
\end{frame}
\begin{frame}
{Model API}
\pycodesm{model_api.py}
\end{frame}
\begin{frame}
{Admin by models alone}
\img{admin.png}
\end{frame}
\begin{frame}
{Admin Syntax}
\pycodesm{admin.py}
\end{frame}
\imgslide{admin1.jpg}{List Page}
\imgslide{admin2.jpg}{Add an Entry}
\imgslide{admin4.jpg}{Auto Validation}
\begin{frame}
{Ugly urls}
\pycode{uglyurl.txt}
\end{frame}
\begin{frame}
{Good urls}
\pycode{goodurl.txt}
\end{frame}
\begin{frame}
{django url pattern}
\pycode{urls.py}
\end{frame}
\imgslide{antenna.jpg}{Views}
\begin{frame}
{django views}
\pycodesm{views_basic.py}
\end{frame}
\begin{frame}
{django views}
\pycodesm{views.py}
\end{frame}
\imgslide{template.jpg}{Templates}
\begin{frame}
{django template}
\htmlcodesm{template.html}
\end{frame}
\section{Features of django}
\subsection{Features}
\imgslide{swiss-army-knife.jpg}{Features}
\begin{frame}
\begin{itemize}[<+-| alert@+>] \item
Admin Interface \item
Generic Views \item
Testing Tools \item
Sessions \item
Authentication \item
Caching \item
Internationalization \item
RSS \item
CSRF protection \item
File Storage
\end{itemize}
\end{frame}
\imgslide{djangodoc2.jpg}{Django Documentation}
\section{Reuseable apps}
\subsection{Writing reuseable apps}
\begin{frame}
{General conventions adopted by the community}
\img{keepleft.jpg}
\end{frame}
\begin{frame}[fragile]
{Use template tags}
\pycodesm{templatetag.py}
\end{frame}
\begin{frame}
{Use Signals}
\pycodesm{signals.py}
\end{frame}
\begin{frame}[fragile]
{Basics}
\begin{itemize}[<+-| alert@+>] \item
Take \verb|template_name| and \verb|extra_context| every where \item
Write urls in applications \item
Import from the application level \item
Prefix template name with directory \item
Use \verb|MEDIA_URL| in templates \item
Reverse url patterns
\end{itemize}
\end{frame}
\begin{frame}
{Basics Done right}
\pycodesm{basicright.py}
\end{frame}
\begin{frame}
{Advanced}
\begin{itemize}[<+-| alert@+>]
\item
Use Template Response
\item
Write Views as Classes
\end{itemize}
\end{frame}
\subsection{Community Applications}
\imgslide{apps.png}{There is an app for that}
\imgslide{choices.jpg}{For every size and style}
\begin{frame}
{Github Search "django"}
\img{3000.jpg}
\end{frame}
\begin{frame}
\img{pinax2.jpg}
\end{frame}
\begin{frame}
{Pinax Features}
\begin{itemize}
\item
openid support
\item
email verification
\item
password management
\item
site announcements
\item
a notification framework
\item
user-to-user messaging
\item
friend invitation (both internal and external to the site)
\item
a basic twitter clone
\item
oembed support
\item
gravatar support
\item
interest groups (called tribes)
\item
projects with basic task and issue management
\item
threaded discussions
\item
wikis with multiple markup support
\item
blogging
\item
bookmarks
\item
tagging
\item
contact import (from vCard, Google or Yahoo)
\item
photo management
\end{itemize}
\end{frame}
\begin{frame}
{django-mingus}
\begin{columns}
\begin{column}{5cm}
\pycodesm{mingus.py}
\end{column}
\begin{column}{5cm}
\pycodesm{mingus2.py}
\end{column}
\end{columns}
\end{frame}
\section{End Notes}
\subsection{Django Stats}
\imgslide{users.jpg}{Django users}
\begin{frame}
{Popular Users}
\begin{itemize}
\item
Media
\begin{itemize}
\item
LA Times
\item
NY Times
\item
Washington Post
\item
Guardian
\end{itemize}
\pause \item
Web2.0
\begin{itemize}
\item
Mahalo: 10 million Page views
\item
Pownce, SixApart
\end{itemize}
\pause \item
Full List: djangosites.com
\end{itemize}
\end{frame}
\begin{frame}
{NASA}
\begin{quotation}
After an extensive trade study, we selected Django ...
as the first and primary application environment for
the Nebula Cloud.
\end{quotation}
\end{frame}
\subsection{Common Enterprise Hurdles}
\begin{frame}
{Enterprise Adoption Hurdles}
\begin{itemize}[<+-| alert@+>]
\item
Multiple Databases
\item
Dynamic settings infrastructure
\item
Tools
\end{itemize}
\end{frame}
\subsection{Other}
\begin{frame}
{About Me}
\begin{itemize}
\item
lakshman@agiliqsolutions.com, @becomingGuru
\item
Agiliq Solutions Formerly, Usware Technologies @agiliq
\item
Team of Expert Django Developers, Happy Clients
\img{mapnew.jpg}
\end{itemize}
\end{frame}
\imgslide{agiliqscreen.jpg}{http://www.agiliqsolutions.com/}
\begin{frame}
{Image Attributions}
\pycodetiny{sources.txt}
\end{frame}
\imgslide{pony.jpg}{?}
\end{document}