78

MeteorJS Meetup

Embed Size (px)

Citation preview

the webapp1

the process and tools

some impediments

2

3

the webapp1

the process and tools

some impediments

2

3

• Kanaal Z

Preparedness Readiness

Raise awareness about fatigue.

Get people to buy the book.

Meaningful algorithmQuestionnaire

Attractive results Retest

ReportingStatistics

Be responsiveLook good

User registration

Facebook share

AnalyticsMaintainable

Monitoring Easily deployable

Demo.http://www.rustenishetnieuwesporten.be/

http://www.lereposestlenouveausport.com/

http://www.restisthenewsport.com/

the webapp1

the process and tools

some impediments

2

3

Git

TeamCity Server Docker Server

Test Server

Production Server

Docker Engine

Meteor Application Container

MongoDBContainer

Docker Engine

Meteor Application Container

MongoDBContainer

CI Build Deploy Test Smoketest- Compile- Inspect- Unit Test- Tag Source

- Deploy package to server

- Verify test server

Deploy Prod. Smoketest

- Deploy package to server

- Verify production server

Create Package

- From tagged source

NASANI

meteor add zodiase:mdl

Last week renamed to Meteor Devtools

Git

TeamCity Server Docker Server

Test Server

Production Server

Docker Engine

Meteor Application Container

MongoDBContainer

Docker Engine

Meteor Application Container

MongoDBContainer

CI Build Deploy Test Smoketest- Compile- Inspect- Unit Test- Tag Source

- Deploy package to server

- Verify test server

Deploy Prod. Smoketest

- Deploy package to server

- Verify production server

Create Package

- From tagged source

1 2 3 TEST

meteor add accounts-passwordmeteor add accounts-facebookmeteor add accounts-googlemeteor add kctang:useraccounts-mdlmeteor add useraccounts:iron-routingmeteor add softwarerero:accounts-t9n

meteor add datariot:ganalytics

meteor add gabrielhpugliese:logentries

meteor add meteorhacks:kadirameteor add meteorhacks:zones

the webapp1

the process and tools

some impediments

2

3

Software development is not a science...

… software development is a craft.

Meteor.publish("statistics-counts", function () { var self = this; var usersId = 'users'; var resultsId = 'results'; var usersCount = 0; var resultsCount = 0; var initializing = true;

var usersHandle = Meteor.users.find().observeChanges({ added: function () { usersCount++; if (!initializing) self.changed("counts", usersId, {count: usersCount}); }, removed: function () { usersCount--; if (!initializing) self.changed("counts", usersId, {count: usersCount}); } });

var resultsHandle = Results.find({current: true}).observeChanges({ added: function () { resultsCount++; if (!initializing) self.changed("counts", resultsId, {count: resultsCount}); }, removed: function () { resultsCount--; if (!initializing) self.changed("counts", resultsId, {count: resultsCount}); } });

usersCount = Meteor.users.find().count(); self.added("counts", usersId, {count: usersCount});

resultsCount = Results.find({current: true}).count(); self.added("counts", resultsId, {count: resultsCount});

initializing = false;

self.ready();

self.onStop(function () { usersHandle.stop(); resultsHandle.stop(); });});

Meteor.rbtFunctions.saveLanguage = function (language) { if (Meteor.userId() && Meteor.user()) { if (Meteor.user().hasOwnProperty("profile") && Meteor.user().profile.hasOwnProperty("language") && Meteor.user().profile.language === language) { return; } Meteor.users.update({_id: Meteor.userId()}, { $set: { "profile.language": language } } ); }};

Meteor.rbtFunctions.loadLanguage = function () { if (Meteor.userId() && Meteor.user()) { if (Meteor.user().hasOwnProperty("profile") && Meteor.user().profile.hasOwnProperty("language")) { var language = Meteor.user().profile.language; T9n.setLanguage(language); Session.set('language', language); } else { var lng = Session.get('language'); if (lng) Meteor.rbtFunctions.setLanguage(lng); } }};

Meteor.rbtFunctions.setLanguage = function (language) { Meteor.rbtFunctions.setLanguageWithoutSave(language); Meteor.rbtFunctions.saveLanguage(language); Logger.log(LogLevelEnum.Info, 'setlanguage', language);};

Meteor.rbtFunctions.setLanguageWithoutSave = function (language) { T9n.setLanguage(language); Session.set('language', language); document.title = T9n.get('appTitle');};

Router.route('QuestionIndex', { path: '/questions', name: 'question.index', waitOn: function () { return [ Meteor.subscribe('questions'), Meteor.subscribe('answers') ]; } });

var saveFormData = function () { var profileData = getProfileData();

if (!checkProfileData(profileData)) { clientAlert(T9n.get('fillOutForm'), 'updateUser', 'fillOutForm'); return; }

checkEmail(profileData.email); saveProfileData(profileData); continueUiFlow();};

Template.AccountIndex.onRendered(function () { if ($('[type="date"]').prop('type') !== 'date') { initLegacyDate(['dateOfBirth'], 1900, moment().year()); }

this.autorun(function () { initLegacyDate(['dateOfBirth'], 1900, moment().year()); });

var body = document.getElementsByTagName('body')[0]; body.onkeydown = function (e) { if (e.keyCode === 13 && saveFormData) { saveFormData(); } };});

• Meteor 1.3• Angular or React i.o. Blaze• Javascript modules• Full npm support• Testing

• Full Material Design i.o. Material Design Lite

• RxJS (reactive extensions for javascript)

• Apollo (GraphQL)

• MantraJS

3 takeways

Git

TeamCity Server Docker Server

Test Server

Production Server

Docker Engine

Meteor Application Container

MongoDBContainer

Docker Engine

Meteor Application Container

MongoDBContainer

CI Build Deploy Test Smoketest- Compile- Inspect- Unit Test- Tag Source

- Deploy package to server

- Verify test server

Deploy Prod. Smoketest

- Deploy package to server

- Verify production server

Create Package

- From tagged source

Mind “out-of-the-box”1

Create your own ALM (remember Nasani)Monitor (logging is invaluable, Kadira is priceless)

2

3

Send us a message• E-mailYou can contact us [email protected] me directly [email protected]

• Our addressVeldkant 33a 2550 Kontich

• On the webwww.involved-it.betwitter.com/involved_itlinkedin.com/involved