i have been working with visual studio for variety of projects for quite a while now, bu t i recently needed to develop a simple html5 webpage that will use some embedded or a seperate file of javascript, now i know there are asp.net projects which support stuff like that but i wanted to know is there a template or project type or something using which i can work purely with html and js only without having to deal with hell of asp.net configs and pages and all that? just simple html5 and js dev with intellisense and maybe a designer mode for css. i looked over internet and am unable to find an exact answer.
Regards.
If you're starting from scratch you can go to File > New > Web Site and choose ASP.NET Empty Web Site. This will give you a very basic site, which has nothing but a Web.config file. You can then add all of your html, js, and css from there. You can also delete the Web.config file, but it is useful as it allows you to continue to use the debugger on your site.
Alternatively you can just start the project in windows explorer, setup the basic files and site directories, then you can go back into Visual Studio, and go to File > Open > Website and then locate the directory your site is in. This will just open the files and allow you to work on them like any other project.
These are the only ways I've seen so far, you may also be able to find project templates online but I haven't looked.
Also, if you're using Visual Studio in this way, then I recommend installing Web Essentials it adds a lot of useful features.
Hope that helps.
Related
A web site project was given to me. There is many CSS and JS files, but I'm not sure that everything is useful.
Do you know if there is a tool able to analyze what and for what are used this type of files, or directly a tool which optimize this files in a web project?
Thank you.
Go to inspector
click audit tab.
click web page performance check box
Click Run Button
You can find what css files are not used
Github recently released their Atom editor open-source. Since it's all written in JavaScript, it should be relatively easy to embed. Unfortunately it doesn't look like it runs anywhere except in node and the custom version of Chromium they bundle with Atom releases.
Does anyone know how I would go about packaging Atom up for the browser? Has anyone already attempted this?
Atom.io is an editor that you download, and you can not embed it in a webpage. I think what you are looking for is something like Prose.io. You can sign in with Github and edit files in your repository. Unfortunately, Prose's interface is different than other editors. I am not sure how cleanly it will embed, but it looks like the best place to start. The project is open source, and it was designed to manage GitHub Pages (small static websites hosted on a GitHub repo). I am not sure how well it will integrate with what you are doing, but I hope that gives you a good starting point.
The problem with this is that the JavaScript environment in the browser and the one in nodejs differ. For example in a browser you can not access the local filesystem which it was nodejs can do and which atom.io makes use of. For embedding atom you'd mainly have to find all these differences and work around them (e.g. reading files from a socket).
See also:
https://github.com/atom/atom/issues/3451#issuecomment-54510710
https://atom.io/packages/web-view
What VS 2010 project template would you use for a plain HTML and JS project, no ASP or other code. Just plain vanilla HTML / JS. I am using an empty Web project ("ASP.net empty Web Application"), still giving me unnecessary files and directories. Is there anything better?
This question is not about extensions for JS, such as Visual Studio Javascript extensions feature comparison .
-- Update as of 15. August --
I have deleted the extra directories and references to the extend possible. The bin folder gets recreated whenever the application is build, but I can solve this on Solution level by switching of the build (Configuration properties). The webconfig is required for debugging - I cannot get rid of this one - so this is the best I get until now.
Damn - obj and bin directories are recreated when closing and re-opening VS2010 (preparing solution stage). So I have to live with some overhead of files / directories.
-- As of 18.August --
Guess there is no better way, delete as much as possible and live with the remaining "trash".
Visual Studio Web Development is orientated to ASP.NET projects creation, but you can build without any problem, HTML & JS applications *deleting the extra directories* created for ASP.NET apps, which need that.
Best regards.
Ángel Manuel.
Have you considered creating a web site in visual studio instead of using a web project? File -> New -> Web Site. It's still directed towards asp.net development but it might be more what you are looking for.
I'd just use a text editor/hilighter like Notepad++ :P
Does anyone know what is being used in this article (Building an HTML5 App with ASP.NET by Stephen Walther) to compress the javascript files?
About 1/2 way down in the blog entry, he says: "All of the custom JavaScript files are combined and minified automatically whenever the application is built with Visual Studio."
However, I've never heard of that being built into Visual Studio.
What is being used to do this?
Upon further investigation, it appears that his sample project included a custom project that uses the Microsoft.Ajax.Utilities.Minifier.
I am trying to write my own Javascript Framework something like jQuery.
I use Aptana Studio for designing websites. I was planning to create a web page and write the Javascript code just as we would do for a website. Then I noticed that Aptana Studio also has a Javascript Project. So I created a new Javascript Project. But it primarily allows you to create only .js files and no HTML files. I wonder what a standalone .js file would do? Would't I need an HTML file to execute and test my Javascript code?
Certainly there must be some advantage to using the Javascript Project. But I am not able to figure it out. Can someone please explain how to use the Javascript Project?
I don't know anything about Aptana Studio, but I'm guessing that you're intended to drive your JavaScript project from another project. Think of the JavaScript project like a self-contained library. It doesn't make sense to include the test code in the library itself, because consumers of the library probably don't want to deal with it. Try creating a second project that imports your JavaScript project and allows you to play with it and test it.
I would recommend that you try Javascript-Test Driver. It has an IDE support and also it seems to be fairly good at helping you debug code. Find more details here:
http://code.google.com/p/js-test-driver/
I would say that while you DO need HTML files; you'd probably wanna do more according to the testing framework you choose; as some work with fixtures other loads up iframe and stuff. But I would presume that writing a whole framework would take more than just HTML pages and a unit testing framework would be more apt for the req.
Screw Unit for JS
http://github.com/nkallen/screw-unit
I know I have deviated from your question; but I just felt that rather than right project structure and HTML for testing what would be more important is a testing framework that keeps development agile and fast.
But that's just me.