Nuxeo studio and custom UI possibility - javascript

We're building a custom UI framework (Angular based) on top of the Nuxeo platform (Using REST API). Having said that, one of the requirements is to be able to use the dynamic workflow mechanism of the Nuxeo studio (I'm also not sure if content routing has a role on this).
Is it possible? What's the main idea/approach behind?
Also, if there are any resource or topic from the documentation please I need help with the link.

You can define your Workflow in Nuxeo Studio and deploy it on your Nuxeo server.
Then, if you build your WebApp using Angular on top of Nuxeo, it probably means you are using Automation http API.
You can then use the Automation Operations that are used to control the Workflow Service.
The dedicated operations are in the "Workflow Context" and "Routing" categories.
http://explorer.nuxeo.org/nuxeo/site/distribution/current/listOperations
We are currently working on adding a dedicated workflow REST endpoint like we did for documents, users, groups, directories : this will make the Angular binding even more natural.
Tiry

Related

Micro frontend architecture advice to build a Portal with notification services embedded inside the system

We have several web applications(angular 7+) that we wish to present under one single page application. We are looking for a micro-frontend architecture/framework to use. As we see it, these are our options for implementation:
Using the single-spa open-source framework: https://github.com/CanopyTax/single-spa
Using Iframes (friendly Iframes) the hosting application (the shell) and loading each application according to the current URL.
Using web components.
Other?
The current state is a monolith FE application that consumes the other child-application as internal applications via IFRAME (This approach is not scalable for us, because the hosting application is building all the products together, and nothing is really separated.)
Our requirements are the usual requirements for micro-frontend:
Independent development - Each team can work on their own repo and build their products regardless of the other products.
Independent deployment - Each application can be upgraded in production without the downtime and without interfering with the other applications.
Shared components - We're using Angular7 in our applications, and we have a proprietary 3rd party library (shared components and logic) that we've already written that should be shared among all of the products for similar look and feel.
We would like to have the ability to upgrade each application's framework (Angular, RXjs, Typescript, etc and also for our proprietary component library) without caring about the other applications.
We tried to use the single-spa framework but we have some issues and we are currently found our-self thinking if this is the right approach for us, or should we try a different approach.
The issues we have using the single-spa are:
Assets loading is problematic. (We must have the assets files on the root folder of the hosting application, and we suffer from assets conflicts when switching to another application).
We still don't know how to handle global styling for all applications (We use sass for styling and it must have complied together with the local styles for each application)
Upgrade angular framework (or all other frameworks) is not possible for one application, it's all or nothing (since we have one instance of angular).
We have to implement a different bundling for development another side of the hosting application (the shell).
When we think about the Iframe (using friendly Iframe) solution, we visualize a full separation between all child-application. Communication is via a post message alone. In this approach can we separate UI Code out of this and make APIS alone to work via IFRAME
Are there any pitfalls for using Iframes?
A more general implementation was to create a web component with a custom element, but we need to support IE11 and Edge which do not support native encapsulation, so we would need to test our app in every site where it is used, to make sure they are not breaking our styles, also I don't know whether a web component can manage child routes or not.
The ideal solution should allow our PARENT application to request the child applications via routes without any coupling between them in terms of resources and assets and should be independent in these terms. Another major feature we need is these applications should have a notification mechanism across them.
Thanks in Advance.

Create a plug and play plugin framework setup using Angular4

My application was in IBM WebSphere portal, where we have a centralized theme for all the portlets. We build individual portlets with the specific features which are then installed from a page into the portal like as shown below.
So altogether we build a portal with lots of portlets (individual web application). In the portal we creates pages and drag and drop each of these portlets as per the requirements.
Now the requirement was that we are moving everything to Micro service Architecture with Angular4 as the front-end. Currently I am having an angular4 application having many UI components and features. I am posting this question to get some ideas or possibility whether it is possible to create a portal like IBM WebSphere/ Liferay in Angular 4 with having the following basic features:
User/Team can create separate individual angular4 application, build and will be able to install/uninstall within the main application like porltets in portal (IBM WebSphere).
User will be able to view all the installed Angular4 application and can create pages, drag and drop those application within a newly created page.
Each separate Angular4 application (like portlets) installed will be using the main application theme.
Can anyone tell me whether this is doable. Do we have any framework setup in Angular4
One of the possible ways I can think of is using webpack(or any other module bundler) to handle the various angular application.
You can check out my answer here to get a brief overview of how you can configure webpack.
In the end, Angular compile to javascript only. So, It will be possible. But the effort needed to maintain and test the overall application might be huge.
When re-designing a system, it is best to think about the problem you are trying to solve and solve for that use case. It feels like you're trying to recreate the same bad interface with Angular. The code may be new, but the user interface problems will still be there.
I would recommend ditching the portlet idea and creating 1 app with many modules. Angular was designed to be very modular so different teams can work on separate modules. You could then have some sort of settings page where you can turn the modules on and off.

How to use server-side rendering in Angular 2?

I have a web app developed with Angular 2 which communicates with Java APIs on the server to fetch data. Everything is working fine except the pages are not indexed by search engine (except Google which supports script generated tags).
I've googled a lot and found that this can be achieved by "server side rendering" and there are libraries available to achieve this but all of these are commercial products that require payment.
I have come across Angular Universal which is not a commercial product, can we use it to solve our issue? If it can then how can we hook it up to our existing app?
You are on the right path there are two ways to achieve your objective
If you are using #angular/cli for developing angular app then you can only follow this link
If you developing with your own webpack.config file then there are lot of options available, best of them is universal-starter , which is featued in official documentation of angular/universal
While continuing with #angular/cli, there is a little caveat that it doesn't support lazy loading yet but they are working on it and future is bright with #angular/cli. If you want to implement lazy loading now only then i will suggest you go ahead with second option.

Custom UI for Alfresco ECM

What are the options for implementing a custom UI for searching the alfresco repository?
I have found only customizations of the Web Scripts share which is more of a WCM thing. Could it be implemented and expanded for Custom Model searches from imported CMIS data?
Has anyone built a custom UI for communicating with the 5.0 or 5.1 alfresco repository?
Any help or search paths would be greatly appreciated.
It's up to you, really.
Latest versions of Alfresco have a nice and documented REST API, which you can consume. Additionally, web scripts you might create are also easily accessible with a simple HTTP request, so customizing is not a problem.
https://api-explorer.alfresco.com/api-explorer/
The latest thing is what Gagravarr already mentioned, Angural2 based components (which also speak with the above mentioned REST API).
Here is a blog post with almost the exact title as your question. The short answer is you can use whatever you want to build a custom app on top of Alfresco.
Yes, there are Angular2 components that will be available some day, but for now, they rely on REST API changes that have not been shipped in any stable release of Alfresco, including Community Edition. They require an early access release (201606-EA or higher) which you should not run in production.
So from whatever language you decide to use you'll be making REST calls. But to which API? There are many. Here is the order of preference you should use when selecting an API for Alfresco.
CMIS. Grab a library from Apache Chemistry.
Public REST API, see http://docs.alfresco.com/5.1/pra/1/topics/pra-welcome.html
Out-of-the-box web scripts marked "Public". See http://localhost:8080/alfresco/s/index for a list, then click down to an individual web script until you see its lifecycle.
Your own custom web scripts
Out-of-the-box web scripts with no lifecycle or something other than public.
That last one is truly a last resort. Don't do it without being fully aware that you are writing against an API that will change without warning.

Deploy Angular2 demo app within rails or as standalone app?

I'm currently learning Angular2 and went through the quickstart and heroes tutorial. I'm always starting these apps with "npm start".
I've created a backend application in ruby on rails, and also have a frontend angular2 app. I do not know how I can integrate the angular2 app within the rails app. Theoretically, I can just put it into the public/ directory to make the JS accessible, but I probably need to convert it somehow so that the links are setup right.
Can anyone tell me how this is done normally?
Thanks a lot
You can do this in two ways as I can see
1 - Add your angular project folder to app/assets/javascripts or in the root in you app and set rails asset pipeline to use it. read more here (for angular1) https://thinkster.io/angular-rails
2 - Running as a separate project and use rails as only as an API. (this is my preferred method) due to following reasons.
this will give a separation between your rails app and angular app. Basically you are forced to implement things in standard api way, like authentication etc. hence overtime you will have a more solid rails api and angular fronted
once you have the separation, you can run these two in different app servers if you wish to. gives better load balancing etc..
You can always replace both frontend and backend with different technologies later, like amber and node since they communicate only via an http api.
So this option will need more time and effort, but, if possible its defiantly worth it :)

Categories