I would like create many indenpendants applications with a master application.
Without going into too much explanation...
The master is the layout and functionnal core
Apps are the contents in the master.
Contrainsts :
Each applications and the master app must be have a independant repository & can be launch (master and app too) separatly.
The core must called all applications
i would not use iframe for called applications.
I need to :
* getting all routes of all applications
* Share fonctionnal code between apps and master
What is the best approach ?
Applications are in npm packages + lerna (or other) ?
Applications are build or keep dev sources in package folder ?
Applications are vuejs plugins ?
architecture type
Thanks for your answers :)
There is no silver bullet for this, but as a best practice and way to go, you should look toward micro frontend architecture with separate package per app + one infrastructure / common package.
Here is a good place to start: https://micro-frontends.org/
Related
What would be the conventional way to write backend code in Expo? For example, have two directories - client and server at the root as below:
ROOT
|-Server
| |_backend files here (ex.Express)
|
|-Client
| |_frontend files here (Expo files)
|
If so, when I publish the project to Expo Go by running the command in the Client directory, how would Expo pick up my backend code in the Server directory?
My goal is to have the project on Expo Go connected to the backend.
Since you're talking about using Express, which is a web server framework, you would basically never distribute this with the client app. It would be deployed separately, and called from the frontend over a network connection.
Having a separate backend, or server, allows you to make it a shared resource. Imagine a shopping app where you had to update the app each time you wanted to see new products - it wouldn't be practical. With a shared backend, you can have a centralized database, or a way to distribute content without updating the app each time, for example. This - commonly called client-server architecture - is the most common pattern in business development today.
This article on client-server architecture might be helpful. https://cio-wiki.org/wiki/Client_Server_Architecture
I am not familiar with Expo. But it sounds like Expo is only taking care of the client/app parts of a full stack application.
In this case I would suggest to have two different repositories, one for the client/app and one for the backend.
Originally I ran a local server on my PC in order to make my django REST api available for my React Native app to reach out to through my computer's ip. So I had a base url hardcoded into my js network utilities as http://10.0.0.xxx:8000/api/ which I used as the basis for all my network calls. Recently I deployed my backend to Heroku so that I could demonstrate my app when away from my computer. So for now I just made a second hardcoded base url of https://my-cool-app.heroku.com/api/ which I manually flip back and forth between in my js code depending on if I want to use my local server (for debugging while devving) or the remote server for demonstration (and by "manually flip back and forth", I mean I literally change my code to point to one or the other).
I understand this is a terrible way to go about things and that I'm missing some major pieces to the puzzle that probably apply not just to RN projects but to most full stack projects where the frontend and backend are not hosted on the same server. I know I can look for the __DEV__ flag to see if I'm working in a debug or release version, but then would I have to keep two versions of the app on my phone somehow? Also, does it even make sense to keep my base urls hanging around on the front end, or should they be dispensed from the backend in some way instead?
I personally use :
https://github.com/zetachang/react-native-dotenv
for my environment variables like my backend api and other configs based on the env.
Since it's similar to many backend libs like django or laravel, i absolutely love this library for managing environment variables :)
I have an Angular(2) + TypeScript application using Keycloak as the authentication/authorization provider,
would like to integrate Keycloak with NativeScript to make the existing web application cater to iOS/Android users.
could see Keycloak supports iOS/Android as listed here : http://www.keycloak.org/docs/2.5/securing_apps_guide/topics/overview/supported-platforms.html?408DD571-0042-4EBB-BC37-1F2966A56651=123451
Is there any NativeScript based plugin to integrate with Keycloak (could not find anything here : http://plugins.nativescript.org/ ) ? pointers for a possible solution would be of great help
Version:
tns --version
2.5.0
Looks like the answer is no. But I start playing around, and to create a plugin, we have basically two strategies:
Extend a pure OAuth client for nativescript. There is this plugin: http://plugins.nativescript.org/plugin/nativescript-oauth
Port the keycloak.js to Nativescript.
I like the second approach because there are more features build in keycloak, so my first try was edit the original code and remove the use of window and other API's that are not present in the browser. I quickly find out that keycloak.js code is a mess (at least to me), and I'm getting a bad time undestanding how to edit its 1258 lines. Because of that, I start a complete rewrite, highly inspired in the original. I'm actualy reading the code and trying to port the project piece by piece, reorganizing for test, and abstracting the use of browser API's to port for web and nativescript.
You can check the code here: https://github.com/atende/keycloak-js-universal but is not close to ready.
The problem is, I have no time to do it :-), but will get done eventually, because I need that too.
Is important to mention that I create a abstraction for Angular 2 that works using the keycloak.js for security, and porting the keycloak.js is strategic to make the library work for Angular 2 Nativescript, which is on my motivation to do it. You can check the project here: https://github.com/atende/angular-spa
Any contributions are wellcome ;-)
My Worklight project contains two separate hybrid mobile applications. The applications have in common a good deal of HTML, CSS and JavaScript. I need a way to encapsulate the common code so that it can be shared by both applications.
Can Worklight Shell and Inner Applications help me to share common code across applications?
If so, where can I find detailed documentation, example code or tutorials that use Shell and Inner Applications for this purpose?
If not, is there another way to share code across Worklight applications?
Yes you can reuse, you can add to Shell common CSS, Javascript functions, Plugins and they will be applied to all the project that are build on top of that.
If it is a hybrid app you can add CSS, JS, Images under <<WLProject>>/components/<<ShellName>>/common
For any plugins related to android or IOS you can add them into respective folders under <<WLProject>>/components/<<ShellName>>
Cheers !!
Shell development in Worklight could potentially solve this for you, but its complexity is much greater and I am not convinced its price is worth it.
You can review shell development in the Advanced Topics section of the IBM Worklight Getting Started web page.
I'm new to ofbiz. I create an application in my "ofbiz/hot-deploy" folder. In some site, books they mention our application should be present in "applications" folders also. But I don't know the difference between put user defined applications in the folders namely "hot-deploy" and "applications" in ofbiz.
Please tell the difference, because it will be very useful to my project. Please forgive my mistakes in my questions because I'm new to ofbiz .
Thanks & Regards,
Sivakumar.J
applications is where the OOTB apps provided with the OFBiz framework like marekting, order, party reside. It is best NOT to put your stuff there so you can forward integrate with the next version of Ofbiz.
application components: they are generic applications that can be used as they are or extended/customized (product, order, party, manufacturing, accounting etc…); application components have access to the services and tools provided by the framework components and to the services published by other application components
hot-deploy is where you put your custom application which also has access to the services underlying from the framework.
So if you make a new application say SivakumarWebApp then place it in the hot-deploy, and it can access the framework components as well as other application components.
http://www.hotwaxmedia.com/apache-ofbiz-blog/ofbiz-tutorial-custom-components-in-ofbiz/