Code snippets editor for developers in a web application - javascript

I was asked to create a configuration web interface for a set of configurable C# code snippets. This interface will be used massively by our company's developers.
Our company codding standard is ASP.NET / C# and all developers' IDE is Visual Studio. I figured out the best way to keep their developing experience unchanged is to actually open the snippets in Visual Studio, however I am afraid this is not even technically possible.
I also thought of using some highlighting libraries, however it will solve only the coloring problem, but not the rest of what the usual C# IDE offers.
Any suggestions?

Related

Debugging JS in ASP.net Web form project with Visual Studio Code

What I want to do, and I don't even know if this is feasible/possible, is launch our old asp.net web solution in VSCode, simple for the purpose of debugging JS.
For years, I've used Visual Studio to develop and debug our web solution (.net asp webforms). However, I'm primarily a front-end developer (JavaScript) in particular. Recently I started using VSCode for personal projects and small web apps, and I really enjoy it.
99.9% of the time, I am writing JS/TS/CSS/HTML.
I don't even know if this is feasible. Any advice or suggestions would be great. Thank you.

How do I get Javascript onto visual studio?

My brother has been interested in learning Javascript and because Visual Studio has been a good program for me in C# I was wondering if it is possible to get Javascript onto Visual Studio. I have tried searching it up, but none of the results worked, is there a way? And if not, what are some good alternatives.
Yes you can do so by integrating javascript extension. There are project templates for js libraries (angular or react) in vs2019 for web applications when you start a new project.
https://learn.microsoft.com/en-us/visualstudio/javascript/javascript-in-vs-2019?view=vs-2019
But in all honesty, I think it is better to do js development in a ide like vs code, sublime or notepad++

Working with JavaScript in Visual Studio 2012

I am working on an old website that uses the Ext framework. It has a huge .js file at its core. I'm not a front-end web guy, I usually write the server and service side code, so I'm unfamiliar with getting heavy with JavaScript in Visual Studio.
In this file, there's this snippet:
...
// private
onDestroy : function(){
if(this.manager){
this.manager.unregister(this);
}
Ext.Window.superclass.onDestroy.call(this);
},
...
How do I find the 'manager' member there? I can't F12 to it and there's no combobox full of members at the top of the editor.
Is this just how it is with JavaScript? Is it because VS has poor support? Is it something to do with the way the project/files are setup?
Please don't mention alternative IDEs, or if you do, don't pass opinion on them that might get us in trouble with the SO police. Woop, woop.
Well, I gave it a while and no one piped up so, from what I've just seen on //build/ 2013, Visual Studio 2012 is pretty crap with JavaScript and its much improved in 2013, including the 'combobox full of members' at the top, CoffeeScript support and some other recent ECMAScript change support.

programming in javascript with Visual Studio (2010)?

Whether you are forced to code javascript in Visual Studio 2010, or insist on using Visual Studio 2010 instead of another IDE, I'm wondering what anyone has done to improve the javascript development experience in VS2010.
I'm asking since javascript support is lacking in Visual Studio 2010. You don't get the the kind of support you get as if you were developing Silverlight apps in C# and XAML. For example, the intellisense doesn't support javascript 1.8.5 (or even 1.6 functions i.e. JSON.Parse), it's difficult to navigate to function or object definitions (no Go To Definition), no Object Browser, Call Hierarchy, and the list can go on.
What have you done to compensate for the VS2010 features that don't exist for javascript? Also, what would be a good feature request to support javascript development; anything that VS2010 should add as an extension or a future release? Also, are there any suggestions to manage the .js code for large projects?
A few things that have helped me so far are the JScript Editor Extensions, and the Web Standards Update. Also, when working in .js files I rely on bookmarks to get back to key places, since the functions of the file aren't visible (as the would be in C#). My feature request would be to add intellisense support by javascript version, similar to how you can target .NET 2.0, 3.5, or 4.0.
There are a number of VS extensions to assist with javascript:
Visual Studio Javascript extensions feature comparison
JSEnhancements is awesome, and does what you really want: adds regions and code block collapsing.
Also see this extension: http://code.google.com/p/js-addin/
which parses your script into an object tree that can be used for navigation.
I have also used the free version of this editor: http://www.yaldex.com/JSFactory_Pro.htm
I can't recommend it, unfortunately, because it suffers from a couple critical problems (awkward UI, freaky intellisense, and not entirely stable). Which is too bad because it's a very thoughtfully designed piece of software by and large, it just fails where the rubber meets the road.
1) Install Resharper, helps a lot when building javascript heavy web apps.
2) Get FireBug for debugging.
3) Also, the JQuery.vsdocs files are sometimes helpful!
While I use vim and Notepad++ to cut code, I feel your pain, or did until I started using Firebug to debug JavaScript. While it many not be exactly fitting for your situation it's invaluable to me in developing Web based apps:
http://getfirebug.com/

JavaScript tools for Visual Studio 2005

I need to find if there are any tools targeting both Visual Studio 2005 and JavaScript. I'm interested in plugins which will increase the quality of work done in VS2005 with JavaScript oriented development.
I think you'll be hard pressed to find anything specific for VS2005, since it is a dev environment and JS is a client technology. However, a couple of ideas you might want to consider:
jQuery. The recent availability of Intellisense for jQuery (although I think it is only for VS2008) helps your quality of work in the sense that you don't have to spend so much time looking back and forth at documentation, although I would say that is the best way to really become familiar with it anyway. There are several other good JS libraries out there, but (a) I don't think that was the point of your question, and (b) jQuery is the only one "semi-officially" supported in VS that I'm aware of.
Script#. Although I haven't used it, it looks interesting... basically you program in C#, and it gets translated to JS at runtime.
If you could afford it, I'll recommend upgrading to Visual Studio 2008. You can open .NET 2.0 application without converting them. It comes with much better Javascript Intellisense.
(source: scottgu.com)
One of the other JavaScript features in VS 2008 is the much-improved support for JavaScript debugging.
These features are enabled in both the free Visual Web Developer 2008 Express edition as well as in Visual Studio, and makes using JavaScript and building AJAX applications significantly easier.
If you are using jQuery in your applications, then you could install jQuery Intellisense in VS 2008.
Well, if you want something that will help you write better Javascript in Visual Studio then you can give JSLint a try. It's a plugin that will verify your Javascript code, spot errors, and help you debug it.
Beware, JSLint can hurt feelings.

Categories