0.4 Release Notes
First of all, thank you for all of your feedback so far. We appreciate each and every one of your contributions to this project - you’ve all made this a better project for all of us, so thank you.
In this release, we’ve made some major changes so that it would be easier for everyone involved to contribute even more. We want to make sure sure we don’t inflate the size of project, or conversely making it overly specific, so we tried to further modularize the various components, making sure the modules are nicely decoupled from core application architecture.
We have added features such as Socket.io support, as well as Gulp, Sass and Less support - all of which would allow more choice when setting up the application. Clearly, there’s little to no need to use both LESS and Sass, or Gulp and Grunt in tandem. For that end, we would like to make use of the generator, and enable the choice as part of the application development workflow.
Since this release introduces some breaking changes, we are currently releasing the branch but not merging it yet. We’d love to hear your input and feedback to the changes we’ve made. There’s still work to be done with writing documentation and completing the generator reflection for these new features, and we hope you’ll take part in our shared effort. We think we should make sure that we have a clear migration process to 0.4 before it is merged with the stable release branch.
We believe these changes will help all of us work together more efficiently, and hopefully make the process of creating full stack Javascript applications even more enjoyable and simple for all of us.
We invite everyone to comment, ask questions and most importantly - submit pull requests!
Relates to https://trello.com/c/vgwdGuNB/38-modularize-core
Vertical modules
We have significantly changed the folder structure. Previously, a single module’s client and server code were spread over two different folders (app and public) - they now are unified under a unified `modules` library. We currently have a `core` module, as well as a `users` module and an example module (articles).
The server-side application level files were reorganized as well. The `express.js` file has been modularized extensively, to ensure readability and easy replacement or extension of the different middleware components.
Gulp
You can now choose to build your project with Gulp. The Gulp file mirrors the same task that exist in the current Gruntfile. It’s a bit easier to write tasks in Gulp - but since we don’t want to force anyone to use Gulp, this feature will be added to the generator as an option alongside Grunt.
Socket.io
Relates to https://trello.com/c/mamXakKT/54-socket-support
On the client side, we added an Angular service called `Socket`, which manages the socket connection authentication, as well as wrapping the native socket `on`, `emit` and `removeListener` methods. We added an example for implementing stacks relying on Socket.io, under “Chat”.
On the server side, `socket.io.js` includes the setup required for socket.io to work with cookies, and it connects the Passport middleware as well.
The additional files found under `modules/chat` are an example for a Socket.io implementation.
ACL
Relates to https://trello.com/c/qb5hQRil/39-modularize-authentication-authorization
We added easy way to manage ACL on the module level. Each module includes a “.policy” file, which allows granular management of permissions according to predefined rolls.
Notice ACL policies are currently managed in memory, but they could be managed in MongoDB or other similar stores as well.
Revamped menus service
Relates to https://github.com/meanjs/mean/issues/58
The menus service has been simplified, and now uses the state oriented menu items. They are configured in each module’s client configuration file (e.g., articles.client.config.js)
Html5mode
HTML5mode is now enabled by default, and is fully supported thanks to the migration of the module API endpoints to /api.
Routing with UI-Router stateProvider - revamped, now using ui-sref across the project (instead of ng-href).
We’ve added E2E testing with Protractor. We created some example e2e tests for articles and users modules, but surely more will be written.
End to End testing with Protractor
We’ve added E2E testing with Protractor. We created some example e2e tests for articles and users modules, but surely more will be written.
User management + profile image support
We introduced a new social connections management page, which allows users to manage their existing social connections to the app. We have also updated the Password retrieval component.
Sass/LESS support
Added support for both build process in both the Gulp and Grunt build processes.
TTL bug fixed
mongoose.js - application starts after connection is established,
This closes https://github.com/meanjs/mean/issues/224
Gruntfile.js - asset consolidation
Express.js - Simplified and modularized
Config/assets - asset consolidation
Strategies folder is removed, ACL is managed on a module basis
Not yet in the version:
i18n support - adding this feature seems to introduce a lot of complexity to the project. For the time being, it is not being actively worked on.
Still in development - Updated documentation for 0.4 - PRs welcome!
Still in development - Updated generators for 0.4. - PRs welcome!
Security in mind - supporting form tokens for CSRF, X-Frame-Options header support, etc.
Controller/Model hooks - this is a concept from sails.js which allows you to implement methods like beforeCreate, beforeValidate on models (they use Waterline ORM, kind of a mongoose framework).
Angular 1.3 - After updating to Angular 1.3, some Karma tests break. We are currently investigating this issue, and once those bugs are fixed the 0.4 branch will be updated to use the new Angular version.
Until next time,
The MeanJS Team