wk04

townripeData Management

Jan 31, 2013 (4 years and 6 months ago)

237 views

Week 04

William Liang

SD5952 New Opportunities in Digital Media

3
-
tier Architecture

Software Architecture


LAMP/LAPR

o
Linux, Apache, MySQL/PostgreSQL, PHP/Perl/Python/RoR


WAMP/WIMP


JAVA + Hibernate + Stripes/Struts


ASP.NET


Google Web Toolkit (Javascript +
Java)

Object Oriented


It's all about code reuse!


Procedural vs. OO


Overhead=inefficiency


Procedural for small/one
-
time/efficient
projects


OO for larger/longer projects at cost of
inefficiency

MVC


Model
-
View
-
Controller Arch. Pattern


Data model


Business Rules


User Presentation


Code Reuse/Maintainability

Agile Development


XP


Pair Programming

Scrum

Test
-
Driven Development


Design tests first before coding


Unit tests


Continuous automated testing

Web Frameworks


Pro: Fast common implementation


Con: Heavy penalty for customization


Remember to consider ease of hiring team
when choosing one

Ruby on Rails


Open Source


aka RoR


Ruby is a programming language


Rails is a web app framework


Fast from prototype to market


Not efficient = hard to scale


Best for starting a new project


Less shared host support it

Django


Open Source


Python


Focus on reusability and modular design


Uses Python unit
-
test framework


Designer
-
friendly template language

Google Web Toolkit

http://code.google.com/webtoolkit/examples/



Open Source


Java
-
>Optimized Javascript


Focus on cross browser compatibility


AJAX


Reusable UI components


JUnit


Mobile and tablet app


Used by Google for many of its apps

Node.js


Open Source


Trendy


End
-
to
-
End Javascript


Mobile friendly


May not be efficient

CakePHP


Open Source


PHP 4 5


MVP


Most shared hosting support it

Zend PHP


Another Open source PHP Framework


MVP


PHP 5 = OO

ASP.NET


Proprietary

Open Source CMS


Wordpress


Drupal


Joomla


more...

Open Source e
-
Commerce


Magento


OScommerce


Zen Cart


more...

Source Rev. Control


CVS


SVN


Git


Perforce


Mercurial

Selenium

Robotium Demo

Sikuli

Servers

Server Racks

Web Hosting


Often bundled with domain reg.


Managed uptime


Restricted access/software


Fine for "typical" web site


Limited storage/bandwidth


Consider geography


As low as HKD250 yearly

Colocation (Colo)


Mid
-
size Enterprise


IT staff needed


Space


Power (UPS)


Bandwidth


Heat


Security/Access


Disaster Proof


Geo
-
redundancy

Cloud Computing

Amazon EC2/S3


Elastic Compute Cloud (EC2)

o
Automated scaling

o
Free credit

o
Windows or
Linux/Solaris/FreeBSD

o
US$7.32/month for 3yr prepay



Simple Storage Service (S3)


Rackspace CS


Pay
-
as
-
you
-
go


Hybrid hosting


Physical server irrelevant


Small upfront cost


Grow as needed

Google App Engine


aka Google cloud service


GWT + App Engine


Python/Java/Go


Django app run natively


Pay only for CPU, bandwidth, storage,
and e
-
mails used in excess of the free
quotas

Microsoft Azure


.NET cloud hosting


Compute/Storage/Fabric

Reliability

Uptime


Load balancing


Redundancy

o
Link

o
DB

o
Physical location

o
Server


Monitoring and Alarming


Automated scheduled backup

Scalability


Client
-
side cache


Server
-
side cache


Load balancing


CDN


Offload computation to client


State
-
less server


Architecture choice


Elastic Cloud

Stay Lean

In general, never build something until
you see a clear need, but do be mindful
of the risks.