everwatchsolutions / convergent-ui Goto Github PK
View Code? Open in Web Editor NEWConvergentUI aims to solve the Distributed Composition UI problem present in many Micro Services Architectures
License: Apache License 2.0
ConvergentUI aims to solve the Distributed Composition UI problem present in many Micro Services Architectures
License: Apache License 2.0
The initial version of Convergent-UI only supported pulling HTML from the backend services. If the backend HTML has image tags embedded in it, those images wouldn't load. Also, if the HTML requires some special styling or javascript in order to look/work correctly, there is no way to pull this into the converged page.
Upgrade to Spring Boot 2.1.8 and Spring Cloud Greenwich
Sorry, don't known where to purpose this feature.
In a micro applications / services architecture, each application is responsible of a small piece of functionalities of a bigger system.
For instance the footer-app could be responsible to manage all things about the website footer.
The footer is then included into the website homepage using a <div data-loc="http://page-footer-app" />
For isolation and simplicity (dev, deployment, ...), I want that the page-footer application declares all js scripts and dedicated css styles inside its own templates.
Currently, this approach will cause web performance issues cause my footer css will be loaded at end of the page and maybe some important js too.
So, I working on a directive allowing to export some tags and import them at right position during process of the main page.
An example is worth a thousand words.
Imagine the main html page served at http://mywebsite/ :
<html>
<head>
<link **data-import="css"** />
<script **data-import="js"** />
</head>
<body>
...
<div data-loc="http://page-footer-app" />
</body>
</html>
And my footer app that responds :
<link type="text/css" rel="stylesheet" href="http://cdn/footer.css" media="all" **data-export="css"**>
<script type="text/javascript" **data-export="js"**>
function() {....}
</script>
<div>
<p>This is my fantastic footer page</p>
</div>
Note : this is not very pertinent to have a footer.css but it's an example.
This way, I manage my dedicated footer styles and scripts into footer templates.
When the convergent-ui filter will render the final page, my css and js resources will be included at right place (and removed on the other side). I can also add some normal scripts into my footer template that do not need to be placed into head tag (-> don't specify data-export attribute)
Right now I adapted the code and have a simple solution (less than 10 lines of code) only working with script and link tags (it could be extended to all tags but certainly with a lot of performance issues).
Let me now if you're interested by this feature and think it could be good to share.
PS : Sorry for the approximative english (yeah i'm a french guy, ...)
I have a backend service returning a HTML fragment which gets included in my page by convergent-ui. The HTML fragment returned contains an image with an absolute path "/portal/img/logo.png" the adress of the image in the fragment gets changed to "/cui-req://http://localhost/portal/img/logo.png" when the fragment is inserted into the page.
Finally, once the page is downloaded, the browser will request "/cui-req://http://localhost/portal/img/logo.png" which will fail with a 404. Its like the cui-req URL doesn't get picked up by the filter.
What did I do wrong?
I see that the src
attribute of an image tag gets automatically rewritten to use the full URL to the "remote" service.
For <script>
and <link>
tags this is not the case. Is there a reason for that?
As pointed out in the documentation, scripts and css files could be loaded with the /cui-req://
prefix, but in the remote service I just want to include the scripts/css with a relative path starting with '/'.
So I think it would be great if these relative paths also get rewritten/prefixed with the services URL.
Upgrade to the most recent versions of Spring Boot and Spring Cloud before upgrading to v2.x
We should only process GET requests. All other request should just be passed through.
Currently, the filter will try to process all content coming across as a String and return the response as a String as well. We need to only process HTML.
Wanted to check and see how this project is progressing. Is it working to your expectations? Has it been deployed in production?
I had posted an issue with the Spring Cloud team at one point looking for something like this for UI.
The GET request filtering is invalid for certain large GET requests that must be sent as a POST.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.