Angular 9 Plugin Architecture - angular9

I have currently written an Angular 9 application, this consists of components and services.
The goal
I have in mind is to be able to override the existing html templates and/or the entire component using a plugin architecture.
I have been following the code located on GitHub here: https://github.com/apoprotsky/angular-plugin-architecture
The Problem
I am not able to use/import my services that deal with authentication, fetching data or dealing with forms etc.
Things I've Tried
Just importing it - doesn't work
Attempted to move all the relevant services to a separate module and load this into both the core app and the plugin, this works for the core app, but does not work for the plugin (it can't find it) - doesn't work
So, the question is, is what I'm trying to do at all possible - if so, what are the best methods for doing so, i feel like the github repo noted above is almost what I'm needing to achieve, but as stated, importing services etc do not work.

Related

How could an Angular/typescript developer continue collaboration with a web designer

Once an html page has been put together it starts to acquire dependencies on Angular and typescript.
This is not ideal for the web designer who really just wants to be able to view and modify their design. Usually this involves data elements too.
In our team the designer needs to be able to continue to work with html and stylesheets; they are not a separate contracted resource.
Is there a way to set up a project so that the web designer does not need to concern themselves with npm packages, Angular versions and data sources?
I have since had an idea...
As it happens I am a Linux user, the designer is a Mac user. I am wondering if it would be possible to create a project consisting of symlinks to html with typescript stubs.
A mock datasource might also be a viable solution.

How to organize Web Development using Git

Web Developers!
How do you go about organizing your Github projects for your front-end and back-end?
For example, I have a python script that generates a JSON file that the front end JavaScript consumes to generate data on the pages.
Would you create one repository with two directories labeled front-end and back-end?
Or would you make two different repositories?
I'm interested in what developers do in the wild. Because up until now I found myself having a complete clone of my website in a directory on my desktop PC, and just pushing individual files via SFTP from there.
I'm getting to the point where I have enough *.old files that I want to implement version control so I can view much older states of code with Metadata like date and user that edited it.
The answer is yes. Make two different github projects.
Just Like Michael W has stated, "[...] this is highly opinionated". What I find to be the most common approach is to implement a single github project when still in development and especially when you're developing on your own. This is useful because you don't have to switch up between repositories and/or branches, which saves time.
Another common approach is to split them up. However this approach is only possible when both projects can run independent from one and other. In your case it's important to split the project logically. If the python project only generates JSON files and places them on a server location, then I would place that into it's own github project, because the main purpose is to generate files, so the python application can run on a server seperate from the frontend. If the webapp only consumes the JSON files through maybe a rest call or through a connection to a FTP, then also that can be placed within it's own project.

Use a single Layout page across multiple asp.net core projects

I work for a company that develops many websites to be used internally but many have parts that are public facing. It is important that all our sites look the same. In moving to dotnet core we found that we are no longer able to use a virtual directory to host the Layout page for our site.
We were storing our Layout page on a file share and referencing it in our projects with a virtual directory. This way if we needed to change the information in the footer, header, or some style/js we could upload a single change to the Layout page and that change would take place on all our sites.
I've tried researching any possible ways and the only thing I can come up with is a custom middleware that downloads the layout page from the file share and updates the current layout page if it is out of date.
.NET Core gives you the capability of creating Razor libraries. This would be a separate project where you can have shared views and reference it to the rest of your projects. You can find a simple implementation here.
You can choose one of these two options to do this.
Reference this project in each solution. Since your solutions directly reference the razor library, any change that is made in the common library will be reflected in every solution without the need of repacking and publish.
use dotnet pack to create a nuget in a shared location. While this option will require you to repack and publish each time, in some cases it would be a more organized solution. You can have a version setup. This means that when you update the shared razor project you will define a new version number. You can update this on each one of your solutions. This reduces the risk of a project breaking. Let's say you have 5 projects and 2 of them are not compatible with the latest update. In this case, you can update the 3 right away. The remaining 2 can be updated when you can spend time updating these projects to match the new requirements.

Yii2 - Upgrade from basic application to Advanced application

I have developed a Basic application in Yii2. It contains 3 models and respective controllers and views, no extension, no theme.
I now think that I should make that application with advanced template for future extend-ability.
Can I convert the basic app directly to advanced app or make a new one?
If I can convert the basic app, what are the steps?
I searched on google but can't find anything related to it except the comparison of the two.
You need modify this bootstrap file. It's make avalible use \common, \frontend, \backend and \console namespaces in project.
In this way you can create any quantity of applications in your project.

Phonegap JQTouch Joomla and MySQL application

I am working on a project and it needs to accomplish the following:
A user logs into a joomla
Makes a change to some of their profile
This new information updates in the
database
Up to this point joomla will do everything, so the question is how do I take the information from the database and call it into a phonegap app. I am using phonegap and jqtouch for the app, and joomla with jomsocial for the update side.
I cannot have the app open into just a mobile version of the website because apple will reject it from the store. I need this solution to work for people to make updates to their profile, and these updates will automatically post to their app. All users input data on the same site, and share a database. Each profile however will have a different app that is released to the markets, so right now I am focusing on a template framework that can easily be changed to the users portion of the database.
From my understanding the php files stay on the server to process information. The big question is how do i call this information into a phonegap app?
To display XML as HTML you need to parse it through an XSLT stylesheet. This transforms your XML nodes into HTML. Of course, you could just use a PHP XML parser. I think there's one bundled with Joomla, but there are lots out there.
I was going to suggest using a Joomla plugin to push the data over to the Phonegap app. There are lots of events that are fired when an account is created and you could manipulate that.
If the XML is local, Jeepstone is correct. If it is not, how are you going to get it? To do this without running into cross domain issues, I suggest you try out this jQuery plugin on the phonegap side of things ... http://code.google.com/p/jquery-jsonp/ . So to take advantage of that nifty tool, you will adjust the public functions in this script to echo back json_encoded array. With which you can then do as you want on the phonegap side of things.
Ya Apple wants your app to not be useless without internet. But it is straightforward to create your index.html to show the user something. Use the failure and success functions in the jsonp library to show connection problems if necessary.