Giter Site home page Giter Site logo

everwatchsolutions / convergent-ui Goto Github PK

View Code? Open in Web Editor NEW
64.0 64.0 15.0 541 KB

ConvergentUI aims to solve the Distributed Composition UI problem present in many Micro Services Architectures

License: Apache License 2.0

Java 82.41% HTML 17.59%

convergent-ui's People

Contributors

andrewserff avatar ccit-spence avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

convergent-ui's Issues

Unable to forward images, css, javascript

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.

Resolving JS/CSS files from fragment

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.

Current State of Project

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.

Ask for new feature : export and import tag to deal with web performance

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, ...)

Absolute path images and cui-req

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.