My problem is I want to integrate Durandal witha Wordpress site yet Durandal expects HTML files as views. How can this be changed to use PHP files?
Yes. A php script generates dynamic HTML files on the server. You would just need to generate HTML that is valid within the context of Durandal.
The strategy is similar to using Durandal with ASP.Net, which would be a good place to start looking for tutorials.
Related
I made a blazor server-side project for submitting the form.
In spite of there is a tutorial of Microsoft about how to embed it in asp.net core(https://learn.microsoft.com/en-us/aspnet/core/blazor/components/integrate-components?view=aspnetcore-3.1). However, I am about to embed it not only in one website but also in some other. So this way is so troublesome.
There is another way by using Iframe. Whereas Iframe does not support CSS vh units well and it has some other limited(such as samesite attribute/cross-origin).
Is there any way to solve this? Thank you.
I suggest you could consider build it as an Templated components.
You could create a component library. And then you could use this template in each project.
Details, you could refer to this article.
I came across vuexpress, vuepress and vue-server-renderer. To me these are looking somewhere similer which I guess are not. I am not frontend developer so not able to understand exact difference and use of these three modules.
Their official sites are saying
https://github.com/vuexpress/vuexpress
vuexpress: Vue + Express.js = VueXpress / A server side rendering
engine for Express.js. Use .vue files as your express.js templates.
https://vuepress.vuejs.org/
VuePress: Vue-powered Static Site Generator
https://ssr.vuejs.org/
vue-server-renderer: server-rendered Single-Page Applications using
Node.js as the server.
vuepress and vue-server-renderer are official library from Vue.js
So what exactly are differences and use of these three modules?
The idea with Vue (from the perspective of your question) is that you create a single-page application.
vuexpress is a rendering engine you can use in an Express application if you want to use the Vue syntax to implement your Express views, i.e. you implement a dynamic website and use the Vue syntax.
vuepress is about building a single-page application in Vue that also prerenders each page (and some other goodies, such as using markdown) to improve initial page load and facilitate for search engines. It is primarily used for websites with static content, such as documentation.
The point with a Vue application is to run it on the client (in the web browser). With vue-server-renderer you can run it on the server to obtain the HTML code the web browser would render if it would run in the web browser, and send it to the web browser, so the web browser doesn't need to run your Vue application, but receives the HTML it would display instead. Why? To improve initial page load and facilitate for search engines. I imagine vuepress makes use of vue-server-renderer under the hood.
There's a feature in Angular Universal that allows you to pre-render pages at build-time. Can this be used to pre-render all your pages and run Angular Universal without a server?
Once html pages have been pre-rendered using angular universal (using nodejs server or asp.net core server), you can use any CDN to serve the pre-generated html.
See https://universal.angular.io/overview/
Edit: have a look at the starer kit
https://github.com/angular/universal-starter
Basically, you can reuse the prerender.js file which will write the rendered html files (for specified static routes) to the dist/browser folder, or wherever you want to. This is that folder that you deploy to a static host after
Well, you're always going to need to have a server somewhere in the equation: the only question is how much you have to set it up yourself versus how much can the current crop of tools and technologies do it for you.
In this talk from Node Summit Steven Fluin from Google talks about Firebase at the end. Pay attention to the bit about 'cloud functions' (at about 20 mins). Your Angular app will be rendered on the server using Firebase cloud functions. When a user interacts with your app, some JS is run to figure out what to send down (from the Firebase server) to the user. "You don't need to set up a server at all; everything is running in Firebase."
I haven't used Firebase myself - I'm using Angular Universal, which has a Node.js server as you know - but this sounds very nice. I found setting up Angular Universal really tricky (but got there in the end).
I already have MVC4 website and that is to perform Searching (OPAC). Now, We have to integrate it with Orchard CMS. I have followed the procedures to add my existing solution into Orchard CMS solution. Everything is okay but I am not able to get the javascript to work with my view page.
Also, The default Orchard library to include js extensions ie, #Script.Require or #Script.Include also not recognised as intellisense feature in my view page.
When I use default MVC library to include the js like #Scripts.Render is not working as expected.
How can I make my custom javascript to work my page.
Help me to identify the problem.
Thanks
I have implemented some tutorials of dojo all this tutorials work on html web pages. Is there any way to implement dojo on php pages.
Dojo is a javascript framework that can be used with any server technology. If you have some static html pages with dojo, the only thing you need to do is to rename them to .php.