26
Application in 24h Fast prototyping of rich UI applications using AngularJS, RequireJS, jQuery by Yuriy V. Silvestrov, Mikhail Valkov @ysilvestrov, @valkovnet

Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Embed Size (px)

DESCRIPTION

Presentation have been taken at KyivJS conference, 2012

Citation preview

Page 1: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Application in 24hFast prototyping of rich UI applications using

AngularJS, RequireJS, jQuery

by Yuriy V. Silvestrov, Mikhail Valkov

@ysilvestrov, @valkovnet

Page 2: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

About us

Yuriy V. Silvestrov10+ years record in IT, 8+ years devoted to managing projects. Now working for Ciklum, managing a team of 30+ persons making different software for Danish financial organizations; also I am CTO in PromoRepublic startup.

Twitter: @ysilvestrov

Please visit my website http://yuriy.silvestrov.comfor more info or contact me at [email protected].

@ysilvestrov, @valkovnet

Page 3: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

About us

Mikhail Valkov10+ years record in IT. 2+ years devoted to system architecture. Now working for Ciklum.

for more info contact me at [email protected].

@ysilvestrov, @valkovnet

Page 4: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

About lectionBased on our own experience

Useful for startups and pet projects

Not the right way, not the best way, but the fast one.

Divide and conquer

@ysilvestrov, @valkovnet

Page 5: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Time is counting

⌛ < 30

@ysilvestrov, @valkovnet

Page 6: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

How many of you

Have tried to do a startup?

Participated in Hakatons or similar events?

Is JavaScript/HTML5 expert?

Is AngularJS/RequireJS expert?

We’ll try to adapt

@ysilvestrov, @valkovnet

Page 7: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Content

Startup mode ON◦When do we need quick prototyping?◦How to quick prototype an app?

JavaScript tricks◦MVC in JavaScript◦jQuery and jQuery plugins◦AngularJS◦RequireJS, Modules and AMD

Design tips◦Using bootstraps (twitter etc.)◦Responsive design

Q&A

@ysilvestrov, @valkovnet

Page 8: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Prototyping

A way to write something useful and not to spend years on it

Prototyping = Minimum Viable Product creation◦If you’ll fail, it would be fast◦If not, you’ll have plenty of time to refactor the

application◦…while the “prototype” is still in use

@ysilvestrov, @valkovnet

Page 9: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Demo application:what we’ve started with

Alarm clocks with skinning and time synchronization

See on BitBucket:◦http://bitbucket.org/ysilvestrov/alarm-clock

See online demo:◦http://jayostudio.net/app/

@ysilvestrov, @valkovnet

Page 10: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Promotion template:what we’re to use it for

An ability to quickly alter UI (or create totally new one) leaving the promotion mechanic unchanged

One app to rule them all: from mobiles to tablets and desktops

< 24 hours to make it

@ysilvestrov, @valkovnet

Page 11: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

How to prototype

Choose platformDownload seed for chosen platformQuick UIChoose vital functionality to prototype Find the frameworks/solutions realizing

the functionalityCompose all together…PROFIT

@ysilvestrov, @valkovnet

Page 12: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Client-side JavaScript

Plain, vanilla Client-Side JS & HTML5

No CoffeeScript

No node.js

@ysilvestrov, @valkovnet

Page 13: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Component development

Use 3-rd party components

Existing online services◦Prefer ones implementing REST interface

If to create new ones – create them with REST

Use dependency managers to integrate

@ysilvestrov, @valkovnet

Page 14: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

jQuery and plugins@ysilvestrov, @valkovnet

Page 15: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Angular JS

One of 20+ MVC JS frameworksSupported by GoogleIntegrated

◦Templates◦Directives and filters◦Module systems◦Resources◦Asynchronous programming

Visit http://angularjs.org for details

@ysilvestrov, @valkovnet

Page 16: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

AngularJS: template and controller

Template

Controller

@ysilvestrov, @valkovnet

Page 17: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

AngularJS:routes and events

Routes

Events

@ysilvestrov, @valkovnet

Page 18: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

RequireJS

Dependency isolation

Dependency management

Modules loading & cashing

Visit http://requirejs.org/ for details

@ysilvestrov, @valkovnet

Page 19: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Modules and AMD

AMD = Asynchronous Module Definition

CommonJS

See https://github.com/amdjs/amdjs-api

@ysilvestrov, @valkovnet

Page 20: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Bootstrap usage

Twitter bootstrap http://twitter.github.com/bootstrap/◦Made for everyone

◦Packed with features

@ysilvestrov, @valkovnet

Page 21: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Twitter bootstrap extensions

Jasny bootstrap(http://jasny.github.com/bootstrap/)◦Row links, Input mask, File upload◦… and much more

Kickstrap (http://getkickstrap.com/)◦Bootstrap with blackjack and hookers ◦actually, with apps and themes

@ysilvestrov, @valkovnet

Page 22: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Angular Seed

https://github.com/angular/angular-seedhttps://github.com/ysilvestrov/angular-seed

@ysilvestrov, @valkovnet

Page 23: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Requiring Angular:what’s inside

Use domReady! plugin to start Angular bootstrap at a time

Page 24: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Requiring Angular:what’s inside

Do not use “define” for controllers – you’d to return too much

Use services to manage controllers dependencies

Page 25: Fast prototyping apps using AngularJS, RequireJS and Twitter Bootstrap

Questions?

???

@ysilvestrov, @valkovnet