Can CanvasKit-based Flutter web app be embedded in other (non-Flutter) web apps/websites? - flutter

We're planning to build a Flutter web app that will need to be embedded within partners' websites (built with different web technologies). We have to use CanvasKit as rendering performance is important (it's a non-trivial component).
As far as I've researched, Web Components support is not available for Flutter for now (correct me if that's wrong). So the only method of embedding I can think of is an iframe. As CanvasKit relies on WebAssembly, I'm concerned about whether that will work as intended. So my question is this: is it possible to embed CanvasKit-based Flatter web apps within other (non-Flutter) web apps, and if so - does it have any downsides worth mentioning, compared to "typical" web apps (e.g., those built with React).
I have to decide strategically for my team whether to use Flutter for such a project or stick to a traditional web stack. Any input will be greatly appreciated.

I am currently writing a flutter project for the web that is embedded in the web via iframe. Everything works fine, at first it was difficult how to pass parameters inside flutter (to interact with the server (id / additional options etc)) solved this issue through query parameters in a web browser and get inside flutter through (GETX package Get.parameters['']).My opinion.... Before starting global development, write a simple project that could interact inside your site, embed in iframe and pass any parameters)

Related

Adobe Experience Manager: (Blackbox) Web API for external access

Background: We're creating an offer for an Xamarin app for a customer, which is using AEM to manage a lot of content. We are not experienced with AEM, therefore I have the task to find the possibilities regarding a Web connection and how deep into AEM we need to interfere, to get the desired data.
Usually, I would never ask such a general question here, but after some hours of research, I didn't find any hint regarding a public API:
I've started a chat with an Adobe employee, but he told me, that he
can't help me regarding technical questions
I've analyzed the AEM architcture, finding Sling being a Web API
(https://helpx.adobe.com/experience-manager/using/querying-experience-manager-sling.html), but it also just Java
I've also found AEM Assets (https://helpx.adobe.com/experience-manager/6-4/assets/user-guide.html),but analyzing it, it seems like this is more like a Web App on top of AEM
I've also found Web APIs in AEM Screens,
https://helpx.adobe.com/experience-manager/6-3/sites/developing/using/developing-screens-rest-api.html, but the architecture here seems also very tightly coupled between the UI and the Web APIs
So, my question: Is there just no Web API at all? Or is one of the subproducts of AEM the endpoint, we could use to get data?
Based on the fact that you mentioned Xamarin I guess you are supposed to work on a mobile app.
You basically have four options, if you want to build that using AEM:
Use the Single Page Application (SPA) capabilities of AEM (requires AEM 6.4):
Use the (legacy) PhoneGap capabilities of AEM.
Use the out-of-the-box Sling APIs to expose the data you need and use them in your Xamarin app.
Write a custom (web service) API and use that in your Xamarin app.
I would strongly suggest to have a look at the SPA support or PhoneGap capabilities if you are not running AEM 6.4.
Working with the Sling API or building your own API is not the best option if you are new to AEM. There are so many pitfalls that will cause you a lot of headaches and you run the risk of creating an unmaintainable mess of an AEM project.

Alfresco as App development framework?

I was surfing the Internet where I found an article saying that Alfresco is a Content Management Framework as well as App Development Framework. While I understood it as Content Management Framework, I am not able to know about it as an App Development Framework.I tried researching over it, but could not find anything viable.
I want to know that how Alfresco can be used as an App Development Framework ?
Hi Alfresco has an application development framework, more info here:
Guides: https://community.alfresco.com/community/application-development-framework/pages/get-started
Angular 2 components repository: https://github.com/Alfresco/alfresco-ng2-components
Alfresco App Yeoman generator: https://github.com/Alfresco/generator-ng2-alfresco-app
JavaScript API repository: https://github.com/Alfresco/alfresco-js-api
Some videos:
https://www.youtube.com/watch?v=-OFI3izSDdk
https://www.youtube.com/watch?v=kjOgVbINAyU
In case you want a live support you can use the Gitter channel: https://gitter.im/Alfresco/alfresco-ng2-components
Well, if for App is meant mobile application, Alfresco has a Mobile SDK available for both iOS and Android which can help you create your own application to work against the Alfresco Platform.
Moreover there is another framework called Aikau which has one main goal
The main purpose of Aikau is to provide a library of widgets that can be easily assembled into a web application for accessing an Alfresco repository. The aim is not to replace Share but it was necessary to migrate away from its original implementation, which was based around the Surf paradigms of pages, templates, components and web scripts, towards a solution that provided for rapid development and customization.
This feature was first introduiced in Alfresco 4.2 and then extended in Alfresco 5.0
If you want to build applications for Alfresco you have a number of options available to you - as mentioned you can build mobile applications (and there are SDKs available to do this).
If you want to build web applications then you have the option of either customizing the default Alfresco Share client (which is built on top of the Alfresco Surf framework using a combination of YUI 2 and Aikau). Alternatively you can built your own web client by building a new client with the Maven Aikau Archetype.
The advantage of the Surf framework is that it takes care of Alfresco authentication across all the various APIs (WebScript, CMIS, Public API, etc) as well as providing lots of security benefits (CSRF, XSS white-lists, etc).
The advantage of using Aikau is that it provides a large number of out-of-the-box widgets that are specifically designed to work with Alfresco data and address Alfresco (ECM) specific use cases.
You are of course not limited to these options - you can build an application on top of any stack you wish, but ultimately you will want to be making use of the REST APIs that the Alfresco Repository provides.
Depending upon the application you are building you may also want to build custom data models and build in workflow via Activiti BPM as well.

Real time use of REST web service in web application

I am new to REST and watched few videos and read few blogs on REST webservice and I came to know that generally people are using REST for supporting multiple devices like mobile and computer etc.
Now consider I am developing order management system and I want to support both computer as well as tablets. If in m traditional web application, I am using Spring MVC at front end, how REST will fit here so that it will support both the kind of devices.
One more doubt is, whatever examples I have browsed, it return html or json data. I want to develop the application the way spring MVC or struts works like returning name of jsp and jsp will be rendered with dynamic data (instead of returning string represented html).
I hope my question is clear. Please bear me as my questions are vague but I am looking from implementation and design point of view.
Just to start REST isn't anything to do with supporting mobile browsers. It is the architecture pattern HTTP follows. The Web had been REST since the early days.
I'm guessing what you mean is a server that returns light weight JSON that the client renders into HTML rather than the server returning HTML directly to browser. To do that you can use a java script framework that expects JSON data and that has a template engine to generate HTML on the fly in the browser. I think Anglar and Ember work like this.
Though I would only do this if you need to, and you don't need to do this just to support mobile browsers, you can support mobile just by making sure your CSS is responsive.

Build a GWT app that can handle both classic web and mobile clients

We have a GWT application specifically designed to handle mobile clients and built with MGWT.
Now, we need to build a frontend for classical web clients, probably building it with GWT-Bootstrap and I'm wondering what's the best solution to achieve this.
How should we proceed with modules, gwt.xml configuration, client type detection, etc ...
What are your suggestions ?
Check this question for how to tell what platform the user is on.
Beyond that, GWT uses only HTML and Javascript, so unlike Flash applications, it actually works fine on mobile devices too; most events (such as clicks) are translated by the browser, so a touch becomes a click, you don't need a separate handler or anything.
Basically what I would suggest is you have a single GWT regardless of platform, and only for certain Widgets, add separate options for Mobile and Desktop, as necessary.
I don't know the architecture of your app and if you use the MVP pattern but GWTP with its Form-factors feature allows you to share almost all of your business logic (your presenters) across the different platforms. You have just to write the view depending on the platform you want to support.

GWT pattern for handling mobile browsers

I am working on a GWT app that needs to serve a different layout to mobile device users. I can easily determine if a user is using a mobile browser; however, I'm not sure about the best pattern for handling them.
I am currently using the MVP pattern - would it be best to simply pass a browser-specific view to the Presenter or is there a more appropriate method?
You could set up GWT to detect the web browser used, as described in this question. Then, via Deferred Binding, let the compiler "slip" the correct view into place for the, say, mobilesafari user agent. That way, you won't have to litter your Java code with browser detection, etc.
The way I've done it is to have different GWT modules (with their own entrypoint, Gin modules, even different CssResources) and then on the myapp.html page you just have to check out what browser is requesting the content and based on it (javascript checks) the appropriate module
<script src="myapp/myapp.nocache.js"/>
or
<script src="mymobileapp/mymobileapp.nocache.js"/>
is loaded.
If you are working with GIN and an MVP framework (gwt-platform is my platform of choice) you can then reuse the code that was already written for the presenters and only implement different views.