Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
simple-boot-front
Advanced tools
Single Page Application Framworks for Web
npm init simple-boot-front projectname
cd projectname
npm run bundle
npm run serve
npm install simple-boot-front
Here is a quick teaser of a complete simple-boot-front application in typescript
index.ts
const option = new SimFrontOption(window, [Advice]).setUrlType(UrlType.path);
const simpleApplication = new SimpleBootFront(AppRouter, option);
simpleApplication.run();
index.html
<!doctype html>
<html>
<head>...</head>
<body id="app"></body>
</html>
AppRouter.ts
@Sim({scheme: 'layout-router'})
@Component({template, styles: [css]})
@Router({
path: '',
childs: {
'': Index,
'/': Index,
'/user': User
}
})
export class AppRouter implements RouterAction, FrontLifeCycle {
name = 'AppRouter'
data = {name: 'good'}
child?: any
constructor(private navigation: Navigation, private simOption: SimFrontOption) {
}
canActivate(url: Intent, module: any) {
console.log('canActivate router--->', url, module)
this.child = module;
}
onReady(data: HTMLFrameElement): void {
}
onRenderd(data: HTMLFrameElement): void {
}
onChangedRender(): void {
}
onCreate(): void {
}
onFinish(): void {
}
onInit(): void {
}
onInitedChild(): void {
}
}
index.ts
@Sim({scheme: 'index'})
Component({
template,
styles: [css]
})
export class Index {
public user?: User;
public data = {name: 'visualkhh'}
onInit() {
console.log('-->')
}
@PostConstruct
public g(s: User) {
}
}
index.html
<h1>index</h1>
${this.data.name}
<button dr-event-click="this.data.name='vvv'"> change name </button>
@Sim(): Objects managed by the SimpleBootFront framework
@Sim({scheme: 'index'})
@Component({
template,
styles: [css]
})
export class Index { }
@PostConstruct(): Methods that you run for a separate initialization operation after the object is created
@PostConstruct
post(projectService: ProjectService) {
console.log('post Construct and dependency injection')
}
@Injectable: No Sim Decorator Class Inject Sim
@Injectable()
export class CTitle extends Title {
constructor(public testService: TestService) {
console.log('ctitle constructor-->', this.testService)
}
cc() {
this.value = this.testService.tail(Math.floor(RandomUtils.random(1, 50)), '---');
}
@PostConstruct
ttt(testService: TestService) {
console.log('poo->', testService)
}
}
@After, @Before (AOP)
fire($event: MouseEvent, view: View<Element>) {
console.log('fire method')
this.data = RandomUtils.random(0, 100);
}
@Before({property: 'fire'})
before(obj: any, protoType: Function) {
console.log('before', obj, protoType)
}
@After({property: 'fire'})
after(obj: any, protoType: Function) {
console.log('after', obj, protoType)
}
@ExceptionHandler
@ExceptionHandler()
public exception0(e: any) {
console.log('Advice Global exception:', e)
}
click() {
intentManager.publish(new Intent('layout://info/data?a=wow&aa=zzz', Math.floor(RandomUtils.random(0, 100))));
// const data = new CustomEvent('intent', {detail: {uri: 'index://showStore', data: {id: ${it.ID}}}}); window.dispatchEvent(data);
//intentManager(new Intent('layout://info/datas', Math.floor(RandomUtils.random(0, 100))));
//intentManager(new Intent('layout://', Math.floor(RandomUtils.random(0, 100)))); // default callback method -> subscribe(i: Intent)
//intentManager(new Intent('://info/datas', Math.floor(RandomUtils.random(0, 100))));
}
@Sim({scheme: 'layout'})
@Component({
template,
styles: [css]
})
export class App {
info = new AppInfo();
constructor() {}
}
export class AppInfo {
datas = 'default data';
data(i: Intent) {
this.datas = i.data + '->' + i.params.aa
}
}
<a router-link="ajax" router-active-class="active">Ajax</a>
<a router-link="ajax">Ajax</a>
showStore(i: Intent) {
this.datas = i.data + '->' + i.params.aa
}
call -> const data = new CustomEvent('intent', {detail: {uri: 'index://showStore', data: {id: ${it.ID}}}}); window.dispatchEvent(data);
FAQs
front end SPA frameworks
The npm package simple-boot-front receives a total of 8 weekly downloads. As such, simple-boot-front popularity was classified as not popular.
We found that simple-boot-front demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.