SlideShare une entreprise Scribd logo
1  sur  50
Télécharger pour lire hors ligne
LETS GET STARTED
ITS JUST ANGULAR
BIO
CAGATAY CIVICI
▸ FOUNDER OF PRIMETEK
▸ EL DESARROLLADOR
▸ JSF EG - APACHE MYFACES
▸ PRIMEFACES
▸ PRIMEUI - PRIMEELEMENTS
▸ PRIMENG
▸ SPEAKER (JavaOne, Devoxx …)
CROSS PLATFORM
PERFORMANCE
TOOLING
ADOPTION
1 VS 2+
MAY 2016
COMMUNITY
LET'S GET STARTED
INTERESTED?
CORE
CORE
LANGUAGES
TYPESCRIPT
JAVASCRIPT
DART
CORE
ARCHITECTURE
<my-app></my-app>
<html>
<head>
<!- scripts —>
</head>
<body>
<my-app>Loading…</my-app>
</body>
</html>
CORE
@COMPONENT
import {Component,Input} from '@angular/core';
@Component({
selector: 'helloworld',
template: ``<div>Hello {{name}}</div>`
})
export class HelloWorldComponent {
@Input() text: string;
}
<helloworld text="Prime"></helloworld>
CORE
@COMPONENT TREE
import {Component,OnInit} from '@angular/core';
import {HelloWorldComponent} from '../helloworld.component';
@Component({
selector: 'my-app',
template: `<h1>Welcome to MyApp</h1>
<helloworld [text]="user></helloworld>`
})
export class AppComponent implements OnInit {
user: string;
ngOnInit() {
this.user = //load user
}
}
<my-app></my-app>
CORE
TEMPLATE SYNTAX AND BINDING
CORE
TEMPLATE SYNTAX AND BINDING
▸ {{property}}
▸ [value]="property", [value]="10", [value]="'10'"
▸ [(value)]="property"
▸ (click)="onButtonClick($event)"
▸ [ngClass]="{'ui-disabled':disabled,'ui-active':active}"
CORE
STRUCTURAL DIRECTIVES
import {Component,OnInit} from '@angular/core';
@Component({
selector: 'my-component',
template: `<div *ngIf="active">…</div>
<ul>
<li *ngFor="let item of items">
{{item}}
</li>
</ul>`
})
export class MyComponent implements OnInit {
active: boolean;
items: string[] = ['Omega','Poseidon','Icarus','Atlantis','Ultima'];
}
CORE
@DIRECTIVE
import {Directive} from '@angular/core';
@Directive({
selector: 'tooltip'
})
export class TooltipDirective {
@Input text: string;
@HostListener('mouseenter', ['$event'])
onMouseEnter(e: Event) {
this.show();
}
show() {
//create tooltip and show
}
}
<input text="text" tooltip text="Username">
FORMS
FORMS
TEMPLATE DRIVEN - NGMODEL
<input type"text" [(ngModel)]="user">
FORMS
NGMODEL
import {Component,OnInit} from '@angular/core';
@Component({
selector: 'my-component',
template: `<input type="text" [(ngModel)]="user">
})
export class MyComponent implements OnInit {
user: string;
}
FORMS
MODEL DRIVEN - REACTIVE
<input type"text" formControlName="user">
FORMS
MODEL DRIVEN - REACTIVE
<form [formGroup]="userform" (ngSubmit)="onSubmit(userform.value)">
<input pInputText type="text" formControlName="firstname" placeholder="Required"/>
</form>
@Component({
selector: 'my-component',
templateURL: 'my.component.html'
})
export class MyComponent implements OnInit {
userform: FormGroup;
constructor(private fb: FormBuilder) {}
ngOnInit() {
this.userform = this.fb.group({
'user': new FormControl('', Validators.required),
});
}}
DEPENDENCY
INJECTION
DEPENDENCY INJECTION
@INJECTABLE
import {Injectable} from '@angular/core';
import {Http, Response} from '@angular/http';
import {Car} from '../domain/car';
@Injectable()
export class CarService {
constructor(private http: Http) {}
getUser() {
return this.http.get('/cars/list')
.toPromise()
.then(res => <Car[]> res.json().data)
.then(data => { return data; });
}
}
DEPENDENCY INJECTION
INJECTION
import {Component,OnInit} from '@angular/core';
import {Car} from '../domain/car';
import {CarService} from '../service/carservice';
@Component({
templateUrl: 'showcase/demo/datatable/datatabledemo.html'
})
export class DataTableDemo implements OnInit {
cars: Car[];
constructor(private carService: CarService) { }
ngOnInit() {
this.carService.loadCars().then(cars => this.cars = cars);
}
}
MODULAR
IMPORT
DECLARE
EXPORT
MODULAR
MODULES
MODULAR
MODULES
MODULE A
COMPONENT X
COMPONENT Y
MODULE B
COMPONENT M
COMPONENT N
MODULE C
COMPONENT T
DIRECTIVE H
B IMPORTS A
B IMPORTS C
MODULAR
NGMODULE
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
@NgModule({
imports: [
CommonModule,
],
declarations: [
ComponentA1,
ComponentA2
],
exports: [
ComponentA1
]
})
export class ModuleA { }
MODULAR
NGMODULE
import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {ModuleA} from 'modulea.module';
@NgModule({
imports: [
CommonModule,
ModuleA
],
declarations: [
ComponentB1,
ComponentB2
]
})
export class ModuleB { }
MODULAR
MODULAR APPS
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {BrowserModule} from '@angular/platform-browser';
import {HttpModule} from '@angular/http';
@NgModule({
imports: [
BrowserModule,
FormsModule,
HttpModule,
BrowserModule
],
declarations: [
AppComponent,
HomePageComponent
],
bootstrap: [AppComponent]
})
export class AppModule { }
ROUTER
ROUTER
ROUTER
INDEX
(SPA)
MAIN
CREATE
DETAIL
CONFIRM
ROUTER
ROUTES AND ROUTERMODULE
import {Routes,RouterModule} from '@angular/router';
import {ModuleWithProviders} from '@angular/core';
import {MainViewComponent} from './app/view/mainview.component';
import {CreateViewComponent} from './demo/view/createview.component';
import {DetailViewComponent} from './demo/view/detailview.component';
export const routes: Routes = [
{path: '', component: MainViewComponent},
{path: 'create', component: CreateViewComponent},
{path: 'detail', component: DetailViewComponent},
];
export const AppRoutes: ModuleWithProviders = RouterModule.forRoot(routes);
import {NgModule} from '@angular/core';
import {AppRoutes} from './app.routes';
@NgModule({
imports: [
AppRoutes,
//…
ROUTER
ROUTERLINK
<a [routerLink]="['/']">Home</a>
<a [routerLink]="['/create']">Create</a>
<a [routerLink]="['/detail']">Detail</a>
ROUTER
LOCATION STRATEGY
http://www.mypp.com/create
REGULAR
http://www.mypp.com/#/create
HASH
DEMO
PRIMENG
UI
PRIMENG
70+ UI COMPONENTS MIT LICENSE
THEMES AND TEMPLATES PRO SUPPORT
PRIMENG
TEMPLATES
DEMO
MORE STUFF
ADVANCED
LAZY ROUTES - LOAD ON DEMAND
INDEX
(SPA)
MAIN
CREATE
DETAIL
CONFIRM
SYSTEMJS
WEBPACK ?
ADVANCED
COMPILER
JIT AOT
DEV PROD
COMPILE ON BROWSER COMPILE ON BUILD
SLOWER FAST
BIGGER BUNDLE SMALLER BUNDLE
MORE
FEATURES TO FOLLOW UP
ANIMATION API
(TRIGGERS, STATE…)
OBSERVABLES
(RXJS)
STYLING
(VIEWENCAPSULATION)
TESTING
(JASMINE,KARMA,
PROTRACTOR…)
SECURITY
(CANACTIVATE…)
CHANGE DETECTION
(PUSH VS REGULAR)
SERVER RENDERING
WRAP UP
TIPS
▸ Webpack instead of System.js
▸ Use CLI
▸ AOT and Lazy loading for Production
▸ Use PrimeNG
QUESTIONS?
- Is it stable?
- Should I use it?
- vs React vs Vue?
- Which UI Lib to choose?
- Should I upgrade?
- Should I do backend instead?

Contenu connexe

Tendances

Models, Programs and Executable UML
Models, Programs and Executable UMLModels, Programs and Executable UML
Models, Programs and Executable UML
Ed Seidewitz
 

Tendances (12)

Angular workshop - Full Development Guide
Angular workshop - Full Development GuideAngular workshop - Full Development Guide
Angular workshop - Full Development Guide
 
A Unified View of Modeling and Programming
A Unified View of Modeling and ProgrammingA Unified View of Modeling and Programming
A Unified View of Modeling and Programming
 
Models, Programs and Executable UML
Models, Programs and Executable UMLModels, Programs and Executable UML
Models, Programs and Executable UML
 
Hidden Docs in Angular
Hidden Docs in AngularHidden Docs in Angular
Hidden Docs in Angular
 
UML as a Programming Language
UML as a Programming LanguageUML as a Programming Language
UML as a Programming Language
 
Dart for Java Developers
Dart for Java DevelopersDart for Java Developers
Dart for Java Developers
 
Dependency injection with koin
Dependency injection with koinDependency injection with koin
Dependency injection with koin
 
How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...How to upgrade your application with no downtime (using edition-based redefin...
How to upgrade your application with no downtime (using edition-based redefin...
 
Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)
 
C and C++ Industrial Training Jalandhar
C and C++ Industrial Training JalandharC and C++ Industrial Training Jalandhar
C and C++ Industrial Training Jalandhar
 
4.Spring IoC&DI(Spring Ioc실습_어노테이션 기반)
4.Spring IoC&DI(Spring Ioc실습_어노테이션 기반)4.Spring IoC&DI(Spring Ioc실습_어노테이션 기반)
4.Spring IoC&DI(Spring Ioc실습_어노테이션 기반)
 
Building maintainable app #droidconzg
Building maintainable app #droidconzgBuilding maintainable app #droidconzg
Building maintainable app #droidconzg
 

Similaire à Itsjustangular

Similaire à Itsjustangular (20)

Angular2: Quick overview with 2do app example
Angular2: Quick overview with 2do app exampleAngular2: Quick overview with 2do app example
Angular2: Quick overview with 2do app example
 
Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)Jan 2017 - a web of applications (angular 2)
Jan 2017 - a web of applications (angular 2)
 
angular fundamentals.pdf angular fundamentals.pdf
angular fundamentals.pdf angular fundamentals.pdfangular fundamentals.pdf angular fundamentals.pdf
angular fundamentals.pdf angular fundamentals.pdf
 
Angular 2 - The Next Framework
Angular 2 - The Next FrameworkAngular 2 - The Next Framework
Angular 2 - The Next Framework
 
Basic overview of Angular
Basic overview of AngularBasic overview of Angular
Basic overview of Angular
 
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
Паразитируем на React-экосистеме (Angular 4+) / Алексей Охрименко (IPONWEB)
 
Angular Workshop FrOSCon 2018
Angular Workshop  FrOSCon 2018Angular Workshop  FrOSCon 2018
Angular Workshop FrOSCon 2018
 
PWA night vol.11 20191218
PWA night vol.11 20191218PWA night vol.11 20191218
PWA night vol.11 20191218
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)Single Page Applications in Angular (italiano)
Single Page Applications in Angular (italiano)
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 
Angular 2 with TypeScript
Angular 2 with TypeScriptAngular 2 with TypeScript
Angular 2 with TypeScript
 
Stencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrivedStencil the time for vanilla web components has arrived
Stencil the time for vanilla web components has arrived
 
Angular 2 NgModule
Angular 2 NgModuleAngular 2 NgModule
Angular 2 NgModule
 
Building a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web ServicesBuilding a TV show with Angular, Bootstrap, and Web Services
Building a TV show with Angular, Bootstrap, and Web Services
 
Angular 2 in-1
Angular 2 in-1 Angular 2 in-1
Angular 2 in-1
 
Web components with Angular
Web components with AngularWeb components with Angular
Web components with Angular
 
Angular Mini Hackathon Code Talks 2019
Angular Mini Hackathon Code Talks 2019Angular Mini Hackathon Code Talks 2019
Angular Mini Hackathon Code Talks 2019
 
22Flutter.pdf
22Flutter.pdf22Flutter.pdf
22Flutter.pdf
 
Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)Angular 2 Architecture (Bucharest 26/10/2016)
Angular 2 Architecture (Bucharest 26/10/2016)
 

Plus de cagataycivici (11)

PrimeNG - Components para la Vida Real
PrimeNG - Components para la Vida RealPrimeNG - Components para la Vida Real
PrimeNG - Components para la Vida Real
 
How to Mess Up Your Angular UI Components
How to Mess Up Your Angular UI ComponentsHow to Mess Up Your Angular UI Components
How to Mess Up Your Angular UI Components
 
PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014PrimeTime JSF with PrimeFaces - Dec 2014
PrimeTime JSF with PrimeFaces - Dec 2014
 
PrimeFaces User Guide 5.0
PrimeFaces User Guide 5.0PrimeFaces User Guide 5.0
PrimeFaces User Guide 5.0
 
Primefaces Confess 2012
Primefaces Confess 2012Primefaces Confess 2012
Primefaces Confess 2012
 
Myfacesplanet
MyfacesplanetMyfacesplanet
Myfacesplanet
 
Jsfandsecurity
JsfandsecurityJsfandsecurity
Jsfandsecurity
 
14 Fr 13 Civici Component Library Showdown
14 Fr 13 Civici Component Library Showdown14 Fr 13 Civici Component Library Showdown
14 Fr 13 Civici Component Library Showdown
 
Open Your Source
Open Your SourceOpen Your Source
Open Your Source
 
Facelets
FaceletsFacelets
Facelets
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 

Dernier

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Dernier (20)

%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Itsjustangular