RabeeJs :The Spring Of JavaScript
Abdennour T.
Platform Engineering | Private Cloud Addict | SRE | DevOps | RHCA | CKS | CKA | AWS | Container | Ansible
RabeeJs : IoC Pattern in JavaScript
WELCOME to Use my own Library : RabeeJs ???? ????????????
It is the equivalent of Spring in Java
. _________________
USE CASE |||||
********************************:
appContext('ctx') ;
ctx.add('<bean id="securityService" class="slm.abdennour.SecurityService">','beans')
ctx.add({id:'searchService','class':'slm.abdennour.SearchSearch'},'beans')
function SearchController(){
$Authowired('securityService')
$Authowired('searchService')
}
SearchController.prototype.tasks=function(word){
return this.searchService.tasks(this.securityService.currentUser,word) ;
};