Presentation is loading. Please wait.

Presentation is loading. Please wait.

Meteor Project Structure

Similar presentations


Presentation on theme: "Meteor Project Structure"— Presentation transcript:

1 Meteor Project Structure
How to prevent spaghetti code and chaos Peter Ilfrich – Software IBM Research Australia

2 This presentation may contain a personal opinion
WARNING!!! This presentation may contain a personal opinion

3 Boilerplate / Template
git clone Folder Structure Fixtures Useful Packages Data Migration Global Template Helpers CSS Helpers Example Code Router Collections + Schema Views

4 Core Folder Structure client compatibility server public private tests

5 Shared Folder client compatibility server shared model routes public
private tests

6 Server Folder client compatibility server init methods publications
shared model routes public private tests

7 Client Folder client compatibility init views server init methods
publications shared model routes public private tests

8 Init / Compatibility client compatibility init views
Common functionality Function declaration 3rd party libraries (excl. NPM, Atmosphere) Compatibility Init Client initialization Environment Global Subscriptions

9 Views client compatibility init views common.less variables.less
globalhelpers.js globalevents.js layout.html Files Folders login/login.html login/login.less login/login.js header/header.html header/header.less header/header.js dashboard/dashboard.html dashboard/dashboard.less dashboard/dashboard.js

10 Server Folder server init methods publications Init dbinit.js
dbmigrate.js 1 file per business object (user, category, entry, post, …) Too many business objects? Group them into sub-folders Methods Publications 1 file per collection Each file contains all publications for a collection

11 Shared Folder shared model routes Model 1 file per collection
Attach schema to collection Specify access privileges and hooks Routes Small Applications 1 file /server/routes.js Larger Applications Group routes into separate files /server/routes/mainroutes.js /server/routes/adminroutes.js /server/routes/apiroutes.js

12 Packages Core Authentication / Security Database Optional Utility less
jquery mizzao:bootstrap-3 iron:router Database aldeed:collections2 matb33:collection-hooks tmeasday:publish-counts meteorhacks:aggregate Utility reactive-var http momentjs:moment Authentication / Security accounts-password browser-policy Optional tsega:bootstrap3-datetimepicker mrt:bootstrap3-typeahead mrt:filesaver johdirr:meteor-git-rev juliancwirko:s-alert fortawesome:fontawesome peernohell:c3 matteodem:gridster dburles:google-maps


Download ppt "Meteor Project Structure"

Similar presentations


Ads by Google