boilerplatejs

In BoilerplateJS browser is loading all the scripts (in other modules) regardless of the module activated

一个人想着一个人 提交于 2020-01-03 17:09:06
问题 In the example project hosted at BoilerplatJS site, when we activate a particular sample module (for example clickCounter) all the scripts in other modules (component.js, viewmodel.js and others) gets loaded in the browser. How to restrict this behavior in case we have to limit modules to users based on some kind of authorization? Thanks! 回答1: There are few things to note here. First regarding the files that load: In your production deployment, all these files will be combined, minified and

Lazy loading boilerplate modules

放肆的年华 提交于 2019-12-23 12:45:49
问题 in boilerplatejs it looks like modules are pre-loaded (Refer to code below) return [ require('./baseModule/module'), require('./sampleModule2/module'), require('./customerModule/module'), require('./orderSearchModule/module'), require('./orderListModule/module'), require('./mainMenuModule/module') ]; what is the impact on this when it comes to large scale web applications (module heavy web applications) . Is there any way to lazy load modules in boilerplatejs? 回答1: Java script has no

Sharing datasources between components on a Boilerplatejs app

限于喜欢 提交于 2019-12-12 17:18:36
问题 I'm using Boilerplatejs to structure a web application where I have "forums" and "categories". On the categories module, I have components that list all categories and edit a specific category (just like the list-detail example bundled with boilerplatejs). When registering a new forum, I need to list all the categories, which are retrieved using Ajax on a tag on the module initialization, so, if I add a new category using the categories module, that list won't be updated when I add a new

Pattern for [lazy-loading] modules on demand

荒凉一梦 提交于 2019-12-11 13:38:26
问题 In my application I need to load modules not at the initialization stage (by enumerating them in ./modules/modules ), but on demand later based on some condition (e.g. user authorization results). Imagine I want to provide User A with calculator module, and User B with text editor module. Let's take boilerplatejs example app for simplicity, and assume that sampleModule1 and sampleModule2 are to be loaded on demand. So I remove the modules from initial loading sequence in src\modules\modules

Adding external CSS file to a BoilerplateJS project

蓝咒 提交于 2019-12-11 02:11:05
问题 I'm trying to incorporate some UI components to a BoilerplateJS project that I'm currently working on, to be specific I want to implement this [http://wijmo.com/wiki/index.php/Getting_Started_with_Wijmo] sample inside a BoilerplateJs component. How can I add the external css files to my BoilerplateJs project. 回答1: There are several ways to import style-sheets. Directly in the index file. (Best suited for style-sheets of libraries such as jQueryUI and Wijmo in your case) As a theme, in themes

BoilerplateJS: recommended way to handle authorization and authentication

不想你离开。 提交于 2019-11-29 02:38:35
With BoilerplateJS setup, what is the recommended way to handle authorization and authentication? Obviously on the server-side you'd check cookies etc to know who's logged in. But, on the client, how would you know if a user is logged in and what their username etc are? I will share how this was done in one of the projects that used BoilerplateJS. On this project we used OAuth 2.0 for authentication. We had a separate login page which was NOT using BoilerplateJS OR complex JS. The reason to keep it separate is that authentication may depend on URL redirection, which is not handled best with JS

BoilerplateJS: recommended way to handle authorization and authentication

僤鯓⒐⒋嵵緔 提交于 2019-11-27 17:12:22
问题 With BoilerplateJS setup, what is the recommended way to handle authorization and authentication? Obviously on the server-side you'd check cookies etc to know who's logged in. But, on the client, how would you know if a user is logged in and what their username etc are? 回答1: I will share how this was done in one of the projects that used BoilerplateJS. On this project we used OAuth 2.0 for authentication. We had a separate login page which was NOT using BoilerplateJS OR complex JS. The reason