One more thing, frontend dependency management with bearcat is asynchronously loaded, which AMD fascinates you a lot, so every page can use different script files and development will be a lot of fun, what you see is what you get, there is no need to build up a bundle and find out the source file when something goes wrong.
So keep reading and have a try, you will enjoy coding with bearcat.
yeah, it is a simple function Object, but has a property and the property is prefixed with ‘$’
this codes describe itself with an id named ‘magicJsObject’, with this id bearcat knows this
guy, when someone else ask the dependency for this
guy, bearcat will automatically wire it up for you.
Aspect Object Programming
Aspect-Oriented Programming (AOP) complements Object-Oriented Programming (OOP) by providing another way of thinking about program structure. The key unit of modularity in OOP is the class, whereas in AOP the unit of modularity is the aspect. Aspects enable the modularization of concerns such as transaction management that cut across multiple types and objects. (Such concerns are often termed crosscutting concerns in AOP literature.)
In Node.js development, it is common that there are serveral envrionments like development, test, production and so. Corresponding to these envrioments are configurations differed from each other. Therefore, it is necessary to make these configuration consistently.
A Quick Example
app for bearcat to scan
above codes show that car has the dependencies with
wheel, car uses
this.$wheel to resolve
this.$engine to resolve
all codes use
bearcat.module to register into bearcat, it is frontend and backend compatible.
then add simple configuration file
context.json to specify the scan directory path
wire codes up, let them go
The whole repository can be found bearcat-quick-example, enjoy with it.