Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

New job -- Preparing, looking for a language equivalent

$
0
0

Hiya,

I'm switching to cshart/mvc/core for a new job and I was hoping to find a framework equivalent.

In the other framework, i have a hugely important feature to me : modular class w/ dependent js/img/css assets that sort of 'live' inside the class folder -->


1. "Outside" the WebApp, modularized, somewhere on my computer, I have the following single class folder container/structure (Please note: I'm not looking for a Video Player Class this is just an example):

--> VideoPlayerClass (Folder - inside are the following files/folders)
          ---> VideoPlayerClass.lang (File - Class w/ following 3 lines of code)
                    this.getAssetManager().publish() //this pushes all files from Assets to the public root in a clever one time way
                    this.addScriptFile(this.dynamicallyCreatedPath+'/Assets/video.js')
                    this.addCssFile(this.dynamicallyCreatedPath+'/Assets/video.css')
          ---> Assets (Folder)
                    ---> video.js (File)
                    ---> video.css (File)
          ---> Views (Folder)
                    ---> main.lang (File with view logic)
                              this.write("<div id='video'></div>")

2. Then, in the view of the actual web app:

          this.write(this.loadExtension("Extensions.VideoPlayerClass.lang"))


3. The final HTML output:

          the following is injected into the head:

          <link rel="stylesheet" type="text/css" href="/assets/7bde39ab-HashValue/video.css" />
          <script type="text/javascript" src="/assets/7bde39ab-HashValue/video.js"></script>

          and then written to the body:

          <div id='video'></div>



4. This way, 

- I don't worry about manually copying asset files to public root
- I just write the class once, the asset files live with the class and the framework sees that I'm using the class for the first time in the app, pushes the files to the public asset folder and i'm ready.

Can someone point me to a similar concept in Csharp/Asp.net/Core?

Thanks!
- Bryan


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>