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

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.

Related

Intellisense problems with node.js development with Visual Studio 2017

Usually we're in a microsoft stack development but for the project purposes we need to develop in node.js in visual studio 2017.
There are some things we don't understand at all but are quite annoying.
We've installed node.js tools for Visual Studio 2017 but intellisense work for some things and doesn't for others.
2 main problems we're facing:
For example, for some node modules (router, express, etc...) intellisense works fine. For others (mongorito, for examlple, but its not mongorito specific, there are many others also) we don't get any intellisense nor we can navigate through its definitions ('go to definition').
For any file we open we get alot of TSxxx error messages. something like this:
Don't know if its important but with the same setup we had our team members to work on angular 2/4 projects (that use node modules, of course) and everything worked fine.
So, if anyone has a piece of advice we would highly appreciate it. And please explain it like for a complete idiots.
PS.
Don't know if its important, but i must say that solution builds, all tests are good and all runs as it should. Its IDE problem.
So, for everyone having the problem i'll post the solution here.
Problem was in typescript version. Now, that comes with a few details.
In Visual studio pre 15.2 you can't have typescript versions switching. So, i first updated VS to 15.2.
After that, i've installed Typescript SDK with latest typescript (2.4.1. i think at the moment).
Then go to Tools > Options > TextEditor > Javascript/Typescript > Intellisense > Here choose typescript version from the drop down.
[I'll leave answer unaccepted for a bit for the case someone comes with a better solution]

Liferay IDE Alternatives

I am using Liferay Developer Studio for theme development and as a frontend developer, I am not impress with the tool's performance.
Below are few reasons I am looking for alternative IDE, compatible for Liferay development.
It occupies more than 75% of the memory
It slower down the whole system
I cannot use chat application while running IDE as to switch from one app to another takes irrelevant time
I use to build theme through CLI. Sometime I need to close the IDE or else it gives runtime error and doesn't build the theme.
I am sure there are many others too faced same issues, which actually makes the development slower. This question is not against the Liferay of course, it's a great enterprise level CMS tool. But yes looking for alternate IDE with best compatibility for the purpose.
Thanks in advance.
You can use Gulp and Yo to generate, build and deploy your theme or layout , and you can use Notepad ++ as editor.
Please refere to those links :
1 - LIFERAY theme generator
2 - Gulp Tasks
You can use any IDE you want. The only one difference between LiferayIDE and others IDEs is you can avoid using BladeCLI by hands.
And nothing can stop you to use another IDE, build you project with maven or gradle and then continue to develop.
If you are a front-end developer you really should use Gulp and Yo. First time you'll feel yourself confused a bit, but after short period of time you'll understand all benefits.

VS2015 Properly Targeting .Net Framework 4.6.1 with new Web Application Project or Class Library

I've created a new Web Application Project in VS2015 using the newer aspnet5 templates. However I can't seem to find a straight answer on how to specifically target the .NET 4.6.1 Framework with it. Looking at the pictures below can someone please shed some light on how to use the newer prject structures but target the .NET Framework 4.6.1 with them. According to microsoft this is possible but I can't make heads or tails on specifically how to do this.
The old and new ways are shown below.
The new way below shows use specific runtime...
With the following showing in the references
The old way seemed much more straight forward. Showing a specifically targeted framework.
The same problem exist for Class Library projects where it seems to want to target an SDK vs a particular version of the framework.
I believe you need to set your DNX_IIS_RUNTIME_FRAMEWORK environment variable to "DNX461". I found this question relevant.

how to combine these angularjs, visual studio & nodejs

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.

how to migrate visual studio C# app to monotouch

I have an existing application developed using Microsoft Visual Studio 2010 C#. I just purchased Xamarin's Monotouch product which allows me to use their IDE MonoDev to create iPhone/iPad applications from scratch by coding C#. Right now I don't want to code a new application. I want take my existing C# application import the source into monodev/monotouch and have the result run on the iPhone/iPad. My existing C# application is designed for deployment on Android phones/tablets using Xamarin's Android product. It works great! I have begun wading into the Xamarin documentation, samples, tutorials etc. But I need to port the existing application to iPhone/iPad right now, right away. I really don't have the luxery to spend time learning from scratch. I've got to belive someone has already gone down this migration path. If you have can we talk, email, or do you know if there is a guide describing the specific steps to take to accomplish this?
TIA
Xamarin MonoTouch does not allow you to run any C# application and run it immediately on an iPhone. The UI layer is native, so the C# code that constructs the UI must use the Xamarin bindings onto the Apple UI APIs.
The 'standard' migration process is to create an empty MonoDevelop project then start adding your existing C# business logic files, resolving any compilation issues as they arise.

Resources