how to combine these angularjs, visual studio & nodejs - node.js

I am coming from MVC background and has recently started development using angularjs.
I am using Visual Studio for the WebApi development and using MVC from angularjs.
The basic template for hosting webapi i had picked from: here
But now i dont have any way for minification & bundling, which would in production drastically hamper the app load time. Is there any way to use minification & bundling with angularjs & webapi without using MVC.
While looking for solution i came across "Node.Js Tools for Visual Studio" which seems to came to my rescue. Now i am having separate projects for webapi and angularjs. i am using node.js for build & testing purposes. npm for installing packages in angular project & nuget for installing any dependencies for webapi project. Now, I can do all the development in visual studio.
But I am still not sure about few things:
how do i make connect between webapi & angularjs. i need to host both in different ports and do the CORS from angularjs.
if i make a change in webapi, will i have to host it again and then test it... is there no easy way out?
Btw, combining visual studio with node.js - is that a bad idea? should i keep the mvc with webapi and angularjs in same visual studio project and using mvc bundling-minification... so i am not worried about hosting & deployment.
Note: I am using NHibernate and have to connect with Oracle. is there any other option that i can try apart from webapi which can make the things easier.
Sorry for my lack of knowledge on how the things on overall level works.. how do these threads combine, and thanks for helping me out. I have done enough googling but was not able to find out a solution. if somebody can point me to some articles it would be great.

AngularJs is built perfectly for communicating with RESTful web apis. Look at the $http and $resource providers. If you are communicating cross domain, you will have to set up CORS in your web api application.
If your project is set up that your angular app is also served by your web api server, you can debug local, make and deploy changes together, etc.
Node.js is a great solution for non-mvc bundling, linting and minification, but nuget does the same thing as npm, and in most cases, it's more suitable for the visual studio experience.
If you're using node.js, you can pretty much wrap anything you like to communicate with oracle.

Related

ASP.Net Core with Angular: if endpoints are specified in typescript, how can such a web service run without NodeJS?

I'm trying to understand how .NET Angular with typescript fits together with NodeJS (solution created using Microsoft Visual Studio).
If the endpoints are defined in typescript, and if NodeJS is needed to run typescript, how can the solution run without NodeJS installed? As per threads like: https://groups.google.com/g/angular/c/UjgOvDu0ads NodeJS is not necessary at runtime...
e.g. IIS can host the webservice that has those endpoints using https://levelup.gitconnected.com/how-to-deploy-angular-app-to-an-iis-web-server-complete-setup-337997486423
also see
https://www.codeproject.com/Articles/831752/JavaScript-for-Windows-server-side

Flutter web state and server-side solutions with flutter

What is the current state of flutter for web in performance, specially on mobile?
And can flutter run Nodejs code?
I am fairly new to web development and was looking for a quick solution to compile my flutter apps to Web.
I am using Firebase too, so not sure if I need Nodejs right now, but its good to know if flutter supports server side programming so if I changed the backend later.
Thanks!

Using Vue Components with ASP MVC .NET, #HTML.Partial("Component.cshtml")?

Since I can't figure out how to set up Visual Studio to use Webpack, NPM, etc, so I can include Single File Components with Import, I was looking for a simple way to use my components without this technology.
Here is my solution...
http://sob-vuejs.blogspot.com/2017/11/a-little-trick-to-create-single-file.html
I have been programming using .NET since the beginning, and have created several very successful companies, so I'm not complaining, however, I have had my head in the sand and have not paid much attention to the Javascript world. So, if anyone can help me out with a simple step by step guide to set up Visual Studio, NPM, Webpack, Vue, and all the other things I would need I would be very appreciative.

JXcore vs Electron

question
I am wondering what the main differences are between Electron and JXcore.
background
I was thinking about how I could make a NodeJS server into an app and I came across both of these. They seem to do the same thing, except that JXcore supports mobile and Electron doesn't.
side question
If Electron doesn't support mobile then how was the slack mobile app created?
Thanks in advance!
From the JXCore site(http://jxcore.com/tech/):
JXcore is a fork on the open source Node.js project
It uses LLVM to compile javascript as opposed to V8 which NodeJS does.
In terms of what are the main differences- Electron is a framework for building native, cross platform desktop applications, where it appears JXCore is a javascript engine forked from NodeJS.
Electron is built with NodeJS, and Chromium. So to make it fair, the comparison would be better stated "How does Electron work with NodeJS vs JXcore". Since I don't have any experience with JXCore, I can't answer that question. I would venture to say the only way to know that is to fork electron and replace Node with JXCore.
Based on your background, I would assume you are thinking about making one application that works cross platform across mobile and desktop environments. To that, I would say it is possible, but you are going to have 2 different projects. There are things in Electron that you wouldn't want included in your mobile app, since they are working with completely different operating systems. You are right that electron does not support mobile (it wasn't built for that).
As far as your side question goes, there are any number of technologies that slack could have used to create their mobile app. They could have used Java , Swift, Objective-C, .NET, Ruby, or Javascript.
There are cross platform tools such as RubyMotion, NativeScript, React Native, and Xamarin that could also be used to create native mobile apps, that all compile down into the native language the mobile OS understands.
A final approach could be the use of tools such as Cordova/Phonegap which create mobile apps via a "web view". Essentially, this is like creating an app that launches a web browser to interact with your phone.
If you are looking for an example on how to build once and use everywhere, I would look at the github repo found here https://github.com/NathanWalker/angular-seed-advanced. This shows a common codebase that can be used in Electron, Web, and Mobile.

Unable to connect to IIS express, using DNX beta5

After I updated VS2015 yesterday and I cannot run my project (singla page app) anymore... Visual Studio says: Unable to connect to IIS express
I am using Solution DNX SDK version: 1.0.0-beta5
And my project.json is:
My references:
So everything should be ok ??
What am I doing wrong ?
BR
You have to understand that direct IIS hosting is no longer supported (and probably never will be again)! This is a decision by the ASP.Net team at Microsoft to completely concentrate on the kestrel server which is anyway required for Mac/Linux/Docker. By concentrating on one server the quality rises for everyone. Like Node, Kestrel recommends to use a reverse proxy in front of it. For that you can use your IIS/nginx/Apache.
I would urgently recommend you setup your project with RC1 and change to kestrel with HTTPPlatformHandler (in VS2015 Update 1 that works transparently with IIS Express for you). Beta5 is very outdated for many things.
It might be possible that your project could take a few hours before being able to run again.
First, you skipped beta6, beta7, beta8 and we are now at RC1.
Check which runtime you can use in Visual Studio and make sure you run with the latest one.
Once this is done, ensure that all your dependencies branded beta5 are renamed to the proper version that is in your Visual Studio. Some packages may have been removed, classes moved and many other things.
Check here for breaking changes:
Changes in beta6
Changes in beta7
Changes in beta8
Changes in rc1

Resources