Top Banner
Web development Tips and tricks By Mahmoud AlZarroug
29

Web development tips and tricks

Jan 15, 2015

Download

Documents

maxo_64

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Web development tips and tricks

Web development

Tips and tricksBy Mahmoud AlZarroug

Page 2: Web development tips and tricks

Highlights• Definition

• Architectureo Storage Tiero Server TieroClient Tier

• Common tips

Page 3: Web development tips and tricks

A Web application is..• An application that utilizes Web browsers to

accomplish one or more tasks over a network

• It can be a simple static page or as advanced as a social network

• Examples:o Twitter, Google Search, Facebook, GMail, Angry

Birds (HTML5 version).. etc

Page 4: Web development tips and tricks

Architecture

Page 5: Web development tips and tricks

Web applications

Page 6: Web development tips and tricks

Client-Server communication

Page 7: Web development tips and tricks

Storage Tier

Page 8: Web development tips and tricks

Storage Tier Where information is stored and retrieved.

Page 9: Web development tips and tricks

What to choose?

Page 10: Web development tips and tricks

Relational database• Utilize relationship between tables

• Flexible

• Easy to update/delete records

• Avoids duplicate data

Page 11: Web development tips and tricks

NoSQL database• Schema-less approach

• Easy to Scale

• Fast !

Page 12: Web development tips and tricks

What database to choose?

Depends on your Software requirements

Page 13: Web development tips and tricks

Server Tier

Page 14: Web development tips and tricks

Server side scripting

Page 15: Web development tips and tricks

Key rules• Security

• Performance

• Scalability

Page 16: Web development tips and tricks

Server Tier: Security• Cross Site Scripting (XSS):

o enables attackers to inject client-side script into Web pages viewed by other users

• SQL injection:o done by passing SQL statements in an entry field in an attempt

to get the website to pass rogue SQL command to the database

• denial-of-service attack (DoS attack):o an attempt to make a machine or network resource

unavailable to its intended users

• Remote code execution:o ability to execute any commands of the attacker's choice on a

target machine or in a target process

Page 17: Web development tips and tricks

Server Tier: Performance

• Minimize response time• Code matters !!

o Find the simplest solution to a problemo Avoid too many database callso Merge loopso Review your algorithms

Page 18: Web development tips and tricks

Server Tier: Performance

• Cache pages

• Cache database queries

• Use “Cache-Control” headers

• Cache function returns

Page 19: Web development tips and tricks

Server Tier: Performance

• Merge JavaScript in a single file

• Merge CSS in a single file

• Compress CSS and JS in production

Page 20: Web development tips and tricks

Server Tier: Scalability

• The ability of a system to handle a growing amount of work in a capable manner or its ability to be enlarged to accommodate that growth

Page 21: Web development tips and tricks

Scalability methods

Page 22: Web development tips and tricks

Client Tier

Page 23: Web development tips and tricks

Client Tier• Client Side Programming

• User Experience

• Browsers Compatibility

Page 24: Web development tips and tricks

Client Side Programming

Flash

Page 25: Web development tips and tricks

User Experience1. Make pages load faster2. Don’t make the user think

Use clear navigation, clear language, clear layout

3. First Impressions Matter4. Show Your Credentials

Buy a SSL cert if required, write copyrights professionally

5. Remove stuffCluttered content, ads

Page 26: Web development tips and tricks

Browsers Compatibility

You will definitely hate this guy

Page 27: Web development tips and tricks

How to avoid it?• First step to avoid browsers compatibility issues is

to know your users and the most common browsers between them

• Minimize using CSS3 and HTML5 if possible or use an alternative depends on the browser

• Use JS frameworks/libraries like Jquery or MooTools

Page 28: Web development tips and tricks

Common Web development tips

• For rapid development use MVC frameworks:o CodeIgniter, CakePHP, Django, ASP.NET

• Use Cloud solutions for server architecture:o Amazon AWS, IBM Cloud, Azure

• “Simplicity is the soul of efficiency”o -Austin Freeman

• “Make it Work Before You Make it Fast”o -Brian Smits

Page 29: Web development tips and tricks

Questions?

Contact me anytime at: mahmoud @ acadox .com

Or Twitter: @MaXo